@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&family=Patrick+Hand&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

:root {
    --paw-color: #be2596;
    --shared-loading-bg: url('/static/images/study-lion-logo.png');
}

body {
    font-family: 'Sora', 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #080F5B;
    background-image: var(--shared-loading-bg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    background-attachment: fixed;
    overflow-x: hidden;
    width: 100%;
}

body.auth-voxel-bg {
    background-color: #080F5B;
    background-image: none;
    position: relative;
}

body.auth-voxel-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: var(--shared-loading-bg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    filter: blur(10px);
    transform: scale(1.03);
    z-index: -2;
}

body.auth-voxel-bg::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(8, 15, 91, 0.22);
    z-index: -1;
}

body.auth-voxel-bg .auth-voxel-background {
    display: none;
}

body.auth-voxel-bg .auth-voxel-background iframe {
    display: none;
}

.index-page body,
body.index-page {
    background-color: #ffffff;
    background-image: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background: #ffffff;
    color: #111111;
    padding: 0.10rem 0;
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e6e6ea;
    overflow: visible;
}


.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 0 2rem;
    position: relative;
    border: none;
    overflow: visible;
}

.navbar.dashboard-nav .container {
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 1.2rem;
    padding: 0 1.5rem;
}

.navbar.dashboard-nav .nav-links {
    flex: none;
    justify-content: center;
    justify-self: center;
}

.navbar.dashboard-nav .dashboard-nav-actions {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 0.7rem;
}

.navbar.dashboard-nav .dashboard-nav-actions .nav-upgrade-btn {
    display: inline-flex;
    align-items: center;
}

.navbar.dashboard-nav .dashboard-nav-actions .profile-dropdown-container,
.navbar.dashboard-nav .dashboard-nav-actions .notification-nav,
.navbar.dashboard-nav .dashboard-nav-actions .golden-paws-nav {
    margin: 0;
}

@media (min-width: 1201px) {
    .navbar.dashboard-nav .container.nav-centered-layout,
    .navbar.dashboard-nav .container {
        max-width: 100%;
        margin: 0 auto;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        column-gap: 1.2rem;
        padding: 0 1.5rem;
    }

    .navbar.dashboard-nav .container.nav-centered-layout .nav-links,
    .navbar.dashboard-nav .nav-links {
        flex: none;
        justify-content: center;
        justify-self: center;
    }

    .navbar.dashboard-nav .nav-links > .golden-paws-nav,
    .navbar.dashboard-nav .nav-links > .notification-nav,
    .navbar.dashboard-nav .nav-links > .profile-dropdown-container,
    .navbar.dashboard-nav .nav-links > li:has(> a.upgrade-btn) {
        display: none !important;
    }

    .navbar.dashboard-nav .container.nav-centered-layout .dashboard-nav-actions,
    .navbar.dashboard-nav .dashboard-nav-actions {
        display: flex;
        align-items: center;
        justify-self: end;
        gap: 0.7rem;
    }

    .navbar.dashboard-nav .dashboard-nav-actions > li,
    .navbar.dashboard-nav .dashboard-nav-actions .profile-dropdown-container,
    .navbar.dashboard-nav .dashboard-nav-actions .notification-nav,
    .navbar.dashboard-nav .dashboard-nav-actions .golden-paws-nav {
        margin: 0;
        list-style: none;
    }

    .navbar.dashboard-nav .dashboard-nav-actions a.upgrade-btn {
        display: inline-flex;
        align-items: center;
    }
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    z-index: 1002;
    border: none;
    outline: none;
}

.header-menuai-icon {
    width: 90px;
    height: 90px;
    object-fit: contain;
    display: block;
    flex: 0 0 auto;
}

.logo {
    width: 117px;
    height: 45px;
    display: block;
    border: none;
    object-fit: contain;
}

.nav-icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-icon-svg svg {
    width: 1em;
    height: 1em;
    display: block;
}

.navbar.dashboard-nav .nav-links a .nav-icon,
.navbar.dashboard-nav .nav-links a .nav-icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    font-size: 1.7rem;
    color: #475569;
    opacity: 0.96;
    vertical-align: middle;
}

.navbar.dashboard-nav .nav-links a .nav-icon-svg svg {
    width: 1.8rem;
    height: 1.8rem;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    border: none;
    margin: 0;
    color: #063970;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.3rem;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    position: static;
    visibility: visible;
    opacity: 1;
}

.nav-links a {
    color: #111111;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    padding: 0.4rem 0.95rem;
    border-radius: 14px;
    font-size: 0.84rem;
    white-space: nowrap;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    line-height: 1.1;
    min-width: 96px;
}

.nav-links a:hover, .nav-links a.active {
    background: transparent;
    color: #1d8fe6;
}

.navbar.dashboard-nav .nav-links a:hover .nav-icon,
.navbar.dashboard-nav .nav-links a:hover .nav-icon-svg,
.navbar.dashboard-nav .nav-links a.active .nav-icon,
.navbar.dashboard-nav .nav-links a.active .nav-icon-svg {
    color: #1d8fe6;
}

/* Login button in main page navigation */
.nav-links a.nav-login-btn {
    background: #f4f4f6;
    color: #111111;
    border: 1px solid #e6e6ea;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    border-radius: 8px;
}

.nav-links a.nav-login-btn:hover {
    background: #ededf1;
    border-color: #d8d8de;
}

/* Logout link styling */
.nav-links a.logout-link {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    margin-left: 1rem;
}

.nav-links a.logout-link:hover {
    background: rgba(255,255,255,0.2);
    border-color: white;
}

/* Upgrade button */
.upgrade-btn {
    position: relative;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: #fff !important;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none !important;
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.35);
}

.upgrade-btn:hover {
    background: linear-gradient(135deg, #b76cff 0%, #8a4bff 100%);
    color: #fff !important;
}

.nav-links a.upgrade-btn:hover,
.nav-links a.upgrade-btn.active {
    background: linear-gradient(135deg, #b76cff 0%, #8a4bff 100%);
    color: #fff !important;
}

.upgrade-badge {
    background: #ffd24d;
    color: #5a2c00;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.upgrade-btn.pro-status {
    background: linear-gradient(135deg, #f7d26a 0%, #d59b2d 100%);
    color: #3b2500 !important;
    box-shadow: 0 8px 18px rgba(213, 155, 45, 0.35);
}

/* Floating menu (dashboard) */
.floating-menu {
    position: fixed;
    left: 0;
    top: 68px;
    bottom: 0;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
    width: 78px;
    padding: 18px 8px 22px;
    background: rgba(17, 24, 39, 0.12);
    border-right: 0;
    border-top: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 900;
    overflow: visible;
    isolation: isolate;
}

.floating-menu::before,
.floating-menu::after {
    content: none;
}

.floating-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 0.42rem;
    width: 100%;
    padding: 0.15rem 0;
    text-decoration: none;
    color: #64748b;
    font-weight: 700;
    font-size: 0.72rem;
    transition: transform 0.18s ease, color 0.18s ease;
    z-index: 1;
}

.floating-menu-item:hover {
    transform: translateX(1px);
    color: #0f172a;
}

.floating-menu-item::after {
    content: none;
}

.floating-menu-item:hover::after {
    opacity: 0;
    transform: none;
}

.floating-icon {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.32rem;
    color: inherit;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.floating-menu-item:hover .floating-icon {
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.floating-icon svg {
    width: 26px;
    height: 26px;
    display: block;
}

.floating-icon img {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
}

.floating-menu-item[href="/teacher-chat"] .floating-icon i {
    font-size: 1.15rem;
    color: #6d28d9;
}

.floating-menu-item[href="/little-lion-shop"] .floating-icon {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    border-color: #c7ddff;
}

.floating-menu-item[href="/orders"] .floating-icon {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
    color: #0f766e;
    border-color: #a5f3fc;
}

.floating-menu-item[href="/teacher-chat"] .floating-icon {
    background: linear-gradient(135deg, #fee2e2 0%, #fca5a5 100%);
    color: #ffffff;
    border-color: #fda4af;
}

.floating-menu-item[href="/activity"] .floating-icon,
.floating-menu-item[href="/learning-library"] .floating-icon {
    background: linear-gradient(135deg, #ccfbf1 0%, #67e8f9 100%);
    color: #ffffff;
    border-color: #99f6e4;
}

.floating-menu-item[href="/holidays"] .floating-icon {
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
    color: #ffffff;
    border-color: #fcd34d;
}

.floating-menu-item .fa-book,
.floating-menu-item .fa-book-open,
.floating-menu-item .fa-book-open-reader,
.navbar.dashboard-nav .nav-links .fa-book,
.navbar.dashboard-nav .nav-links .fa-book-open,
.navbar.dashboard-nav .nav-links .fa-book-open-reader {
    transform: none !important;
    rotate: 0deg !important;
    scale: 1 !important;
}

.floating-label {
    display: block;
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border: 0;
    text-align: center;
    max-width: 58px;
    font-size: 0.56rem;
    line-height: 1.1;
    font-weight: 800;
    color: #d1d5db;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (min-width: 1201px) {
    .navbar.dashboard-nav .container {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 28px;
        margin: 0;
    }

    .dashboard-page .dashboard .container {
        max-width: 1280px;
        padding-left: 128px;
        padding-right: 28px;
        margin: 0 auto;
    }

    .dashboard-page .dashboard {
        padding-top: 92px;
    }

    .welcome-card {
        padding-top: 2.15rem;
    }
}

.dashboard-teacher-fab {
    position: fixed;
    right: 24px;
    bottom: 0;
    min-width: 280px;
    height: 58px;
    padding: 0 14px 0 18px;
    border-radius: 14px 14px 0 0;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1100;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-teacher-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.24);
}

.dashboard-teacher-fab::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.04) 55%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.dashboard-teacher-fab-text {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: #0f2d6b;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.dashboard-teacher-fab-avatar {
    position: relative;
    z-index: 1;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: linear-gradient(180deg, #d8ecff 0%, #ffffff 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.18);
    overflow: hidden;
}

.dashboard-teacher-fab img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    body:not(.public-page) {
        padding-bottom: 120px;
    }

    .dashboard-teacher-fab {
        display: none;
    }

    .floating-menu {
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        transform: none;
        width: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        gap: 2px;
        padding: 2px 8px calc(1px + env(safe-area-inset-bottom));
        border-radius: 0;
        border: 1px solid rgba(229, 235, 245, 0.55);
        border-bottom: 0;
        background: rgba(255, 255, 255, 0.58);
        box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.08);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        z-index: 1200;
        display: flex;
    }

    .floating-menu::before,
    .floating-menu::after {
        display: none;
    }

    .floating-menu-item {
        flex: 1;
        min-width: 0;
        gap: 2px;
        padding: 0 2px;
        font-size: 0.7rem;
        font-weight: 700;
        color: #6b7280;
        text-align: center;
    }

    .floating-menu-item::after {
        content: none;
    }

    .floating-icon {
        width: 50px;
        height: 50px;
        min-width: 50px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.34) 100%);
        border: 1px solid rgba(255, 255, 255, 0.52);
        border-radius: 16px;
        font-size: 1.5rem;
        color: #5b6472;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.55),
            0 10px 24px rgba(15, 23, 42, 0.12);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .floating-icon svg {
        width: 26px;
        height: 26px;
        color: #5b6472;
    }

    .floating-icon img {
        width: 26px;
        height: 26px;
    }

    .floating-menu-item[href="/learning-library"] .floating-icon {
        background: #eef6ff;
        border: 1px solid #cfe0ff;
        color: #2563eb;
    }

    .floating-menu-item[href="/learning-library"] {
        display: flex;
    }

    .floating-menu-item[href="/learning-library"] .floating-label {
        display: block;
        color: #6b7280;
    }

    .floating-menu-item[href="/learning-library"] .floating-icon .nav-icon-svg {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
    }

    .floating-menu-item[href="/learning-library"] .floating-icon svg {
        width: 24px;
        height: 24px;
        color: #2563eb;
        display: block;
    }

 .floating-label {
    display: none;
}

    .floating-menu-item:nth-child(3) {
        transform: translateY(-18px);
        color: #2f4fc2;
        font-weight: 700;
    }

    .floating-menu-item:nth-child(3) .floating-icon {
        width: 54px;
        height: 54px;
        border-radius: 999px;
        background: linear-gradient(180deg, #2756d8 0%, #1f46b8 100%);
        border: 0;
        box-shadow: 0 8px 18px rgba(31, 70, 184, 0.22);
        color: #ffffff;
        font-size: 1.55rem;
    }

    .floating-menu-item:nth-child(3) .floating-icon svg {
        width: 24px;
        height: 24px;
        color: #ffffff;
    }

    .floating-menu-item:nth-child(3) .floating-icon img {
        width: 24px;
        height: 24px;
        border-radius: 0;
        object-fit: cover;
        display: block;
    }

    .floating-menu-item:nth-child(3) .floating-label {
        color: #3d5cc9;
        font-weight: 700;
    }

}


/* Global dark header theme override */
/* Global dark header theme override */

/* Content frame border (below header) */
:is(.dashboard, .content-section, .hero, .features, .pricing-section, .testimonials, .cta, footer) {
    border-radius: 36px;
    margin: 0 12px 12px 12px;
    box-sizing: border-box;
}

.index-page :is(.dashboard, .content-section, .hero, .features, .pricing-section, .testimonials, .cta, footer) {
    margin: 0;
    border-radius: 0;
}

/* Hide notification + profile only when the mobile menu is open */
.nav-links.active .notification-nav,
.nav-links.active .profile-dropdown-container {
    display: none !important;
}

/* Golden Paws Counter in Nav */
.golden-paws-nav {
    display: flex;
    align-items: center;
}

.mobile-header-paws,
.mobile-upgrade-band {
    display: none;
}

.paws-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fde8f4;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    color: var(--paw-color);
    font-weight: 600;
    border: 2px solid rgba(190, 37, 150, 0.35);
}

.paws-counter-compact {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #f97316;
    gap: 0;
}

.paws-counter-compact.metrics-ready > .paw-icon-mini,
.paws-counter-compact.metrics-ready > #navPawsCount,
.mobile-header-paws.metrics-ready > .paw-icon-mini,
.mobile-header-paws.metrics-ready > #mobileHeaderPawsCount {
    display: none;
}

.top-stats-strip {
    display: inline-flex;
    align-items: center;
    gap: 1.35rem;
}

.top-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1;
}

.top-stat-item i {
    font-size: 1.3rem;
}

.top-stat-paw-coin {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.95) 0 16%, rgba(255, 255, 255, 0.12) 17%, transparent 34%),
        linear-gradient(180deg, #ffe78a 0%, #ffc83d 48%, #f29f05 100%);
    box-shadow:
        inset 0 0 0 2px rgba(255, 244, 181, 0.95),
        inset 0 -2px 5px rgba(181, 111, 0, 0.24),
        0 3px 8px rgba(242, 159, 5, 0.28);
}

.top-stat-paw-icon {
    width: 16px;
    height: 16px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 1px 1px rgba(122, 74, 0, 0.22));
}

.top-stat-lxp {
    color: #ff7a1b;
}

.top-stat-paws {
    color: #f59e0b;
}

.top-stat-level {
    color: #3d8cff;
}

.top-stat-item span {
    color: #23344e;
    min-width: 1ch;
}

.paw-icon-mini {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff0f7;
    border: 1px solid #f59ec7;
    border-radius: 50%;
}

.paw-icon-mini img {
    width: 14px;
    height: 14px;
    display: block;
}

.paws-counter-compact #navPawsCount {
    color: #0f2f5a;
    font-weight: 700;
    min-width: 20px;
    font-size: 1.1rem;
}

.paw-icon-nav {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

#navPawsCount {
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
    color: var(--paw-color);
}

/* Notification Button */
.notification-nav {
    display: flex;
    align-items: center;
    position: relative;
}

.notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f4f4f6;
    border: none;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.notification-btn i {
    font-size: 1.2rem;
    line-height: 1;
}

.notification-btn:hover {
    background: rgba(255,255,255,0.25);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ff4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    width: 380px;
    max-height: 500px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1003;
    overflow: hidden;
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.notification-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f5f7fa;
    transition: background 0.2s;
    cursor: pointer;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item.unread {
    background: #f0f4ff;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #667eea;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #e3f2fd;
    color: #2196f3;
}

.notification-icon.login-icon {
    background: #e8f5e9;
    color: #4caf50;
}

.notification-content {
    flex: 1;
}

.notification-text {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
}

.notification-time {
    font-size: 0.85rem;
    color: #999;
}

.notification-empty {
    padding: 3rem 2rem;
    text-align: center;
}

.empty-icon {
    margin-bottom: 1rem;
}

.notification-empty h4 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: #333;
}

.notification-empty p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

/* Profile Dropdown */
.profile-dropdown-container {
    position: relative;
    z-index: 1002;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.profile-btn:hover {
    background: rgba(255,255,255,0.25);
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.3rem;
    color: white;
    border: 2px solid white;
    position: relative;
}

.profile-avatar img,
.profile-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.plan-badge {
    position: absolute;
    bottom: -6px;
    right: -10px;
    background: #7c3aed;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.35rem;
    border-radius: 999px;
    border: 2px solid #fff;
}

.plan-badge.pro {
    background: #be2596;
}

.profile-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-arrow {
    transition: transform 0.3s;
}

.profile-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1003;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.profile-info h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.profile-info p {
    font-size: 0.85rem;
    color: #666;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0 1rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: #f9fafb;
}

.dropdown-item.active {
    background: #eff6ff;
    color: #667eea;
    font-weight: 600;
}

.dropdown-item.setting {
    color: #1e3a8a;  /* Navy blue */
}

.dropdown-item.setting:hover {
    background: #dbeafe;  /* Light blue hover */
    color: #1e40af;  /* Darker navy on hover */
}

.dropdown-item.setting.active {
    background: #dbeafe;  /* Light blue background */
    color: #1e3a8a;  /* Navy blue text */
    font-weight: 600;
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: #fef2f2;
}

.dropdown-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.dropdown-item.avatar-picker-action {
    width: calc(100% - 2rem);
    margin: 0.5rem 1rem;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.avatar-picker-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.avatar-picker-modal.show {
    display: flex;
}

.avatar-picker-dialog {
    width: min(560px, 96vw);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.avatar-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.avatar-picker-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1f2937;
}

.avatar-picker-close {
    border: none;
    background: transparent;
    font-size: 1.15rem;
    color: #6b7280;
    cursor: pointer;
}

.avatar-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 0.85rem;
    padding: 1.1rem 1.25rem;
}

.avatar-option {
    border: 2px solid #dbe4f0;
    background: #f8fafc;
    border-radius: 999px;
    width: 72px;
    height: 72px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-option.selected {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.avatar-upload-option {
    border-style: dashed;
    border-radius: 16px;
    flex-direction: column;
    gap: 0.2rem;
    background: #f8fbff;
    color: #1f3f7f;
}

.avatar-upload-option .upload-plus {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.avatar-upload-option .upload-text {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.avatar-picker-note {
    margin: 0;
    padding: 0 1.25rem 0.8rem;
    color: #475569;
    font-size: 0.84rem;
}

.avatar-picker-note.error {
    color: #b91c1c;
}

.avatar-picker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.95rem 1.25rem 1.2rem;
    border-top: 1px solid #e5e7eb;
}

.avatar-picker-btn {
    border: none;
    border-radius: 10px;
    padding: 0.6rem 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.avatar-picker-btn.cancel {
    background: #e5e7eb;
    color: #334155;
}

.avatar-picker-btn.remove {
    margin-right: auto;
    background: #fee2e2;
    color: #991b1b;
}

.avatar-picker-btn.remove:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.avatar-picker-btn.save {
    background: #2563eb;
    color: #fff;
}

.cookie-consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-consent-overlay.hide {
    opacity: 0;
    transition: opacity 0.18s ease;
}

.cookie-consent-modal {
    width: min(480px, 96vw);
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    padding: 1.4rem 1.25rem;
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
    font-family: Arial, sans-serif;
}

.cookie-consent-modal h3 {
    margin: 0 0 1rem;
    font-size: 2rem;
    color: #4b5563;
}

.cookie-consent-modal p {
    margin: 0 0 1rem;
    line-height: 1.55;
    color: #374151;
    font-size: 1.02rem;
}

.cookie-consent-btn {
    width: 100%;
    border-radius: 3px;
    border: 1px solid #2563eb;
    padding: 0.85rem 1rem;
    font-size: 1.06rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.75rem;
}

.cookie-consent-btn.primary {
    background: #2563eb;
    color: #fff;
}

.cookie-consent-btn.secondary {
    background: #fff;
    color: #2563eb;
}

.cookie-consent-btn.small {
    width: auto;
    min-width: 180px;
    margin-top: 0.9rem;
}

.cookie-settings-panel {
    display: none;
    margin-top: 0.8rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.7rem;
}

.cookie-settings-panel.show {
    display: block;
}

.cookie-setting-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.55rem 0;
    font-size: 0.95rem;
    color: #1f2937;
}

.cookie-setting-item.locked {
    opacity: 0.75;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none !important;  /* Force hide on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    z-index: 1002;
    position: relative;
    width: 44px;
    height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    outline: none;
    box-shadow: none;
}

.menu-toggle:focus {
    outline: none;
    box-shadow: none;
}

.menu-toggle:focus-visible {
    outline: 2px solid rgba(255,255,255,0.5);
    outline-offset: 2px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #111111;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
    pointer-events: none;
    border: none;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 24, 37, 0.26);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-large {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-unlock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.3rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c6cf7 0%, #ff8a3d 100%);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(124, 108, 247, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-unlock:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(124, 108, 247, 0.35);
}

.unlock-sparkle {
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary .btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: btnSpin 0.8s linear infinite;
}

.btn-primary.is-loading .btn-text {
    opacity: 0.85;
}

.btn-primary.is-loading .btn-spinner {
    display: inline-block;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-full {
    width: 100%;
}

/* Modern Hero Section - White Background with Image on Right */
.hero-modern {
    background: white;
    padding: 5rem 0 3rem 0;
    position: relative;
    overflow: hidden;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content-left {
    padding-right: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #0033a0;
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
    animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.hero-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.btn-hero {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn-hero-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8555 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.5);
}

.btn-hero-secondary {
    background: white;
    color: #0033a0;
    border: 2px solid #0033a0;
    box-shadow: 0 4px 15px rgba(0, 51, 160, 0.1);
}

.btn-hero-secondary:hover {
    background: #0033a0;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 51, 160, 0.3);
}

.hero-features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
    color: #555;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
}

.hero-image-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    animation: fadeInRight 1s ease-out 0.3s backwards;
}

.hero-image-modern {
    width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 51, 160, 0.15);
    position: relative;
    z-index: 2;
    transition: transform 0.3s;
}

.hero-image-modern:hover {
    transform: scale(1.02);
}

.hero-image-decoration {
    position: absolute;
    border-radius: 24px;
    z-index: 1;
}

.decoration-1 {
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.1;
}

.decoration-2 {
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8555 100%);
    opacity: 0.1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero Info Section */
.hero-info {
    background: #f8f9fa;
    padding: 3rem 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.03);
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem 1rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 1.8rem;
    color: #0033a0;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat-card p {
    font-size: 0.95rem;
    color: #666;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-modern {
        padding: 4rem 0 2rem 0;
    }
    
    .hero-modern::before {
        width: 100%;
        height: 50%;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-content-left {
        padding-right: 0;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-features-list {
        align-items: center;
    }
    
    .hero-image-container {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .hero-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-modern {
        padding: 3rem 0 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn-hero {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-hero {
        width: 100%;
        text-align: center;
    }
    
    .hero-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
}

/* Old Hero Banner CSS - Keep for compatibility */
.hero-banner {
    position: relative;
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
}

.hero-banner-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.hero-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 51, 153, 0.7) 0%, rgba(0, 51, 153, 0.3) 50%, transparent 100%);
    display: flex;
    align-items: center;
}

.hero-banner-content {
    max-width: 600px;
    padding: 2rem;
    animation: slideInLeft 1s ease-out;
}

.hero-banner-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.hero-banner-subtitle {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 2rem;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    line-height: 1.4;
}

.hero-banner-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-banner {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn-banner-primary {
    background: #ff6b35;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-banner-primary:hover {
    background: #ff5520;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.btn-banner-secondary {
    background: white;
    color: #0033a0;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.btn-banner-secondary:hover {
    background: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.5);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero Info Section */
.hero-info {
    background: white;
    padding: 3rem 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat-card p {
    font-size: 0.95rem;
    color: #666;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-banner-container {
        height: 500px;
    }
    
    .hero-banner-title {
        font-size: 2.5rem;
    }
    
    .hero-banner-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-banner-container {
        height: 400px;
    }
    
    .hero-banner-overlay {
        background: linear-gradient(to bottom, rgba(0, 51, 153, 0.8) 0%, rgba(0, 51, 153, 0.6) 100%);
    }
    
    .hero-banner-content {
        padding: 1.5rem;
    }
    
    .hero-banner-title {
        font-size: 2rem;
    }
    
    .hero-banner-subtitle {
        font-size: 1rem;
    }
    
    .btn-banner {
        padding: 0.8rem 1.8rem;
        font-size: 1rem;
    }
    
    .hero-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
}

/* Old Hero Section - Keep for compatibility */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.stat p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-image {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInScale 1.2s ease-out;
}

.hero-main-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: floatImage 6s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.hero-main-image:hover {
    transform: scale(1.05);
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes floatImage {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Hero image is now handled inline in index.html */

/* Features Section */
.features, .products, .testimonials {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

.feature-card p {
    color: #666;
}

/* Products */
.products {
    background: #ebf3f9;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    position: relative;
}

.product-card.featured {
    border: 3px solid #667eea;
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.product-card h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

.product-card ul {
    list-style: none;
    margin: 1.5rem 0;
}

.product-card li {
    padding: 0.5rem 0;
    color: #666;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stars {
    color: #ffc107;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-card p {
    font-style: italic;
    color: #666;
    margin-bottom: 1.5rem;
}

.testimonial-author strong {
    color: #333;
    display: block;
}

.testimonial-author span {
    color: #999;
    font-size: 0.9rem;
}

/* CTA Section */
.cta {
    background: transparent;
    color: #1f2937;
    text-align: center;
    padding: 1.5rem 0 2.6rem;
}

.cta h2 {
    font-size: 2.45rem;
    margin-bottom: 1.12rem;
    line-height: 1.15;
}

.cta p {
    font-size: 1.18rem;
    margin: 0 auto 1.7rem;
    max-width: 700px;
    color: #4b5563;
    line-height: 1.5;
}

.index-page .cta .container {
    max-width: 1200px;
}

.index-page .cta .cta-panel {
    background: linear-gradient(90deg, #dff2fd 0%, #f9e9f6 100%);
    border-radius: 24px;
    max-width: 950px;
    margin: 0 auto;
    padding: 4.25rem 1.9rem;
}

.index-page .cta .btn-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 275px;
    border-radius: 999px;
    font-size: 0.98rem;
    font-weight: 700;
    padding: 0.9rem 1.8rem;
    text-decoration: none;
    background: linear-gradient(90deg, #f050a4 0%, #14a9e8 100%);
    color: #fff;
    box-shadow: none;
}

@media (max-width: 900px) {
    .cta h2 {
        font-size: 1.45rem;
    }

    .cta p {
        font-size: 0.9rem;
    }

    .index-page .cta .cta-panel {
        border-radius: 16px;
        padding: 2rem 1rem;
    }

    .index-page .cta .btn-large {
        min-width: 190px;
        font-size: 0.74rem;
        padding: 0.62rem 1.2rem;
    }
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #999;
}

/* Auth Pages */
.auth-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.auth-card h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.auth-card > p {
    color: #666;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.worksheet-topic-select-shell {
    width: 100%;
}

.worksheet-topic-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.worksheet-topic-select {
    background: #ffffff;
    border: 1px solid #d5dce8;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.worksheet-topic-select.is-disabled {
    opacity: 0.65;
    pointer-events: none;
}

.worksheet-topic-search {
    padding: 0.55rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.worksheet-topic-search input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 2px solid #9aa9bc;
    border-radius: 9px;
    font-size: 1rem;
    color: #334155;
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
}

.worksheet-topic-search input:focus {
    outline: none;
    border-color: #2f66e8;
    box-shadow: 0 0 0 3px rgba(47, 102, 232, 0.14);
}

.worksheet-topic-options {
    max-height: 270px;
    overflow-y: auto;
    padding: 0.35rem 0;
}

.worksheet-topic-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    color: #1e293b;
    font-size: 0.98rem;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.worksheet-topic-option:hover {
    background: #eef2f7;
}

.worksheet-topic-option.is-selected {
    background: #dbeafe;
}

.worksheet-topic-option input {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: #1f7aec;
    flex: 0 0 auto;
}

.worksheet-topic-option-label {
    flex: 1;
    line-height: 1.3;
}

.worksheet-topic-empty {
    padding: 0.8rem 0.9rem;
    color: #64748b;
    font-size: 0.95rem;
}

.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #999;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider span {
    padding: 0 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.9rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    margin-bottom: 1rem;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #d0d0d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-google svg {
    flex-shrink: 0;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-benefits {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 15px;
}

.auth-benefits h3 {
    margin-bottom: 1.5rem;
}

.auth-benefits ul {
    list-style: none;
}

.auth-benefits li {
    padding: 0.75rem 0;
    font-size: 1.05rem;
}

/* Dashboard */
.dashboard {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.dashboard-page.auth-voxel-bg {
    min-height: 100vh;
    position: relative;
}

.dashboard-page .navbar.dashboard-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
}

.dashboard-page .dashboard {
    min-height: calc(100vh - 76px);
    padding-top: 76px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1.5rem 1.75rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #0b73b8 0%, #0a5fa6 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(11, 115, 184, 0.25);
}

.welcome-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.2rem;
    align-items: stretch;
    margin-bottom: 2rem;
    position: relative;
}


.welcome-row > * {
    position: relative;
    z-index: 1;
}

.welcome-main-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.welcome-row .dashboard-header {
    margin-bottom: 0;
    height: 180px;
}

.welcome-activity-card {
    margin-bottom: 0;
}

.activity-progress-combo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.education-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.education-progress-header h3 {
    margin: 0;
    font-size: 1.35rem;
    color: #1d2942;
    font-weight: 800;
}

.education-progress-cta {
    border: 0;
    border-radius: 10px;
    min-height: 42px;
    padding: 0.75rem 1.15rem;
    background: linear-gradient(135deg, #3f51df 0%, #3047d8 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 10px 18px rgba(63, 81, 223, 0.22);
}

.education-progress-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
    gap: 1rem;
    align-items: stretch;
}

.education-progress-side-stack {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    min-width: 0;
    min-height: 100%;
}

.education-progress-main-card,
.education-progress-side-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 1rem 1rem 1.1rem;
}

.education-progress-main-card {
    background: linear-gradient(135deg, #e7f0ff 0%, #edf4ff 100%);
    border: 1px solid #d9e6ff;
    min-height: 370px;
}

.education-progress-main-card::before,
.education-progress-side-card::before {
    content: "";
    position: absolute;
    top: -28px;
    right: -18px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.38);
}

.education-progress-main-card::after,
.education-progress-side-card::after {
    content: "";
    position: absolute;
    top: 18px;
    right: 56px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.education-progress-main-top,
.education-progress-side-icon {
    position: relative;
    z-index: 1;
}

.education-progress-main-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.education-progress-main-icon,
.education-progress-side-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #ffe8a3 0%, #ffd86d 100%);
    color: #a06b00;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.58);
    font-size: 1.15rem;
}

.education-progress-side-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.26);
}

.education-progress-main-arrow {
    color: #364152;
    font-size: 1.25rem;
    font-weight: 700;
}

.education-progress-side-card h4 {
    position: relative;
    z-index: 1;
    margin: 0 0 0.8rem;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.1;
}

.education-progress-bar {
    position: relative;
    z-index: 1;
    height: 10px;
    border-radius: 999px;
    background: #cddcf9;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.education-progress-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2d54e5 0%, #56c46d 100%);
}

.education-progress-lessons,
.education-progress-side-row {
    position: relative;
    z-index: 1;
}

.education-progress-lessons {
    display: grid;
    gap: 0.7rem;
}

.recent-activity-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 0.9rem;
}

.education-progress-lesson {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}

.lesson-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.lesson-icon.complete {
    background: #fff5cf;
    color: #d39b00;
}

.lesson-icon.pending {
    background: #fff2d9;
    color: #c68900;
}

.education-progress-lesson strong {
    display: block;
    color: #1d2942;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.education-progress-lesson span {
    color: #5d6880;
    font-size: 0.86rem;
}

.education-progress-mini-bar {
    display: block;
    width: 100%;
    height: 8px;
    margin-top: 0.45rem;
    border-radius: 999px;
    background: #dbe3ee;
    overflow: hidden;
}

.education-progress-mini-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3656e8 0%, #35c16b 100%);
}

.education-progress-side-card {
    background:
        linear-gradient(135deg, rgba(11, 94, 153, 0.2) 0%, rgba(20, 132, 191, 0.12) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(7, 59, 109, 0.16) 100%),
        url('/static/images/tf.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border: 1px solid rgba(255, 179, 147, 0.55);
    box-shadow: 0 18px 32px rgba(255, 122, 92, 0.22);
    padding-top: 1.45rem;
    min-height: 370px;
}

.education-progress-side-card::before {
    top: auto;
    right: auto;
    left: -20px;
    bottom: -24px;
    width: 124px;
    height: 124px;
    background: rgba(255, 255, 255, 0.08);
}

.education-progress-side-card::after {
    top: 16px;
    right: 18px;
    width: 96px;
    height: 96px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 1px, transparent 1.5px);
    background-size: 12px 12px;
    border-radius: 18px;
    opacity: 0.55;
}

.education-progress-side-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
    margin-bottom: 0.65rem;
    padding: 0.7rem 0.85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(2px);
}

.education-progress-side-row strong {
    color: #222b45;
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 800;
}

.quest-today-row span {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
}

.homework-quest-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.quiz-friends-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 1rem;
    background: linear-gradient(180deg, #2f7df4 0%, #1c5dd0 100%);
    box-shadow: 0 18px 32px rgba(47, 125, 244, 0.24);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    min-height: 0;
}

.quiz-friends-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.22) 0, transparent 22%);
    pointer-events: none;
}

