body[data-theme="day"]{
    --app-bg:#f4f7fb;
    --app-surface:#ffffff;
    --app-surface-2:#eef4fb;
    --app-border:rgba(34,48,74,0.12);
    --app-text:#162033;
    --app-muted:#607089;
    --app-soft:#334155;
    --app-primary:#0877df;
    --app-primary-2:#18a6e8;
    --app-shadow:0 18px 42px rgba(35,49,78,0.10);
    background:
    radial-gradient(
        circle at top left,
        rgba(24,166,232,0.13),
        transparent 30%
    ),
    linear-gradient(
        180deg,
        #f8fbff 0%,
        #eef4fb 48%,
        #f6f8fc 100%
    );
    color:#162033;
}

body[data-theme="day"] .main-header,
body[data-theme="day"] .quiz-header{
    background:rgba(255,255,255,0.86);
    border-bottom:1px solid rgba(34,48,74,0.10);
    box-shadow:0 10px 32px rgba(34,48,74,0.07);
}

body[data-theme="day"] .logo{
    color:#0877df;
}

body[data-theme="day"] .nav-item,
body[data-theme="day"] #userGreeting{
    color:#526077;
}

body[data-theme="day"] .nav-item:hover{
    color:#0877df;
}

body[data-theme="day"] .mobile-menu{
    background:#ffffff;
    border-top:1px solid rgba(34,48,74,0.10);
    box-shadow:0 22px 40px rgba(34,48,74,0.12);
}

body[data-theme="day"] .mobile-menu a{
    color:#162033;
}

body[data-theme="day"] .mobile-menu a:hover{
    background:#edf4fb;
    color:#0877df;
}

body[data-theme="day"] .logout-btn,
body[data-theme="day"] .menu-toggle,
body[data-theme="day"] .site-theme-toggle,
body[data-theme="day"] .quiz-theme-toggle{
    background:#edf4fb;
    color:#162033;
    border-color:rgba(34,48,74,0.12);
}

.site-theme-toggle,
.quiz-theme-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:44px;
    padding:0 15px;
    border:none;
    border-radius:14px;
    background:rgba(255,255,255,0.08);
    color:white;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
    transition:0.25s ease;
}

.site-theme-toggle:hover,
.quiz-theme-toggle:hover{
    transform:translateY(-2px);
}

body[data-theme="day"] .hero,
body[data-theme="day"] .topic-hero,
body[data-theme="day"] .dashboard-section,
body[data-theme="day"] .exam-section,
body[data-theme="day"] .category-section,
body[data-theme="day"] .topic-section,
body[data-theme="day"] .section,
body[data-theme="day"] .features{
    background:transparent;
    color:#162033;
}

body[data-theme="day"] .hero,
body[data-theme="day"] .topic-hero{
    background:
    radial-gradient(
        circle at 86% 0%,
        rgba(24,166,232,0.16),
        transparent 32%
    ),
    linear-gradient(
        180deg,
        #f9fcff 0%,
        #eef5fc 100%
    );
    border-bottom:1px solid rgba(34,48,74,0.10);
}

body[data-theme="day"] .hero h1,
body[data-theme="day"] #pageTitle,
body[data-theme="day"] #heroTitle,
body[data-theme="day"] #title,
body[data-theme="day"] .dashboard-top h1,
body[data-theme="day"] .section-heading h2,
body[data-theme="day"] .section-title h2,
body[data-theme="day"] .topic-section-header h2{
    color:#162033;
}

body[data-theme="day"] .hero p,
body[data-theme="day"] .section-heading p,
body[data-theme="day"] .section-title p,
body[data-theme="day"] .topic-subtitle,
body[data-theme="day"] .dashboard-subtitle,
body[data-theme="day"] .side-text,
body[data-theme="day"] .goal-text{
    color:#607089;
}

body[data-theme="day"] .exam-card,
body[data-theme="day"] .subject-card,
body[data-theme="day"] .category-card,
body[data-theme="day"] .topic-card,
body[data-theme="day"] .quiz-card,
body[data-theme="day"] .difficulty-card,
body[data-theme="day"] .dashboard-card,
body[data-theme="day"] .analytics-box,
body[data-theme="day"] .recent-box,
body[data-theme="day"] .side-box,
body[data-theme="day"] .empty-box,
body[data-theme="day"] .card,
body[data-theme="day"] .auth-card,
body[data-theme="day"] .auth-box{
    background:
    linear-gradient(
        180deg,
        #ffffff,
        #f8fbff
    );
    color:#162033;
    border-color:rgba(34,48,74,0.12);
    box-shadow:0 18px 42px rgba(35,49,78,0.10);
}

body[data-theme="day"] .exam-card p,
body[data-theme="day"] .subject-card p,
body[data-theme="day"] .category-card p,
body[data-theme="day"] .topic-card p,
body[data-theme="day"] .quiz-description,
body[data-theme="day"] .dashboard-card h3,
body[data-theme="day"] .result-meta,
body[data-theme="day"] .palette-subtitle{
    color:#607089;
}

body[data-theme="day"] .exam-card h2,
body[data-theme="day"] .exam-card h3,
body[data-theme="day"] .subject-card h3,
body[data-theme="day"] .category-card h2,
body[data-theme="day"] .topic-card h3,
body[data-theme="day"] .quiz-title,
body[data-theme="day"] .difficulty-card h2,
body[data-theme="day"] .dashboard-card p,
body[data-theme="day"] .analytics-top h2,
body[data-theme="day"] .side-box h2,
body[data-theme="day"] .result-title{
    color:#162033;
}

body[data-theme="day"] .hero-tag,
body[data-theme="day"] .hero-badge,
body[data-theme="day"] .dashboard-tag,
body[data-theme="day"] .quiz-badge{
    color:#075fb5;
    background:#e8f4ff;
    border-color:rgba(8,119,223,0.18);
}

