/* ================================
   PROFESSIONAL RESET
================================ */
html{
    box-sizing:border-box;
    height:100%;
}
*, *::before, *::after{
    box-sizing:inherit;
}
body{
    margin:0;
    padding:0;
    min-height:100%;
    font-family:'Segoe UI',sans-serif;
    background:#f4f6f9;   /* Light Background */
    color:#000;           /* Black Text */
}

/* ================================
   APP WRAPPER
================================ */
.app-wrapper{
    min-height:100vh;
    padding:20px 16px 110px;
}

/* ================================
   HEADER
================================ */
.page-header{
    margin-bottom:22px;
}
.page-header h2{
    font-size:22px;
    font-weight:600;
    color:#000;
}

/* ================================
   CARD SYSTEM
================================ */
.card{
    background:#ffffff;   /* White Card */
    border-radius:16px;
    padding:22px;
    margin-bottom:18px;
    box-shadow:0 5px 18px rgba(0,0,0,0.08);
    transition:0.25s ease;
}

.card:hover{
    transform:translateY(-3px);
}

.card > *{
    margin-bottom:12px;
}
.card > *:last-child{
    margin-bottom:0;
}

/* ================================
   BIG POINTS
================================ */
.points-big{
    font-size:34px;
    font-weight:700;
    color:#000;
}

/* ================================
   REF CODE
================================ */
.ref-code{
    font-size:18px;
    font-weight:600;
    background:#f1f1f1;
    padding:12px;
    border-radius:12px;
    text-align:center;
}

/* ================================
   STATUS
================================ */
.status{
    padding:12px;
    border-radius:12px;
    font-weight:600;
    text-align:center;
}
.connected{
    background:#e6fff5;
    color:#00a86b;
    border:1px solid #00a86b;
}
.disconnected{
    background:#ffecec;
    color:#d63031;
    border:1px solid #d63031;
}

/* ================================
   BUTTON SYSTEM
================================ */
.btn{
    display:flex;
    justify-content:center;
    align-items:center;
    width:100%;
    padding:14px 16px;
    border:none;
    border-radius:25px;
    font-weight:600;
    font-size:14px;
    cursor:pointer;
    text-decoration:none;
    transition:all 0.25s ease;
}

.card .btn{
    margin-top:16px;
}

.btn + .btn{
    margin-top:12px;
}

.btn:hover{
    transform:translateY(-2px);
}

/* Button Variants */
.primary{
    background:#007bff;
    color:#fff;
}
.dark{
    background:#222;
    color:#fff;
}
.success-btn{
    background:#28a745;
    color:#fff;
}
.danger-btn{
    background:#dc3545;
    color:#fff;
}

/* ================================
   FORM SYSTEM
================================ */
input,select{
    width:100%;
    padding:14px;
    margin-bottom:14px;
    border-radius:10px;
    border:1px solid #ddd;
    font-size:14px;
    background:#fff;
    color:#000;
}
input:focus,select:focus{
    border-color:#007bff;
    outline:none;
}

/* ================================
   ALERTS
================================ */
.alert{
    padding:13px;
    border-radius:12px;
    margin-bottom:16px;
    font-weight:600;
    text-align:center;
}
.success{
    background:#e6fff5;
    color:#00a86b;
    border:1px solid #00a86b;
}
.error{
    background:#ffecec;
    color:#d63031;
    border:1px solid #d63031;
}

/* ================================
   BADGE
================================ */
.badge{
    display:inline-block;
    padding:6px 14px;
    border-radius:20px;
    font-size:12px;
    background:#f1f1f1;
    color:#000;
}

/* ================================
   REWARD
================================ */
.reward{
    font-weight:700;
    color:#000;
}

/* ================================
   CENTER SCREEN
================================ */
.center-screen{
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
    padding:20px;
}
.center-card{
    width:100%;
    max-width:420px;
}

/* ================================
   BOTTOM NAV
================================ */
.bottom-nav{
    position:fixed;
    bottom:0;
    left:0;
    width:100%;
    background:#ffffff;
    display:flex;
    justify-content:space-around;
    padding:12px 0;
    border-top:1px solid #ddd;
}
.bottom-nav a{
    color:#000;
    text-decoration:none;
    font-size:12px;
    display:flex;
    flex-direction:column;
    align-items:center;
    opacity:0.6;
    transition:0.25s;
}
.bottom-nav a.active{
    opacity:1;
    color:#007bff;
}
.bottom-nav a:hover{
    opacity:1;
}

/* ================================
   EMPTY STATE
================================ */
.empty{
    text-align:center;
    margin-top:40px;
    opacity:0.7;
}

/* ================================
   RESPONSIVE
================================ */
@media(max-width:480px){
    .points-big{
        font-size:26px;
    }
}
/* Smooth Fade */
.fade-in{
    animation:fadeIn 0.5s ease forwards;
}
@keyframes fadeIn{
    from{opacity:0; transform:translateY(10px);}
    to{opacity:1; transform:translateY(0);}
}

/* Green highlight for new task */
.new-task{
    border:2px solid #00ff88;
    box-shadow:0 0 20px rgba(0,255,136,0.6);
}

/* Counter animation */
.counter{
    transition:0.4s ease;
}
/* Timer Red Warning */
.timer-warning{
    color:#ff3b3b;
    font-weight:700;
}

/* Button Loading State */
.btn.loading{
    opacity:0.7;
    pointer-events:none;
    position:relative;
}

.btn.loading::after{
    content:"";
    width:16px;
    height:16px;
    border:2px solid #fff;
    border-top:2px solid transparent;
    border-radius:50%;
    position:absolute;
    right:15px;
    animation:spin 0.6s linear infinite;
}

@keyframes spin{
    to{ transform:rotate(360deg); }
}

.form-group{
    margin-bottom:15px;
}

.alert{
    padding:12px;
    border-radius:12px;
    margin-bottom:15px;
    font-weight:600;
    text-align:center;
}

.alert.success{
    background:#e6fffa;
    color:#00b894;
}

.alert.error{
    background:#ffe6e6;
    color:#ff3b3b;
}
.btn{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}

.btn-loader{
    width:16px;
    height:16px;
    border:2px solid #fff;
    border-top:2px solid transparent;
    border-radius:50%;
    animation:spin 0.6s linear infinite;
}

@keyframes spin{
    0%{ transform:rotate(0deg); }
    100%{ transform:rotate(360deg); }
}

.btn.loading{
    opacity:0.8;
    pointer-events:none;
}
.card.active{
    border:2px solid #00c853;
}

.card.complete{
    border:2px solid #666;
    opacity:0.7;
}

.progress-bar{
    width:100%;
    height:8px;
    background:#222;
    border-radius:10px;
    overflow:hidden;
    margin-top:8px;
}

.progress-fill{
    height:100%;
    background:linear-gradient(90deg,#00c853,#00e676);
    width:0%;
    transition:width 0.5s ease;
}

.card.complete .progress-fill{
    background:#777;
}

.action-buttons{
    display:flex;
    gap:8px;
    margin-top:12px;
}

.btn.small{
    padding:6px 12px;
    font-size:12px;
}