.quiz-friends-hero,
.quiz-friends-actions {
    position: relative;
    z-index: 1;
}

.quiz-friends-kicker {
    display: inline-block;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.28rem;
}

.quiz-friends-card h4 {
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1.05;
    font-weight: 900;
}

.quiz-friends-board {
    position: relative;
    margin-top: 0.9rem;
    min-height: 120px;
    border-radius: 18px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.95) 0 50%, rgba(255,255,255,0.9) 50% 100%),
        linear-gradient(180deg, rgba(255,255,255,0.95) 0 50%, rgba(255,255,255,0.9) 50% 100%);
    box-shadow: inset 0 0 0 6px #f7a400, 0 12px 24px rgba(17, 33, 81, 0.22);
    overflow: hidden;
}

.quiz-friends-board::before,
.quiz-friends-board::after {
    content: "";
    position: absolute;
    inset: 0;
}

.quiz-friends-board::before {
    background:
        linear-gradient(90deg, rgba(76, 166, 255, 0.28) 0 50%, rgba(88, 230, 116, 0.28) 50% 100%);
}

.quiz-friends-board::after {
    background:
        linear-gradient(180deg, rgba(255, 120, 71, 0.32) 0 50%, rgba(251, 222, 65, 0.22) 50% 100%);
    mix-blend-mode: multiply;
}

.board-piece {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.board-piece.blue { top: 28px; left: 28px; background: #3f8dff; }
.board-piece.red { bottom: 26px; left: 52px; background: #ff5e5e; }
.board-piece.green { top: 34px; right: 34px; background: #38cf68; }
.board-piece.yellow { bottom: 24px; right: 56px; background: #ffd33d; }

.board-dice {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-12deg);
    font-size: 2.6rem;
    z-index: 2;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.2));
}

.quiz-friends-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.quiz-friends-action {
    min-height: 112px;
    border-radius: 16px;
    text-decoration: none;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-align: center;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.18), 0 10px 18px rgba(16, 33, 81, 0.2);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quiz-friends-action:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.18), 0 14px 22px rgba(16, 33, 81, 0.26);
}

.quiz-friends-action.orange {
    background: linear-gradient(180deg, #ffd82f 0%, #ff8b16 100%);
}

.quiz-friends-action.green {
    background: linear-gradient(180deg, #d8ff27 0%, #5adf21 100%);
}

.quiz-friends-action-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.education-progress-main-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.quest-today-btn {
    border: 0;
    min-width: 86px;
    max-width: 110px;
    height: 34px;
    padding: 0 0.9rem;
    border-radius: 999px;
    background: #ffffff;
    color: #1d2942;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 18px rgba(181, 73, 39, 0.18);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.quest-today-btn:hover:not(:disabled):not(.is-completed) {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(181, 73, 39, 0.24);
    background: #fff6f1;
}

.quest-today-btn.is-completed {
    min-width: 94px;
    height: 28px;
    padding: 0 0.8rem;
    background: linear-gradient(180deg, #7ed957 0%, #63c943 100%);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(74, 161, 47, 0.7);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0;
    cursor: default;
}

.welcome-badge-card {
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 30px rgba(21, 28, 52, 0.14);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.welcome-side-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    align-self: start;
}

.welcome-leaderboard-card {
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 16px 30px rgba(21, 28, 52, 0.14);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.welcome-leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.welcome-leaderboard-header h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1f2f52;
}

.welcome-leaderboard-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: #2f7df4;
    text-decoration: none;
}

.welcome-leaderboard-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(120px, 0.85fr);
    gap: 0.75rem;
}

.leaderboard-position-card,
.leaderboard-points-card {
    border-radius: 18px;
    background: #f8fbff;
    padding: 0.85rem 0.9rem;
    min-width: 0;
}

.leaderboard-summary-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6f7f98;
    margin-bottom: 0.45rem;
}

.leaderboard-crown-avatar {
    position: relative;
    width: 66px;
    height: 66px;
    margin-bottom: 0.45rem;
}

.leaderboard-crown-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffe38f;
    box-shadow: 0 8px 18px rgba(31, 47, 82, 0.12);
}

.leaderboard-crown {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 1;
}

.leaderboard-crown::before {
    content: "\f521";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.1rem;
    color: #ffba12;
    text-shadow: 0 4px 10px rgba(255, 186, 18, 0.28);
}

.leaderboard-rank-chip {
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    min-width: 28px;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #6a5cff 0%, #8c37d8 100%);
    color: #ffffff;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(106, 92, 255, 0.24);
}

.leaderboard-position-card p,
.leaderboard-points-card strong {
    font-size: 0.85rem;
    color: #243248;
}

.leaderboard-position-card p {
    color: #6f7f98;
}

.leaderboard-points-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.leaderboard-points-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff3c4;
    color: #e0a400;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.leaderboard-points-card strong {
    font-size: 1.15rem;
    font-weight: 800;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 24px 30px minmax(0, 1fr) 18px auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.72rem 0.82rem;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(21, 28, 52, 0.08);
}

.leaderboard-row img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.leaderboard-row-profile-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
}

.leaderboard-row-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.leaderboard-row-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.leaderboard-row-avatar-current {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.leaderboard-row-rank,
.leaderboard-row-points,
.leaderboard-row-name {
    font-size: 0.82rem;
}

.leaderboard-row-rank {
    color: #60708c;
    font-weight: 700;
}

.leaderboard-row-name {
    color: #243248;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-row-points {
    color: #4f5f7d;
    font-weight: 700;
    white-space: nowrap;
}

.leaderboard-row-trend {
    font-size: 0.68rem;
    justify-self: center;
}

.leaderboard-row-trend.up {
    color: #20b56a;
}

.leaderboard-row-trend.down {
    color: #f46464;
}

.leaderboard-row-trend.neutral {
    color: #99a6bb;
}

.leaderboard-row.is-current-user {
    background: linear-gradient(135deg, #1f5ca8 0%, #174b88 100%);
}

.leaderboard-row.is-current-user .leaderboard-row-rank,
.leaderboard-row.is-current-user .leaderboard-row-name,
.leaderboard-row.is-current-user .leaderboard-row-points,
.leaderboard-row.is-current-user .leaderboard-row-trend {
    color: #ffffff;
}

.welcome-badge-card.compact {
    padding: 0.95rem;
    gap: 0.7rem;
    min-height: 310px;
}

.welcome-badge-card.compact .welcome-badge-list {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
}

.welcome-badge-card.compact .welcome-badge-item {
    padding: 0.68rem 0.75rem;
    gap: 0.65rem;
}

.welcome-badge-card.compact .welcome-badge-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 0.96rem;
}

.welcome-badge-card.compact .welcome-badge-text strong {
    font-size: 0.92rem;
}

.welcome-badge-card.compact .welcome-badge-text span {
    font-size: 0.77rem;
}

.welcome-friends-card {
    position: relative;
    overflow: hidden;
    padding: 0.95rem;
    border-radius: 22px;
    background:
        radial-gradient(circle at 18% 82%, rgba(17, 65, 196, 0.98) 0%, rgba(17, 65, 196, 0) 42%),
        radial-gradient(circle at 78% 18%, rgba(238, 127, 57, 0.92) 0%, rgba(238, 127, 57, 0) 36%),
        radial-gradient(circle at 54% 56%, rgba(238, 244, 235, 0.32) 0%, rgba(238, 244, 235, 0) 50%),
        linear-gradient(135deg, rgba(18, 26, 74, 0.94) 0%, rgba(57, 82, 120, 0.88) 100%);
    border: 1px solid rgba(255, 255, 255, 0.34);
    box-shadow: 0 18px 34px rgba(21, 28, 52, 0.22);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.welcome-friends-chip {
    width: fit-content;
    padding: 0.3rem 0.62rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    color: #667085;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 8px 16px rgba(31, 41, 55, 0.08);
}

.welcome-friends-copy h3 {
    margin: 0 0 0.35rem;
    color: #ffffff;
    font-size: 2.1rem;
    line-height: 1;
    font-weight: 300;
}

.welcome-friends-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    line-height: 1.35;
    max-width: 240px;
}

.welcome-friends-badges {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.welcome-friends-badge {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem 0.82rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    text-decoration: none;
    color: inherit;
}

.welcome-friends-badge-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.78);
    color: #41516f;
    box-shadow: 0 8px 16px rgba(31, 41, 55, 0.12);
}

.welcome-friends-badge-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.welcome-friends-badge-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.welcome-friends-badge-text strong {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.welcome-friends-badge-text span {
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.76rem;
    font-weight: 600;
}

.welcome-friends-badge-text small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.28;
}

.welcome-friends-badge.is-ready {
    background: rgba(255, 255, 255, 0.16);
}

.welcome-friends-badge.is-invite {
    background: rgba(255, 255, 255, 0.24);
}

.welcome-friends-badge.is-empty {
    background: rgba(255, 255, 255, 0.16);
}

.welcome-shop-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 0.95rem;
    border-radius: 22px;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 211, 102, 0.92) 0%, rgba(255, 211, 102, 0) 34%),
        radial-gradient(circle at 82% 24%, rgba(255, 150, 64, 0.9) 0%, rgba(255, 150, 64, 0) 30%),
        radial-gradient(circle at 48% 88%, rgba(255, 247, 221, 0.28) 0%, rgba(255, 247, 221, 0) 46%),
        linear-gradient(135deg, rgba(92, 45, 8, 0.94) 0%, rgba(161, 83, 23, 0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 18px 34px rgba(78, 42, 11, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.welcome-shop-copy h3,
.welcome-shop-copy p,
.welcome-shop-card .welcome-friends-badge-text strong,
.welcome-shop-card .welcome-friends-badge-text span,
.welcome-shop-card .welcome-friends-badge-text small {
    color: #ffffff;
}

.welcome-shop-balance {
    background: rgba(255, 255, 255, 0.24);
}

.welcome-shop-balance .welcome-friends-badge-icon {
    background: rgba(255, 247, 221, 0.9);
}

.welcome-shop-balance .welcome-friends-badge-icon img {
    object-fit: contain;
    padding: 7px;
}

.welcome-shop-badges {
    gap: 0.55rem;
}

.welcome-shop-item {
    background: rgba(255, 255, 255, 0.18);
}

.welcome-shop-item .welcome-friends-badge-icon {
    background: rgba(255, 255, 255, 0.84);
}

.welcome-shop-item .welcome-friends-badge-icon img {
    object-fit: cover;
}

.weekly-quiz-card {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    align-items: stretch;
    gap: 1rem;
    padding: 0.7rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 30px rgba(21, 28, 52, 0.14);
    text-decoration: none;
    color: inherit;
    min-width: 0;
    min-height: 296px;
    align-content: stretch;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.progress-weekly-quiz-card {
    min-height: 0;
    grid-template-columns: 200px minmax(0, 1fr);
    padding: 0.9rem;
    border-radius: 24px;
}

.progress-weekly-quiz-card .weekly-quiz-art {
    width: 200px;
    min-height: 188px;
}

.progress-weekly-quiz-card .weekly-quiz-content {
    min-height: 188px;
}

.weekly-quiz-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px rgba(21, 28, 52, 0.18);
}

.weekly-quiz-art {
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(160deg, #1f66d1 0%, #2f87ff 100%);
    width: 148px;
    min-height: 204px;
    height: 100%;
    align-self: stretch;
}

.weekly-quiz-art img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.weekly-quiz-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    gap: 0.5rem;
    padding: 0.15rem 0 0 0;
    min-height: 204px;
    height: 100%;
}

.weekly-quiz-copy {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    min-width: 0;
}

.weekly-quiz-kicker {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2f7df4;
}

.weekly-quiz-content h3 {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.04;
    color: #1d2942;
    max-width: 9ch;
}

.weekly-quiz-content p {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.3;
    color: #5d6880;
    font-weight: 600;
}

.weekly-quiz-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: fit-content;
    min-width: 175px;
    max-width: 100%;
    margin-top: auto;
    align-self: flex-start;
    padding: 0.86rem 1.14rem;
    border-radius: 999px;
    background: #f3f6fb;
    color: #1d2942;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
    box-shadow: none;
    white-space: nowrap;
    flex-wrap: nowrap;
    line-height: 1;
}

.welcome-badge-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #1d2942;
}

.welcome-badge-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.welcome-badge-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.85rem;
    border-radius: 16px;
}

.welcome-badge-item.lilac {
    background: linear-gradient(135deg, #efe6ff 0%, #f5efff 100%);
}

.welcome-badge-item.sky {
    background: linear-gradient(135deg, #eaf2ff 0%, #f1f6ff 100%);
}

.welcome-badge-item.cream {
    background: linear-gradient(135deg, #fff1cf 0%, #fff8e8 100%);
}

.welcome-badge-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    color: #ff9f1c;
    font-size: 1.05rem;
    box-shadow: 0 8px 14px rgba(43, 56, 94, 0.1);
}

.welcome-badge-text {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.welcome-badge-text strong {
    color: #23314d;
    font-size: 0.95rem;
    line-height: 1.2;
}

.welcome-badge-text span {
    color: #5d6880;
    font-size: 0.82rem;
    line-height: 1.35;
}

.library-card {
    width: 100%;
    height: auto;
    align-self: stretch;
}

.dashboard-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(255,255,255,0.35) 0 2px, transparent 3px),
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25) 0 2px, transparent 3px),
        radial-gradient(circle at 50% 15%, rgba(255,255,255,0.2) 0 2px, transparent 3px),
        radial-gradient(circle at 70% 30%, rgba(255,255,255,0.22) 0 2px, transparent 3px),
        radial-gradient(circle at 85% 20%, rgba(255,255,255,0.18) 0 2px, transparent 3px);
    opacity: 0.45;
}

.dashboard-header h2 {
    color: #22335d;
    margin-bottom: 0.4rem;
    font-size: clamp(1.7rem, 2.5vw, 2.35rem);
    line-height: 1.08;
}

.welcome-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 168px;
    padding: 1.75rem 1.9rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 34px;
    background:
        radial-gradient(circle at 18% 18%, rgba(178, 221, 255, 0.9) 0, rgba(178, 221, 255, 0) 18%),
        radial-gradient(circle at 82% 26%, rgba(255, 214, 233, 0.72) 0, rgba(255, 214, 233, 0) 20%),
        linear-gradient(90deg, rgba(240, 249, 255, 0.94) 0%, rgba(251, 250, 255, 0.92) 52%, rgba(255, 245, 249, 0.9) 100%);
    box-shadow: 0 18px 44px rgba(29, 78, 216, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
}

.welcome-card-main {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
}

.welcome-card-avatar {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 999px;
    overflow: hidden;
    border: 4px solid #ffffff;
    box-shadow: 0 12px 24px rgba(35, 72, 149, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

.welcome-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.welcome-card-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.welcome-date {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.92rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffeeb3 0%, #ffd866 100%);
    color: #9a6100;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.8rem;
}

.welcome-subtitle {
    max-width: 760px;
    font-size: 1rem;
    line-height: 1.55;
    color: #64748b;
    margin-bottom: 0;
}

.welcome-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.welcome-btn {
    background: #d8f1ff;
    color: #0b73b8;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.welcome-paws {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.18);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-weight: 700;
}

.welcome-paws img {
    width: 24px;
    height: 24px;
}

.welcome-card-illustration {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 280px;
}

.welcome-card-illustration::before {
    display: none;
}

.welcome-card-illustration::after {
    display: none;
}

.welcome-summary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 320px;
    padding: 1.15rem 1.35rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 28px rgba(63, 94, 168, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.welcome-summary-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.welcome-summary-copy strong {
    display: block;
    margin: 0 0 0.25rem;
    color: #22335d;
    font-size: 1rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.welcome-summary-copy span {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 700;
}

.welcome-card-avatar .welcome-summary-paws {
    display: none;
}

.welcome-summary-paws {
    color: #b45309;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
}

.calendar-icon {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    background: #ffffff;
    color: #0b73b8;
    display: grid;
    grid-template-rows: auto 1fr auto;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.18);
}

.calendar-header {
    background: #0b73b8;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.calendar-body {
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.calendar-day {
    font-size: 2.4rem;
    font-weight: 900;
    padding-bottom: 0.5rem;
}

.library-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.8rem;
    padding: 0;
    background: transparent;
    color: #ffffff;
    box-shadow: none;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    min-height: 0;
    position: relative;
    overflow: visible;
}

.library-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    padding-left: 0;
}

.library-card::before {
    display: none;
}

.library-covers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    position: relative;
    z-index: 1;
}

.dashboard-library-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 1.2rem;
    align-items: start;
    margin: 0 0 2rem;
}

.dashboard-library-row h3 {
    grid-column: 1 / -1;
}

.dashboard-library-row .library-covers {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    align-items: stretch;
}

.dashboard-library-row .library-cover-tile {
    height: 188px;
}

.library-covers a {
    display: block;
}

.library-cover-tile {
    position: relative;
    display: block;
    height: 150px;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(32, 42, 74, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.72);
    background: transparent;
}

.library-cover-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0) 28%, rgba(22, 31, 68, 0.68) 100%);
}

.library-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    padding: 0;
    transform: none;
}

.library-cover-badge {
    position: absolute;
    left: 0.72rem;
    bottom: 0.72rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 6px 14px rgba(20, 30, 61, 0.18);
    z-index: 1;
    font-size: 0.95rem;
}

.library-cover-title {
    position: absolute;
    left: 3.25rem;
    right: 0.7rem;
    bottom: 0.95rem;
    z-index: 1;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.library-cover-tile.theme-night .library-cover-badge,
.library-cover-tile.theme-story .library-cover-badge {
    color: #4d79ff;
}

.library-cover-tile.theme-sky .library-cover-badge {
    color: #4d79ff;
}

.library-cover-tile.theme-cake .library-cover-badge {
    color: #36b24a;
}

.library-feature-card {
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 32px rgba(19, 28, 55, 0.14);
    overflow: hidden;
    color: #1c2842;
}

.library-feature-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.library-feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.library-feature-body {
    padding: 1rem 1.1rem 1.15rem;
}

.library-feature-body h4 {
    margin: 0 0 0.5rem;
    font-size: 1.9rem;
    font-weight: 800;
    color: #1c2842;
    line-height: 1;
}

.library-feature-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #ff6fa6;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.library-feature-body p {
    margin: 0 0 1rem;
    color: #58657b;
    line-height: 1.5;
    font-size: 0.95rem;
}

.library-feature-actions {
    display: flex;
    gap: 0.75rem;
}

.library-feature-btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
}

.library-feature-btn.primary {
    background: linear-gradient(135deg, #ff6ea8 0%, #ff4f87 100%);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(255, 79, 135, 0.22);
}

.library-feature-btn.secondary {
    background: linear-gradient(135deg, #8fe95e 0%, #5fda45 100%);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(95, 218, 69, 0.2);
}

.library-page {
    padding: 2.5rem 0 4rem;
    background: transparent;
    min-height: calc(100vh - 80px);
}

.library-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.library-hero h2 {
    font-size: 2.2rem;
    color: #0b73b8;
    margin-bottom: 0.6rem;
}

.library-hero p {
    color: #5b6b7a;
    margin: 0 auto;
    max-width: 640px;
}

.library-shelf {
    background: #f0f3f8;
    border-radius: 26px;
    padding: 2rem;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.shelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.book-card {
    display: grid;
    gap: 0.6rem;
    text-decoration: none;
    color: #1f2a37;
    background: #ffffff;
    padding: 0.8rem;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(18, 42, 90, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 26px rgba(18, 42, 90, 0.2);
}

.book-card img {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    object-fit: cover;
}

.book-meta h4 {
    margin: 0;
    font-size: 1rem;
}

.book-meta p {
    margin: 0.2rem 0 0;
    color: #5b6b7a;
    font-size: 0.85rem;
}

.shelf-base {
    margin-top: 2rem;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d8a66d, #b57b40);
    box-shadow: inset 0 4px 6px rgba(0,0,0,0.15);
}

.library-viewer-body {
    background: #0f172a;
    color: #ffffff;
    overflow-x: hidden;
}

.library-viewer-topbar {
    background: #1b1464;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.viewer-topbar-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.viewer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
}

.viewer-brand .logo {
    width: 120px;
    height: auto;
    display: block;
}

.viewer-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #cbd5f5;
    font-size: 0.9rem;
    flex: 1;
    justify-content: center;
}

.viewer-progress input[type="range"] {
    width: min(520px, 40vw);
    accent-color: #3b82f6;
}

.viewer-back-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.25);
    white-space: nowrap;
}

.viewer-back-link:hover {
    background: rgba(255,255,255,0.15);
}

.library-viewer {
    padding: 0.6rem 0 1.2rem;
}

.library-viewer.landscape {
    min-height: calc(100vh - 62px);
}

.viewer-landscape-container {
    max-width: 1400px;
}

.viewer-stage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    background: radial-gradient(circle at top, #1f2a48 0%, #0f172a 60%);
    padding: 0.8rem;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    height: calc(100vh - 90px);
}

.viewer-stage .page {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
}

.viewer-stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 120px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.75);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
    color: #fbbf24;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.viewer-nav span {
    line-height: 1;
}

.viewer-nav:hover {
    transform: translateY(-50%) scale(1.03);
    background: rgba(15, 23, 42, 0.9);
}

.viewer-nav-left {
    left: -16px;
}

.viewer-nav-right {
    right: -16px;
}

@media (max-width: 1200px) {
    .viewer-stage {
        max-width: 95%;
    }
}

@media (max-width: 900px) {
    .viewer-stage {
        grid-template-columns: 1fr;
        max-width: 90%;
        height: auto;
    }

    .viewer-nav-left,
    .viewer-nav-right {
        top: 90%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        height: 52px;
        width: 120px;
    }

    .viewer-nav-right {
        top: auto;
        bottom: -18px;
        transform: translate(-50%, 0);
    }
}

.viewer-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    color: #cbd5f5;
}

.viewer-footer input[type=\"range\"] {
    flex: 1;
    accent-color: #3b82f6;
}

@media (max-width: 900px) {
    .viewer-stage {
        grid-template-columns: 1fr;
    }
}

@keyframes drift {
    0% { transform: translateX(0); opacity: 0.9; }
    50% { transform: translateX(12px); opacity: 1; }
    100% { transform: translateX(0); opacity: 0.9; }
}

.welcome-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 14% 52%, rgba(255,255,255,0.2) 0 42px, transparent 44px),
        radial-gradient(circle at 46% 18%, rgba(191, 219, 254, 0.22) 0 58px, transparent 60px),
        radial-gradient(circle at 84% 24%, rgba(251, 207, 232, 0.18) 0 52px, transparent 54px);
    animation: drift 6s ease-in-out infinite;
    opacity: 0.95;
}


.bubbles-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 1rem 2rem;
    border-radius: 10px;
    color: white;
}

.bubble-icon {
    font-size: 2.5rem;
}

/* Golden Paw Icons */
.golden-paw-icon {
    width: 48px;
    height: 48px;
    display: inline-block;
    vertical-align: middle;
}

.golden-paw-icon-inline {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 4px;
}

.bubble-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.bubble-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--paw-color);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
}

.card-header h3 {
    font-size: 1.3rem;
}