body[data-theme="day"] .card-icon,
body[data-theme="day"] .subject-icon,
body[data-theme="day"] .dashboard-icon,
body[data-theme="day"] .topic-icon{
    background:#e8f4ff;
    color:#0877df;
}

body[data-theme="day"] .card-icon i,
body[data-theme="day"] .subject-icon i,
body[data-theme="day"] .dashboard-icon i,
body[data-theme="day"] .topic-icon i{
    color:#0877df;
}

body[data-theme="day"] .exam-card:hover,
body[data-theme="day"] .subject-card:hover,
body[data-theme="day"] .category-card:hover,
body[data-theme="day"] .topic-card:hover,
body[data-theme="day"] .quiz-card:hover,
body[data-theme="day"] .difficulty-card:hover,
body[data-theme="day"] .dashboard-card:hover,
body[data-theme="day"] .result-item:hover{
    border-color:rgba(8,119,223,0.26);
    box-shadow:0 22px 52px rgba(35,49,78,0.14);
}

body[data-theme="day"] input,
body[data-theme="day"] select{
    background:#f5f8fc;
    color:#162033;
    border-color:rgba(34,48,74,0.14);
}

body[data-theme="day"] .footer{
    background:#ffffff;
    color:#162033;
    border-top:1px solid rgba(34,48,74,0.10);
}

body[data-theme="day"] .footer-section p,
body[data-theme="day"] .footer-section a,
body[data-theme="day"] .footer-bottom{
    color:#607089;
}

body[data-theme="day"] .quiz-layout{
    background:
    linear-gradient(
        180deg,
        #f8fbff,
        #eef4fb
    );
}

body[data-theme="day"] .option,
body[data-theme="day"] .palette-btn,
body[data-theme="day"] .modal-content,
body[data-theme="day"] .sectional-level{
    background:#ffffff;
    color:#162033;
    border-color:rgba(34,48,74,0.12);
}

body[data-theme="day"] .submit-modal-card{
    background:
    linear-gradient(
        180deg,
        #ffffff,
        #f4f8fd
    );
    border-color:rgba(34,48,74,0.12);
    box-shadow:0 28px 70px rgba(25,42,70,0.18);
}

body[data-theme="day"] .submit-modal-icon{
    background:#fff1f2;
    color:#d43f47;
    border-color:#ffd4d8;
}

body[data-theme="day"] .modal-content p{
    color:#62708a;
}

body[data-theme="day"] .modal-btn-cancel{
    background:#eef4fb;
    color:#21324d;
    border-color:rgba(34,48,74,0.12);
}

body[data-theme="day"] .modal-btn-cancel:hover{
    background:#e2edf8;
}

body[data-theme="day"] .sectional-level{
    background:#e8f4ff;
    color:#075fb5;
    border-color:rgba(8,119,223,0.18);
}

body[data-theme="day"] .sectional-level:hover{
    background:#0877df;
    color:#ffffff;
    border-color:#0877df;
}

body[data-theme="day"] .option-text,
body[data-theme="day"] #questionText,
body[data-theme="day"] .question-top h3,
body[data-theme="day"] .palette-card h2{
    color:#162033;
}

body[data-theme="day"] .progress-ring::before{
    background:#ffffff;
}

body[data-theme="day"] .result-item,
body[data-theme="day"] .dashboard-streak,
body[data-theme="day"] .back-link,
body[data-theme="day"] .secondary-btn{
    background:#f6f9fd;
    border-color:rgba(34,48,74,0.10);
    color:#334155;
}

body[data-theme="day"] .login-btn,
body[data-theme="day"] .dashboard-btn,
body[data-theme="day"] .primary-btn,
body[data-theme="day"] .start-btn,
body[data-theme="day"] .upload-btn{
    background:
    linear-gradient(
        135deg,
        #0877df,
        #18a6e8
    );
    color:#ffffff;
    box-shadow:0 12px 24px rgba(8,119,223,0.20);
}

@media(max-width:768px){
    .site-theme-toggle{
        min-width:44px;
        width:44px;
        padding:0;
    }

    .site-theme-toggle span{
        display:none;
    }
}

body[data-theme="day"] .option.selected {
    background: #e0f2fe;
    border-color: #0284c7;
}

/* Day mode: quiz language and timer */
body[data-theme="day"] .lang-btn,
body[data-theme="day"] .timer-label {
    color: #334155;
}

body[data-theme="day"] .lang-btn[aria-pressed="true"] {
    color: #075985;
    background: #e0f2fe;
    box-shadow: inset 0 0 0 1px #7dd3fc;
}

body[data-theme="day"] .timer-box {
    background: #eaf2fb;
    border: 1px solid #cbd5e1;
}

body[data-theme="day"] .timer-box.warning .timer-value {
    color: #92400e;
}

body[data-theme="day"] .timer-box.danger .timer-value {
    color: #b91c1c;
}

/* Day mode: question palette */
body[data-theme="day"] .palette-btn,
body[data-theme="day"] .legend.unanswered {
    background: #f1f5f9;
    border: 1px solid #94a3b8;
}

body[data-theme="day"] .palette-btn.current,
body[data-theme="day"] .legend.current {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

body[data-theme="day"] .palette-btn.answered,
body[data-theme="day"] .legend.answered {
    background: #047857;
    border-color: #047857;
    color: #fff;
}

body[data-theme="day"] .palette-btn.review,
body[data-theme="day"] .legend.review {
    background: #7e22ce;
    border-color: #7e22ce;
    color: #fff;
}

/* Keep the current question visible even after it is answered or marked */
body[data-theme="day"] .palette-btn.current {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
}