.card-body {
    padding: 1.5rem;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f5f7fa;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.quick-action:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

.quick-action span {
    font-size: 2rem;
}

.quick-action h4 {
    margin-bottom: 0.25rem;
}

.quick-action p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.subject-progress {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subject-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f5f7fa;
    border-radius: 10px;
}

.subject-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.subject-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.subject-icon i {
    font-size: 0.92rem;
}

.skill-level {
    text-align: right;
    font-weight: 600;
    color: #667eea;
}

.progress-bar {
    width: 100px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s;
}

.view-details {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.view-details:hover {
    text-decoration: underline;
}

.class-item, .reward-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f5f7fa;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.class-time {
    min-width: 100px;
}

.class-time strong {
    display: block;
    color: #667eea;
}

.class-details h4 {
    margin-bottom: 0.25rem;
}

.class-details p {
    font-size: 0.9rem;
    color: #666;
}

.reward-thumb {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.featured-rewards {
    margin: 1rem 0;
}

/* Content Section */
.content-section {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.content-section h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.content-section > .container > p {
    color: #666;
    margin-bottom: 2rem;
}

/* Worksheet Generator */
.worksheet-generator {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-section h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

/* Worksheet Area */
.worksheet-area {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.worksheet-session-logo-link {
    display: none;
}

body.worksheet-session-active .worksheet-session-logo-link {
    position: fixed;
    top: 1rem;
    left: 1.25rem;
    z-index: 1205;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.worksheet-session-logo {
    display: block;
    width: 140px;
    height: auto;
}

body.worksheet-session-active .navbar.dashboard-nav,
body.worksheet-session-active .floating-menu {
    display: none !important;
}

body.worksheet-session-active.auth-voxel-bg {
    background: linear-gradient(90deg, #dff4ff 0%, #f2f6ff 48%, #ffeef6 100%) !important;
}

body.worksheet-session-active.auth-voxel-bg::before,
body.worksheet-session-active.auth-voxel-bg::after,
body.worksheet-session-active .auth-voxel-background {
    display: none !important;
}

body.worksheet-session-active .content-section {
    margin: 0;
    min-height: 100vh;
    padding: 6.5rem 2rem 2rem;
    background: transparent;
}

body.worksheet-session-active .content-section > .container {
    max-width: 100%;
    width: 100%;
    padding: 0;
}

body.worksheet-session-active .worksheet-area {
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 8.5rem);
    border-radius: 0;
    box-shadow: none;
}

.worksheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.worksheet-header h3 {
    color: #667eea;
}

.worksheet-paper-header {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.worksheet-brand {
    font-family: "Comic Sans MS", "Trebuchet MS", cursive;
    font-size: 0.85rem;
    color: #667eea;
    letter-spacing: 0.3px;
}

.worksheet-header-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.worksheet-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.worksheet-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.worksheet-number {
    font-size: 0.9rem;
    color: #4b5563;
    font-weight: 600;
}

.worksheet-name {
    font-size: 1.05rem;
    color: #111827;
    font-weight: 700;
}

.worksheet-directions {
    font-size: 0.9rem;
    color: #6b7280;
}

.worksheet-input-mode {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.8rem;
    font-size: 0.85rem;
    color: #334155;
    background: #eef2ff;
    border: 1px solid #dbe4ff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}

.worksheet-input-mode-label {
    font-weight: 600;
    color: #1e3a8a;
}

.worksheet-input-mode label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.worksheet-intro-card {
    border-radius: 24px;
    border: 5px solid rgba(255, 255, 255, 0.75);
    background: linear-gradient(135deg, rgba(49, 168, 224, 0.86) 0%, rgba(47, 158, 216, 0.86) 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    margin: 0 0 1.1rem;
    position: relative;
}

.worksheet-intro-card::before {
    content: '';
    position: absolute;
    right: -36px;
    top: -34px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.worksheet-intro-card::after {
    content: '';
    position: absolute;
    left: 54%;
    top: 22%;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.worksheet-intro-title {
    margin: 0;
    background: rgba(239, 247, 251, 0.82);
    color: #1f9de4;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: "Poppins", sans-serif;
    font-style: normal;
    line-height: 1.1;
    padding: 0.55rem 1rem 0.65rem;
    position: relative;
    z-index: 1;
}

.worksheet-subtitle {
    color: #fff;
    margin: 0;
    padding: 0.85rem 1rem 1rem;
    font-size: 1.05rem;
    line-height: 1.35;
    max-width: 82%;
    position: relative;
    z-index: 1;
}

.worksheet-limit-card {
    background: #ffffff;
    border: 1px solid #e6e6ea;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0 1.2rem;
    color: #1f2937;
    display: grid;
    gap: 0.25rem;
    max-width: 220px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.worksheet-limit-card .limit-title {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.worksheet-limit-card .limit-count {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 1.6rem;
    font-weight: 800;
}

.worksheet-limit-card .limit-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
}

.worksheet-limit-card .limit-note {
    font-size: 0.85rem;
    color: #6b7280;
}

.worksheet-message {
    margin: 0.5rem 0 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fbbf24;
    color: #92400e;
    font-size: 0.9rem;
}

.worksheet-generate-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(2, 6, 23, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.worksheet-generate-dialog {
    position: relative;
    width: 100%;
    max-width: 700px;
}

.worksheet-generate-close {
    position: absolute;
    top: 0.4rem;
    right: 0.6rem;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.worksheet-generate-dialog .worksheet-generator {
    margin-bottom: 0;
}

.worksheet-card-board {
    background:
        radial-gradient(circle at 16% 30%, rgba(219, 234, 254, 0.5) 0, rgba(219, 234, 254, 0) 20%),
        radial-gradient(circle at 52% 24%, rgba(255, 237, 213, 0.3) 0, rgba(255, 237, 213, 0) 22%),
        radial-gradient(circle at 82% 58%, rgba(219, 234, 254, 0.28) 0, rgba(219, 234, 254, 0) 24%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 255, 0.95) 100%);
    border: 1px solid rgba(222, 231, 245, 0.9);
    border-radius: 22px;
    padding: 1rem;
    margin: 0 0 1.4rem;
    box-shadow: 0 16px 34px rgba(71, 85, 105, 0.12);
}

.worksheet-card-board-head h3 {
    margin: 0;
    color: #22335d;
    font-size: 1.1rem;
}

.worksheet-card-board-head p {
    margin: 0.2rem 0 0.85rem;
    color: #5d6983;
    font-size: 0.86rem;
}

.worksheet-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.75rem;
}

.worksheet-task-card {
    border: none;
    border-radius: 12px;
    min-height: 132px;
    padding: 0.7rem 0.75rem;
    text-align: left;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.worksheet-task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}

.worksheet-task-card-item {
    background: #ffffff;
    border: 1px solid #cfd8e3;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.worksheet-task-card-completed {
    border-color: #cfd8e3;
    background: #ffffff;
}

.worksheet-task-card-completed .worksheet-task-status {
    color: #166534;
}

.worksheet-task-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0ea5e9;
}

.worksheet-task-date {
    position: absolute;
    top: 0.68rem;
    right: 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #f97316;
}

.worksheet-task-title {
    color: #1e293b;
    font-size: 1.02rem;
    line-height: 1.22;
    font-weight: 700;
    margin-top: 0.2rem;
}

.worksheet-task-number {
    margin-top: 0.38rem;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.worksheet-task-footer {
    margin-top: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.worksheet-task-status {
    color: #f97316;
    font-size: 0.8rem;
    font-weight: 600;
}

.worksheet-task-progress {
    color: #0ea5e9;
    font-size: 0.8rem;
    font-weight: 700;
}

.worksheet-task-create {
    background: #ffffff;
    border: 1px dashed #cfd8e3;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    color: #22335d;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.worksheet-task-create-icon {
    font-size: 1.35rem;
    line-height: 1;
    color: #2f9df2;
}

@media (max-width: 640px) {
    .worksheet-card-grid {
        grid-template-columns: 1fr;
    }
}

.timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #666;
}

.worksheet-cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    min-height: 48px;
    padding: 0.8rem 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: linear-gradient(135deg, #334195 0%, #35ace5 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 10px 22px rgba(44, 65, 149, 0.22);
}

.worksheet-cancel-btn::after {
    content: "\203A";
    margin-left: 0.55rem;
    font-size: 1rem;
    line-height: 1;
}

.worksheet-cancel-btn:hover {
    background: linear-gradient(135deg, #2f3d8e 0%, #2f9ed3 100%);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.26);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(44, 65, 149, 0.28);
}

.question-item {
    background: #ffffff;
    padding: 0.75rem 0.5rem 1rem 1.75rem;
    border-radius: 0;
    margin-bottom: 1.25rem;
    box-shadow: none;
    border-bottom: 1px solid #e6e6e6;
}

.question-number {
    color: #001f5b;
    font-weight: 700;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.question-text {
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 0.275rem;
    line-height: 1.45;
    margin-bottom: 0.85rem;
    color: #1f1f1f;
}

.worksheet-area .question-text.question-text-small {
    font-size: 1.25rem;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-weight: 400;
}

.question-text ul,
.question-text ol {
    margin-left: 1rem;
}

.question-group-title {
    font-weight: 700;
    font-size: 0.6rem;
    margin: 0.5rem 0 0.35rem;
    color: #2b2b2b;
}

.worksheet-question-image-wrap {
    margin: 0.5rem 0 1rem;
    display: flex;
    justify-content: center;
}


.worksheet-question-image {
    max-width: 33%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #e3e6ef;
    background: #fff;
}

.answer-input {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    font-size: 1rem;
    margin-top: 0.5rem;
    resize: vertical;
    min-height: 155px;
    line-height: 1.5;
    background: #f5f6f8;
    box-shadow: none;
}

.answer-input.answer-input-inline {
    min-height: auto;
    height: 40px;
    width: auto;
    min-width: 120px;
    display: inline-block;
    vertical-align: baseline;
    margin: 0 0.35rem;
    resize: none;
}

.answer-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.answer-helper {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #9aa2b1;
}

.pen-answer-panel {
    margin-top: 0.5rem;
}

.pen-answer-toolbar {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.pen-clear-btn {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
}

.pen-clear-btn:hover {
    background: #eef2f7;
}

.pen-draw-canvas {
    width: 100%;
    min-height: 280px;
    height: 280px;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 0.6rem;
    touch-action: none;
    cursor: crosshair;
}

.pen-ocr-status {
    min-height: 1rem;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    color: #64748b;
}

.pen-answer-transcript {
    min-height: auto;
    height: 44px;
    margin-top: 0;
}

.mcq-statement-list {
    margin: 0.2rem 0 1rem;
}

.mcq-statement-row {
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 1.15rem;
    line-height: 1.55;
    color: #1f2937;
    margin: 0.35rem 0;
}

.mcq-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem 1rem;
    margin-top: 0.35rem;
}

.mcq-choice-pill {
    border: 1px solid #d8dee9;
    border-radius: 999px;
    background: #e5e7eb;
    color: #1f2937;
    padding: 0.9rem 1.2rem;
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.mcq-choice-pill:hover {
    background: #dce1e9;
}

.mcq-choice-pill.selected {
    background: #f1d8af;
    border-color: #f1d8af;
}

.mcq-choice-number {
    font-weight: 600;
    min-width: 2.1rem;
}

.mcq-choice-text {
    display: inline-block;
}

@media (max-width: 768px) {
    .mcq-choice-grid {
        grid-template-columns: 1fr;
    }
}

.result-group-title {
    margin: 0 0 0.3rem;
    color: #2b2b2b;
}

.result-partial {
    color: #b7791f;
    font-weight: 600;
    font-size: 0.85em;
}

/* Results Area */
.results-area {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.worksheet-marking-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.worksheet-marking-dialog {
    width: min(440px, 100%);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1rem 1rem 1.1rem;
    box-shadow: 0 16px 42px rgba(2, 6, 23, 0.24);
}

.worksheet-marking-dialog h3 {
    margin: 0 0 0.3rem;
    font-size: 1.08rem;
    color: #0f172a;
}

.worksheet-marking-dialog p {
    margin: 0 0 0.8rem;
    color: #64748b;
    font-size: 0.92rem;
}

.worksheet-marking-progress-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.worksheet-marking-progress-bar {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
    transition: width 0.18s ease-out;
}

.worksheet-marking-progress-text {
    margin-top: 0.55rem;
    font-weight: 700;
    color: #1e3a8a;
    font-size: 0.9rem;
}

.ai-summary-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin: 1rem 0 1.5rem;
    text-align: left;
}

.ai-summary-card h4 {
    margin: 0 0 0.6rem;
    color: #0f172a;
}

.ai-summary-card p {
    margin: 0 0 0.8rem;
    color: #475569;
}

.ai-summary-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ai-summary-row {
    display: grid;
    grid-template-columns: 1.2fr 0.6fr 2fr;
    gap: 0.75rem;
    align-items: start;
    font-size: 0.9rem;
    color: #1f2937;
}

.ai-summary-head {
    font-weight: 700;
    color: #0f172a;
}

.result-accuracy {
    margin: 0.2rem 0 0.6rem;
    font-size: 0.85rem;
    color: #64748b;
}

.results-card {
    text-align: center;
}

.results-card h3 {
    color: #667eea;
    margin-bottom: 2rem;
}

.worksheet-results-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.worksheet-results-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    min-height: 54px;
    padding: 0.95rem 1.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #27408b 0%, #34a7df 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(39, 64, 139, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.worksheet-results-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(39, 64, 139, 0.34);
    filter: saturate(1.05);
}

.score-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.score-circle {
    position: relative;
    width: 150px;
    height: 150px;
}

.score-circle span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
}

.score-details {
    text-align: left;
}

.score-details p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.score-details span {
    color: #667eea;
    font-weight: 700;
}

#resultsDetails {
    margin: 2rem 0;
    text-align: left;
}

.result-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
}

.result-item.correct {
    background: #d4edda;
}

.result-item.incorrect {
    background: #f8d7da;
}

.result-icon {
    font-size: 1.5rem;
}

.result-details p {
    margin-bottom: 0.5rem;
}

.result-question {
    color: #1f2937;
    font-weight: 600;
}

.correct-answer {
    color: #155724;
    font-weight: 600;
}

.ai-teacher-note {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: #f3f7ff;
    border: 1px solid #d6e2ff;
    color: #2d3a66;
    font-size: 0.95rem;
}

.ai-teacher-note p {
    margin: 0.35rem 0 0;
}

/* Classes */
.classes-intro-card {
    border-radius: 24px;
    border: 5px solid rgba(255, 255, 255, 0.75);
    background: linear-gradient(135deg, rgba(49, 168, 224, 0.86) 0%, rgba(47, 158, 216, 0.86) 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    margin: 0 0 1.1rem;
    position: relative;
}

.classes-intro-card::before {
    content: '';
    position: absolute;
    right: -36px;
    top: -34px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.classes-intro-card::after {
    content: '';
    position: absolute;
    left: 54%;
    top: 22%;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.classes-intro-title {
    margin: 0;
    background: rgba(239, 247, 251, 0.82);
    color: #1f9de4;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: "Poppins", sans-serif;
    line-height: 1.1;
    padding: 0.55rem 1rem 0.65rem;
    position: relative;
    z-index: 1;
}

.classes-subtitle {
    color: #fff;
    margin: 0;
    padding: 0.85rem 1rem 1rem;
    font-size: 1.05rem;
    line-height: 1.35;
    max-width: 82%;
    position: relative;
    z-index: 1;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.classes-grid-panel {
    background:
        radial-gradient(circle at 16% 30%, rgba(219, 234, 254, 0.5) 0, rgba(219, 234, 254, 0) 20%),
        radial-gradient(circle at 52% 24%, rgba(255, 237, 213, 0.3) 0, rgba(255, 237, 213, 0) 22%),
        radial-gradient(circle at 82% 58%, rgba(219, 234, 254, 0.28) 0, rgba(219, 234, 254, 0) 24%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 255, 0.95) 100%);
    border: 1px solid rgba(222, 231, 245, 0.9);
    border-radius: 28px;
    box-shadow: 0 16px 34px rgba(71, 85, 105, 0.12);
    padding: 1.1rem 1.2rem 1.25rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.classes-group-title {
    grid-column: 1 / -1;
    margin: 0 0 0.3rem;
    display: inline-block;
    justify-self: start;
    background: transparent;
    color: #22335d;
    border-radius: 0;
    padding: 0;
    font-size: 1.15rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.classes-empty-message {
    grid-column: 1 / -1;
    margin: 0.25rem 0 0;
    color: #5d6983;
    font-size: 0.98rem;
    font-weight: 700;
}

.class-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    position: relative;
}

.class-card.is-past-cutoff {
    opacity: 0.55;
    filter: grayscale(1);
}

.class-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
}

.class-card h3 {
    color: #22335d;
    margin-bottom: 0.38rem;
    font-size: 1.02rem;
    line-height: 1.22;
    font-weight: 700;
}

.class-info p {
    color: #5d6983;
    margin-bottom: 0.38rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.class-info strong {
    color: #22335d;
    font-weight: 700;
}

.classes-page .btn-unlock.btn-full {
    width: auto;
    min-height: 0;
    align-self: flex-start;
    padding: 0.42rem 0.82rem;
    font-size: 0.82rem;
    gap: 0.28rem;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(124, 108, 247, 0.18);
}

.classes-page .btn-unlock.btn-full .unlock-sparkle {
    font-size: 0.98rem;
}

.info-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.info-section h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
}

.feature-item .feature-icon {
    font-size: 2.5rem;
}

.feature-item h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

.feature-item p {
    color: #666;
    font-size: 0.95rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.video-placeholder {
    background: #f5f7fa;
    padding: 3rem;
    border-radius: 10px;
    text-align: center;
    margin: 2rem 0;
}

/* Teacher Chat */
.chat-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.chat-layout.full-width {
    grid-template-columns: 90px 1fr;
    transition: grid-template-columns 0.25s ease;
}

.chat-layout.full-width.sidebar-expanded {
    grid-template-columns: 290px 1fr;
}

.chat-container {
    max-width: 100%;
}

.teachers-toggle {
    width: 100%;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    padding: 0.9rem 0.55rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 0.7rem;
}

.teachers-sidebar {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 1rem 0.65rem;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    height: fit-content;
}

.teachers-sidebar.collapsed {
    padding: 0.85rem 0.5rem 0.65rem;
}

.teachers-sidebar h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.teacher-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.teacher-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.82rem 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #ffffff;
}

.teacher-item:hover, .teacher-item.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
}

.teacher-avatar {
    font-size: 1.6rem;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    display: grid;
    place-items: center;
}

.teacher-avatar i {
    font-size: 1.35rem;
    color: #3b82f6;
}

.teacher-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.teacher-item h4 {
    margin-bottom: 0.25rem;
}

.teacher-item p {
    font-size: 0.9rem;
    opacity: 0.85;
}

.status {
    font-size: 0.85rem;
}

.status-dot {
    font-size: 0.5rem;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.teachers-sidebar.collapsed .teacher-item {
    justify-content: center;
    padding: 0.8rem 0.42rem;
}

.teachers-sidebar.collapsed .teacher-item div {
    display: none;
}

.teachers-sidebar.collapsed .teacher-avatar {
    width: 34px;
    height: 34px;
    font-size: 1.4rem;
}

.status.online {
    color: #4CAF50;
}

.status.offline {
    color: #999;
}

.teacher-item.active .status.online,
.teacher-item.active .status.offline {
    color: white;
}

.chat-area {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 600px;
    width: 100%;
}

/* Teacher chat full-screen style */
.teacher-chat-page .content-section {
    margin-top: 0.35rem;
    margin-bottom: 0;
    padding: 0;
    min-height: calc(100vh - 72px - 0.35rem);
}

.teacher-chat-page .chat-container.container {
    max-width: 100%;
    padding: 0 0.75rem;
    height: calc(100vh - 72px - 0.35rem);
    display: flex;
    flex-direction: column;
}

.teacher-chat-page .chat-layout {
    margin-bottom: 0;
    flex: 1;
    min-height: 0;
}

/* Remove left Tutor menu on teacher chat page */
.teacher-chat-page .teachers-sidebar {
    display: none !important;
}

.teacher-chat-page .chat-layout,
.teacher-chat-page .chat-layout.full-width,
.teacher-chat-page .chat-layout.full-width.sidebar-expanded {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
}

.teacher-chat-page .chat-area {
    height: 100%;
    min-height: 0;
    max-height: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #dff4ff 0%, #f2f6ff 48%, #ffeef6 100%);
    border-radius: 0;
    box-shadow: none;
}

.teacher-chat-page .chat-messages {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 6.5rem 2rem 10.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0.95rem;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
}

.teacher-chat-page .navbar.dashboard-nav,
.teacher-chat-page .floating-menu {
    display: none !important;
}

.teacher-chat-page,
.teacher-chat-page.auth-voxel-bg {
    background: linear-gradient(90deg, #dff4ff 0%, #f2f6ff 48%, #ffeef6 100%) !important;
}

.teacher-chat-logo-link {
    position: fixed;
    top: 1rem;
    left: 1.25rem;
    z-index: 1205;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.teacher-chat-logo {
    display: block;
    width: 117px;
    height: 38px;
    object-fit: contain;
}

.teacher-chat-logo-link:hover {
    transform: translateY(-1px);
    border-color: rgba(191, 219, 254, 0.95);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12), 0 0 0 3px rgba(219, 234, 254, 0.75);
}

.teacher-chat-page.auth-voxel-bg::before,
.teacher-chat-page.auth-voxel-bg::after,
.teacher-chat-page .auth-voxel-background {
    display: none !important;
}

.teacher-chat-page .content-section {
    margin: 0;
    min-height: 100vh;
}

.teacher-chat-page .chat-container.container {
    height: 100vh;
    max-width: 100%;
    padding: 0;
}

.teacher-stage-shell {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.teacher-stage-topbar {
    position: absolute;
    right: 1.8vw;
    top: 2rem;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 1rem;
    z-index: 5;
    pointer-events: auto;
}

.teacher-stage-voice-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.teacher-stage-voice-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.95);
    transition: transform 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.teacher-stage-voice-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    color: #2563eb;
    box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.98), 0 12px 24px rgba(37, 99, 235, 0.12);
}

.teacher-stage-voice-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.teacher-stage-back {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #4c453b;
    font-size: 0.96rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    position: relative;
    z-index: 6;
    pointer-events: auto;
}

.teacher-stage-back:hover {
    color: #2f66e8;
}

.teacher-stage-debug-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    font-size: 0.94rem;
    font-weight: 700;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.teacher-stage-debug-btn:hover {
    transform: translateY(-1px);
    color: #ef4444;
    border-color: rgba(254, 202, 202, 0.95);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12), 0 0 0 3px rgba(254, 226, 226, 0.75);
}

.teacher-stage-debug-btn.is-empty {
    opacity: 0.72;
}

.teacher-stage-rag-btn:hover {
    color: #0f766e;
    border-color: rgba(153, 246, 228, 0.95);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12), 0 0 0 3px rgba(204, 251, 241, 0.8);
}

.teacher-debug-open {
    overflow: hidden;
}

.teacher-debug-modal[hidden] {
    display: none;
}

.teacher-debug-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
}

.teacher-debug-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
}

.teacher-debug-dialog {
    position: relative;
    width: min(1100px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    margin: 1rem auto;
    padding: 1.2rem;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(245,248,255,0.98) 100%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.teacher-debug-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: #eef2ff;
    color: #334155;
    font-size: 1.5rem;
    cursor: pointer;
}

.teacher-debug-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.3rem;
}

.teacher-debug-header p {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.94rem;
}

.teacher-debug-meta {
    margin-top: 0.9rem;
    padding: 0.8rem 1rem;
    border-radius: 16px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.9rem;
    font-weight: 600;
}

.teacher-debug-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    min-height: 0;
    flex: 1;
}

.teacher-debug-card {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #dbe7f7;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
}

.teacher-debug-card h4 {
    margin: 0;
    padding: 0.95rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 1rem;
}

.teacher-debug-card pre {
    margin: 0;
    padding: 1rem;
    flex: 1;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.84rem;
    line-height: 1.55;
    color: #1e293b;
    background: transparent;
}

.teacher-rag-dialog {
    width: min(1180px, calc(100vw - 2rem));
}

.teacher-rag-grid {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
}

.teacher-rag-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
}

.teacher-rag-form label {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}

.teacher-rag-form label span {
    color: #334155;
    font-size: 0.84rem;
    font-weight: 700;
}

.teacher-rag-form input,
.teacher-rag-form textarea {
    width: 100%;
    border: 1px solid #dbe7f7;
    border-radius: 14px;
    padding: 0.82rem 0.9rem;
    font: inherit;
    color: #0f172a;
    background: #ffffff;
}

.teacher-rag-form textarea {
    min-height: 220px;
    resize: vertical;
}

.teacher-rag-submit-btn,
.teacher-rag-delete-btn {
    border: none;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.teacher-rag-submit-btn {
    padding: 0.82rem 1rem;
    background: linear-gradient(90deg, #14b8a6 0%, #0ea5e9 100%);
    color: #ffffff;
}

.teacher-rag-status {
    min-height: 1.2rem;
    margin: 0;
    color: #0f766e;
    font-size: 0.88rem;
    font-weight: 600;
}

.teacher-rag-list {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    overflow: auto;
}

.teacher-rag-empty {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
}

.teacher-rag-item {
    border: 1px solid #dbe7f7;
    border-radius: 18px;
    padding: 0.95rem 1rem;
    background: #ffffff;
}

.teacher-rag-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.teacher-rag-item-head h5 {
    margin: 0.35rem 0 0;
    color: #0f172a;
    font-size: 0.98rem;
}

.teacher-rag-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: #ecfeff;
    color: #0f766e;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.teacher-rag-item p {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.55;
}

.teacher-rag-delete-btn {
    padding: 0.56rem 0.85rem;
    background: #fff1f2;
    color: #e11d48;
}

.teacher-welcome-dialog {
    width: min(405px, calc(100vw - 2rem));
    padding: 1.5rem 1.5rem 1.35rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
}

.teacher-welcome-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
    line-height: 1.15;
    font-weight: 700;
}

.teacher-welcome-header p {
    margin: 0.65rem 0 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.teacher-welcome-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.35rem 0 1.5rem;
}

.teacher-welcome-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
}

.teacher-welcome-icon {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 1.45rem;
}

.teacher-welcome-item h3 {
    margin: 0;
    color: #2a2d33;
    font-size: 0.95rem;
    font-weight: 700;
}

.teacher-welcome-item p {
    margin: 0.2rem 0 0;
    color: #6b7280;
    font-size: 0.84rem;
    line-height: 1.5;
}

.teacher-welcome-start-btn {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 0.8rem 1rem;
    background: linear-gradient(90deg, #22b5f6 0%, #1592e6 100%);
    color: #ffffff;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(34, 181, 246, 0.22);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.chat-header h3 {
    color: #667eea;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    font-size: 2rem;
    flex-shrink: 0;
}

.message-avatar i {
    font-size: 1.35rem;
    color: #2563eb;
}

.message-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    object-fit: cover;
    display: block;
}

.message-content {
    background: #f5f7fa;
    padding: 1rem;
    border-radius: 10px;
    max-width: 70%;
}

.ai-response-title {
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 0.6rem;
}

.teacher-message .message-content {
    background: #eef4ff;
    border-radius: 22px;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    line-height: 1.48;
    color: #21304d;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.teacher-chat-page .stage-intro-message {
    align-self: flex-start;
    justify-content: flex-start;
    max-width: min(620px, 74%);
}

.teacher-chat-page .stage-intro-message .message-content {
    background: #eef4ff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
    color: #21304d;
    padding: 0.85rem 1rem;
    max-width: 100%;
    text-align: left;
    font-size: 0.95rem;
}

.teacher-chat-page .stage-intro-message .message-content p:first-child {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.65rem;
    text-align: center;
}

.teacher-chat-page .stage-intro-message .message-content p:last-of-type {
    font-size: clamp(0.95rem, 1.05vw, 1.12rem);
    line-height: 1.42;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-align: left;
}

.ai-learning-page .stage-intro-message .message-content p:last-of-type {
    font-family: "Caveat", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
    font-size: 2.13em;
    line-height: 1.34;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.teacher-chat-page .stage-intro-message .message-time {
    display: block;
    margin-top: 0.65rem;
    text-align: center;
    font-size: 0.88rem;
}

.ai-learning-page .teacher-message .message-content > p:not(:first-child),
.ai-learning-page .teacher-message .message-content li,
.ai-learning-page .teacher-message .message-content h1,
.ai-learning-page .teacher-message .message-content h2,
.ai-learning-page .teacher-message .message-content h3,
.ai-learning-page .teacher-message .message-content h4,
.ai-learning-page .teacher-message .message-content td,
.ai-learning-page .teacher-message .message-content th,
.ai-learning-page .teacher-message .ai-stream-content,
.ai-learning-page .teacher-message .ai-stream-content p,
.ai-learning-page .teacher-message .ai-stream-content li,
.ai-learning-page .teacher-message .ai-stream-content h1,
.ai-learning-page .teacher-message .ai-stream-content h2,
.ai-learning-page .teacher-message .ai-stream-content h3,
.ai-learning-page .teacher-message .ai-stream-content h4,
.ai-learning-page .teacher-message .ai-stream-content td,
.ai-learning-page .teacher-message .ai-stream-content th {
    font-family: "Caveat", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
    font-size: 1.34em;
    line-height: 1.34;
    letter-spacing: 0.01em;
}

.ai-learning-page .teacher-message .message-content > p:first-child,
.ai-learning-page .teacher-message .message-read-btn,
.ai-learning-page .teacher-message .message-voice-label,
.ai-learning-page .teacher-message .message-time,
.ai-learning-page .teacher-message .ai-voice-btn,
.ai-learning-page .teacher-message .ai-loader-copy {
    font-family: "Poppins", sans-serif;
}

.ai-learning-page .teacher-message .message-content > p:first-child,
.ai-learning-page .teacher-message .message-read-btn,
.ai-learning-page .teacher-message .message-voice-label,
.ai-learning-page .teacher-message .message-time,
.ai-learning-page .teacher-message .ai-voice-bar {
    display: none !important;
}

.teacher-message .message-content p,
.teacher-message .message-content li {
    font-size: 0.9rem;
    line-height: 1.48;
}

.teacher-message .message-content p {
    margin: 0 0 0.72rem;
}

.teacher-message .message-content p:last-of-type {
    margin-bottom: 0;
}

.teacher-message .message-content ol,
.teacher-message .message-content ul {
    margin: 0.35rem 0 0;
    padding-left: 1.5rem;
}

.teacher-message .message-content li {
    margin-bottom: 0.65rem;
    padding-left: 0.1rem;
}

.teacher-message .message-content li:last-child {
    margin-bottom: 0;
}

.teacher-message .message-content strong {
    display: inline;
    margin: 0;
    color: #0f172a;
    font-weight: 700;
}

.teacher-message .message-content h1,
.teacher-message .message-content h2,
.teacher-message .message-content h3,
.teacher-message .message-content h4 {
    font-size: 1.02rem;
    line-height: 1.4;
}

.ai-steps {
    display: grid;
    gap: 0.6rem;
}

.ai-step {
    background: #f3f7ff;
    border: 1px solid #d6e2ff;
    border-radius: 12px;
    padding: 0.65rem 0.75rem;
}

.ai-step-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #7c3aed;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.ai-followup {
    margin-top: 0.7rem;
    color: #0f172a;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
}

.message-content .p5-science,
.message-content .p5-science * {
    text-align: left !important;
}

.message-content .p5-science footer {
    background: #1e3a8a !important;
    color: #f8fafc !important;
    border: 1px solid #1d4ed8 !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
}

.message-content .p5-science footer * {
    color: #f8fafc !important;
}

.user-message .message-content {
    background: #1473e6;
    color: #ffffff;
    border-radius: 18px;
    padding: 0.85rem 1.05rem;
    position: relative;
    box-shadow: 0 8px 16px rgba(20, 115, 230, 0.22);
}

.user-message .message-content::after {
    content: "";
    position: absolute;
    right: 10px;
    bottom: -7px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid #1473e6;
}

.user-message .message-content p:first-child,
.user-message .message-content .message-time {
    display: none;
}

.user-message .message-content p {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.35;
}

.message-content strong {
    display: block;
    margin-bottom: 0.5rem;
}

.message-time {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    display: block;
}

.message-read-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.15rem;
    padding: 0.34rem 0.72rem;
    border-radius: 999px;
    border: 1px solid #bfd2f6;
    background: #ffffff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.message-read-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.message-read-btn.is-speaking {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1e40af;
}

.message-read-btn[hidden] {
    display: none !important;
}

.message-voice-label {
    margin-top: 0.45rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
}

.chat-input-area {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 0.8rem 1.35rem 1.25rem;
    border-top: none;
    background: linear-gradient(90deg, rgba(223, 244, 255, 0.82) 0%, rgba(242, 246, 255, 0.9) 48%, rgba(255, 238, 246, 0.82) 100%);
}

.chat-input-area form {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 0.75rem;
    max-width: 1180px;
    margin: 0 auto;
    background: linear-gradient(90deg, rgba(250, 253, 255, 0.96) 0%, rgba(255, 250, 253, 0.96) 100%);
    border: 1px solid rgba(230, 219, 195, 0.92);
    border-radius: 999px;
    padding: 0.8rem 0.95rem 0.8rem 1.2rem;
    box-shadow: 0 20px 40px rgba(69, 54, 20, 0.08);
}

.chat-input-area input {
    grid-column: 1 / 2;
    width: 100%;
    padding: 0.2rem 0.2rem 0.2rem;
    border: none;
    border-radius: 0;
    font-size: 1.18rem;
    background: transparent !important;
    color: #3c342f;
    text-align: left;
}

.chat-input-area input:focus {
    outline: none;
}

.chat-input-area input:-webkit-autofill,
.chat-input-area input:-webkit-autofill:hover,
.chat-input-area input:-webkit-autofill:focus,
.chat-input-area input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: #3c342f !important;
    transition: background-color 9999s ease-out 0s;
}

.chat-input-area input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.voice-input-btn {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(228, 231, 236, 0.95);
    background: rgba(255, 255, 255, 0.96);
    color: #7a8088;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 0 0 auto;
}

.voice-input-btn:hover {
    background: #dbe3ee;
}

.voice-input-btn.listening {
    background: #fee2e2;
    border-color: #f87171;
    color: #b91c1c;
    animation: voicePulse 1s ease-in-out infinite;
}

.voice-input-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.teacher-chat-page .chat-input-area .btn-primary {
    min-width: 34px;
    width: 34px;
    height: 34px;
    grid-column: 3 / 4;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    padding: 0;
    font-size: 0;
    background: transparent;
    color: inherit;
    border: none;
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    font-weight: 700;
}

.teacher-chat-page .chat-input-area .btn-primary::after {
    content: none;
}

.teacher-chat-page .chat-input-area .btn-primary img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}

.teacher-chat-page .chat-input-area .btn-primary:hover {
    transform: translateY(-1px);
    background: transparent;
    box-shadow: none;
    outline: none;
    opacity: 0.92;
}

.teacher-chat-page .chat-input-area .btn-primary:focus,
.teacher-chat-page .chat-input-area .btn-primary:focus-visible,
.teacher-chat-page .chat-input-area .btn-primary:active {
    background: transparent;
    border: none;
    box-shadow: none;
    outline: none;
    color: inherit;
}

.chat-image-attachment {
    margin-top: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #f8fbff;
    border: 1px solid #dbe7f7;
    border-radius: 10px;
    padding: 0.45rem 0.55rem;
}

.teacher-chat-page .chat-image-attachment {
    max-width: 860px;
    margin: 0.55rem auto 0;
}

.chat-image-attachment img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #c9d8ef;
    flex: 0 0 auto;
}

.chat-image-attachment-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    width: 100%;
    min-width: 0;
}

.chat-image-attachment-actions span {
    color: #334155;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clear-attachment-btn {
    border: 1px solid #fca5a5;
    background: #fff1f2;
    color: #b91c1c;
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
}

@keyframes voicePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Bubble Store */
.store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.little-lion-shop-page .content-section {
    margin-top: 1rem;
}

.little-lion-shop-page .content-section .container {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 28px;
    padding: 1.6rem;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.store-header h2 {
    margin: 0;
    color: #111827;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.bubbles-balance {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    padding: 0.95rem 1.15rem;
    border-radius: 18px;
    color: #111827;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.bubbles-balance p {
    font-size: 0.95rem;
    margin: 0;
    color: #475569;
}

.bubbles-balance strong {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.shop-description {
    color: #666;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.shop-description--light {
    color: #fff;
}

.little-lion-shop-page .shop-description {
    color: #64748b;
}

.store-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.9rem;
}

.store-categories {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.6rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.7rem 1rem;
    border: 1px solid #d7e1ec;
    background: #ffffff;
    color: #334155;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover, .category-btn.active {
    background: #111827;
    color: white;
    border-color: #111827;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.store-item {
    background: #ffffff;
    padding: 0;
    border-radius: 20px;
    border: 1px solid #e7edf4;
    box-shadow: none;
    text-align: left;
    transition: all 0.3s;
    overflow: hidden;
    cursor: pointer;
}

.store-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.item-image {
    font-size: 4rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 164px;
    padding: 1.25rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #edf2f7;
}

.item-image img {
    width: 100%;
    max-width: 132px;
    height: 132px;
    object-fit: contain;
    display: block;
}

.store-item h3,
.store-item p,
.item-price,
.stock-qty {
    margin-left: 0.95rem;
    margin-right: 0.95rem;
}

.store-item h3 {
    color: #1f2937;
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
    font-size: 1rem;
    line-height: 1.35;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.store-item p {
    color: #64748b;
    font-size: 0.84rem;
    margin-bottom: 0.7rem;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-price {
    color: #0f172a;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.stock-qty {
    color: #64748b;
    font-size: 0.82rem;
    margin-bottom: 0.85rem;
}

.stock-banner {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #ff4d4f;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(255, 77, 79, 0.3);
}

.store-item {
    position: relative;
}

.store-item.is-out-of-stock {
    cursor: default;
    opacity: 0.78;
}

.store-item.is-out-of-stock:hover {
    transform: none;
    box-shadow: none;
}

.btn-primary.disabled,
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-quest-mini.disabled,
.btn-quest-mini:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    border-color: transparent;
    box-shadow: none;
}

.quest-complete-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #cff7ef;
    color: #1f4b4a;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(36, 114, 110, 0.18);
}

/* Progress */
.progress-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.progress-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.subject-header {
    padding: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.math-header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.english-header {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.science-header {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}

.chinese-header {
    background: linear-gradient(135deg, #E91E63 0%, #C2185B 100%);
}

.skill-display {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    align-items: center;
}

.skill-circle {
    position: relative;
}

.skill-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
}

.skill-label {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 0.5rem;
}

.skill-description {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.progress-stats {
    display: flex;
    justify-content: space-around;
    padding: 1.5rem;
    background: #f5f7fa;
}

.progress-stats.secondary-stats {
    background: #fafbfc;
    border-top: 1px solid #e5e9f0;
    padding: 1rem 1.5rem;
}

.progress-stats.secondary-stats .stat-item h4 {
    font-size: 0.9rem;
    color: #667eea;
}

.progress-stats.secondary-stats .stat-item p {
    font-size: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-item h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: #666;
    font-size: 1.1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: #f5f7fa;
    padding: 1.5rem;
    border-radius: 10px;
}

.info-card h4 {
    color: #667eea;
    margin-bottom: 1rem;
}

.info-card p {
    color: #666;
}

/* Responsive */
/* Tablet/iPad authenticated pages: show primary nav as bottom dock */
@media (min-width: 769px) and (max-width: 1200px) {
    body:not(.public-page) {
        padding-bottom: 86px;
    }

    .navbar.dashboard-nav .container {
        max-width: 100%;
        padding: 0.2rem 0.8rem;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
    }

    .navbar.dashboard-nav .menu-toggle,
    .navbar.dashboard-nav .mobile-header-paws,
    .navbar.dashboard-nav .mobile-upgrade-band {
        display: none !important;
    }

    .navbar.dashboard-nav .nav-brand {
        flex: 0 0 auto;
    }

    .navbar.dashboard-nav .dashboard-nav-actions {
        margin-left: auto;
        gap: 0.5rem;
    }

    .navbar.dashboard-nav .logo {
        width: 106px;
        height: 41px;
    }

    .navbar.dashboard-nav .nav-links {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 8px;
        top: auto;
        transform: none;
        height: auto;
        width: auto;
        max-width: none;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        gap: 0;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        margin: 0;
        border-radius: 20px 20px 0 0;
        border: 1px solid #e5e7eb;
        border-bottom: 0;
        background: #ffffff;
        box-shadow: 0 -3px 12px rgba(15, 23, 42, 0.2);
        z-index: 1200;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        overflow: visible;
    }

    .navbar.dashboard-nav .nav-links li {
        flex: 1 1 0;
        min-width: 0;
        list-style: none;
        margin: 0;
        padding: 0;
        display: block !important;
    }

    .navbar.dashboard-nav .nav-links li.tablet-dock-item {
        display: block !important;
    }

    .navbar.dashboard-nav .nav-links li.mobile-action-item,
    .navbar.dashboard-nav .nav-links a.upgrade-btn {
        display: none !important;
    }

    /* Keep paws + notification + profile anchored inside top header on iPad */
    .tablet-header-actions {
        margin-left: auto;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        flex: 0 0 auto;
    }

    .tablet-header-actions .golden-paws-nav,
    .tablet-header-actions .notification-nav,
    .tablet-header-actions .profile-dropdown-container {
        display: block !important;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none;
        z-index: auto;
    }

    .tablet-header-actions .golden-paws-nav .paws-counter {
        width: auto;
        min-width: 86px;
        padding: 0.45rem 0.7rem;
        border-radius: 999px;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        box-shadow: none;
    }

    .tablet-header-actions .notification-nav .notification-btn {
        width: 40px;
        height: 40px;
        border-radius: 999px;
        border: 1px solid #e5e7eb;
        background: #ffffff;
    }

    .tablet-header-actions .profile-dropdown-container .profile-btn {
        padding: 0;
        border-radius: 999px;
        background: transparent;
    }

    .tablet-header-actions .profile-dropdown-container .plan-badge {
        right: -6px;
    }

    .navbar.dashboard-nav .nav-links a {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.22rem;
        width: 100%;
        color: #1f2937;
        font-size: 0.74rem;
        font-weight: 600;
        padding: 0.45rem 0.2rem;
        border-radius: 12px;
        white-space: normal;
        text-align: center;
        line-height: 1.15;
    }

    .navbar.dashboard-nav .nav-links .tablet-dock-label {
        display: inline-block;
        max-width: 100%;
    }

    .navbar.dashboard-nav .nav-links a.active,
    .navbar.dashboard-nav .nav-links a:hover {
        background: #f4f4f6;
    }

    .navbar.dashboard-nav .nav-links a .nav-icon,
    .navbar.dashboard-nav .nav-links a .nav-icon-svg {
        font-size: 1.06rem;
        width: 1.2rem;
        height: 1.2rem;
        margin: 0;
        flex: 0 0 auto;
    }

    .navbar.dashboard-nav .nav-links a .nav-icon-svg svg {
        width: 1.1rem;
        height: 1.1rem;
    }

    .navbar.dashboard-nav .nav-links .tablet-dock-item .floating-icon {
        width: 1.2rem;
        height: 1.2rem;
        min-width: 1.2rem;
        border-radius: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        color: #475569;
        font-size: 1.06rem;
        margin: 0;
    }

    .navbar.dashboard-nav .nav-links .tablet-dock-item .floating-icon svg,
    .navbar.dashboard-nav .nav-links .tablet-dock-item .floating-icon i {
        width: 1.1rem;
        height: 1.1rem;
        font-size: 1.06rem;
        color: inherit;
    }

    .navbar.dashboard-nav .nav-links .tablet-dock-item .floating-label {
        display: none;
    }

    .floating-menu,
    .dashboard-teacher-fab {
        display: none !important;
    }

    .welcome-card {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 1.1rem;
        min-height: 0;
        padding: 1.25rem 1.35rem;
    }

    .welcome-card-main,
    .welcome-card-content {
        min-width: 0;
    }

    .welcome-card-content h2 {
        font-size: clamp(1.8rem, 3.2vw, 2.35rem);
        line-height: 1.05;
        margin-bottom: 0.35rem;
        word-break: break-word;
    }

    .welcome-subtitle {
        font-size: 0.88rem;
        line-height: 1.45;
        max-width: none;
    }

    .welcome-card-illustration {
        min-width: 0;
        width: 100%;
        justify-content: flex-start;
        align-self: stretch;
    }

    .welcome-summary-card {
        width: min(100%, 360px);
        max-width: 100%;
        padding: 0.95rem 1rem;
        gap: 0.75rem;
    }

    .welcome-card-avatar {
        width: 62px;
        height: 62px;
        min-width: 62px;
    }

    .welcome-summary-copy strong {
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .welcome-summary-copy span {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .education-progress-grid {
        grid-template-columns: 1fr;
    }

    .education-progress-main-stack,
    .education-progress-quest-stack {
        min-width: 0;
    }

    .education-progress-quest-stack {
        margin-top: 0;
    }

    /* Teacher chat: keep input above tablet bottom dock */
    .teacher-chat-page .chat-area {
        position: relative;
    }

    .teacher-chat-page .chat-messages {
        padding-bottom: calc(165px + env(safe-area-inset-bottom));
    }

    .teacher-chat-page .chat-input-area {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        z-index: 1210;
        background: linear-gradient(90deg, rgba(223, 244, 255, 0.84) 0%, rgba(242, 246, 255, 0.9) 48%, rgba(255, 238, 246, 0.84) 100%);
        border-top: 0;
        padding: 0.55rem 0.7rem;
    }

    .teacher-chat-page .chat-input-area form {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        background: linear-gradient(90deg, rgba(250, 253, 255, 0.96) 0%, rgba(255, 250, 253, 0.96) 100%);
        border: 1px solid #e4eaf3;
        border-radius: 18px;
        padding: 0.45rem 0.5rem;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    }
}

/* Tablet styles */
@media (max-width: 1024px) {
    .navbar .container {
        padding: 0.25rem 0.8rem;
        flex-wrap: wrap;
        row-gap: 0.35rem;
    }


    .nav-links {
        gap: 0.2rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        padding: 0.42rem 0.75rem;
        font-size: 0.86rem;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .navbar {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .navbar.dashboard-nav .dashboard-nav-actions {
        display: none;
    }

    body {
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .stat {
        text-align: left;
    }
    
    .stat h3 {
        font-size: 1.5rem;
    }
    
    .stat p {
        font-size: 0.85rem;
    }
    
    .btn-large {
        width: 100%;
        text-align: center;
    }
    
    .hero-image {
        display: none;
    }
    
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .auth-benefits {
        display: none;
    }

    /* Mobile Navigation */
    .menu-toggle {
        display: flex !important;
        order: 3;
        margin-left: auto;
        flex-shrink: 0;
        z-index: 1101;
        width: 42px;
        height: 42px;
        padding: 0.5rem;
        border-radius: 14px;
    }

    .menu-toggle.active {
        position: fixed;
        top: 0.9rem;
        right: 0.9rem;
        margin-left: 0;
        background: #ffffff;
        border: 1px solid #ece7f2;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    }

    .menu-toggle span {
        width: 22px;
        height: 2.5px;
        background: #2f2a35;
    }

    .mobile-header-paws {
        display: inline-flex;
        align-items: center;
        gap: 0;
        padding: 0;
        border: 0;
        background: transparent;
        color: #0f2f5a;
        font-weight: 700;
        font-size: 1.02rem;
        order: 2;
        margin-left: auto;
        margin-right: 0.6rem;
        min-height: 34px;
    }

    .mobile-header-paws .top-stats-strip {
        gap: 0.85rem;
    }

    .mobile-header-paws .top-stat-item {
        gap: 0.28rem;
        font-size: 1rem;
    }

    .mobile-header-paws .top-stat-item i {
        font-size: 1.08rem;
    }

    .mobile-header-paws .top-stat-item span {
        font-size: 1rem;
    }

    .mobile-header-paws .paw-icon-mini {
        width: 18px;
        height: 18px;
    }

    .mobile-header-paws .paw-icon-mini img {
        width: 12px;
        height: 12px;
    }

    .mobile-upgrade-band {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.45rem 0.8rem;
        background: linear-gradient(90deg, #eff6ff 0%, #dbeafe 100%);
        border-top: 1px solid #dbe5f7;
        border-bottom: 1px solid #dbe5f7;
    }

    .mobile-upgrade-text {
        color: #1e3a8a;
        font-size: 0.78rem;
        font-weight: 600;
    }

    .mobile-upgrade-btn {
        text-decoration: none;
        background: #2563eb;
        color: #ffffff;
        border-radius: 8px;
        padding: 0.3rem 0.7rem;
        font-size: 0.72rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .navbar .container {
        width: 100%;
        max-width: 100vw;
        padding: 0 0.1rem;
        flex-wrap: nowrap;
        position: relative;
        justify-content: space-between;
        border-bottom: none;
        min-height: 72px;
    }

    .nav-brand {
        order: 1;
        border: none;
        min-height: 72px;
        display: flex;
        align-items: center;
    }

    /* Hide desktop-only items on mobile */
    .nav-links li.desktop-only {
        display: none !important;
    }

    /* Ensure nav-links don't create visual line */
    .nav-links {
        position: fixed !important;
        top: 0;
        right: -100% !important;
        height: 100vh;
        width: 294px;
        max-width: 85vw;
        background: #ffffff;
        flex-direction: column;
        padding: 0.1rem 1rem 1.15rem !important;
        gap: 0;
        box-shadow: -12px 0 32px rgba(15, 23, 42, 0.12);
        border-left: 1px solid #e5e7eb;
        transition: right 0.3s ease-in-out, visibility 0.3s, opacity 0.3s;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1000;
        justify-content: flex-start;
        align-items: flex-start;
        -webkit-overflow-scrolling: touch;
        order: 2;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        display: flex !important;
        transform: translateX(0);
        z-index: 1100;
    }

    .nav-links::before {
        content: none !important;
        display: none !important;
    }

    .nav-links.active {
        right: 0 !important;
        padding-top: 0.1rem !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    /* Ensure nav-links list items don't show */
    .nav-links:not(.active) li {
        display: none !important;
    }
    
    .nav-links.active li {
        display: block !important;
    }

    .nav-links li {
        width: 100%;
        list-style: none;
        margin: 0 0 0.16rem;
        padding: 0;
    }

.mobile-menu-avatar {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-menu-avatar {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        justify-content: stretch;
        padding: 0.2rem 0 0.8rem;
        margin: 0 0 0.45rem !important;
        border-bottom: 1px solid #f1f2f6;
    }

    .mobile-menu-avatar-card {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.42rem;
        background: transparent;
        border: 0;
        border-radius: 0;
        padding: 0.25rem 0.25rem 0.65rem;
    }

    .mobile-menu-avatar-copy {
        min-width: 0;
        flex: 0 0 auto;
        text-align: center;
    }

    .mobile-menu-avatar-name {
        color: #23212a;
        font-size: 0.96rem;
        font-weight: 600;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-menu-avatar-meta {
        margin-top: 0.12rem;
        color: #7a7681;
        font-size: 0.74rem;
        font-weight: 500;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-menu-avatar img {
        width: 56px;
        height: 56px;
        border-radius: 999px;
        object-fit: cover;
        display: block;
        border: 3px solid #ffd85a;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
        flex: 0 0 auto;
    }

    .mobile-menu-profile-link {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        width: 100%;
        padding: 0.78rem 0.85rem;
        border-radius: 14px;
        background: #eef3f9;
        color: #2f2a35;
        text-decoration: none;
    }

    .mobile-menu-profile-link-icon {
        width: 1rem;
        height: 1rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #5b6472;
        flex: 0 0 auto;
    }

    .mobile-menu-profile-link-text {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.92rem;
        font-weight: 500;
        text-align: center;
    }

    .mobile-menu-profile-link-arrow {
        display: none;
    }
}
    
    /* Mobile Golden Paws alignment */
    .golden-paws-nav {
        display: none !important;
    }
    
    .paws-counter {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 1.1rem;
    }

    .golden-paws-nav {
        margin-bottom: 0.75rem !important;
    }
    
    .notification-btn {
        width: 100%;
        height: 48px;
        border-radius: 12px;
    }

    /* Mobile: hide notification + profile items */
    .notification-nav,
    .profile-dropdown-container {
        display: none !important;
    }

    /* Mobile: hide paws + upgrade items inside slide menu on all pages */
    .nav-links .golden-paws-nav,
    .nav-links a.upgrade-btn {
        display: none !important;
    }

    .nav-links .golden-paws-nav {
        visibility: hidden !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        overflow: hidden !important;
        list-style: none !important;
    }


    .mobile-action-item {
        width: 100%;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-action-link {
        display: block;
        width: 100%;
        padding: 0.42rem 0.55rem;
        font-size: 0.72rem;
        border-radius: 10px;
        margin-bottom: 0.08rem;
        text-align: left;
        color: #22335d;
        text-decoration: none;
        background: transparent;
        border: 1px solid transparent;
    }

    .mobile-action-link .nav-icon {
        margin-right: 0.28rem;
        width: 0.72rem;
        text-align: center;
    }

    .mobile-action-link:hover {
        background: #f6f8fc;
    }

    .mobile-action-link.active {
        background: #f3f6fb;
        border-color: #e2e8f0;
    }
    
    /* Mobile notification dropdown */
    .notification-dropdown {
        width: calc(100vw - 2rem);
        right: 1rem;
        left: 1rem;
        max-width: 380px;
    }
    
    .notification-dropdown.show {
        position: fixed;
        top: 80px;
        right: 1rem;
        left: auto;
    }

    .nav-links a {
        display: flex;
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.82rem 0.2rem;
        font-size: 0.98rem;
        font-weight: 500;
        border-radius: 0;
        margin-bottom: 0;
        text-align: left;
        color: #2f2a35;
        -webkit-tap-highlight-color: transparent;
        border: 1px solid transparent;
        border-bottom-color: #f4f4f6;
        white-space: nowrap;
        gap: 0.4rem;
    }

    .nav-links a:hover, .nav-links a.active {
        background: transparent;
        border-color: transparent;
        border-bottom-color: #f4f4f6;
        color: #16131d;
    }

    .nav-links a .nav-icon,
    .nav-links a .nav-icon-svg {
        margin-right: 0.38rem;
        font-size: 1.08rem;
        color: #3b3742;
        flex: 0 0 auto;
    }

    .navbar.dashboard-nav .nav-links a .nav-icon,
    .navbar.dashboard-nav .nav-links a .nav-icon-svg {
        width: 1.24rem;
        height: 1.24rem;
        min-width: 1.24rem;
        font-size: 1.08rem;
        margin-right: 0.38rem;
    }

    .navbar.dashboard-nav .nav-links a .nav-icon-svg svg {
        width: 1.08rem;
        height: 1.08rem;
    }

    .nav-links a .nav-icon + *,
    .nav-links a .nav-icon-svg + * {
        flex: 1 1 auto;
        min-width: 0;
        white-space: nowrap;
    }

    .nav-links a::after {
        content: "\203A";
        font-size: 1.1rem;
        line-height: 1;
        color: #8d8895;
        margin-left: 0.75rem;
        flex: 0 0 auto;
    }

    .nav-links a.active .nav-icon,
    .nav-links a.active .nav-icon-svg,
    .nav-links a:hover .nav-icon,
    .nav-links a:hover .nav-icon-svg {
        color: #1f1b24;
    }

    .nav-links a span,
    .nav-links a .nav-label,
    .nav-links a {
        letter-spacing: 0;
    }

    .mobile-action-link .mobile-action-text {
        flex: 1 1 auto;
        min-width: 0;
        white-space: nowrap;
    }

    .mobile-action-link [data-lucide],
    .mobile-action-link .nav-icon-svg,
    .mobile-action-link .nav-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.08rem;
        height: 1.08rem;
        min-width: 1.08rem;
        margin-right: 0.38rem;
        color: #3b3742;
        flex: 0 0 auto;
    }

    .mobile-action-link svg {
        width: 1rem;
        height: 1rem;
        display: block;
    }

    .nav-links a.logout-link {
        margin-top: 0.6rem;
        border-top: 1px solid #f1f2f6;
        padding-top: 1rem;
    }

    /* Mobile Sign In/Sign Up Buttons */
    .nav-links a.nav-login-btn {
        background: rgba(255,255,255,0.15);
        border: 2px solid rgba(255,255,255,0.6);
        font-weight: 600;
        text-align: center;
        margin-top: 1rem;
    }

    .nav-links a.btn-primary {
        background: white;
        color: #667eea;
        font-weight: 600;
        border: none;
        text-align: center;
    }

    .nav-links a.logout-link {
        margin-left: 0;
        margin-top: 1rem;
        text-align: center;
    }

    .dashboard-page .navbar.dashboard-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        right: auto;
        width: 92px;
        background: transparent;
        border: 0;
        box-shadow: none;
        z-index: 1200;
    }

    .dashboard-page .navbar.dashboard-nav .container {
        display: block;
        min-height: 100vh;
        padding: 0;
    }

    .dashboard-page .navbar.dashboard-nav .nav-brand,
    .dashboard-page .navbar.dashboard-nav .menu-toggle,
    .dashboard-page .navbar.dashboard-nav .mobile-header-paws,
    .dashboard-page .navbar.dashboard-nav .dashboard-nav-actions,
    .dashboard-page .mobile-upgrade-band {
        display: none !important;
    }

    .dashboard-page .navbar.dashboard-nav .nav-links,
    .dashboard-page .navbar.dashboard-nav .nav-links.active {
        position: fixed !important;
        top: 0;
        left: 0 !important;
        right: auto !important;
        width: 92px;
        max-width: 92px;
        height: 100vh;
        padding: max(16px, env(safe-area-inset-top)) 0 max(14px, env(safe-area-inset-bottom)) !important;
        background: linear-gradient(180deg, #dbe7fb 0%, #afc9fb 100%);
        border: 0;
        border-radius: 0 28px 28px 0;
        box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.28);
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .dashboard-page .navbar.dashboard-nav .nav-links:not(.active) li,
    .dashboard-page .navbar.dashboard-nav .nav-links.active li {
        display: flex !important;
    }

    .dashboard-page .navbar.dashboard-nav .nav-links li {
        width: 100%;
        margin: 0;
        display: flex;
        justify-content: center;
        flex: 0 0 auto;
    }

    .dashboard-page .navbar.dashboard-nav .nav-links li.mobile-action-item:first-of-type {
        margin-top: auto;
        padding-top: 10px;
    }

    .dashboard-page .mobile-menu-avatar {
        display: flex !important;
        width: 100%;
        padding: 2px 0 8px;
        margin: 0 0 8px !important;
        border: 0;
        justify-content: center;
    }

    .dashboard-page .mobile-menu-avatar-card {
        padding: 0;
        gap: 0;
    }

    .dashboard-page .mobile-menu-avatar img {
        width: 54px;
        height: 54px;
        border-radius: 999px;
        border: 3px solid rgba(255, 255, 255, 0.9);
        box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
    }

    .dashboard-page .mobile-menu-avatar-copy,
    .dashboard-page .mobile-menu-profile-link {
        display: none !important;
    }

    .dashboard-page .navbar.dashboard-nav .nav-links a,
    .dashboard-page .mobile-action-link {
        width: 76px;
        min-width: 76px;
        height: 66px;
        padding: 0;
        margin: 0;
        border: 0;
        border-radius: 0 22px 22px 0;
        background: transparent;
        color: transparent;
        font-size: 0;
        line-height: 0;
        justify-content: center;
        gap: 0;
    }

    .dashboard-page .navbar.dashboard-nav .nav-links a::after,
    .dashboard-page .mobile-action-link::after {
        content: none;
    }

    .dashboard-page .navbar.dashboard-nav .nav-links a .nav-icon,
    .dashboard-page .navbar.dashboard-nav .nav-links a .nav-icon-svg,
    .dashboard-page .mobile-action-link .nav-icon,
    .dashboard-page .mobile-action-link .nav-icon-svg,
    .dashboard-page .mobile-action-link [data-lucide] {
        width: 24px;
        height: 24px;
        min-width: 24px;
        margin: 0;
        color: #111827;
        font-size: 1.28rem;
    }

    .dashboard-page .navbar.dashboard-nav .nav-links a .nav-icon-svg svg,
    .dashboard-page .mobile-action-link svg {
        width: 22px;
        height: 22px;
    }

    .dashboard-page .navbar.dashboard-nav .nav-links a.active,
    .dashboard-page .navbar.dashboard-nav .nav-links a:hover,
    .dashboard-page .mobile-action-link.active,
    .dashboard-page .mobile-action-link:hover {
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(78, 117, 202, 0.2);
    }

    .dashboard-page .dashboard {
        min-height: 100vh;
        padding-top: 1rem;
        padding-left: 104px;
    }

    .dashboard-page .dashboard .container {
        padding: 0 0.9rem 1.25rem 0.55rem;
    }
    
    /* Profile dropdown mobile */
    .profile-dropdown-container {
        margin-top: 1rem;
    }
    
    .profile-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }
    
    .profile-dropdown {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        transform: none;
    }
    
    .profile-dropdown.show {
        transform: none;
    }

    .nav-brand h1 {
        font-size: 1.2rem;
    }
    
    /* Dashboard mobile responsiveness */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .welcome-card-main {
        width: 100%;
        align-items: center;
    }

    .welcome-card-illustration {
        width: 100%;
        justify-content: flex-start;
        align-self: stretch;
        min-width: 0;
        padding-right: 0;
    }

    .welcome-card-illustration::before,
    .welcome-card-illustration::after {
        display: none;
    }

    .calendar-icon {
        width: 96px;
        height: 96px;
        margin-top: 0.5rem;
        margin-left: auto;
    }

    .calendar-icon {
        display: none;
    }

    .calendar-day {
        font-size: 2rem;
        padding-bottom: 0.4rem;
    }

    .welcome-summary-card {
        min-width: 0;
        width: 100%;
        padding: 0.95rem 1rem;
    }

    .welcome-card-avatar {
        width: 62px;
        height: 62px;
        min-width: 62px;
    }

    .welcome-summary-copy strong {
        font-size: 0.95rem;
    }

    .welcome-summary-copy span {
        font-size: 0.84rem;
    }

    .welcome-date {
        font-size: 0.72rem;
        margin-bottom: 0.55rem;
    }

    .library-card {
        width: 100%;
        margin-bottom: 1.5rem;
        height: 140px;
        min-height: 140px;
    }

    .dashboard .library-card {
        display: none !important;
    }

    .welcome-row {
        grid-template-columns: 1fr;
        margin-bottom: 1.5rem;
    }

    .welcome-main-column {
        gap: 0.9rem;
    }

    .welcome-row .dashboard-header {
        margin-bottom: 0;
        height: auto;
        min-height: 220px;
    }

    .welcome-badge-card {
        padding: 0.95rem;
    }

    .welcome-leaderboard-summary {
        grid-template-columns: 1fr;
    }

    .leaderboard-position-card,
    .leaderboard-points-card {
        text-align: center;
        align-items: center;
        justify-items: center;
    }

    .leaderboard-crown-avatar {
        margin-left: auto;
        margin-right: auto;
    }

    .welcome-side-stack {
        display: flex;
        flex-direction: column;
    }

    .welcome-friends-copy h3 {
        font-size: 1.7rem;
    }

    .welcome-friends-copy p {
        max-width: none;
    }

    .weekly-quiz-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .weekly-quiz-art {
        min-height: 170px;
        width: 100%;
        height: 170px;
    }

    .weekly-quiz-content {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0.2rem 0.1rem 0.1rem;
        min-height: 0;
        height: auto;
    }

    .weekly-quiz-content h3 {
        max-width: none;
        font-size: 1.45rem;
    }
    
    .dashboard-header h2 {
        font-size: 1.3rem;
    }
    
    .bubbles-display {
        width: 100%;
        padding: 0.8rem 1rem;
        gap: 0.8rem;
    }
    
    .bubble-icon {
        font-size: 2rem;
    }
    
    .golden-paw-icon {
        width: 36px;
        height: 36px;
    }
    
    .golden-paw-icon-inline {
        width: 18px;
        height: 18px;
    }
    
    .bubble-count {
        font-size: 1.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard {
        padding: 1rem 0;
    }
    
    .dashboard .container {
        padding: 0 1rem;
    }
    
    .chat-layout {
        grid-template-columns: 1fr;
    }

    .chat-layout.full-width,
    .chat-layout.full-width.sidebar-expanded {
        grid-template-columns: 1fr;
    }
    
    .teachers-sidebar {
        display: none !important;
    }

    .chat-area {
        width: 100%;
        min-width: 0;
    }

    .chat-input-area form {
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .chat-input-area input {
        min-width: 0;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    .navbar .container {
        padding: 0;
    }

    .nav-brand h1 {
        font-size: 1rem;
    }

    .logo {
        width: 108px;
        height: auto;
        max-height: 60px;
    }

    .header-menuai-icon {
        width: 28px;
        height: 28px;
    }

    .nav-links {
        width: 100%;
        right: -100%;
    }

    .nav-links.active {
        right: 0;
    }
}

/* Golden Paw Toast Notification */
.golden-paw-toast {
    position: fixed;
    top: 80px;
    right: -400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 10000;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 280px;
}

.golden-paw-toast.show {
    right: 20px;
}

.golden-paw-toast-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.golden-paw-toast-icon {
    width: 56px;
    height: 56px;
    animation: pawBounce 0.6s ease-in-out;
}

.golden-paw-toast-text {
    flex: 1;
}

.golden-paw-amount {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: var(--paw-color);
}

.golden-paw-label {
    font-size: 0.9rem;
    opacity: 0.95;
    font-weight: 500;
}

@keyframes pawBounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.2) rotate(-10deg);
    }
    50% {
        transform: scale(1.1) rotate(10deg);
    }
    75% {
        transform: scale(1.15) rotate(-5deg);
    }
}

/* Mobile Golden Paw Toast */
@media (max-width: 768px) {
    .golden-paw-toast {
        top: auto;
        bottom: -200px;
        right: 50%;
        transform: translateX(50%);
        min-width: 90%;
        max-width: 320px;
        transition: bottom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }
    
    .golden-paw-toast.show {
        bottom: 20px;
        right: 50%;
    }
    
    .golden-paw-toast-icon {
        width: 48px;
        height: 48px;
    }
    
    .golden-paw-amount {
        font-size: 1.8rem;
    }
}

/* Daily Quest Section */
.daily-quests-section {
    margin-bottom: 2rem;
}

.daily-quests-section .section-title {
    color: #ffffff;
}

.classroom-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 0.6rem;
}

.classroom-section.only-schedule {
    grid-template-columns: 1fr;
}

.classroom-main-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.classroom-shop {
    min-width: 0;
    display: flex;
    margin-top: 0;
}

.classroom-shop-inline {
    align-self: stretch;
}

.classroom-shop .quick-start-card {
    width: 100%;
    min-height: 372px;
    max-height: 372px;
    padding: 2.55rem 0.9rem 0.8rem;
    gap: 0.75rem;
    overflow: hidden;
}

.classroom-shop .quick-start-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    height: 100%;
    min-height: 0;
    padding: 0.72rem;
    overflow: hidden;
}

.classroom-shop .quick-start-card .card-body p {
    margin: 0;
    line-height: 1.34;
}

.classroom-shop .shop-description {
    font-size: 0.84rem;
}

.classroom-shop .featured-rewards {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.classroom-shop .reward-item {
    align-items: center;
    margin-bottom: 0;
    padding: 0.55rem 0.65rem;
    gap: 0.7rem;
    border-radius: 14px;
}

.classroom-shop .reward-item h4,
.classroom-shop .reward-item p {
    margin: 0;
}

.classroom-shop .reward-item h4 {
    font-size: 0.9rem;
    line-height: 1.2;
}

.classroom-shop .reward-item p {
    font-size: 0.82rem;
    line-height: 1.2;
}

.classroom-shop .reward-thumb {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.classroom-shop .welcome-shop-card {
    min-height: 372px;
}

.subjects-showcase-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
    margin-top: 0;
    margin-bottom: 2rem;
    max-width: 760px;
}

.subjects-showcase-row-inline {
    margin-top: 0.35rem;
    margin-bottom: 0;
    max-width: none;
}

.learning-catalog-section {
    margin-bottom: 0;
    padding: 1.2rem 1.25rem 1.35rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(226, 232, 240, 0.28);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.learning-catalog-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.35;
    pointer-events: none;
}

.learning-catalog-header,
.learning-course-grid {
    position: relative;
    z-index: 1;
}

.learning-catalog-header {
    margin-bottom: 1rem;
}

.learning-catalog-header h3 {
    margin: 0;
    color: #3f3f46;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.learning-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 235px));
    gap: 0.9rem;
    justify-content: start;
}

.learning-course-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    width: 100%;
    max-width: 235px;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #cfd8e3;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.learning-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
}

.learning-course-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.55rem;
    background: linear-gradient(180deg, #4fc0ff 0%, #2f9df2 100%);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
}

.learning-course-tier {
    opacity: 0.95;
}

.learning-course-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0.68rem 0.68rem 0.52rem;
}

.learning-course-body h4 {
    margin: 0 0 0.6rem;
    color: #374151;
    font-size: 0.92rem;
    line-height: 1.18;
    min-height: 2.2em;
}

.learning-course-art {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 132px;
    margin-bottom: 0.6rem;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
    border: 1px solid #dbe5f0;
}

.learning-course-art img {
    width: 100%;
    max-width: 144px;
    height: 114px;
    object-fit: contain;
}

.learning-course-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    color: #6b7280;
    font-size: 0.78rem;
}

.learning-course-meta span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.learning-course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.64rem 0.72rem;
    background: linear-gradient(180deg, #ffe89d 0%, #f7d971 100%);
    border-top: 1px solid #efcf68;
    color: #1f2937;
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
}

.learning-course-status,
.learning-course-action {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}

.learning-course-action {
    font-size: 0.72rem;
}

.subjects-side-card {
    min-height: 100%;
}

.subjects-side-card .library-feature-body h4 {
    font-size: 1.55rem;
}

.subjects-side-card .library-feature-body {
    padding: 0.9rem 1rem 1rem;
}

.classroom-left .section-header {
    margin-bottom: 1rem;
    position: static;
    z-index: 2;
}

.classroom-left .section-header h3 {
    font-size: 1.25rem;
    margin: 0;
    color: #f28a33;
    font-weight: 700;
    font-style: italic;
    background: #fff6ed;
    border-radius: 0 0 22px 0;
    padding: 0.35rem 1rem 0.4rem 0.65rem;
    position: absolute;
    top: 0;
    left: 0;
    line-height: 1.1;
    z-index: 3;
}

.classroom-left {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 36px;
    padding: 3.4rem 1.4rem 1.3rem;
    border: 2px solid #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    position: relative;
    overflow: hidden;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.classroom-left::before {
    content: '';
    position: absolute;
    right: -30px;
    top: -28px;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: #f3f4f6;
    z-index: 1;
}

.classroom-left::after {
    content: '';
    position: absolute;
    left: -46px;
    bottom: -52px;
    width: 134px;
    height: 134px;
    border-radius: 50%;
    background: #f3f4f6;
    z-index: 1;
}

.classroom-subtitle {
    margin: 2.75rem 0 0.75rem;
    color: #f8fffb;
    font-size: 1.35rem;
    line-height: 1.2;
}

.classroom-subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
    position: relative;
    z-index: 2;
}


.classroom-subject-card {
    border-radius: 20px;
    padding: 0;
    box-shadow: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    display: flex;
    justify-content: center;
}

.classroom-subject-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.classroom-subject-card.math {
    background: transparent;
}

.classroom-subject-card.english {
    background: transparent;
}

.classroom-subject-card.science {
    background: transparent;
}

.classroom-subject-card.chinese {
    background: transparent;
}

.classroom-frame {
    background: transparent;
    border-radius: 16px;
    padding: 0.4rem 0.8rem 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
    position: relative;
    border: none;
    box-shadow: none;
}

.classroom-frame img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border: 2px solid #d6dde8;
    border-radius: 12px;
    background: #ffffff;
    padding: 3px;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.15));
    transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
    transform-origin: center;
}

.classroom-subject-card:hover .classroom-frame img {
    transform: translateY(-6px) scale(1.05) rotate(-4deg);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
    filter: drop-shadow(0 14px 24px rgba(0,0,0,0.18));
}

.classroom-frame span {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #2c3e50;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

.classroom-right .dashboard-card {
    height: 100%;
}

.class-schedule-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 26px;
    border: 1px solid rgba(217, 226, 238, 0.95);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.class-schedule-card::before {
    content: none;
}

.class-schedule-card::after {
    content: none;
}

.class-schedule-card .panel-header {
    position: relative;
    z-index: 2;
    margin-bottom: 0.1rem;
}

.class-schedule-card .panel-header h3 {
    font-size: 1.08rem;
    margin: 0;
    color: #1f2937;
    font-weight: 800;
    background: transparent;
    padding: 0;
    position: static;
    line-height: 1.1;
}

.class-schedule-card .panel-link {
    background: transparent;
    color: #64748b;
    border: 0;
    padding-right: 0;
}

.class-schedule-card .panel-link:hover {
    color: #1f2937;
    background: transparent;
}

.class-schedule-card .schedule-list {
    position: relative;
    z-index: 2;
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: 0;
}

.quick-start-card {
    background: linear-gradient(135deg, #4eb3e3 0%, #3ca6da 100%);
    border-radius: 32px;
    border: 4px solid #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    padding: 3.1rem 1.2rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
}

.quick-start-card::before {
    content: '';
    position: absolute;
    right: -34px;
    top: -30px;
    width: 122px;
    height: 122px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.quick-start-card::after {
    content: '';
    position: absolute;
    left: -52px;
    bottom: -58px;
    width: 145px;
    height: 145px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.quick-start-card .panel-header {
    position: relative;
    z-index: 2;
}

.quick-start-card .panel-header h3 {
    font-size: 1.15rem;
    margin: 0;
    color: #37a7e6;
    font-weight: 700;
    font-style: italic;
    background: #f6fbff;
    border-radius: 0 0 22px 0;
    padding: 0.35rem 0.95rem 0.45rem 0.65rem;
    position: absolute;
    top: -2.5rem;
    left: -1.2rem;
    line-height: 1.1;
}

.quick-start-card .panel-link {
    background: rgba(255, 255, 255, 0.2);
    color: #f2fbff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.quick-start-card .panel-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.3);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 700;
}

.panel-link {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: #f4f6fb;
}

.panel-link:hover {
    color: #1f2937;
}

.panel-card .card-body {
    padding: 0;
}

.quick-start-card .quick-start-list,
.quick-start-card .card-body {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.84);
    border-radius: 22px;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.quick-start-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.quick-start-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
    background: #f9fafc;
    text-decoration: none;
    border: 1px solid #eef2f7;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-start-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.quick-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #dfe7ff, #c7d6ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    color: #4f46e5;
}

.quick-icon i {
    font-size: 1.18rem;
}

.quick-text h4 {
    margin: 0 0 0.2rem;
    font-size: 0.98rem;
    color: #1f2937;
    font-weight: 700;
}

.quick-text p {
    margin: 0;
    color: #6b7280;
    font-size: 0.85rem;
}

.quick-start-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #0b73b8;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(11, 115, 184, 0.25);
}

.quick-start-cta:hover {
    background: #0a5fa6;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.schedule-item {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    padding: 0.9rem 0.95rem 0.95rem;
    border-radius: 18px;
    background: #ffffff;
    text-decoration: none;
    border: 1px solid #eceff5;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.schedule-item.is-past-cutoff {
    opacity: 0.5;
    filter: grayscale(1);
}

.schedule-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.schedule-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    border-radius: 18px 18px 0 0;
}

.schedule-item-top,
.schedule-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.schedule-item-top {
    margin-top: 0.15rem;
}

.schedule-more-btn {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.95rem;
    cursor: pointer;
    flex-shrink: 0;
}

.schedule-more-btn:hover {
    background: #f1f5f9;
}

.schedule-avatars {
    display: flex;
    align-items: center;
}

.schedule-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: -8px;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    color: #334155;
    font-size: 0.9rem;
}

.schedule-avatar.avatar-one {
    background: #fde68a;
}

.schedule-avatar.avatar-two {
    background: #fecaca;
}

.schedule-avatar.avatar-three {
    background: #d9f99d;
}

.schedule-add-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e355e;
    color: #ffffff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.dot-purple {
    background: linear-gradient(90deg, #ff7a59, #ff5e3a);
}

.dot-blue {
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
}

.dot-peach {
    background: linear-gradient(90deg, #f59e0b, #fb923c);
}

.dot-red {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.dot-green {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.welcome-back-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 16, 24, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.5rem;
}

.welcome-back-modal.is-visible {
    display: flex;
}

.welcome-back-card {
    width: min(420px, 100%);
    background: #ffffff;
    border-radius: 14px;
    padding: 1.1rem 1rem 1.35rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    position: relative;
    backdrop-filter: blur(2px);
}

.welcome-back-close {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #dbe3ee;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: #4a5568;
}

.welcome-back-media {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 10px;
    padding: 0.5rem 0.25rem 0.35rem;
    margin-top: 0.2rem;
}

.welcome-back-media img {
    width: 135px;
    height: 135px;
    object-fit: contain;
}

.welcome-back-main-img {
    border-radius: 999px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.welcome-back-main-img.is-speaking {
    box-shadow:
        0 0 0 10px rgba(255, 255, 255, 0.95),
        0 0 42px rgba(184, 126, 255, 0.54),
        0 0 74px rgba(137, 220, 255, 0.48);
    transform: scale(1.05);
}

.welcome-back-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    color: #0f172a;
}

.welcome-back-content p {
    margin: 0.2rem 0 1.35rem;
    color: #475569;
    text-align: center;
    min-height: 2.4em;
    padding: 0 0.6rem;
    white-space: normal;
}

.welcome-back-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.1rem;
    margin-bottom: 0.35rem;
}

.welcome-back-content .btn-primary {
    border-radius: 999px;
    padding: 0.6rem 1.5rem;
}

.welcome-back-actions .game-button {
    display: inline-block;
    padding: 7px 27px;
    font-family: 'Arial Black', sans-serif;
    font-size: 19px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 9px;
    cursor: pointer;
    background: linear-gradient(to bottom, #ffe100 0%, #f7b500 100%);
    border: 3px solid #000;
    color: white;
    -webkit-text-stroke: 1px black;
    text-shadow: 2px 2px 0 #000;
    box-shadow: 0 4px 0 #000;
    transition: all 0.1s ease;
    position: relative;
    margin: 0 auto;
}

.welcome-back-actions .game-button:active {
    box-shadow: 0 1px 0 #000;
    transform: translateY(3px);
}

.welcome-back-actions .game-button::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    height: 30%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px 5px 0 0;
    pointer-events: none;
}

@media (max-width: 520px) {
    .welcome-back-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .welcome-back-media {
        justify-content: center;
    }
}

.schedule-text h4 {
    margin: 0 0 0.2rem;
    font-size: 1rem;
    color: #1f2937;
    font-weight: 700;
}

.schedule-text p {
    margin: 0;
    font-size: 0.84rem;
    color: #6b7280;
}

.schedule-arrow {
    margin-left: auto;
    color: #94a3b8;
    font-size: 1.3rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .subjects-showcase-row {
        grid-template-columns: 1fr;
    }

    .learning-catalog-section {
        padding: 1rem;
        border-radius: 22px;
    }

    .learning-catalog-header h3 {
        font-size: 0.96rem;
    }

    .learning-course-grid {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .learning-course-footer {
        font-size: 0.86rem;
    }

    .learning-course-action {
        font-size: 0.74rem;
    }

    .learning-course-card {
        max-width: none;
    }

    .class-schedule-card {
        padding: 1.1rem;
    }
}

@media (max-width: 1024px) {
    .education-progress-side-stack {
        grid-template-rows: auto auto;
    }

    .quiz-friends-actions {
        grid-template-columns: 1fr;
    }

    .classroom-section {
        grid-template-columns: 1fr;
    }
}

.section-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.activity-trends-row {
    display: block;
    margin-bottom: 1.5rem;
}

.leaderboard-page-shell {
    padding: 2rem 0 3rem;
}

.leaderboard-hero,
.leaderboard-stage-card,
.leaderboard-table-card {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(26, 40, 92, 0.16);
}

.leaderboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.35rem;
    background:
        radial-gradient(circle at 15% 18%, rgba(112, 197, 255, 0.25) 0, transparent 24%),
        radial-gradient(circle at 84% 16%, rgba(255, 170, 214, 0.26) 0, transparent 22%),
        linear-gradient(135deg, rgba(232, 246, 255, 0.98) 0%, rgba(255, 244, 250, 0.98) 100%);
}

.leaderboard-hero-kicker {
    display: inline-block;
    margin-bottom: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #fff2a6;
    color: #a76300;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.leaderboard-hero h1 {
    color: #1d2b4f;
    font-size: 2.1rem;
    line-height: 1;
    margin-bottom: 0.45rem;
    font-weight: 900;
}

.leaderboard-hero p {
    max-width: 620px;
    color: #5d6983;
    font-size: 1rem;
}

.leaderboard-hero-user {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    min-width: 240px;
}

.leaderboard-hero-user img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #8cc8ff;
}

.leaderboard-hero-user strong {
    display: block;
    color: #1d2b4f;
    font-size: 1rem;
    font-weight: 800;
}

.leaderboard-hero-user span {
    color: #5d6983;
    font-size: 0.86rem;
    font-weight: 700;
}

.leaderboard-stage-card,
.leaderboard-table-card {
    padding: 1.35rem;
    margin-bottom: 1.35rem;
}

.leaderboard-stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.leaderboard-stage-header h2 {
    color: #1d2b4f;
    font-size: 1.45rem;
    font-weight: 900;
}

.leaderboard-stage-note {
    color: #2f7df4;
    font-size: 0.88rem;
    font-weight: 800;
}

.leaderboard-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.podium-slot {
    text-align: center;
    padding-top: 0.4rem;
}

.podium-avatar-wrap {
    position: relative;
    width: 92px;
    height: 92px;
    margin: 0 auto 0.65rem;
}

.podium-avatar-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #ffffff;
    box-shadow: 0 14px 24px rgba(26, 40, 92, 0.18);
}

.podium-rank-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    min-width: 34px;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #6a5cff 0%, #8c37d8 100%);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 900;
}

.podium-slot h3 {
    color: #1d2b4f;
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 0.2rem;
}

.podium-slot p {
    color: #5d6983;
    font-size: 0.88rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.podium-base {
    border-radius: 20px 20px 12px 12px;
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.4);
}

.podium-base-1 {
    height: 138px;
    background: linear-gradient(180deg, #ffe067 0%, #ffb31d 100%);
}

.podium-base-2 {
    height: 112px;
    background: linear-gradient(180deg, #dae6f7 0%, #a3b6d3 100%);
}

.podium-base-3 {
    height: 92px;
    background: linear-gradient(180deg, #ffc790 0%, #ff9f56 100%);
}

.kid-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.kid-leaderboard-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(26, 40, 92, 0.08);
}

.kid-leaderboard-row.is-current-user {
    background: linear-gradient(135deg, #2e68bc 0%, #174b88 100%);
}

.kid-leaderboard-rank {
    color: #64748b;
    font-size: 1rem;
    font-weight: 900;
}

.kid-leaderboard-player {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.kid-leaderboard-player img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #eff6ff;
}

.kid-leaderboard-player strong {
    display: block;
    color: #1d2b4f;
    font-size: 1rem;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kid-leaderboard-player span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.kid-leaderboard-score {
    color: #1d2b4f;
    font-size: 1rem;
    font-weight: 900;
    white-space: nowrap;
}

.kid-leaderboard-row.is-current-user .kid-leaderboard-rank,
.kid-leaderboard-row.is-current-user .kid-leaderboard-player strong,
.kid-leaderboard-row.is-current-user .kid-leaderboard-player span,
.kid-leaderboard-row.is-current-user .kid-leaderboard-score {
    color: #ffffff;
}

@media (max-width: 768px) {
    .leaderboard-page-shell {
        padding: 1rem 0 6rem;
    }

    .leaderboard-page-shell .container {
        padding: 0 0.9rem;
    }

    .leaderboard-hero {
        display: none;
    }

    .leaderboard-stage-card,
    .leaderboard-table-card {
        position: relative;
        background:
            radial-gradient(circle at 50% 16%, rgba(255, 225, 117, 0.28) 0, transparent 18%),
            radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.96) 0, rgba(255, 255, 255, 0.82) 56%, rgba(236, 244, 255, 0.92) 100%);
        border-radius: 28px;
        padding: 1rem 0.9rem 1.05rem;
        box-shadow: 0 14px 28px rgba(35, 52, 94, 0.12);
    }

    .leaderboard-stage-card::before {
        content: "This Month";
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        padding: 0.34rem 0.9rem;
        border-radius: 999px;
        background: #f4c400;
        color: #1d2b4f;
        font-size: 0.78rem;
        font-weight: 800;
        box-shadow: 0 6px 14px rgba(244, 196, 0, 0.18);
    }

    .leaderboard-stage-card {
        overflow: hidden;
        padding-top: 2.4rem;
    }

    .leaderboard-table-card {
        margin-top: -0.2rem;
        background: transparent;
        box-shadow: none;
        padding: 0.2rem 0 0;
    }

    .leaderboard-stage-header {
        justify-content: center;
        margin-bottom: 0.8rem;
    }

    .leaderboard-stage-card .leaderboard-stage-header h2 {
        width: 100%;
        text-align: center;
        font-size: 1.55rem;
        border-radius: 22px;
        padding: 0.75rem 1rem;
        background: linear-gradient(180deg, #cfe2f8 0%, #bdd5f1 100%);
        box-shadow: inset 0 -2px 0 rgba(29, 43, 79, 0.55);
    }

    .leaderboard-stage-card .leaderboard-stage-note,
    .leaderboard-table-card .leaderboard-stage-header {
        display: none;
    }

    .leaderboard-podium {
        gap: 0.45rem;
        align-items: end;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 0.55rem;
    }

    .podium-slot {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 0;
    }

    .podium-slot.rank-1 {
        order: 2;
    }

    .podium-slot.rank-2 {
        order: 1;
    }

    .podium-slot.rank-3 {
        order: 3;
    }

    .podium-avatar-wrap {
        width: 76px;
        height: 76px;
        margin-bottom: 0.35rem;
    }

    .podium-avatar-wrap img {
        border-width: 5px;
        box-shadow: 0 10px 16px rgba(26, 40, 92, 0.14);
    }

    .podium-slot.rank-1 .podium-avatar-wrap {
        width: 92px;
        height: 92px;
    }

    .podium-rank-badge {
        min-width: 28px;
        padding: 0.18rem 0.38rem;
        font-size: 0.8rem;
        right: -4px;
        bottom: -2px;
        background: linear-gradient(135deg, #ffe100 0%, #f3b900 100%);
        color: #1d2b4f;
    }

    .podium-slot h3 {
        font-size: 0.88rem;
        margin-bottom: 0.18rem;
        text-align: center;
    }

    .podium-slot p {
        margin-bottom: 0.35rem;
        padding: 0.22rem 0.68rem;
        border-radius: 999px;
        background: #edf5ff;
        color: #1d2b4f;
        font-size: 0.78rem;
        font-weight: 800;
        box-shadow: 0 5px 10px rgba(29, 43, 79, 0.08);
    }

    .podium-slot.rank-2 p {
        background: #fff8dc;
    }

    .podium-slot.rank-3 p {
        background: #ffe7f7;
    }

    .podium-base {
        width: 100%;
        border-radius: 12px 12px 0 0;
        box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.38);
    }

    .podium-base-1 {
        height: 122px;
        background: linear-gradient(180deg, #d7ffbd 0%, #b1eb7c 100%);
    }

    .podium-base-2 {
        height: 94px;
        background: linear-gradient(180deg, #ffe98f 0%, #efce58 100%);
    }

    .podium-base-3 {
        height: 82px;
        background: linear-gradient(180deg, #ffc6ef 0%, #e88be0 100%);
    }

    .kid-leaderboard-list {
        gap: 0.72rem;
    }

    .kid-leaderboard-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.7rem;
        padding: 0.85rem 0.9rem;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 10px 20px rgba(29, 43, 79, 0.08);
    }

    .kid-leaderboard-row.is-current-user {
        background: rgba(255, 255, 255, 0.96);
    }

    .kid-leaderboard-rank,
    .kid-leaderboard-row.is-current-user .kid-leaderboard-rank,
    .kid-leaderboard-row.is-current-user .kid-leaderboard-player strong,
    .kid-leaderboard-row.is-current-user .kid-leaderboard-player span,
    .kid-leaderboard-row.is-current-user .kid-leaderboard-score {
        color: #1d2b4f;
    }

    .kid-leaderboard-rank {
        font-size: 0.9rem;
        min-width: 34px;
    }

    .kid-leaderboard-player {
        gap: 0.68rem;
    }

    .kid-leaderboard-player img {
        width: 44px;
        height: 44px;
        border-width: 3px;
    }

    .kid-leaderboard-player strong {
        font-size: 0.96rem;
        margin-bottom: 0.18rem;
    }

    .kid-leaderboard-player span {
        display: none;
    }

    .kid-leaderboard-score {
        font-size: 0.82rem;
        padding: 0.2rem 0.62rem;
        border-radius: 999px;
        background: #dcecff;
        box-shadow: inset 0 0 0 1px rgba(29, 43, 79, 0.12);
    }

    .kid-leaderboard-row:nth-child(odd)::after,
    .kid-leaderboard-row:nth-child(even)::after {
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 0.92rem;
        margin-left: 0.15rem;
    }

    .kid-leaderboard-row:nth-child(odd)::after {
        content: "\f0d8";
        color: #7ad14d;
    }

    .kid-leaderboard-row:nth-child(even)::after {
        content: "\f0d7";
        color: #ff7a1b;
    }
}

.daily-activity {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 2.3rem 1.5rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.daily-activity-header {
    display: block;
    margin-bottom: 1rem;
}

.daily-activity-header h3 {
    font-size: 1.25rem;
    margin: 0;
    color: #f28a33;
    font-weight: 700;
    font-style: italic;
    background: #fff6ed;
    border-radius: 0 0 22px 0;
    padding: 0.35rem 1rem 0.4rem 0.65rem;
    position: absolute;
    top: 0;
    left: 0;
    line-height: 1.1;
}

.daily-activity-header h3::after {
    content: none;
}

.daily-activity-header p {
    margin: 0;
    color: #9aa3af;
    font-size: 0.9rem;
    line-height: 1.25;
}

.daily-activity-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(48px, 1fr));
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.activity-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 48px;
    background: #ffffff;
    border-radius: 16px;
    padding: 0.45rem 0.4rem 0.35rem;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    border: 1px solid #eef2f7;
}

.activity-weekday {
    font-size: 0.72rem;
    color: #9aa3af;
    font-weight: 700;
    text-transform: uppercase;
}

.activity-circle {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #f1f5f9;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid #e5e7eb;
}

.activity-circle.active {
    background: #ffffff;
    color: #111827;
    border-color: #e5e7eb;
    box-shadow: none;
}

.activity-circle.active {
    background: linear-gradient(135deg, #d7f7ef 0%, #c2f1e7 100%);
    color: #0f766e;
    border-color: #b5eee0;
    box-shadow: 0 6px 14px rgba(14, 116, 144, 0.18);
}

.activity-dots {
    display: flex;
    gap: 0.2rem;
}

.activity-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
}

.activity-dot.filled {
    background: #5b8def;
}

@media (max-width: 1024px) {
    .daily-activity-strip {
        grid-template-columns: repeat(7, minmax(44px, 1fr));
    }
}

@media (max-width: 768px) {
    .daily-activity {
        padding: 1rem;
    }

    .education-progress-header,
    .education-progress-grid {
        grid-template-columns: 1fr;
    }

    .education-progress-header {
        display: grid;
    }

    .education-progress-cta {
        width: 100%;
    }

    .recent-activity-list {
        grid-template-columns: 1fr;
    }

    .daily-activity-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .daily-activity-strip {
        grid-template-columns: repeat(7, minmax(42px, 1fr));
    }
}

.paw-activity-overview {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 0.6rem;
}

.paw-stat-card {
    background: #ffffff;
    border: 1px solid #e3e8f3;
    border-radius: 12px;
    padding: 0.65rem 0.75rem;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.paw-stat-label {
    display: block;
    font-size: 0.74rem;
    color: #64748b;
    margin-bottom: 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.paw-stat-card strong {
    font-size: 1.12rem;
    color: #1e3a8a;
    font-weight: 800;
}

.paw-graph-card {
    margin-top: 0;
    background: #ffffff;
    border: 1px solid #e3e8f3;
    border-radius: 14px;
    padding: 0.7rem 0.8rem 0.55rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    height: 100%;
}

.paw-trend-card {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    width: 100%;
    max-width: none;
}

.paw-graph-title {
    font-size: 0.82rem;
    color: #1e3a8a;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.paw-chart-canvas-wrap {
    position: relative;
    height: 195px;
}

#pawTrendChart {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px) {
    .activity-trends-row {
        grid-template-columns: 1fr;
    }

    .paw-activity-overview {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .paw-chart-canvas-wrap {
        height: 170px;
    }
}

.daily-quests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 320px));
    gap: 1.5rem;
    margin-bottom: 2rem;
    justify-content: start;
}

.daily-quest-card.mini {
    position: relative;
    background: #fdfdfd;
    border: 2px solid #eef2f7;
    border-radius: 18px;
    padding: 1.25rem;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    width: 100%;
    max-width: 320px;
}

.daily-quest-card.mini:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(76, 102, 241, 0.16);
    border-color: #dbe4ff;
}

.quest-top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

.quest-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #dfe7ff 0%, #c8d6ff 100%);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.8);
}

.quest-title-wrap h4 {
    font-size: 1.05rem;
    color: #1f2937;
    margin: 0 0 0.2rem;
    font-weight: 700;
}

.quest-desc {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0;
}

.quest-progress-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #6b7280;
    margin: 0.75rem 0 0.4rem;
}

.quest-progress-label {
    font-weight: 600;
}

.quest-progress-status {
    color: #9aa3af;
    font-weight: 600;
}

.daily-quest-card.completed .quest-progress-status {
    color: #16a34a;
}

.daily-quest-card.completed .quest-progress-fill {
    width: 100% !important;
}

.daily-quest-card.completed .quest-progress-label {
    color: #16a34a;
}

.quest-progress-bar {
    height: 8px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.9rem;
}

.quest-progress-fill {
    display: block;
    height: 100%;
    width: 12%;
    background: linear-gradient(90deg, #6b8cff 0%, #7f7bff 100%);
    border-radius: 999px;
}

.daily-quest-card[data-subject="Math"] .quest-badge {
    background: linear-gradient(135deg, #ffd9e5 0%, #ffc3d8 100%);
}

.daily-quest-card[data-subject="Math"] .quest-progress-fill {
    background: linear-gradient(90deg, #ff8fb1 0%, #ff6ea9 100%);
}

.daily-quest-card[data-subject="English"] .quest-badge {
    background: linear-gradient(135deg, #dfe7ff 0%, #c9d6ff 100%);
}

.daily-quest-card[data-subject="English"] .quest-progress-fill {
    background: linear-gradient(90deg, #7b8cff 0%, #5f6bff 100%);
}

.daily-quest-card[data-subject="Science"] .quest-badge {
    background: linear-gradient(135deg, #dcf3ff 0%, #c5e5ff 100%);
}

.daily-quest-card[data-subject="Science"] .quest-progress-fill {
    background: linear-gradient(90deg, #57b0ff 0%, #3a8dff 100%);
}

.daily-quest-card[data-subject="Chinese"] .quest-badge {
    background: linear-gradient(135deg, #e5fbec 0%, #d1f5dc 100%);
}

.daily-quest-card[data-subject="Chinese"] .quest-progress-fill {
    background: linear-gradient(90deg, #4fd6a2 0%, #29b98a 100%);
}

.quest-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.quest-reward-mini {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #4f46e5;
    font-weight: 700;
    font-size: 0.85rem;
    margin: 0;
}

.btn-quest-mini {
    background: linear-gradient(135deg, #0b73b8 0%, #0a5fa6 100%);
    color: white;
    border: none;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Sora', 'Poppins', sans-serif;
    font-size: 0.85rem;
}

.btn-quest-mini:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(11, 115, 184, 0.25);
}

.btn-quest-mini:disabled {
    background: #4caf50;
    cursor: not-allowed;
}

.btn-quest-mini.completed {
    background: #4caf50;
}

/* Full-Screen Quest Interface */
.fullscreen-quest {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.96) 0, rgba(255, 255, 255, 0.9) 18%, transparent 42%),
        radial-gradient(circle at 88% 14%, rgba(120, 201, 255, 0.2) 0, transparent 22%),
        radial-gradient(circle at 82% 72%, rgba(178, 223, 255, 0.14) 0, transparent 24%),
        linear-gradient(135deg, #f9fbff 0%, #eef6ff 45%, #d9ebff 100%);
    z-index: 10000;
    overflow: hidden;
}

.quest-fullscreen-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.08) 30%, rgba(201, 228, 255, 0.1) 100%);
}

.quest-header-bar {
    background: linear-gradient(90deg, #6437ff 0%, #6f44ff 100%);
    color: #111827;
    padding: 1.15rem 1.5rem 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    border-bottom: 0;
    box-shadow: none;
    position: relative;
    z-index: 20;
}

.quest-header-left {
    display: none;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.quest-back-btn {
    background: linear-gradient(135deg, #8b2bd8 0%, #6d28d9 100%);
    color: #ffffff;
    border: none;
    padding: 0.72rem 1.45rem;
    border-radius: 999px;
    font-size: 0.94rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 10px 20px rgba(109, 40, 217, 0.18);
}

.quest-back-btn:hover {
    filter: brightness(1.03);
}

.quest-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.05rem;
    font-weight: 600;
    white-space: nowrap;
}

.quest-title-main {
    color: #1f2937;
    font-size: 1rem;
    font-weight: 700;
}

.quest-subject-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
}

.quest-progress-info {
    display: none;
}

.quest-mobile-progress-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.2rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 12px 28px rgba(55, 26, 156, 0.14);
}

.quest-mobile-progress-pill-left {
    background: #ffffff;
    color: #101828;
}

.quest-mobile-progress-pill-right {
    background: linear-gradient(135deg, #ff7a18 0%, #ff8d24 100%);
    color: #ffffff;
}

.quest-mobile-progress-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.quest-mobile-progress-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff7a18 0%, #ff9a35 100%);
    transition: width 0.25s ease;
}

.quest-mobile-progress {
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr) auto;
    align-items: center;
    gap: 1rem;
    width: min(760px, calc(100% - 180px));
    margin: 0 auto;
}

.quest-mobile-progress-track-wrap {
    position: relative;
}

.quest-desktop-progress-badge {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, -42%);
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, #ffffff 0 56%, transparent 56%),
        conic-gradient(from 310deg, #ff7a18 0 12%, #f8dacb 12% 100%);
    border: 8px solid #5f34ff;
    color: #111827;
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 18px 34px rgba(79, 45, 186, 0.2);
    z-index: 2;
}

.fullscreen-quest.feedback-mode .quest-header-bar {
    padding-top: 1.15rem;
    padding-bottom: 1.25rem;
    overflow: visible;
    z-index: 30;
}

.fullscreen-quest.feedback-mode .quest-desktop-progress-badge {
    display: none;
}

@media (min-width: 769px) {
    .quest-content-area.feedback-mode .solution-body {
        position: relative;
        padding-top: 4.2rem;
    }

    .quest-content-area.feedback-mode .solution-body::before {
        content: "Solution";
        position: absolute;
        top: 1rem;
        left: 2rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 164px;
        height: 40px;
        padding: 0 1.25rem;
        border-radius: 999px;
        background: linear-gradient(135deg, #ff9a1f 0%, #ff8a00 100%);
        color: #ffffff;
        font-size: 1rem;
        line-height: 1;
        font-weight: 700;
        box-shadow: none;
        z-index: 2;
    }

    .quest-content-area.feedback-mode .solution-panel-card-question::before {
        display: none;
    }

    .quest-content-area.feedback-mode .solution-panel-card-question {
        margin-top: 0;
    }
}

.quest-paw-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    font-weight: 700;
    position: relative;
    min-width: 90px;
    justify-content: center;
    color: #1f2937;
}

.quest-header-actions {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.quest-voice-toggle {
    background: #f8fafc;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.quest-voice-toggle:hover {
    background: #eef2f7;
    border-color: #d1d5db;
}

.quest-voice-toggle.is-off {
    opacity: 0.7;
}

.quest-header-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #4b5563;
}

.quest-tool-icon {
    width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

.quest-tool-icon svg {
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
}

.quest-header-right {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    margin-left: 0;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.quest-header-clock {
    display: none;
}

.quest-header-clock::before {
    content: "◔";
    display: inline-block;
    margin-right: 0.45rem;
    font-size: 0.92rem;
    vertical-align: middle;
}

.quest-paw-counter img {
    width: 22px;
    height: 22px;
}

.paw-fly {
    position: absolute;
    right: 10px;
    top: -8px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #ffd166;
    animation: pawFly 0.9s ease-out forwards;
    pointer-events: none;
}

.paw-fly img {
    width: 16px;
    height: 16px;
}

.clap-fly {
    position: absolute;
    right: 36px;
    top: -12px;
    font-size: 1.1rem;
    animation: clapFly 0.9s ease-out forwards;
    pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

@keyframes pawFly {
    0% { transform: translateY(6px); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateY(-20px); opacity: 0; }
}

@keyframes clapFly {
    0% { transform: translateY(8px) scale(0.9); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translateY(-18px) scale(1.1); opacity: 0; }
}

.paw-center {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(2);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: rgba(0,0,0,0.6);
    color: #ffd166;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 700;
    z-index: 10000;
    animation: pawCenterPop 0.9s ease-out forwards;
    pointer-events: none;
}

.paw-center img {
    width: 80px;
    height: 80px;
}

@keyframes pawCenterPop {
    0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translate(-50%, -55%) scale(1.05); opacity: 0; }
}

.quest-main-content {
    flex: 1;
    display: flex;
    gap: 0;
    min-height: 0;
}

/* Quest Sidebar */
.quest-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 70px);
}

.proficiency-section {
    flex-shrink: 0;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.proficiency-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.proficiency-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.proficiency-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #45a049 100%);
    transition: width 0.3s ease;
}

.proficiency-score {
    color: #4caf50;
    font-weight: 700;
    font-size: 1.1rem;
}

.questions-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.question-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.question-list-item.locked {
    cursor: default;
    opacity: 0.6;
}

.question-list-item.locked .question-list-topic,
.question-list-item.locked .question-list-points {
    color: #9ca3af;
}

.question-list-item::before {
    content: '';
    position: absolute;
    left: 1.9rem;
    top: 100%;
    width: 2px;
    height: 0.5rem;
    background: #e5e7eb;
}

.question-list-item:last-child::before {
    display: none;
}

.question-list-item.active {
    background: #f0f4ff;
    border-left: 3px solid #667eea;
}

.question-list-item.correct {
    background: #f0fdf4;
}

.question-list-item.correct .status-number {
    background: #4caf50;
    color: white;
}

.question-list-item.incorrect {
    background: #fef2f2;
}

.question-list-item.incorrect .status-number {
    background: #f44336;
    color: white;
}

.question-status-icon {
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.status-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}


.question-list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.question-list-title {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.question-list-topic {
    font-size: 0.85rem;
    color: #999;
}

.question-list-points {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #667eea;
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.question-list-points::before {
    content: '';
    width: 16px;
    height: 16px;
    display: inline-block;
    background-image: url('/static/images/golden-paw.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.quest-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
    align-items: center;
    min-height: 0;
}

.quest-content-area.feedback-mode {
    overflow: hidden;
}

/* Question Display */
.question-display {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    margin: 0 auto;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.question-topic {
    background: #667eea;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
}

.question-counter {
    color: #666;
    font-weight: 600;
}

.question-text-large {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 3rem;
    line-height: 1.6;
    text-align: center;
}

.quest-solution-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.75rem;
    max-width: 900px;
    width: 100%;
    height: 100%;
    max-height: 100%;
    box-shadow: 0 12px 30px rgba(18, 24, 38, 0.08);
    display: flex;
    flex-direction: column;
}

.solution-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #ffffff;
    padding-bottom: 0.2rem;
}

.solution-question-number {
    color: #111827;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
}

.solution-score {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
}

.solution-actions {
    justify-self: end;
}

.btn-next-top {
    margin: 0;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    border-radius: 999px;
}

.quest-solution-card .btn-next.btn-next-top {
    padding: 0.42rem 1.05rem !important;
    font-size: 0.88rem !important;
    border-radius: 999px !important;
    min-width: auto !important;
    width: auto !important;
    line-height: 1.2;
}

.solution-date {
    color: #9ca3af;
    font-weight: 600;
    justify-self: end;
}

.solution-body {
    color: #1f2937;
    font-size: 1.05rem;
    line-height: 1.6;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    flex: 1;
}

.solution-status {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.solution-status.is-correct {
    color: #16a34a;
}

.solution-status.is-incorrect {
    color: #dc2626;
}

.solution-feedback-footer {
    margin-top: 0;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1rem;
    border-radius: 18px;
    padding: 0.9rem 0.95rem;
    border: 1px solid #b9e2db;
    background: #ecfdf5;
}

.solution-feedback-footer.is-incorrect {
    border-color: #fed7aa;
    background: #fff7ed;
}

.solution-feedback-result {
    margin-bottom: 0;
}

.solution-feedback-result strong {
    display: block;
    margin: 0 0 0.18rem;
    color: #0f8b8d;
    font-size: 1.1rem;
    font-weight: 800;
}

.solution-feedback-footer.is-incorrect .solution-feedback-result strong {
    color: #ea580c;
}

.solution-feedback-result span {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.45;
}

.solution-feedback-paw-card {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 220px;
    padding: 0.72rem 0.85rem;
    border-radius: 16px;
    border: 1px solid #f9c24d;
    background: linear-gradient(135deg, #fff8db 0%, #fff1b8 100%);
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.14);
}

.solution-feedback-paw-card-standalone {
    margin: 0 0 1rem;
    justify-self: stretch;
    box-sizing: border-box;
}

.solution-feedback-paw-card img {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
}

.solution-feedback-paw-copy {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.solution-feedback-paw-copy strong {
    color: #9a3412;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
}

.solution-feedback-paw-copy span {
    color: #7c5a10;
    font-size: 0.8rem;
    line-height: 1.35;
}

.solution-feedback-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

@media (min-width: 769px) {
    .quest-main-content.feedback-mode {
        display: block;
        flex: 1 1 auto;
        min-height: 0;
        background: #ffffff;
        overflow: hidden;
        position: relative;
        z-index: 1;
    }

    .quest-main-content.feedback-mode .quest-sidebar {
        display: none;
    }

    .quest-content-area.feedback-mode {
        padding: 2.4rem 0 0;
        height: 100%;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        background: #ffffff;
        -webkit-overflow-scrolling: touch;
    }

    .quest-content-area.feedback-mode .quest-solution-card {
        display: grid;
        grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.14fr);
        grid-template-rows: auto auto auto 1fr;
        width: 100%;
        max-width: none;
        min-height: 100%;
        height: auto;
        padding: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: #ffffff;
    }

    .quest-content-area.feedback-mode .solution-header {
        grid-column: 1;
        grid-row: 1;
        position: static;
        margin: 0;
        padding: 2rem 1.8rem 0.8rem 2rem;
        background: #ffffff;
    }

    .quest-content-area.feedback-mode .solution-feedback-footer {
        grid-column: 1;
        grid-row: 2;
        margin: 0 1.8rem 1rem 2rem;
    }

    .quest-content-area.feedback-mode .solution-feedback-paw-card-standalone {
        grid-column: 1;
        grid-row: 3;
        margin: 0 1.8rem 1rem 2rem;
    }

    .quest-content-area.feedback-mode .solution-body {
        grid-column: 2;
        grid-row: 1 / span 4;
        border-left: 1px solid #dbe3ef;
        padding: 2rem 2rem 1.5rem;
        overflow: visible;
        background: #ffffff;
    }
}

.solution-feedback-btn {
    flex: 1 1 0;
    min-height: 48px;
    border-radius: 999px;
    font-size: 0.81rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.solution-feedback-btn.secondary {
    background: rgba(255, 255, 255, 0.75);
    border-color: #79c9bc;
    color: #2b7a78;
}

.solution-feedback-btn.primary {
    background: linear-gradient(135deg, #0f8b8d 0%, #178d7f 100%);
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(15, 139, 141, 0.18);
}

.solution-feedback-btn.primary:disabled,
.solution-feedback-btn.primary.is-cooldown {
    background: #9ca3af !important;
    color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

.solution-section-title {
    font-weight: 700;
    margin: 1rem 0 0.5rem;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.solution-section-title.cub-ai-title {
    color: #2563eb;
}

.solution-section-title.cub-ai-title .cub-ai-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    margin-right: 0.35rem;
    color: #8b5cf6;
    font-size: 2rem;
    line-height: 1;
}

.solution-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1.5rem 0;
}

.solution-panel-card {
    border: 1px solid #dbe7e2;
    border-radius: 18px;
    background: #ffffff;
    padding: 0.8rem 0.85rem 0.88rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.035);
}

.solution-panel-card-question {
    position: relative;
    border: 1px solid #e8eaf6;
    border-radius: 22px;
    background:
        radial-gradient(circle at 20% 18%, rgba(124, 58, 237, 0.06) 0, transparent 26%),
        linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    padding: 2.1rem 1.35rem 1.2rem;
    box-shadow: 0 10px 28px rgba(76, 92, 148, 0.08);
}

.solution-panel-card-question::before {
    content: "✎";
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed 0%, #5b31d6 100%);
    color: #ffffff;
    font-size: 1.45rem;
    box-shadow: 0 10px 22px rgba(91, 49, 214, 0.28);
}

.solution-panel-card-ai {
    border-color: #b7efe0;
}

.solution-panel-card .solution-section-title {
    margin-top: 0;
    margin-bottom: 0.55rem;
    font-size: 1.02rem;
}

.solution-panel-card-question .solution-section-title {
    justify-content: center;
    text-align: center;
    font-size: 1.05rem;
    margin-bottom: 0.8rem;
}

.solution-panel-card-question p {
    margin: 0;
    text-align: center;
    color: #334155;
    font-size: 1.02rem;
    line-height: 1.7;
}

.solution-steps {
    margin: 0 0 1rem 1.2rem;
    padding: 0;
}

.solution-steps li {
    list-style: none;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.72rem 0.82rem;
    margin: 0 0 0.55rem 0;
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.05);
    font-size: 0.96rem;
    line-height: 1.6;
}

.solution-steps li .solution-step-label {
    display: inline-block;
    background: #eef2ff;
    color: #4338ca;
    font-weight: 700;
    font-size: 0.68rem;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    margin-right: 0.5rem;
}

.solution-answers {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.solution-answers li {
    padding: 0.62rem 0.72rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.45rem;
    font-weight: 500;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
    font-size: 0.98rem;
    line-height: 1.5;
}

.solution-answers li.is-selected {
    border-color: #f59e0b;
    background: #fff7ed;
}

.solution-answers li.is-correct {
    border-color: #22c55e;
    background: #f0fdf4;
}

/* Admin Question Play: one-tab list indentation inside question content */
#playQuestionText ul,
#playQuestionText ol {
    margin: 0.55rem 0 0.75rem;
    padding-left: 2em;
}

#playQuestionText li {
    margin: 0.2rem 0;
}

.solution-step-label {
    font-weight: 700;
    color: #1f2937;
    margin-right: 0.25rem;
}

.solution-body p {
    margin: 0 0 1rem;
    font-size: 0.98rem;
    line-height: 1.64;
}

.solution-body ul {
    margin: 0 0 1rem 1.2rem;
    padding: 0;
}

.solution-loading {
    color: #6b7280;
    font-weight: 600;
}

.quest-feedback-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 2rem;
}

.quest-feedback-loader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    width: min(100%, 340px);
    padding: 1.6rem 1.4rem;
    border: 1px solid #dbe7e2;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    text-align: center;
}

.quest-feedback-loader-spinner {
    width: 54px;
    height: 54px;
    border: 4px solid #dbeafe;
    border-top-color: #22c55e;
    border-radius: 50%;
    animation: questFeedbackSpin 0.8s linear infinite;
}

.quest-feedback-loader-title {
    color: #111827;
    font-size: 1.05rem;
    font-weight: 800;
}

.quest-feedback-loader-text {
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.5;
}

@keyframes questFeedbackSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.solution-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-top-sections {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 0.9rem;
}

.feedback-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0 0 0.65rem;
}

.feedback-action-btn {
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #1e3a8a;
    border-radius: 999px;
    padding: 0.36rem 0.72rem;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-action-btn:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.feedback-inline-note {
    margin: 0 0 0.9rem;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
    border-radius: 12px;
    padding: 0.56rem 0.72rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-top-card {
    border-radius: 14px;
    padding: 0.66rem 0.8rem;
    border: 1px solid #dbe4ef;
    background: #f8fafc;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.035);
}

.ai-top-card h5 {
    margin: 0 0 0.35rem;
    font-size: 0.96rem;
    line-height: 1.2;
}

.ai-top-card p {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.56;
}

.ai-top-card.summary {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.ai-top-card.explanation {
    background: #ffffff;
    border-color: #dbe4ef;
}

.ai-top-card.exam-expectation {
    background: #fff7ed;
    border-color: #fdba74;
}

.ai-top-card.exam-checklist {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.ai-top-card.tip {
    background: #fff7ed;
    border-color: #fed7aa;
}

.ai-top-card.correct {
    background: #ffffff;
    border-color: #dbe4ef;
    color: #111111;
}

.ai-top-card.correct h5,
.ai-top-card.correct p,
.ai-top-card.correct li,
.ai-top-card.correct strong {
    color: #111111;
}

.ai-top-card.misconception {
    background: #fff1f2;
    border-color: #fda4af;
}

.ai-checklist {
    margin: 0.1rem 0 0;
    padding-left: 1.1rem;
}

.ai-checklist li {
    margin: 0.25rem 0;
    line-height: 1.5;
    font-size: 0.9rem;
}

.timeline-step {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 0.75rem;
}

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6b7280;
    margin-top: 0.38rem;
}

.timeline-line {
    width: 2px;
    flex: 1;
    background: #d1d5db;
    margin-top: 0.45rem;
}

.timeline-content {
    border-left: 2px solid #d1d5db;
    padding: 0.7rem 0.9rem 0.7rem 1rem;
    border-radius: 0 10px 10px 0;
    background: #ffffff;
}

.timeline-content h4 {
    margin: 0 0 0.55rem;
    font-size: 1.06rem;
    color: #111827;
}

.timeline-content p {
    margin: 0 0 0.75rem;
    font-size: 1.02rem;
    line-height: 1.7;
}

.solution-key-card {
    margin-top: 0.4rem;
    border: 1px solid #86efac;
    background: #f0fdf4;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    color: #166534;
    font-weight: 600;
}

.quest-question-card {
    background: #ffffff;
    border: 1px solid #e7e9f2;
    border-radius: 16px;
    padding: 1.75rem;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 10px 24px rgba(21, 34, 50, 0.05);
}

.quest-question-card .question-text-large {
    text-align: left;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.question-mark {
    font-weight: 600;
    color: #374151;
}

.question-performance {
    color: #6b7280;
}

.question-parts-toggle {
    width: 100%;
    border: none;
    background: #eef2f7;
    color: #374151;
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin: 1rem 0;
}

.question-parts-chevron {
    font-size: 1.4rem;
    transform: rotate(90deg);
}

.question-parts-toggle.open .question-parts-chevron {
    transform: rotate(-90deg);
}

.question-parts {
    display: none;
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.question-parts.open {
    display: block;
}

.quest-hint-card {
    background: #e9f3fb;
    border: 1px solid #cfe3f4;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    max-width: 800px;
    width: 100%;
}

.hint-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.hint-title {
    font-weight: 700;
    color: #1f2937;
}

.hint-feedback {
    font-size: 0.85rem;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hint-icon-btn {
    border: none;
    background: #ffffff;
    border-radius: 999px;
    padding: 0.3rem 0.55rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.hint-icon-btn.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.hint-body {
    color: #1f2937;
    font-size: 0.95rem;
    line-height: 1.5;
}

.options-grid {
    display: grid;
    gap: 1rem;
}

.option-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f9fafb;
    border: 3px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    font-family: 'Poppins', sans-serif;
}

.option-button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(10px);
}

.option-letter {
    width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.option-button:hover .option-letter {
    background: white;
    color: #667eea;
}

.option-button.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.option-button.selected .option-letter {
    background: white;
    color: #667eea;
}

.multi-submit-wrap {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

body:not(.public-page) .quest-content-area .btn-submit-multi,
body:not(.public-page) .quest-content-area .btn-skip-question {
    background: #1e8e3e !important;
    color: white;
    border: 1px solid #1e8e3e !important;
    padding: 0.78rem 1.9rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 0 rgba(20, 108, 44, 0.35), 0 3px 10px rgba(30, 142, 62, 0.28) !important;
}

body:not(.public-page) .quest-content-area .btn-submit-multi.btn-submit-compact {
    background: linear-gradient(135deg, #3f51df 0%, #3047d8 100%) !important;
    color: #ffffff;
    border: 0 !important;
    padding: 0.75rem 1.15rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.1;
    min-width: 96px;
    max-width: none;
    height: 42px;
    min-height: 0;
    box-shadow: 0 10px 18px rgba(63, 81, 223, 0.22) !important;
}

body:not(.public-page) .quest-content-area .btn-submit-multi:disabled,
body:not(.public-page) .quest-content-area .btn-skip-question:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none !important;
}

body:not(.public-page) .quest-content-area .btn-skip-question {
    padding: 0.78rem 1.55rem;
}

body:not(.public-page) .quest-content-area .btn-submit-multi:hover:not(:disabled),
body:not(.public-page) .quest-content-area .btn-skip-question:hover:not(:disabled) {
    background: #188038 !important;
    border-color: #188038 !important;
    box-shadow: 0 2px 0 rgba(18, 94, 39, 0.35), 0 4px 12px rgba(24, 128, 56, 0.3) !important;
    transform: translateY(-1px);
}

body:not(.public-page) .quest-content-area .btn-submit-multi.btn-submit-compact:hover:not(:disabled) {
    background: linear-gradient(135deg, #4b5df0 0%, #3951e4 100%) !important;
    box-shadow: 0 14px 24px rgba(63, 81, 223, 0.26) !important;
    transform: translateY(-1px);
}

body:not(.public-page) .quest-content-area .btn-submit-multi.btn-submit-compact:disabled {
    background: linear-gradient(135deg, #3f51df 0%, #3047d8 100%) !important;
    color: #ffffff;
    opacity: 0.65;
}

.option-text {
    font-size: 1.1rem;
    flex: 1;
}

/* Feedback Display */
.feedback-display {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    text-align: center;
    margin: 0 auto;
}

.feedback-icon {
    margin-bottom: 2rem;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    animation: successPop 0.5s;
}

.error-icon {
    width: 100px;
    height: 100px;
    background: #f44336;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    animation: errorShake 0.5s;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.feedback-result h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feedback-display.correct h2 {
    color: #4caf50;
}

.feedback-display.incorrect h2 {
    color: #f44336;
}

.feedback-message {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.explanation-box {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: left;
}

.explanation-box h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.explanation-box p {
    color: #333;
    line-height: 1.8;
    font-size: 1.1rem;
}

.solution-summary {
    background: #eef2ff;
    color: #1f2937;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.solution-steps h4 {
    color: #667eea;
    margin: 0 0 1rem;
    font-size: 1rem;
}

.solution-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
}

.step-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #667eea;
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-text {
    color: #1f2937;
    font-size: 0.95rem;
    line-height: 1.6;
}

.feedback-actions {
    margin-top: 2rem;
}

.btn-next {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.78rem 1.9rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
    box-shadow: none !important;
}

.btn-next:hover {
    filter: brightness(1.04);
    transform: none;
}

.btn-next:disabled {
    background: #9ca3af;
    color: #f3f4f6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Quest Completion Screen */
.quest-completion-screen {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    text-align: center;
    margin: 0 auto;
    position: relative;
}

.completion-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: completionBounce 0.6s;
}

@keyframes completionBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.completion-title {
    font-size: 1.45rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.completion-subtitle {
    font-size: 0.72rem;
    color: #666;
    margin-bottom: 1rem;
}

.perfect-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 0.72rem;
    animation: shine 1s infinite;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.stat-item {
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 8px;
}

.stat-item.highlight {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.45rem;
    opacity: 0.8;
}

.btn-large {
    padding: 0.35rem 0.8rem;
    font-size: 0.42rem;
    min-width: 0;
}

.quest-completion-screen .btn-primary.btn-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1.2rem;
    min-width: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #4c453b;
    border: none;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    font-size: 0.96rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}

.quest-completion-screen .btn-primary.btn-large::before {
    content: "\2190";
    font-size: 1rem;
    line-height: 1;
}

.quest-completion-screen .btn-primary.btn-large:hover {
    color: #2f66e8;
    background: rgba(255, 255, 255, 0.98);
    transform: none;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.upgrade-cta-top-right {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}

.btn-unlock.btn-compact {
    padding: 0.25rem 0.55rem;
    font-size: 0.6rem;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(124, 108, 247, 0.25);
}

.upgrade-note {
    font-size: 0.55rem;
    color: #6b7280;
}

/* Exit Dialog */
.quest-exit-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeIn 0.3s;
}

.quest-exit-dialog {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s;
}

.exit-dialog-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
}

.quest-exit-dialog h3 {
    font-size: 1.8rem;
    color: #333;
    text-align: center;
    margin-bottom: 1rem;
}

.quest-exit-dialog p {
    color: #666;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.exit-dialog-list {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    list-style: none;
}

.exit-dialog-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
}

.exit-dialog-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.exit-dialog-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.quest-exit-dialog .btn-cancel,
.quest-exit-dialog .btn-end-quiz {
    background: linear-gradient(135deg, #8b2bd8 0%, #6d28d9 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0.74rem 1.5rem !important;
    border-radius: 999px;
    font-size: 0.98rem !important;
    font-weight: 800 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: none !important;
    min-width: 0;
    min-height: 0 !important;
    appearance: none;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.quest-exit-dialog .btn-cancel:hover,
.quest-exit-dialog .btn-end-quiz:hover {
    filter: brightness(1.03);
    transform: none;
    box-shadow: none !important;
}

button.exit-dialog-pill,
.quest-exit-dialog button.exit-dialog-pill,
.quest-exit-dialog-overlay button.exit-dialog-pill {
    background: linear-gradient(135deg, #8b2bd8 0%, #6d28d9 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 0.74rem 1.5rem !important;
    font-size: 0.98rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    font-family: 'Poppins', sans-serif !important;
    box-shadow: none !important;
    appearance: none !important;
    min-height: 0 !important;
    min-width: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

button.exit-dialog-pill:hover,
.quest-exit-dialog button.exit-dialog-pill:hover,
.quest-exit-dialog-overlay button.exit-dialog-pill:hover {
    filter: brightness(1.03);
    transform: none !important;
    box-shadow: none !important;
}

/* Partial Completion Messages */
.partial-completion-notice {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 0.7rem;
    margin-bottom: 1rem;
}

.partial-completion-notice p {
    color: #856404;
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.45;
}

.completion-note {
    background: #e3f2fd;
    border-radius: 16px;
    padding: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.completion-note p {
    color: #1565c0;
    margin: 0;
    font-size: 1rem;
}

/* Mobile Quest Styles */
@media (max-width: 768px) {
    .daily-quests-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .fullscreen-quest,
    .quest-fullscreen-container,
    .quest-main-content {
        background:
            radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.94) 0, transparent 26%),
            linear-gradient(160deg, #f9fbff 0%, #edf6ff 48%, #dcecff 100%);
    }

    .fullscreen-quest {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .quest-fullscreen-container {
        min-height: 100dvh;
        height: auto;
    }

    .quest-main-content {
        min-height: 0;
    }

    .quest-header-bar {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 0.6rem;
        padding: 0.85rem 0.95rem 0.7rem;
        background: #ffffff;
        color: #1f2937;
        border-bottom: 1px solid #e5e7eb;
    }

    .quest-header-left,
    .quest-header-right {
        display: contents;
    }

    .quest-back-btn {
        display: none;
    }

    .quest-mobile-progress {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        min-width: 0;
    }

    .quest-mobile-progress-bar {
        flex: 1 1 auto;
        height: 10px;
        border-radius: 999px;
        background: #e5e7eb;
        overflow: hidden;
    }

    .quest-mobile-progress-fill {
        display: block;
        height: 100%;
        width: 0;
        border-radius: inherit;
        background: linear-gradient(90deg, #0f8b8d 0%, #178d7f 100%);
        transition: width 0.25s ease;
    }

    .quest-mobile-progress-count {
        flex: 0 0 auto;
        min-width: 42px;
        text-align: center;
        padding: 0.22rem 0.42rem;
        border-radius: 999px;
        background: #e7f7f5;
        color: #2b7a78;
        font-size: 0.76rem;
        font-weight: 700;
    }

    .quest-header-tools,
    .quest-title,
    .quest-progress-info,
    .quest-header-actions,
    .quest-header-clock,
    .quest-sidebar {
        display: none;
    }

    .quest-content-area {
        padding: 0.9rem 0.85rem 1.1rem;
        align-items: stretch;
        overflow: visible;
        padding-bottom: 5.5rem;
    }

    .question-display,
    .feedback-display,
    .quest-completion-screen {
        padding: 1rem;
    }

    .quest-question-card {
        max-width: none;
        border-radius: 22px;
        border: 1px solid #e6edf5;
        padding: 1rem;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    }

    .quest-question-card .dq-question-head {
        display: none;
    }

    .quest-question-card .dq-question-main {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .quest-question-card .dq-question-index {
        width: 54px;
        height: 54px;
        border-radius: 16px;
        font-size: 1.25rem;
        background: linear-gradient(180deg, #e8f7f5 0%, #d4efeb 100%);
        color: #0f8b8d;
    }

    .question-text-large,
    .quest-question-card .question-text-large {
        font-size: 1.08rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        text-align: left;
        color: #1f2937;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .option-button,
    .quest-question-card .option-button {
        min-height: 56px;
        padding: 0.8rem 0.7rem;
        gap: 0.55rem;
        border-width: 1px;
        border-radius: 14px;
        background: #ffffff;
        border-color: #dbe4ee;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    }

    .option-button:hover,
    .quest-question-card .option-button:hover {
        transform: none;
        background: #f0fdfa;
        color: #0f172a;
        border-color: #0f8b8d;
    }

    .option-letter,
    .quest-question-card .option-number-pill {
        width: 28px;
        height: 28px;
        font-size: 0.92rem;
        background: #eef2f7;
        color: #334155;
    }

    .option-button.selected,
    .quest-question-card .option-button.selected {
        background: #0f8b8d;
        border-color: #0f8b8d;
        color: #ffffff;
    }

    .option-button.selected .option-letter,
    .quest-question-card .option-button.selected .option-number-pill {
        background: #ffffff;
        color: #0f8b8d;
    }

    .option-text {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .multi-submit-wrap {
        margin-top: 1rem;
        justify-content: stretch;
        gap: 0.65rem;
    }

    body:not(.public-page) .quest-content-area .btn-submit-multi,
    body:not(.public-page) .quest-content-area .btn-skip-question,
    .btn-next.btn-next-top {
        flex: 1 1 0;
        min-height: 50px;
        padding: 0.78rem 1rem;
        border-radius: 16px;
        font-size: 0.92rem;
    }

    .quest-hint-card {
        margin-top: 0.8rem;
        border-radius: 18px;
        padding: 0.95rem;
        background: #e8f5f2;
        border: 1px solid #b9e2db;
    }

    .hint-header {
        align-items: flex-start;
    }

    .hint-feedback {
        font-size: 0.76rem;
    }

    .hint-body {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .quest-solution-card {
        max-width: none;
        max-height: none;
        min-height: calc(100dvh - 96px);
        padding: 1rem 1rem 1.15rem;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.12);
        background: #ffffff;
    }

    .solution-header {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 0.9rem;
        background: #ffffff;
        padding-bottom: 0.4rem;
    }

    .solution-header::before {
        content: "";
        position: absolute;
        top: -0.35rem;
        left: 50%;
        transform: translateX(-50%);
        width: 56px;
        height: 4px;
        border-radius: 999px;
        background: #d6d3d1;
    }

    .solution-avatar {
        display: none;
    }

    .solution-score {
        font-size: 0;
        position: relative;
        padding-top: 0.35rem;
    }

    .solution-score::before {
        content: "Explanation";
        font-size: 1.05rem;
        font-weight: 800;
        color: #111827;
    }

    .solution-body {
        padding-right: 0;
        font-size: 0.94rem;
        line-height: 1.58;
    }

    .solution-feedback-footer {
        display: block;
        margin-top: 0.8rem;
        border-radius: 18px;
        padding: 0.85rem 0.85rem 0.9rem;
    }

    .solution-feedback-result {
        margin-bottom: 0.75rem;
    }

    .solution-feedback-result strong {
        font-size: 1rem;
    }

    .solution-feedback-result span {
        font-size: 0.84rem;
    }

    .solution-feedback-paw-card {
        width: 100%;
        min-width: 0;
        margin-bottom: 0.75rem;
    }

    .solution-feedback-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.6rem;
        align-items: center;
    }

    .solution-feedback-btn {
        flex: 0 0 auto;
        min-height: 46px;
        min-width: 132px;
        padding: 0.72rem 1rem;
        font-size: 0.9rem;
    }

    .feedback-result h2,
    .completion-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}




/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #080F5B;
    background-image: var(--shared-loading-bg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.loading-screen.active {
    display: flex;
    opacity: 1;
}

.page-transition-progress {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 12000;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.page-transition-progress.active {
    display: flex;
}

.page-transition-progress-inner {
    width: min(320px, calc(100vw - 32px));
    padding: 0.55rem 0.65rem;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.page-transition-bar-container {
    width: 100%;
    margin: 0;
}

.page-transition-bar {
    animation: loading 3s steps(12, end);
}

.loading-content {
    text-align: center;
    animation: floatUp 1s ease-out;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    padding: 1.2rem 1.4rem 1.4rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.loading-logo {
    max-width: 250px;
    width: 30%;
    height: auto;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
}

.loading-bar-container {
    width: 240px;
    height: 28px;
    background: rgba(102, 51, 153, 0.9);
    border: 4px solid #ffffff;
    border-radius: 6px;
    margin: 2.2rem auto 0;
    padding: 3px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(24, 11, 52, 0.28);
}

.loading-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    background:
        repeating-linear-gradient(
            90deg,
            #ef4444 0 12px,
            #f97316 12px 24px,
            #fb923c 24px 36px,
            #facc15 36px 48px,
            #d9f99d 48px 60px
        );
    animation: loading 3s steps(12, end);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes loading {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* Decorative elements */
.loading-screen::before,
.loading-screen::after {
    content: '✨';
    position: absolute;
    font-size: 2rem;
    animation: twinkle 2s ease-in-out infinite;
}

.loading-screen::before {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.loading-screen::after {
    top: 15%;
    right: 20%;
    animation-delay: 1s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .page-transition-progress {
        inset: 0;
    }

    .page-transition-progress-inner {
        width: calc(100vw - 20px);
        padding: 0.45rem 0.5rem;
        border-radius: 12px;
    }

    .loading-logo {
        max-width: 150px;
    }
    
    .loading-bar-container {
        width: 80%;
        max-width: 300px;
    }
}
/* ===========================================
   E-COMMERCE STYLES - Little Lion Shop
   Add these to static/css/style.css
   =========================================== */

/* Floating Cart Button */
.cart-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    z-index: 1000;
}

.cart-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1001;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s;
    z-index: 1002;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cart-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.cart-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.cart-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 12px;
    position: relative;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.cart-item-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #666;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-quantity button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.cart-item-quantity button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.cart-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ff4444;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.3s;
}

.cart-item-remove:hover {
    transform: rotate(90deg);
    background: #cc0000;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.cart-empty p:first-of-type {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
}

.cart-empty p:last-of-type {
    color: #666;
    margin: 0;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid #f0f0f0;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.cart-total-paws {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
}

.checkout-btn {
    width: fit-content;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    align-self: flex-end;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Product Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.product-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.modal-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.product-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
}

.product-modal-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 16px;
    padding: 2rem;
    min-height: 400px;
}

.product-modal-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.product-modal-details h2 {
    margin: 0 0 1rem;
    font-size: 2rem;
}

.product-modal-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.product-modal-price .paw-icon {
    width: 32px;
    height: 32px;
}

.product-modal-price span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.product-modal-description h3 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

.product-modal-description p {
    color: #666;
    line-height: 1.8;
    margin: 0 0 1.5rem;
}

.product-modal-stock {
    background: #f0f4ff;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.product-modal-stock p {
    margin: 0.5rem 0;
    color: #333;
}

.product-modal-quantity {
    margin-bottom: 2rem;
}

.product-modal-quantity label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.quantity-selector button:hover {
    background: #667eea;
    color: white;
}

.quantity-selector input {
    width: 80px;
    height: 40px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.quantity-total {
    display: block;
    color: #666;
    font-size: 0.95rem;
}

.add-to-cart-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.insufficient-paws {
    text-align: center;
    padding: 2rem;
    background: #fff5f5;
    border-radius: 12px;
}

.insufficient-paws svg {
    margin-bottom: 1rem;
}

.insufficient-paws p {
    margin: 0.5rem 0;
    color: #666;
}

/* Checkout Modal */
.checkout-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

.checkout-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 12px;
}

.checkout-section h3 {
    margin: 0 0 1rem;
    font-size: 1.3rem;
}

.checkout-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkout-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.checkout-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.checkout-item-info {
    flex: 1;
}

.checkout-item-info h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.checkout-item-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.checkout-item-total {
    font-weight: 700;
    color: #667eea;
}

.address-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.address-details {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    line-height: 1.8;
}

.checkout-summary {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-row.total {
    border-top: 2px solid #e0e0e0;
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 1.2rem;
}

.paws-positive {
    color: #4caf50;
}

.paws-negative {
    color: #ff4444;
}

.checkout-confirm-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.checkout-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Order Confirmation */
.order-confirmation-content {
    text-align: center;
    padding: 3rem 2rem;
}

.confirmation-icon {
    margin-bottom: 2rem;
}

.order-confirmation-content h2 {
    margin: 0 0 1.5rem;
    font-size: 2rem;
    color: #4caf50;
}

.order-details {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.order-details p {
    margin: 0.75rem 0;
    font-size: 1.1rem;
}

.confirmation-message {
    color: #666;
    line-height: 1.8;
    margin: 1.5rem 0;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-secondary {
    padding: 0.75rem 2rem;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-primary {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Address Management in Settings */
.settings-section {
    margin-bottom: 3rem;
}

.section-description {
    color: #666;
    margin-bottom: 1.5rem;
}

.addresses-list {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.address-card {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
}

.address-card.default {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #fafcff 100%);
}

.address-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.address-info h3 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.address-info p {
    margin: 0.5rem 0;
    color: #666;
    line-height: 1.6;
}

.address-phone {
    font-weight: 600;
    color: #333 !important;
}

.default-badge {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.address-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-edit,
.btn-delete {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    border: 2px solid;
    background: white;
}

.btn-edit {
    color: #2196f3;
    border-color: #2196f3;
}

.btn-edit:hover {
    background: #2196f3;
    color: white;
}

.btn-delete {
    color: #ff4444;
    border-color: #ff4444;
}

.btn-delete:hover {
    background: #ff4444;
    color: white;
}

.no-addresses {
    text-align: center;
    padding: 3rem 2rem;
    background: #f9f9f9;
    border-radius: 12px;
}

.no-addresses h3 {
    margin: 1rem 0 0.5rem;
}

.no-addresses p {
    color: #666;
    margin: 0.5rem 0;
}

.add-address-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.add-address-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Address Form Modal */
.address-modal {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-group {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.save-address-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.save-address-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Order History */
.orders-list {
    display: grid;
    gap: 1.5rem;
}

.order-history-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.order-history-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #eef2f7;
}

.order-chip {
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.order-chip span {
    color: #3b82f6;
    font-weight: 700;
}

.order-history-date {
    color: #94a3b8;
    font-size: 0.95rem;
}

.track-order-btn {
    border: none;
    border-radius: 999px;
    background: #f59e0b;
    color: #ffffff;
    padding: 0.5rem 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.4px;
}

.track-order-btn:hover {
    background: #d97706;
}

.order-history-item-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.6fr) minmax(120px, 0.8fr) minmax(170px, 0.9fr);
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #eef2f7;
}

.order-history-product {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.order-history-product img {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.order-history-product-meta h4 {
    margin: 0 0 0.25rem;
    color: #111827;
    font-size: 1.08rem;
}

.order-history-product-meta p {
    margin: 0 0 0.35rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.order-paws-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #334155;
    font-weight: 700;
    font-size: 0.9rem;
}

.order-history-status,
.order-history-delivery {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
}

.order-history-status span,
.order-history-delivery span {
    color: #9ca3af;
    font-size: 0.82rem;
}

.order-history-status strong,
.order-history-delivery strong {
    color: #111827;
    font-size: 1rem;
}

.order-history-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.8rem 1.15rem;
    background: #f8fafc;
}

.order-history-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.history-action-btn,
.history-cancel-btn {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #334155;
    border-radius: 10px;
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.history-action-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.history-cancel-btn {
    border-color: #fecaca;
    color: #b91c1c;
}

.history-cancel-btn:hover:not(:disabled) {
    background: #fef2f2;
}

.history-cancel-btn.disabled,
.history-cancel-btn:disabled {
    border-color: #e5e7eb;
    color: #9ca3af;
    background: #f3f4f6;
    cursor: not-allowed;
}

.order-history-total {
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

.order-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.order-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.order-header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
}

.order-date {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.order-status {
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.order-details {
    margin-bottom: 1rem;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: #666;
}

.order-paws {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #667eea;
}

.view-order-btn {
    width: 100%;
    padding: 0.75rem;
    background: #f0f4ff;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.view-order-btn:hover {
    background: #667eea;
    color: white;
}

@media (max-width: 900px) {
    .order-history-top {
        grid-template-columns: 1fr;
    }

    .track-order-btn {
        justify-self: start;
    }

    .order-history-item-row {
        grid-template-columns: 1fr;
    }

    .order-history-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Paw Icon Variants */
.paw-icon-small {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.paw-icon-tiny {
    width: 16px;
    height: 16px;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 3000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.toast-success {
    border-left: 4px solid #4caf50;
}

.toast.toast-error {
    border-left: 4px solid #ff4444;
}

.toast.toast-info {
    border-left: 4px solid #2196f3;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .little-lion-shop-page .content-section {
        margin-top: 0.55rem;
    }

    .little-lion-shop-page .content-section .container {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .little-lion-shop-page .store-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }

    .little-lion-shop-page .store-header h2 {
        line-height: 1.2;
    }

    .little-lion-shop-page .bubbles-balance {
        width: 100%;
        justify-content: flex-start;
        padding: 0.9rem 1rem;
    }

    .little-lion-shop-page .store-actions {
        justify-content: stretch;
    }

    .little-lion-shop-page .store-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .little-lion-shop-page .store-categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        gap: 0.65rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .little-lion-shop-page .store-categories::-webkit-scrollbar {
        display: none;
    }

    .little-lion-shop-page .category-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.62rem 1rem;
    }

    .little-lion-shop-page .store-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .little-lion-shop-page .store-item {
        width: 100%;
        margin: 0;
    }

    .little-lion-shop-page .cart-floating-btn {
        right: 16px;
        bottom: 92px;
        width: 54px;
        height: 54px;
    }
    
    .product-modal-grid {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
    }
    
    .product-modal-image {
        min-height: 250px;
    }
    
    .checkout-modal-content {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .address-card {
        flex-direction: column;
        gap: 1rem;
    }
    
    .address-actions {
        flex-direction: row;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
    
    .confirmation-actions button {
        width: 100%;
    }
}

/* ===========================================
   ADMIN DASHBOARD STYLES
   =========================================== */

.admin-header {
    text-align: center;
    margin-bottom: 3rem;
}

.admin-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-header p {
    color: #fff;
    font-size: 1.1rem;
}

/* Statistics Cards */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-info h3 {
    margin: 0 0 0.25rem;
    font-size: 2rem;
    color: #333;
}

.stat-info p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

/* Tabs */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    align-items: stretch;
    overflow: visible;
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    margin-bottom: -2px;
    flex: 0 1 auto;
}

.tab-btn.active {
    color: #fff;
    border-bottom-color: #fff;
}

.tab-btn:hover {
    color: #fff;
}

/* Admin Dashboard Tab Panels */
.admin-page .tab-content {
    display: none;
}

.admin-page .tab-content.active {
    display: block;
}

/* Admin Dashboard Tab Panels */
#users-tab,
#orders-tab {
    display: none;
}

#users-tab.active,
#orders-tab.active {
    display: block;
}

/* Admin Section */
.admin-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #333;
}

.search-input {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    min-width: 300px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: #6b7280;
    font-weight: 600;
}

.admin-table thead {
    background: #f9f9f9;
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.admin-table tbody tr {
    transition: all 0.2s;
}

.admin-table tbody tr:hover {
    background: #f9f9f9;
}

.questions-jobs-table .file-col {
    width: 28%;
    max-width: 380px;
}

.questions-jobs-table .question-file-name {
    display: inline-block;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.paws-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
    color: #0f172a;
    background: #e2e8f0;
    text-transform: uppercase;
}

.activity-badge.daily {
    background: #dbeafe;
    color: #1e40af;
}

.activity-badge.worksheet {
    background: #fef3c7;
    color: #92400e;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-admin {
    background: #ff4444;
    color: white;
}

.badge-oauth {
    background: #4caf50;
    color: white;
}

.badge-email {
    background: #2196f3;
    color: white;
}

.badge-success {
    background: #4caf50;
    color: white;
}

.badge-inactive {
    background: #9e9e9e;
    color: white;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.2px;
    background: #cff7ef;
    color: #1f4b4a;
}

.status-pill.in-progress {
    background: #d8f0ff;
    color: #1f3f5f;
}

.status-select {
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.status-select:focus {
    outline: none;
    border-color: #667eea;
}

.admin-input {
    width: 110px;
    padding: 0.4rem 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.admin-select {
    padding: 0.4rem 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.admin-input:focus,
.admin-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.product-image-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    background: #fff;
}

.generator-panel {
    background: #f9fbff;
    border: 1px solid #e6eef7;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.generator-fields {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.generator-subjects {
    margin: 1rem 0;
}

.subject-checkboxes {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.subject-checkboxes label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.generator-topics {
    margin: 1rem 0;
}

.topic-checkboxes {
    display: grid;
    gap: 0.75rem;
}

.topic-group {
    border: 1px solid #dbe7f4;
    border-radius: 10px;
    background: #ffffff;
    padding: 0.75rem;
}

.topic-group-title {
    font-family: Arial, sans-serif;
    font-size: 1.18rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.topic-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.topic-group-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.btn-topic-toggle {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    cursor: pointer;
}

.btn-topic-toggle:hover {
    background: #dbeafe;
}

.topic-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
}

.topic-items label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
}

.generator-note {
    margin-top: 0.75rem;
    color: #666;
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.4rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #cce5ff;
    color: #004085;
}

.status-shipped {
    background: #d1ecf1;
    color: #0c5460;
}

.status-delivered {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Buttons */
.btn-sm {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    margin-right: 0.5rem;
}

.btn-info {
    background: #2196f3;
    color: white;
}

.btn-info:hover {
    background: #0b7dda;
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

.btn-warning {
    background: #ff9800;
    color: white;
}

.btn-warning:hover {
    background: #e68900;
}

/* User Details Modal */
.user-details-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.user-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.detail-section {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.detail-section h3 {
    margin: 0 0 1rem;
    color: #333;
    font-size: 1.2rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
    font-weight: 600;
}

.detail-value {
    color: #333;
}

.paws-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 12px;
}

.paws-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
}

.mini-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.mini-order-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.mini-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mini-order-details p {
    margin: 0.25rem 0;
    color: #666;
    font-size: 0.9rem;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

.transaction-row {
    display: grid;
    grid-template-columns: 100px 1fr 120px;
    gap: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    align-items: center;
}

.tx-date {
    font-size: 0.85rem;
    color: #666;
}

.tx-desc {
    color: #333;
}

.tx-amount {
    text-align: right;
    font-weight: 600;
}

.tx-amount.positive {
    color: #4caf50;
}

.tx-amount.negative {
    color: #ff4444;
}

/* Order Details Modal */
.order-details-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.order-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.address-display {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    line-height: 1.8;
}

.address-display p {
    margin: 0.5rem 0;
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.item-info strong {
    display: block;
    margin-bottom: 0.25rem;
}

.item-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.item-total {
    text-align: right;
    color: #667eea;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .user-details-grid,
    .order-details-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        font-size: 0.85rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        min-width: auto;
        width: 100%;
    }
    
    .transaction-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .tx-amount {
        text-align: left;
    }
}

/* Table Overflow */
.users-table-container,
.orders-table-container {
    overflow-x: auto;
}

/* ===========================================
   OTP VERIFICATION STYLES
   =========================================== */

.email-otp-group {
    display: flex;
    gap: 0.5rem;
}

.email-otp-group input {
    flex: 1;
}

.btn-send-otp {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-send-otp:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-send-otp:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.otp-input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.otp-input-group input {
    flex: 1;
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 0.5rem;
    font-weight: 600;
}

.otp-timer {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    min-width: 70px;
}

.otp-hint {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

#otpGroup {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .email-otp-group {
        flex-direction: column;
    }
    
    .btn-send-otp {
        width: 100%;
    }
}

/* ===========================================
   FORGOT PASSWORD STYLES
   =========================================== */

.forgot-password-link {
    text-align: right;
    margin-top: 0.5rem;
}

.forgot-password-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.forgot-password-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}


/* ===========================================
   LEARNING RESOURCES - FULL SCREEN VIEWS
   =========================================== */

/* Full Screen Container */
.study-note-fullscreen,
.quiz-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f5f7fa;
    z-index: 9999;
    overflow-y: auto;
}

.study-note-fullscreen,
.study-note-fullscreen * {
    font-family: 'Comic Neue', 'Patrick Hand', 'Poppins', cursive;
}

/* Full Screen Header */
.fullscreen-header {
    background: #303c6c;
    color: white;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.fullscreen-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

/* Back Button */
.back-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.62rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-3px);
}

.back-arrow {
    font-size: 0.9rem;
    font-weight: bold;
}

/* Mark Completed Button */
.mark-completed-btn {
    background: #4caf50;
    border: none;
    color: white;
    padding: 0.62rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.mark-completed-btn:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.mark-completed-btn.completed {
    background: #9e9e9e;
    cursor: not-allowed;
}

.check-icon {
    font-size: 0.9rem;
    font-weight: bold;
}

/* Success Toast */
.success-toast {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: #4caf50;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s;
    font-weight: 500;
}

.success-toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Full Screen Body */
.fullscreen-body {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.study-note-fullscreen .fullscreen-body {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0.35rem 1.5rem 0;
    min-height: calc(100vh - 58px);
    height: calc(100vh - 58px);
    box-sizing: border-box;
    overflow: hidden;
}

.study-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    width: 100%;
    min-height: 100%;
    height: 100%;
}

.study-page-preview {
    background: #ffffff;
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    position: sticky;
    top: 110px;
}

.study-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
}

.study-preview-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #22437b;
}

.study-preview-toggle {
    border: 1px solid #9eb7e8;
    background: #edf3ff;
    color: #2a4f93;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.55rem;
    cursor: pointer;
}

.study-preview-list {
    display: block;
}

.study-page-preview.collapsed .study-preview-list {
    display: none;
}

.page-preview-item {
    width: 100%;
    border: 1px solid #d7deea;
    border-radius: 10px;
    background: #f8fafc;
    color: #1f2937;
    text-align: left;
    padding: 0.65rem 0.7rem;
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.page-preview-item:hover {
    border-color: #6b84d6;
    background: #eef3ff;
}

.page-preview-item.active {
    border-color: #3755b3;
    background: #e6eeff;
    box-shadow: inset 0 0 0 1px #3755b3;
}

.page-preview-number {
    min-width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    background: #dce6ff;
    color: #27408f;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-preview-title {
    font-size: 0.9rem;
    line-height: 1.35;
    font-weight: 600;
    width: 100%;
}

.study-slider-container {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.study-page-indicator {
    margin-bottom: 0;
    color: #334155;
    font-weight: 600;
    font-size: 0.86rem;
    text-align: center;
}

/* Study Content */
.study-content {
    background: #fffdf6;
    border-radius: 16px;
    padding: 2.5rem 2.75rem;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.12);
    line-height: 1.8;
    font-family: Arial, sans-serif;
    font-size: 9px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(120, 135, 155, 0.12),
        rgba(120, 135, 155, 0.12) 1px,
        transparent 1px,
        transparent 28px
    );
}

.study-content h1 {
    font-size: 2.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
    border-bottom: 3px solid #f2c94c;
    padding-bottom: 0.4rem;
    font-family: Arial, sans-serif;
}

.study-content h1:first-child {
    margin-top: 0;
}

.study-content h2 {
    font-size: 1.6rem;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
    color: #374151;
    background: #fff3bf;
    border-left: 6px solid #f2c94c;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

.study-content h3 {
    font-size: 1.25rem;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    color: #3f4b5f;
    font-weight: 700;
}

.study-content p {
    margin-bottom: 0.9rem;
    color: #374151;
    font-size: 9px;
}

.study-content ul {
    margin-left: 1.6rem;
    margin-bottom: 1.2rem;
    list-style: disc;
}

.study-content li {
    margin-bottom: 0.6rem;
    color: #374151;
    font-size: 9px;
}

.study-content strong {
    color: #1f2937;
    font-weight: 700;
}

.study-image {
    text-align: center;
    margin: 1rem 0 1.25rem;
}

.study-image img {
    width: 50%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.study-image img[alt="Plant Life Cycle"] {
    width: 50%;
}

.study-note-fullscreen .study-content .study-image:has(img[alt="Flower Reproductive Structures"]) {
    float: right;
    width: min(42%, 340px);
    margin: 0.2rem 0 0.8rem 1rem;
    text-align: right;
}

.study-note-fullscreen .study-content .study-image:has(img[alt="Flower Reproductive Structures"]) img {
    width: 100%;
}

.study-note-fullscreen .study-content img[alt="Flower Reproductive Structures"] {
    float: right;
    width: min(42%, 340px);
    margin: 0.2rem 0 0.8rem 1rem;
}

.study-note-fullscreen .study-content img[alt="Pollination Definition"],
.study-note-fullscreen .study-content img[alt="Agents of Pollination"] {
    width: 300px !important;
    height: 400px !important;
    object-fit: contain;
}

/* From this point onward: keep all study-note content images at 300x400 */
.study-note-fullscreen .study-content .study-image img,
.study-note-fullscreen .study-content img {
    width: 300px !important;
    height: 400px !important;
    object-fit: contain !important;
}

/* Basics Needed Before Reproduction images: use default fit behavior */
.study-note-fullscreen .study-content img[alt="Cell Basics"],
.study-note-fullscreen .study-content img[alt="Role of Cells in Reproduction"],
.study-note-fullscreen .study-content img[alt="Inheritance in Plants"] {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
}

.study-navigation {
    margin-top: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.45rem;
    position: sticky;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #d9e2f4;
    padding: 0.1rem 0 0;
    z-index: 2;
}

.study-nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.nav-btn {
    border: none;
    border-radius: 6px;
    background: #3f5fb8;
    color: #ffffff;
    padding: 0.5rem 0.95rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 38px;
    min-width: 170px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-btn:disabled {
    cursor: not-allowed;
}

.page-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
}

.page-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #c8d3ee;
    cursor: pointer;
}

.page-dot.active {
    background: #3f5fb8;
}

/* Study Notes LMS-like theme */
.study-note-fullscreen {
    background: #f1f3f6;
}

.study-note-fullscreen .fullscreen-header {
    background: #ffffff;
    color: #1f2937;
    border-bottom: 1px solid #d9e2ec;
    box-shadow: none;
    padding: 0.55rem 0.9rem;
    font-family: Arial, sans-serif !important;
}

.study-note-fullscreen .fullscreen-title {
    color: #111827;
    font-size: 0.98rem;
    font-weight: 700;
    font-family: Arial, sans-serif !important;
}

.study-note-fullscreen .back-button {
    background: linear-gradient(90deg, #0f766e 0%, #0ea5a1 68%);
    border: 1px solid #0c7f76;
    color: #ffffff;
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
    border-radius: 8px;
    position: relative;
    padding-right: 2.1rem;
    font-family: Arial, sans-serif !important;
}

.study-note-fullscreen .back-button .back-arrow {
    display: none;
}

.study-note-fullscreen .back-button::after {
    content: "\f060";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 0;
    right: 0;
    width: 1.65rem;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.14);
    border-left: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0 8px 8px 0;
    font-size: 0.78rem;
}

.study-note-fullscreen .mark-completed-btn {
    background: #4f46e5;
    color: #ffffff;
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
    box-shadow: none;
    font-family: Arial, sans-serif !important;
}

.study-note-fullscreen .mark-completed-btn:hover:not(:disabled) {
    background: #4338ca;
    transform: none;
}

.study-note-fullscreen .fullscreen-body {
    padding: 0.45rem 0.8rem 0;
}

.study-note-fullscreen .study-layout {
    gap: 0;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    grid-template-columns: 285px minmax(0, 1fr);
}

.study-note-fullscreen .study-page-preview {
    border-radius: 0;
    border-right: 1px solid #d7dee8;
    box-shadow: none;
    max-height: 100%;
    top: 0;
    padding: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.study-note-fullscreen .material-tabs {
    margin: 0;
    padding: 0.8rem 0.75rem 0.35rem;
    border-bottom: none;
    background: #ffffff;
    display: flex;
    gap: 0.5rem;
}

.study-note-fullscreen .material-tab {
    border: none;
    background: transparent;
    color: #4b5563;
    font-size: 15px;
    font-weight: 700;
    padding: 0.3rem 0.45rem;
    border-bottom: none;
    cursor: default;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-family: Arial, sans-serif !important;
}

.study-note-fullscreen .material-tab.active {
    color: #607089;
}

.study-note-fullscreen .material-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #4338ca;
    font-size: 0.62rem;
    margin-left: 0.22rem;
}

.study-note-fullscreen .study-preview-list {
    padding: 0.2rem 0.5rem 0.45rem;
    overflow-y: auto;
    max-height: none;
    flex: 1;
    background: #ffffff;
}

.study-note-fullscreen .page-preview-item {
    border-radius: 20px;
    background: transparent;
    border: 1px solid #c8d5ea;
    margin: 0 0 0.7rem;
    padding: 0.8rem 0.9rem 0.75rem;
    display: block;
    position: relative;
    text-align: left;
}

.study-note-fullscreen .page-preview-item.active {
    background: #f4f8ff;
    border-color: #1a78ef;
    box-shadow: none;
    padding-bottom: 0.9rem;
}

.study-note-fullscreen .page-preview-item.active::before {
    display: none;
}

.study-note-fullscreen .topic-card-head {
    font-size: 15px;
    font-weight: 400;
    color: #4f6282;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-family: Arial, sans-serif !important;
}

.study-note-fullscreen .page-preview-item.active .topic-card-head {
    color: #1675ea;
    font-weight: 700;
}

.study-note-fullscreen .topic-card-progress {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.55rem;
}

.study-note-fullscreen .topic-card-track {
    flex: 1;
    height: 10px;
    background: #e2e8f2;
    border-radius: 999px;
    overflow: hidden;
}

.study-note-fullscreen .topic-card-track span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #1680f2;
}

.study-note-fullscreen .topic-card-percent {
    font-size: 12px;
    color: #5f7391;
    min-width: 32px;
    text-align: right;
    font-family: Arial, sans-serif !important;
}

.study-note-fullscreen .topic-card-items {
    display: none;
    margin-top: 0.65rem;
}

.study-note-fullscreen .page-preview-item.active .topic-card-items {
    display: block;
}

.study-note-fullscreen .topic-card-item {
    font-size: 14px;
    color: #5f7391;
    padding: 0.42rem 0;
    font-family: Arial, sans-serif !important;
}

.study-note-fullscreen .study-preview-footer {
    border-top: 1px solid #d7dee8;
    background: #ffffff;
    padding: 0.2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.study-note-fullscreen .material-footer-item {
    border: none;
    background: transparent;
    color: #1f2937;
    border-radius: 0;
    font-size: 15px;
    font-weight: 400;
    padding: 0.42rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.38rem;
    text-align: left;
    cursor: pointer;
    font-family: Arial, sans-serif !important;
    border-bottom: 1px solid #d7dee8;
}

.study-note-fullscreen .material-footer-item:hover {
    background: transparent;
}

.study-note-fullscreen .material-item-icon {
    font-size: 15px;
    color: #1f2937;
    min-width: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif !important;
}

.study-note-fullscreen .study-slider-container {
    background: #ffffff;
    padding: 0.5rem 0.8rem 0;
}

.study-note-fullscreen .study-workspace-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.study-note-fullscreen .study-page-indicator {
    font-size: 16px;
    color: #4b5563;
    font-weight: 600;
    font-family: Arial, sans-serif !important;
}

.study-note-fullscreen .study-top-controls {
    display: flex;
    gap: 0.4rem;
}

.study-note-fullscreen .study-top-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #0c7f76;
    background: linear-gradient(90deg, #0f766e 0%, #0ea5a1 68%);
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.study-note-fullscreen .study-top-nav-btn:disabled {
    cursor: not-allowed;
}

.study-note-fullscreen .study-content {
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    background-image: none;
    padding: 1rem 1.1rem;
    font-size: 16px !important;
    line-height: 1.6;
    font-family: Arial, sans-serif !important;
}

.study-note-fullscreen .study-content,
.study-note-fullscreen .study-content h1,
.study-note-fullscreen .study-content h2,
.study-note-fullscreen .study-content h3,
.study-note-fullscreen .study-content h4,
.study-note-fullscreen .study-content h5,
.study-note-fullscreen .study-content h6,
.study-note-fullscreen .study-content p,
.study-note-fullscreen .study-content li,
.study-note-fullscreen .study-content ul,
.study-note-fullscreen .study-content ol,
.study-note-fullscreen .study-content strong,
.study-note-fullscreen .study-content em,
.study-note-fullscreen .study-content span,
.study-note-fullscreen .study-content td,
.study-note-fullscreen .study-content th,
.study-note-fullscreen .study-content blockquote,
.study-note-fullscreen .study-content code {
    font-family: Arial, sans-serif !important;
}

.study-note-fullscreen .study-content h1 {
    font-size: 1.15rem;
    border-bottom: 4px solid #2cc89a;
    margin-top: 0;
    margin-bottom: 0.7rem;
    padding-bottom: 0.22rem;
}

.study-note-fullscreen .study-content h2 {
    font-size: 1.95rem;
    color: #c76500;
    background: transparent;
    border: none;
    margin-top: 1.05rem;
    margin-bottom: 0.7rem;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
}

.study-note-fullscreen .study-content h2::before {
    content: "\f15b";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #f59e0b;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex: 0 0 34px;
}

.study-note-fullscreen .study-content h3 {
    font-size: 1.05rem;
    margin-top: 0.7rem;
    margin-bottom: 0.35rem;
    font-weight: 700;
    color: #024950;
    border-bottom: 3px solid #2cc89a;
    padding-bottom: 0.16rem;
    display: inline-block;
}

.study-note-fullscreen .study-content h2,
.study-note-fullscreen .study-content h2 .heading-text {
    border-bottom: 3px solid #2cc89a;
    padding-bottom: 0.12rem;
}

.study-note-fullscreen .study-content .key-ideas-box {
    background: #f6efe6;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    margin: 0.6rem 0 1rem;
}

.study-note-fullscreen .study-content .key-ideas-heading {
    color: #ef6c00;
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
}

.study-note-fullscreen .study-content .key-ideas-heading::before {
    content: "\f111";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #ef6c00;
    font-size: 0.52rem;
}

.study-note-fullscreen .study-content .key-ideas-box ul,
.study-note-fullscreen .study-content .key-ideas-box p {
    margin: 0;
}

.study-note-fullscreen .study-content ul {
    margin: 0.2rem 0 0.35rem 1.45rem;
    padding: 0;
    list-style: disc;
}

.study-note-fullscreen .study-content ul li {
    margin: 0 0 0.15rem;
    line-height: 1.3;
    color: #0f172a;
}

.study-note-fullscreen .study-content ul + ul {
    margin-top: 0.08rem;
}

.study-note-fullscreen .study-content ul li::marker {
    color: #c7d2df;
}

.study-note-fullscreen .study-content p,
.study-note-fullscreen .study-content li {
    font-size: 16px !important;
}

.study-note-fullscreen .study-content ul,
.study-note-fullscreen .study-content ol,
.study-note-fullscreen .study-content span,
.study-note-fullscreen .study-content td,
.study-note-fullscreen .study-content th,
.study-note-fullscreen .study-content blockquote {
    font-size: 16px !important;
}

.study-note-fullscreen .study-navigation {
    display: none;
}

/* Quiz Full Screen Styles */
.quiz-content {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quiz-progress-section {
    margin-bottom: 3rem;
}

.quiz-question-section {
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    line-height: 1.4;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-text-answer {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.quiz-text-input {
    flex: 1;
    min-width: 220px;
    padding: 0.9rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
}

.quiz-text-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.quiz-submit-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.9rem 1.6rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-submit-btn:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-1px);
}

.quiz-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.quiz-finish-btn {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
    line-height: 1;
    margin-left: 0.75rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    text-align: left;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.quiz-option:hover:not(:disabled) {
    border-color: #667eea;
    background: #f7f9ff;
    transform: translateX(8px);
}

.option-letter {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
    font-weight: 700;
    color: #666;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.option-text {
    flex: 1;
    line-height: 1.5;
}

.quiz-option.correct {
    border-color: #4caf50;
    background: #e8f5e9;
}

.quiz-option.correct .option-letter {
    background: #4caf50;
    color: white;
}

.quiz-option.incorrect {
    border-color: #f44336;
    background: #ffebee;
}

.quiz-option.incorrect .option-letter {
    background: #f44336;
    color: white;
}

/* Quiz Explanation */
.quiz-explanation-section {
    margin-top: 2.5rem;
    padding: 2rem;
    border-radius: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.correct-explanation {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.incorrect-explanation {
    background: #ffebee;
    border-left: 4px solid #f44336;
}

.explanation-header h3 {
    margin: 0 0 1rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.explanation-text {
    margin: 0 0 1.5rem;
    color: #4a5568;
    font-size: 1.1rem;
    line-height: 1.6;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    min-width: 200px;
}

/* Quiz Results */
.quiz-results {
    text-align: center;
    padding: 2rem;
}

.results-emoji {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.quiz-results h2 {
    margin: 0 0 2.5rem;
    color: #2c3e50;
    font-size: 2.2rem;
}

.score-circle {
    width: 200px;
    height: 200px;
    margin: 0 auto 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.score-number {
    font-size: 3.5rem;
    font-weight: bold;
}

.score-percentage {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.results-breakdown {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.stat-label {
    font-size: 1rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
}

.stat-value.correct {
    color: #4caf50;
}

.stat-value.incorrect {
    color: #f44336;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fullscreen-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .fullscreen-title {
        font-size: 1.3rem;
        text-align: left;
    }
    
    .back-button {
        order: -1;
        width: 100%;
        justify-content: center;
    }
    
    .mark-completed-btn {
        width: 100%;
        justify-content: center;
    }
    
    .fullscreen-body {
        padding: 1rem;
    }

    .study-note-fullscreen .fullscreen-body {
        min-height: auto;
        height: auto;
        overflow: visible;
    }

    .study-layout {
        grid-template-columns: 1fr;
        min-height: auto;
        height: auto;
    }

    .study-page-preview {
        position: static;
        max-height: 220px;
    }

    .study-note-fullscreen .study-layout {
        grid-template-columns: 1fr !important;
        min-height: auto;
        height: auto;
        border: 1px solid #d7dee8;
    }

    .study-note-fullscreen .study-page-preview {
        width: 100%;
        max-height: 320px;
        border-right: none;
        border-bottom: 1px solid #d7dee8;
        position: static;
    }

    .study-note-fullscreen .study-slider-container {
        width: 100%;
        min-width: 0;
        padding: 0.45rem 0.6rem 0;
    }

    .study-note-fullscreen .study-content {
        width: 100%;
        min-width: 0;
        padding: 0.9rem 0.85rem;
        font-size: 15px !important;
        line-height: 1.55;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .study-note-fullscreen .study-content h1 {
        font-size: 1.05rem;
        line-height: 1.3;
    }

    .study-note-fullscreen .study-content h2 {
        font-size: 1.05rem;
        line-height: 1.35;
        gap: 0.45rem;
    }

    .study-note-fullscreen .study-content h2::before {
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .study-note-fullscreen .study-content h3 {
        font-size: 0.98rem;
        line-height: 1.35;
    }
    
    .study-content,
    .quiz-content {
        padding: 1.5rem;
    }
    
    .study-content h1 {
        font-size: 1.8rem;
    }
    
    .study-content h2 {
        font-size: 1.5rem;
    }

    .study-navigation {
        grid-template-columns: 1fr;
        position: static;
        padding: 0;
        border-top: none;
    }

    .nav-btn {
        width: 100%;
    }
    
    .question-text {
        font-size: 1.3rem;
    }
    
    .score-circle {
        width: 160px;
        height: 160px;
    }
    
    .score-number {
        font-size: 2.5rem;
    }
    
    .results-breakdown {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions button {
        width: 100%;
    }
    
    .success-toast {
        right: 1rem;
        left: 1rem;
    }
}

/* Loading Spinner (kept from modal CSS) */
.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.loading-spinner .spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Progress Bar (used in quiz) */
.progress-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.question-counter {
    text-align: center;
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

/* Daily Quest question card: sample-style layout */
.quest-question-card .dq-question-shell {
    border: 1px solid #e1e8f5;
    border-radius: 16px;
    padding: 1rem 1rem 1.15rem;
    margin-bottom: 1rem;
    background: #ffffff;
}

.dq-mobile-hint-chip,
.dq-mobile-badge,
.dq-mobile-question-title,
.dq-mobile-quiz-title,
.quest-mobile-progress-pill {
    display: none;
}

.quest-question-card .dq-question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.quest-question-card .dq-head-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.quest-question-card .dq-question-label {
    color: #111827;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
}

.quest-question-card .dq-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.34rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.quest-question-card .dq-chip-topic {
    background: #efe9fb;
    color: #5b2bc9;
}

.quest-question-card .dq-chip-subtopic {
    background: #e6f6ea;
    color: #0f6b3d;
}

.quest-question-card .dq-chip-difficulty {
    background: #dff8ea;
    color: #0f7a4a;
}

.quest-question-card .dq-question-main {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.quest-question-card .dq-question-index {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #2f66e8;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(47, 102, 232, 0.25);
}

.quest-question-card .dq-question-text {
    margin: 0;
    width: 100%;
    color: #0f254d;
    font-size: 1.1rem;
    line-height: 1.55;
}

.quest-question-card .dq-question-text p {
    margin: 0 0 0.7rem;
}

.quest-question-card .dq-question-text p:last-child {
    margin-bottom: 0;
}

.quest-question-card .dq-question-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.9rem 0;
    border: 1px solid #d7dce8;
    border-radius: 10px;
    overflow: hidden;
}

.quest-question-card .dq-question-text th {
    background: #2f66e8;
    color: #ffffff;
    text-align: left;
    padding: 0.6rem 0.8rem;
    border: 1px solid #2f66e8;
}

.quest-question-card .dq-question-text td {
    padding: 0.62rem 0.8rem;
    border: 1px solid #d7dce8;
    color: #1e293b;
}

.quest-question-card .dq-question-text tr:nth-child(even) td {
    background: #f8fbff;
}

.quest-question-card .options-grid {
    border-top: 1px dashed #d9e0ec;
    padding-top: 1rem;
    gap: 0.72rem;
}

.quest-question-card .option-button {
    padding: 0.72rem 0.95rem;
    border-width: 2px;
    border-radius: 14px;
    gap: 0.75rem;
    min-height: 58px;
}

.quest-question-card .option-button .option-text {
    font-size: 0.99rem;
    line-height: 1.32;
    font-weight: 500;
}

.quest-question-card .option-button:hover {
    transform: none;
}

.quest-question-card .option-number-pill {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 999px;
    background: #e8eef7;
    color: #334155;
    font-weight: 800;
    font-size: 0.78rem;
    border: 1px solid #d4dce9;
}

@media (min-width: 769px) {
    .fullscreen-quest {
        background:
            radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.92) 0, transparent 24%),
            radial-gradient(circle at 82% 18%, rgba(180, 215, 255, 0.2) 0, transparent 26%),
            linear-gradient(135deg, #f9fbff 0%, #eef6ff 45%, #d9ebff 100%);
    }

    .quest-fullscreen-container,
    .quest-main-content,
    .quest-content-area {
        background: transparent;
    }

    .fullscreen-quest.feedback-mode .quest-main-content,
    .fullscreen-quest.feedback-mode .quest-content-area {
        background: #ffffff;
    }

    .fullscreen-quest .quest-content-area:has(.quest-completion-screen) {
        background: #eef6ff;
    }

    .quest-main-content {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        min-height: calc(100vh - 73px);
    }

    .quest-progress-info {
        display: none;
    }

    .quest-header-actions {
        display: inline-flex;
    }

    .quest-paw-counter {
        display: none;
    }

    .quest-sidebar {
        width: 44px;
        height: auto;
        border-right: 1px solid #dbe3ef;
        background: #fbfdff;
    }

    .questions-list {
        padding: 0;
    }

    .question-list-item {
        justify-content: center;
        align-items: center;
        min-height: 38px;
        padding: 0;
        margin: 0;
        border-radius: 0;
        border-bottom: 1px solid #eef2f7;
        background: transparent;
    }

    .question-list-item::before,
    .question-list-info {
        display: none;
    }

    .question-list-item.active {
        border-left: 3px solid #84b9ef;
        background: #edf5ff;
    }

    .question-status-icon {
        margin-top: 0;
    }

    .status-number {
        width: auto;
        height: auto;
        border-radius: 0;
        background: transparent;
        color: #64748b;
        font-weight: 500;
        font-size: 1.05rem;
    }

    .question-list-item.active .status-number {
        color: #111827;
        font-weight: 700;
    }

    .question-list-item.correct .status-number,
    .question-list-item.incorrect .status-number {
        background: transparent;
        color: #111827;
    }

    .quest-content-area {
        padding: 0;
        align-items: stretch;
        overflow: hidden;
    }

    .quest-question-card.quest-exam-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
        max-width: none;
        width: 100%;
        height: 100%;
        min-height: calc(100vh - 73px);
        padding: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: #ffffff;
    }

    .quest-exam-pane {
        position: relative;
        min-width: 0;
        min-height: 0;
    }

    .quest-exam-passage {
        border-right: 1px solid #dbe3ef;
        padding: 2rem 2rem 4.5rem 2.3rem;
        overflow-y: auto;
        background: #ffffff;
    }

    .quest-exam-answer {
        padding: 2rem 2.2rem 4.5rem;
        overflow-y: auto;
        background: #ffffff;
    }

    .quest-question-card .dq-question-shell {
        border: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        background: transparent;
    }

    .quest-question-card .dq-question-head {
        margin-bottom: 1.25rem;
    }

    .quest-question-card .dq-question-main {
        display: block;
    }

    .quest-question-card .dq-question-text {
        color: #26364a;
        font-size: 1rem;
        line-height: 1.62;
    }

    .quest-question-card .dq-question-text table {
        margin: 1.15rem 0;
    }

    .quest-answer-header {
        margin-bottom: 1.35rem;
    }

.quest-answer-counter {
    display: none;
}

    .quest-answer-instruction {
        color: #475569;
        font-size: 0.98rem;
        line-height: 1.5;
    }

    .quest-question-card .options-grid {
        border-top: none;
        padding-top: 0;
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        margin-bottom: 1.2rem;
    }

    .quest-question-card .option-button {
        min-height: 0;
        padding: 0.9rem 0.25rem;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid #eef2f7;
        background: transparent;
        box-shadow: none;
        justify-content: flex-start;
        gap: 0.9rem;
    }

    .quest-question-card .option-button .option-text {
        color: #1f2937;
        font-size: 1rem;
        line-height: 1.5;
        font-weight: 500;
    }

    .quest-question-card .option-button:hover {
        background: #f8fbff;
    }

    .quest-question-card .option-button.selected {
        background: #eef6ff;
    }

    .quest-question-card .option-number-pill {
        width: 28px;
        height: 28px;
        min-width: 28px;
        background: #ffffff;
        border: 1.5px solid #94a3b8;
        color: #334155;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .quest-question-card .option-button.selected .option-number-pill {
        background: #ffffff;
        border-color: #2f66e8;
        color: #2f66e8;
    }

    .multi-submit-wrap {
        justify-content: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.4rem;
    }

    body:not(.public-page) .quest-content-area .btn-submit-multi,
    body:not(.public-page) .quest-content-area .btn-skip-question {
        min-height: 0;
        padding: 0.78rem 1.25rem;
        border-radius: 6px;
        font-size: 0.96rem;
        box-shadow: none;
    }

    .quest-hint-card {
        margin-top: 0;
        max-width: none;
        width: 100%;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        background: #fbfdff;
        box-shadow: none;
    }

    .quest-pane-arrow {
        position: absolute;
        bottom: 1.45rem;
        width: 34px;
        height: 34px;
        border: none;
        background: transparent;
        color: #334155;
        font-size: 1.55rem;
        line-height: 1;
        cursor: pointer;
    }

    .quest-pane-arrow-left {
        left: 2.15rem;
    }

    .quest-pane-arrow-right {
        right: 2rem;
    }
}

@media (max-width: 768px) {
    .quest-content-area.feedback-mode {
        overflow: visible;
        padding-top: 1.2rem;
        margin-top: 0;
    }

    .quest-content-area.feedback-mode .solution-body {
        overflow: visible;
        max-height: none;
    }

    .quest-answer-header,
    .quest-pane-arrow {
        display: none;
    }

    .quest-question-card .dq-question-head {
        align-items: flex-start;
    }

    .quest-question-card .dq-head-chips {
        margin-left: 0;
    }

    .quest-question-card .dq-question-main {
        gap: 0.75rem;
    }

    .quest-question-card .dq-question-text {
        font-size: 1rem;
    }

    .quest-question-card .option-button {
        min-height: 52px;
        padding: 0.62rem 0.78rem;
        gap: 0.62rem;
    }

    .quest-question-card .option-button .option-text {
        font-size: 0.98rem;
    }

    .quest-question-card .option-number-pill {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.72rem;
    }
}

@media (max-width: 768px) {
    .fullscreen-quest,
    .quest-fullscreen-container {
        background:
            radial-gradient(circle at 50% 0%, rgba(255, 146, 62, 0.16) 0, rgba(255, 146, 62, 0.03) 16%, transparent 30%),
            linear-gradient(180deg, #6437ff 0%, #6f44ff 31%, #eef6ff 31%, #eef6ff 100%);
    }

    .quest-header-bar {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 1.1rem 1rem 4.4rem;
        background: transparent;
        border-bottom: 0;
    }

    .quest-title,
    .quest-progress-info,
    .quest-header-actions,
    .quest-header-clock,
    .quest-back-btn,
    .quest-sidebar,
    .quest-question-card .dq-question-head {
        display: none !important;
    }

    .quest-mobile-progress {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.8rem;
        width: 100%;
    }

    .quest-desktop-progress-badge {
        display: none;
    }

    .quest-mobile-progress-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 4.8rem;
        padding: 0.8rem 0.95rem;
        border-radius: 1rem;
        font-size: 0.95rem;
        font-weight: 800;
        line-height: 1;
        box-shadow: 0 12px 28px rgba(55, 26, 156, 0.14);
    }

    .quest-mobile-progress-pill-left {
        background: #ffffff;
        color: #101828;
    }

    .quest-mobile-progress-pill-right {
        background: linear-gradient(135deg, #ff7a18 0%, #ff8d24 100%);
        color: #ffffff;
    }

    .quest-mobile-progress-bar {
        height: 0.65rem;
        background: rgba(255, 255, 255, 0.14);
    }

    .quest-mobile-progress-fill {
        background: linear-gradient(90deg, #ff7a18 0%, #ff9a35 100%);
    }

    .quest-main-content {
        display: block;
        min-height: 0;
    }

    .quest-content-area {
        padding: 0 0.85rem 6rem;
        margin-top: -2.85rem;
        background: transparent;
    }

    .question-display {
        padding: 0;
        background: transparent;
    }

    .quest-question-card.quest-exam-layout {
        display: block;
        border: 0;
        background: transparent;
        border-radius: 0;
        padding: 0;
        overflow: visible;
        box-shadow: none;
    }

    .quest-exam-pane {
        background: transparent;
        padding: 0;
        overflow: visible;
    }

    .quest-exam-passage,
    .quest-exam-answer {
        border: 0;
        padding: 0;
        background: transparent;
    }

    .quest-question-card .dq-question-shell {
        position: relative;
        margin: 0 0 1.1rem;
        padding: 3.5rem 1.25rem 1.35rem;
        border: 0;
        border-radius: 1.5rem;
        background: #ffffff;
        box-shadow: 0 18px 40px rgba(84, 70, 162, 0.14);
        overflow: visible;
    }

    .dq-mobile-hint-chip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 0.7rem;
        background: #ffe1cf;
        color: #ff7a18;
        font-size: 0;
        font-weight: 800;
        width: 3.2rem;
        height: 3rem;
        padding: 0;
        margin-bottom: 1.25rem;
        box-shadow: none;
    }

    .dq-mobile-hint-chip::before {
        content: "💡";
        margin-right: 0;
        font-size: 1rem;
    }

    .dq-mobile-badge {
        position: absolute;
        top: -3.35rem;
        left: 50%;
        transform: translateX(-50%);
        width: 6.2rem;
        height: 6.2rem;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background:
            radial-gradient(circle at center, #ffffff 0 56%, transparent 56%),
            conic-gradient(from 310deg, #ff7a18 0 12%, #f8dacb 12% 100%);
        border: 0.5rem solid #5f34ff;
        color: #111827;
        font-size: 1.95rem;
        font-weight: 800;
        box-shadow: 0 18px 34px rgba(79, 45, 186, 0.2);
    }

    .dq-mobile-question-title {
        display: block;
        text-align: center;
        color: #000000;
        font-size: 1.2rem;
        font-weight: 800;
        margin-bottom: 0.7rem;
    }

    .dq-mobile-quiz-title {
        display: block;
        text-align: center;
        color: #51576d;
        font-size: 1rem;
        font-weight: 500;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px dashed #d8dee8;
    }

    .quest-question-card .dq-question-main {
        display: block;
    }

    .quest-question-card .dq-question-text {
        text-align: center;
        color: #111827;
        font-size: 1rem;
        line-height: 1.65;
    }

    .quest-question-card .dq-question-text p {
        margin: 0 0 0.7rem;
    }

    .quest-question-card .options-grid {
        display: grid;
        gap: 1rem;
        border-top: 0;
        padding-top: 0;
        margin-top: 0.2rem;
    }

    .quest-question-card .option-button {
        position: relative;
        min-height: 5rem;
        padding: 0.95rem 1rem;
        border: 1px solid #e3e8f0;
        border-radius: 1.25rem;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(114, 132, 166, 0.08);
        gap: 0.85rem;
    }

    .quest-question-card .option-number-pill {
        width: 2.35rem;
        height: 2.35rem;
        min-width: 2.35rem;
        border: 1.5px solid #d7dce6;
        background: #ffffff;
        color: #404a5c;
        font-size: 0.88rem;
        font-weight: 700;
    }

    .quest-question-card .option-button .option-text {
        color: #101828;
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.42;
    }

    .quest-question-card .option-button.selected {
        border-color: #d1efe1;
        background: linear-gradient(135deg, #effaf4 0%, #edf8ff 100%);
        color: #15803d;
    }

    .quest-question-card .option-button.selected .option-number-pill {
        border-color: #55c46b;
        background: #55c46b;
        color: #ffffff;
    }

    .quest-question-card .option-button.selected::after {
        content: "✓";
        position: absolute;
        top: 50%;
        right: 0.95rem;
        transform: translateY(-50%);
        width: 2.45rem;
        height: 2.45rem;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #55c46b;
        color: #ffffff;
        font-size: 1.15rem;
        font-weight: 800;
        box-shadow: 0 10px 18px rgba(85, 196, 107, 0.22);
    }

    .quest-question-card .option-button.selected .option-text {
        color: #55b35d;
        padding-right: 3rem;
    }

    .multi-submit-wrap {
        margin-top: 0.95rem;
    }

    .quest-hint-card {
        margin-top: 1rem;
        border-radius: 1.2rem;
        padding: 1rem;
        background: rgba(231, 242, 252, 0.82);
        border: 1px solid #d8e7f5;
        box-shadow: none;
    }
}

/* Global Button Theme */
body:not(.public-page) :is(a, button, input[type="submit"], input[type="button"])[class^="btn"],
body:not(.public-page) :is(a, button, input[type="submit"], input[type="button"])[class*=" btn"] {
    background: linear-gradient(90deg, #2f2d76 0%, #2eaee3 100%) !important;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.65) !important;
    border-radius: 999px !important;
    box-shadow: 0 5px 0 rgba(15, 23, 42, 0.35), 0 8px 16px rgba(15, 23, 42, 0.2) !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body:not(.public-page) :is(a, button)[class^="btn"]::after,
body:not(.public-page) :is(a, button)[class*=" btn"]::after {
    content: "›";
    margin-left: 0.55em;
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1;
}

body:not(.public-page) :is(a, button, input[type="submit"], input[type="button"])[class^="btn"]:hover,
body:not(.public-page) :is(a, button, input[type="submit"], input[type="button"])[class*=" btn"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 0 rgba(15, 23, 42, 0.35), 0 12px 18px rgba(15, 23, 42, 0.24) !important;
    filter: saturate(1.08);
}

body:not(.public-page) :is(a, button, input[type="submit"], input[type="button"])[class^="btn"]:active,
body:not(.public-page) :is(a, button, input[type="submit"], input[type="button"])[class*=" btn"]:active {
    transform: translateY(1px);
    box-shadow: 0 3px 0 rgba(15, 23, 42, 0.35), 0 5px 12px rgba(15, 23, 42, 0.2) !important;
}

body:not(.public-page) :is(button, input[type="submit"], input[type="button"])[class^="btn"]:disabled,
body:not(.public-page) :is(button, input[type="submit"], input[type="button"])[class*=" btn"]:disabled {
    background: #9ca3af !important;
    color: #f8fafc !important;
    border-color: #d1d5db !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
    cursor: not-allowed;
}

/* Worksheet submit button style override */
#submitWorksheetBtn.btn-primary.btn-large {
    background: linear-gradient(90deg, #0e9f98 0%, #0aa7a0 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 700 !important;
    padding: 0.9rem 1.35rem !important;
    min-height: 44px;
}

/* Admin Button Theme - match purple "Start" style */
.admin-page :is(a, button, input[type="submit"], input[type="button"])[class^="btn"],
.admin-page :is(a, button, input[type="submit"], input[type="button"])[class*=" btn"],
.admin-page .tab-btn {
    background: linear-gradient(90deg, #8b3fe3 0%, #6b2fd9 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 0 rgba(42, 23, 84, 0.28) !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.admin-page :is(a, button)[class^="btn"]::after,
.admin-page :is(a, button)[class*=" btn"]::after,
.admin-page .tab-btn::after {
    content: "›";
    margin-left: 0.5em;
    font-size: 1.05em;
    font-weight: 700;
    line-height: 1;
}

.admin-page :is(a, button, input[type="submit"], input[type="button"])[class^="btn"]:hover,
.admin-page :is(a, button, input[type="submit"], input[type="button"])[class*=" btn"]:hover,
.admin-page .tab-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 0 rgba(42, 23, 84, 0.3) !important;
    filter: brightness(1.03);
}

.admin-page :is(a, button, input[type="submit"], input[type="button"])[class^="btn"]:active,
.admin-page :is(a, button, input[type="submit"], input[type="button"])[class*=" btn"]:active,
.admin-page .tab-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 rgba(42, 23, 84, 0.28) !important;
}

.admin-page :is(button, input[type="submit"], input[type="button"])[class^="btn"]:disabled,
.admin-page :is(button, input[type="submit"], input[type="button"])[class*=" btn"]:disabled,
.admin-page .tab-btn:disabled {
    background: #b7a7d8 !important;
    color: #f8f7fd !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed;
}

#submitWorksheetBtn.btn-primary.btn-large::after {
    content: none !important;
}

#submitWorksheetBtn.btn-primary.btn-large:hover {
    background: linear-gradient(90deg, #0b948d 0%, #089b95 100%) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Daily Quest action buttons: final override after global button theme */
body:not(.public-page) .quest-content-area button.btn-submit-multi,
body:not(.public-page) .quest-content-area button.btn-skip-question {
    background: #1e8e3e !important;
    border: 1px solid #1e8e3e !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    box-shadow: 0 2px 0 rgba(20, 108, 44, 0.35), 0 3px 10px rgba(30, 142, 62, 0.28) !important;
    font-weight: 700 !important;
}

body:not(.public-page) .quest-content-area button.btn-submit-multi:hover:not(:disabled),
body:not(.public-page) .quest-content-area button.btn-skip-question:hover:not(:disabled) {
    background: #188038 !important;
    border-color: #188038 !important;
    box-shadow: 0 2px 0 rgba(18, 94, 39, 0.35), 0 4px 12px rgba(24, 128, 56, 0.3) !important;
}

body:not(.public-page) .quest-content-area button.btn-submit-multi::after,
body:not(.public-page) .quest-content-area button.btn-skip-question::after {
    content: none !important;
}

/* Classes Page: mobile layout */
.classes-page .classes-grid-panel-all {
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .classes-page .content-section {
        margin: 0 0.5rem 0.75rem;
        border-radius: 16px;
    }

    .classes-page .content-section .container {
        padding: 0 0.65rem;
    }

    .classes-page .classes-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
        margin-bottom: 1rem;
    }

    .classes-page .classes-grid-panel {
        border-radius: 14px;
        padding: 0.75rem;
    }

    .classes-page .classes-grid-panel-all {
        margin-top: 0.85rem;
    }

    .classes-page .classes-group-title {
        font-size: 0.9rem;
        padding: 0.15rem 0.6rem;
        margin-bottom: 0.2rem;
    }

    .classes-page .class-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .classes-page .class-badge {
        top: 0.7rem;
        right: 0.7rem;
        padding: 0.3rem 0.65rem;
        font-size: 0.72rem;
    }

    .classes-page .class-card h3 {
        margin-bottom: 0.38rem;
        font-size: 1.02rem;
        padding-right: 4.8rem;
    }

    .classes-page .class-info p {
        font-size: 0.98em;
        margin-bottom: 0.38rem;
    }

    .classes-page .btn-unlock.btn-full,
    .classes-page .btn-primary.btn-full {
        min-height: 42px;
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
    }

    .classes-page .btn-unlock.btn-full {
        min-height: 0;
        width: auto;
        padding: 0.36rem 0.72rem;
        font-size: 0.78rem;
    }

    .classes-page .info-section {
        margin-top: 1rem;
        border-radius: 12px;
        padding: 1rem;
    }

    .classes-page .features-list {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .classes-page .feature-item .feature-icon {
        font-size: 1.55rem;
        min-width: 1.8rem;
    }

    .classes-page .feature-item h4 {
        font-size: 0.95rem;
        margin-bottom: 0.2rem;
    }

    .classes-page .feature-item p {
        font-size: 0.84rem;
        line-height: 1.35;
    }
}

/* Teacher Chat: mobile formatting fixes */
@media (max-width: 768px) {
    body.teacher-chat-page {
        padding-bottom: 0 !important;
    }

    .teacher-chat-logo-link {
        display: none !important;
    }

    .teacher-chat-page .content-section {
        margin: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .teacher-chat-page .chat-container.container {
        padding: 0 !important;
        overflow-x: hidden;
        max-width: 100%;
    }

    .teacher-chat-page .chat-layout,
    .teacher-chat-page .chat-layout.full-width,
    .teacher-chat-page .chat-layout.full-width.sidebar-expanded {
        display: block;
        grid-template-columns: 1fr !important;
        gap: 0;
    }

    .teacher-chat-page .teachers-sidebar,
    .teacher-chat-page .teachers-toggle {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .teacher-chat-page .chat-area {
        width: 100%;
        min-width: 0;
        height: calc(100dvh - 58px);
        min-height: 0;
        max-height: none;
        border-radius: 0;
        overflow: hidden;
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    .teacher-chat-page .chat-messages {
        padding: 5.35rem 0.65rem calc(90px + env(safe-area-inset-bottom));
    }

    .teacher-chat-page .teacher-stage-topbar {
        top: calc(env(safe-area-inset-top) + 0.6rem);
        left: 0.65rem;
        right: 0.65rem;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .teacher-chat-page .teacher-stage-voice-controls {
        gap: 0.35rem;
        padding: 0.34rem 0.45rem;
    }

    .teacher-chat-page .teacher-stage-voice-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .teacher-chat-page .teacher-stage-debug-btn,
    .teacher-chat-page .teacher-stage-rag-btn,
    .teacher-chat-page .teacher-stage-back {
        width: auto;
        max-width: 100%;
        padding: 0.78rem 1rem;
        font-size: 0.92rem;
        line-height: 1.2;
        white-space: nowrap;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }

    .teacher-chat-page .teacher-stage-debug-btn span,
    .teacher-chat-page .teacher-stage-rag-btn span {
        display: none;
    }

    .teacher-debug-dialog {
        width: min(100vw - 1rem, 100%);
        max-height: calc(100vh - 1rem);
        margin: 0.5rem auto;
        padding: 1rem;
        border-radius: 22px;
    }

    .teacher-debug-grid {
        grid-template-columns: 1fr;
    }

    .teacher-rag-grid {
        grid-template-columns: 1fr;
    }

    .teacher-debug-card pre {
        min-height: 180px;
        font-size: 0.8rem;
    }

    .teacher-welcome-dialog {
        width: min(100vw - 1rem, 100%);
        padding: 1.35rem 1.1rem 1.15rem;
        border-radius: 24px;
    }

    .teacher-welcome-header h2 {
        font-size: 1.55rem;
    }

    .teacher-welcome-header p {
        font-size: 0.98rem;
    }

    .teacher-welcome-item {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 0.8rem;
        align-items: flex-start;
    }

    .teacher-welcome-icon {
        width: 54px;
        height: 54px;
        font-size: 1.35rem;
    }

    .teacher-welcome-item h3 {
        font-size: 1rem;
    }

    .teacher-welcome-item p {
        font-size: 0.9rem;
    }

    .teacher-welcome-start-btn {
        font-size: 1rem;
        padding: 0.95rem 1rem;
    }

    .teacher-chat-page .message {
        gap: 0.55rem;
        margin-bottom: 0.9rem;
    }

    .teacher-chat-page .message-content {
        max-width: 86%;
        padding: 0.72rem;
    }

    .teacher-chat-page .message-avatar {
        font-size: 1.35rem;
    }

    .teacher-chat-page .stage-intro-message {
        max-width: 100%;
        align-items: flex-start;
    }

    .teacher-chat-page .stage-intro-message .message-content {
        max-width: calc(100vw - 4.9rem);
        border-radius: 20px;
    }

    .teacher-chat-page .stage-intro-message .message-content p:first-child {
        text-align: left;
        margin-bottom: 0.45rem;
    }

    .teacher-chat-page .stage-intro-message .message-time {
        text-align: left;
    }

    .teacher-chat-page .chat-input-area {
        padding: 0.55rem 0.6rem calc(0.55rem + env(safe-area-inset-bottom));
        border-top: 0;
        background: linear-gradient(90deg, rgba(223, 244, 255, 0.84) 0%, rgba(242, 246, 255, 0.9) 48%, rgba(255, 238, 246, 0.84) 100%);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1201;
    }

    .teacher-chat-page .chat-input-area form {
        display: flex !important;
        align-items: center;
        gap: 0.35rem;
        width: 100%;
        background: linear-gradient(90deg, rgba(250, 253, 255, 0.96) 0%, rgba(255, 250, 253, 0.96) 100%);
        border: 1px solid #e4eaf3;
        border-radius: 22px;
        padding: 0.35rem 0.38rem 0.35rem 0.55rem;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    }

    .teacher-chat-page .chat-input-area input {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        font-size: 0.9rem;
        padding: 0.55rem 0.25rem;
        border-radius: 0;
        border: none;
        background: transparent !important;
        color: #334155;
        box-shadow: none;
        text-align: left;
    }

    .teacher-chat-page .chat-input-area input::placeholder {
        color: #9aa6b8;
        font-weight: 500;
    }

    .teacher-chat-page .chat-input-area .btn-primary {
        flex: 0 0 auto;
        min-width: 28px;
        width: 28px;
        height: 28px;
        padding: 0;
        font-size: 0;
        border-radius: 0;
        background: transparent;
        color: inherit;
        border: none;
        box-shadow: none;
        font-weight: 700;
    }

    .teacher-chat-page .chat-input-area .btn-primary img {
        width: 28px;
        height: 28px;
    }

    .teacher-chat-page .chat-input-area .btn-primary::after {
        content: none;
    }

    .teacher-chat-page .voice-input-btn {
        width: 34px;
        height: 34px;
        font-size: 0.82rem;
        border-radius: 999px;
        background: #f4f7fb;
        border: 1px solid #e2e8f0;
        color: #7b8799;
    }

    .teacher-chat-page .info-section {
        display: none !important;
    }

    .teacher-chat-page .floating-menu {
        display: none !important;
    }
}
.multiplayer-notification-item .notification-icon {
    padding: 0;
    overflow: hidden;
}

.multiplayer-notification-item .notification-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.multiplayer-notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.multiplayer-inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: #fff;
    color: #274690;
    font-weight: 700;
    font-size: 0.84rem;
    text-decoration: none;
    cursor: pointer;
}

.multiplayer-inline-btn.primary {
    background: linear-gradient(135deg, #4f8cff 0%, #2358d8 100%);
    color: #fff;
    border-color: transparent;
}

.quiz-with-friends-page,
.friends-quiz-session-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(166, 225, 255, 0.85), transparent 40%),
        radial-gradient(circle at top right, rgba(255, 214, 236, 0.85), transparent 38%),
        linear-gradient(180deg, #f7fbff 0%, #fff7fb 100%) !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}

.quiz-friends-brand {
    position: fixed;
    top: 22px;
    left: 26px;
    z-index: 1205;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.quiz-friends-brand img {
    display: block;
    width: 136px;
    height: auto;
}

.quiz-friends-logo {
    top: 22px;
    left: 26px;
}

.quiz-friends-back-btn {
    position: fixed;
    top: 22px;
    right: 26px;
    z-index: 1205;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #3e4b69;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 14px 34px rgba(30, 41, 59, 0.12);
}

.quiz-friends-back-btn:hover {
    color: #2358d8;
}

.quiz-friends-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 110px auto 48px;
}

.quiz-friends-page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 24px 70px rgba(71, 85, 105, 0.14);
}

.quiz-friends-page-kicker,
.friends-quiz-live-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: #2563eb;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
}

.quiz-friends-page-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(0.72rem, 1.15vw, 0.95rem);
    color: #22304f;
}

.quiz-friends-page-hero p {
    margin: 0;
    max-width: 540px;
    color: #5b6989;
    font-size: 1.05rem;
}

.quiz-friends-page-art {
    display: flex;
    gap: 14px;
}

.quiz-friends-badge {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 18px 40px rgba(59, 130, 246, 0.18);
}

.quiz-friends-badge.blue {
    background: linear-gradient(135deg, #4f8cff 0%, #2a63ff 100%);
}

.quiz-friends-badge.yellow {
    background: linear-gradient(135deg, #ffcf40 0%, #ff8a34 100%);
}

.quiz-friends-search-card,
.quiz-friends-panel,
.friends-quiz-launch-card {
    margin-top: 24px;
    padding: 26px 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 70px rgba(71, 85, 105, 0.12);
}

.quiz-friends-search-card h2,
.quiz-friends-panel h3 {
    margin: 0;
    color: #22304f;
}

.quiz-friends-search-row {
    margin-top: 18px;
    display: flex;
    gap: 12px;
}

.quiz-friends-search-input {
    flex: 1;
    min-width: 0;
    height: 56px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: #fff;
    font-size: 1rem;
}

.quiz-friends-primary-btn {
    min-width: 130px;
    padding: 0 20px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #8b5cf6 0%, #5b2be0 100%);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 18px 34px rgba(124, 58, 237, 0.22);
}

.quiz-friends-search-results,
.quiz-friends-panel-body {
    margin-top: 18px;
    display: grid;
    gap: 12px;
}

.quiz-friends-search-result,
.quiz-friends-list-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(51, 65, 85, 0.08);
}

.quiz-friends-list-card.active {
    background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 100%);
}

.quiz-friends-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.quiz-friends-user img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.16);
}

.quiz-friends-user div {
    min-width: 0;
}

.quiz-friends-user strong,
.quiz-friends-user span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quiz-friends-meta-time {
    display: block;
    margin-top: 4px;
    color: #8a97ad;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
}

.quiz-friends-user strong {
    color: #22304f;
}

.quiz-friends-user span,
.quiz-friends-empty-text {
    color: #667892;
}

.quiz-friends-inline-btn,
.quiz-friends-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
}

.quiz-friends-inline-btn {
    border: 0;
    background: #edf3ff;
    color: #3157a1;
    cursor: pointer;
}

.quiz-friends-inline-btn.primary {
    background: linear-gradient(135deg, #4f8cff 0%, #2358d8 100%);
    color: #fff;
}

.quiz-friends-list-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 0 120px;
    align-items: stretch;
}

.quiz-friends-list-actions .quiz-friends-inline-btn {
    width: 100%;
}

.received-invite-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.received-invite-card .quiz-friends-user {
    width: 100%;
}

.received-invite-card .quiz-friends-list-actions {
    margin-top: 14px;
    flex: none;
    width: 100%;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.received-invite-card .quiz-friends-list-actions .quiz-friends-inline-btn {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    padding-inline: 18px;
}

.stacked-quiz-friends-card {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 172px;
    padding: 14px 16px;
}

.stacked-quiz-friends-card .quiz-friends-user {
    width: 100%;
    align-items: flex-start;
}

.stacked-quiz-friends-card .quiz-friends-user img {
    width: 42px;
    height: 42px;
}

.stacked-quiz-friends-card .quiz-friends-user strong {
    font-size: 0.95rem;
}

.stacked-quiz-friends-card .quiz-friends-user span {
    font-size: 0.82rem;
}

.stacked-quiz-friends-card .quiz-friends-inline-btn,
.stacked-quiz-friends-card .quiz-friends-status-pill {
    margin-top: auto;
    align-self: flex-start;
}

.stacked-quiz-friends-card .quiz-friends-status-pill {
    min-width: 96px;
    padding: 8px 12px;
    font-size: 0.82rem;
}

.quiz-friends-match-summary {
    white-space: normal !important;
    line-height: 1.35;
}

.stacked-quiz-friends-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-start;
}

.stacked-quiz-friends-actions .quiz-friends-inline-btn {
    margin-top: 0;
    min-width: 108px;
    padding: 8px 14px;
    font-size: 0.84rem;
}

.quiz-friends-status-pill.pending {
    background: #fff7d6;
    color: #b36a00;
}

.quiz-friends-status-pill.accepted {
    background: #dbfce7;
    color: #1f8d4d;
}

.quiz-friends-status-pill.declined {
    background: #ffe2e2;
    color: #bf3d3d;
}

.quiz-friends-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.quiz-friends-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.quiz-friends-panel-head span {
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf3ff;
    color: #2358d8;
    font-weight: 800;
}

.friends-quiz-launcher {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.friends-quiz-launch-card {
    max-width: 580px;
    text-align: center;
}

.friends-quiz-launch-card h1 {
    margin: 0 0 8px;
    color: #22304f;
}

.friends-quiz-launch-card p {
    margin: 0;
    color: #667892;
}

.friends-quiz-results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.friends-quiz-result-card {
    padding: 20px;
    border-radius: 24px;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: 0 12px 30px rgba(51, 65, 85, 0.08);
    text-align: center;
}

.friends-quiz-result-card.opponent {
    background: linear-gradient(135deg, #fff7fb 0%, #ffffff 100%);
}

.friends-quiz-result-card img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 12px;
}

.friends-quiz-result-card h3 {
    margin: 0 0 8px;
    color: #22304f;
}

.friends-quiz-result-card strong {
    display: block;
    font-size: 1.8rem;
    color: #2358d8;
    margin-bottom: 6px;
}

.friends-quiz-result-card span {
    color: #667892;
    font-size: 0.95rem;
}

.friends-quiz-result-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.friends-quiz-live-panel {
    position: fixed;
    top: 88px;
    right: 22px;
    width: 310px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
    z-index: 10005;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    overflow: visible;
}

.friends-quiz-live-panel.is-collapsed {
    transform: translateX(calc(100% + 26px));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.friends-quiz-floating-toggle {
    position: absolute;
    top: 120px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #4f8cff 0%, #2358d8 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
    z-index: 10006;
}

.friends-quiz-floating-toggle i {
    font-size: 1rem;
}

.friends-quiz-floating-toggle.is-open {
    right: 332px;
}

.friends-quiz-live-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.friends-quiz-live-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.friends-quiz-live-head h3 {
    margin: 0;
    color: #22304f;
    font-size: 1.1rem;
}

.friends-quiz-live-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2358d8;
    font-weight: 800;
    font-size: 0.8rem;
}

.friends-quiz-player-card {
    padding: 14px;
    border-radius: 18px;
    background: #f8fbff;
    margin-bottom: 10px;
}

.friends-quiz-player-card.opponent {
    background: #fff7fb;
}

.friends-quiz-player-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.friends-quiz-player-main img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.friends-quiz-player-main strong,
.friends-quiz-player-main span {
    display: block;
}

.friends-quiz-player-main span {
    color: #667892;
    font-size: 0.85rem;
}

.friends-quiz-player-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.friends-quiz-player-stats span,
.friends-quiz-score-ribbon span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    color: #3157a1;
    font-size: 0.82rem;
    font-weight: 700;
}

.friends-quiz-score-ribbon {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

@media (max-width: 1024px) {
    .quiz-friends-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .friends-quiz-live-panel {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .quiz-friends-shell {
        width: min(100% - 24px, 100%);
        margin-top: 96px;
    }

    .quiz-friends-page-hero,
    .quiz-friends-search-row,
    .quiz-friends-search-result,
    .quiz-friends-list-card,
    .friends-quiz-score-ribbon {
        flex-direction: column;
        align-items: stretch;
    }

    .quiz-friends-grid,
    .friends-quiz-results-grid {
        grid-template-columns: 1fr;
    }

    .quiz-friends-page-art {
        align-self: flex-start;
    }

    .quiz-friends-primary-btn,
    .quiz-friends-inline-btn,
    .quiz-friends-status-pill {
        width: 100%;
    }

    .friends-quiz-live-panel {
        position: static;
        width: auto;
        margin: 20px 12px 0;
        transform: none !important;
    }

    .friends-quiz-floating-toggle {
        display: none;
    }
}
