/* header-footer.css */
/* ═══════════════════════════════════════════════════════
   WordlyPlay — Global Header & Footer v2 (Glassmorphism)
   ═══════════════════════════════════════════════════════ */

/* ── Floating Header (transparent → solid on scroll) ── */
.header {
    transition: background var(--transition-base),
                box-shadow var(--transition-base),
                border-color var(--transition-base);
}

.header--scrolled {
    background: var(--glass-bg-strong) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    box-shadow: var(--shadow-md);
}

/* Sign up button: gradient */
.header__actions .btn--primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--purple, #8B5CF6) 100%);
    border: none;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.25);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.header__actions .btn--primary:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

/* Nav link animated underline */
.gnav__link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--purple, #8B5CF6));
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

.gnav__link:hover::before {
    width: 60%;
}

/* Slide-up animation */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── Desktop Navigation ─────────────────────────────── */
.gnav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.gnav__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: color 0.2s, background 0.2s, text-shadow 0.2s;
    white-space: nowrap;
    position: relative;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    line-height: 1;
}

.gnav__link:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    text-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.gnav__link.is-active {
    color: var(--accent-primary);
    font-weight: var(--weight-bold);
}

.gnav__link.is-active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--tile-gradient-from), var(--tile-gradient-to));
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.gnav__chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* ── Dropdown (Glass) ───────────────────────────────── */
.gnav__dropdown {
    position: relative;
}

.gnav__dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: calc(var(--z-sticky) + 10);
}

.gnav__dropdown:hover .gnav__dropdown-menu,
.gnav__dropdown:focus-within .gnav__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.gnav__dropdown:hover .gnav__chevron {
    transform: rotate(180deg);
}

.gnav__dropdown-item {
    display: block;
    padding: 10px 14px;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
}

.gnav__dropdown-item:hover {
    color: var(--text-primary);
    background: var(--accent-primary-light);
}

.gnav__dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 6px;
}

/* ── Header Actions (right side) ────────────────────── */
.header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header__profile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.header__profile-link:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.header__logout-btn {
    font-size: var(--text-xs) !important;
    padding: 0.4rem 0.8rem !important;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.header__logout-btn:hover {
    opacity: 1;
}

/* ── Hamburger Button ───────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.hamburger:hover {
    background: var(--accent-primary-light);
}

.hamburger__line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.is-active .hamburger__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active .hamburger__line:nth-child(2) {
    opacity: 0;
}

.hamburger.is-active .hamburger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Overlay ─────────────────────────────────── */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: calc(var(--z-sticky) + 50);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ── Mobile Slide-out Nav (Glass) ───────────────────── */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh; /* dynamic viewport height for mobile browsers */
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-left: var(--glass-border);
    z-index: calc(var(--z-sticky) + 100);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* prevent whole nav from scrolling; links section scrolls */
}

.mobile-nav.is-open {
    transform: translateX(0);
}

.mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-tertiary);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.15s, color 0.15s;
}

.mobile-nav__close:hover {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
}

.mobile-nav__links {
    flex: 1;
    min-height: 0; /* critical: allows flex child to shrink and scroll */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-md) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-nav__link {
    display: block;
    padding: 12px 16px;
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.mobile-nav__link:hover {
    color: var(--text-primary);
    background: var(--accent-primary-light);
}

.mobile-nav__link.is-active {
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--tile-gradient-from), var(--tile-gradient-to));
    box-shadow: var(--shadow-sm);
}

.mobile-nav__divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-xs) 0;
}

.mobile-nav__section-title {
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    padding: 8px 16px 4px;
}

.mobile-nav__footer {
    padding: var(--space-md) var(--space-lg);
    padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.mobile-nav__gems {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-sm);
    font-weight: var(--weight-bold);
    color: var(--gem-gold);
    text-shadow: 0 0 8px var(--gem-glow);
}

/* ═══════════════════════════════════════════════════════
   Global Footer (Glass)
   ═══════════════════════════════════════════════════════ */

.gfooter {
    margin-top: var(--space-4xl);
    padding: var(--space-3xl) 0 var(--space-xl);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--accent-primary), var(--purple, #8B5CF6), var(--accent-secondary)) 1;
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

.gfooter__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.gfooter__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.gfooter__social-link:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    transform: translateY(-2px);
}

.gfooter__heading {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gfooter__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.gfooter__list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s, text-shadow 0.15s;
    font-weight: var(--weight-medium);
}

.gfooter__list a:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.gfooter__seo {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: var(--space-lg);
}

.gfooter__seo p {
    color: var(--text-tertiary);
    font-size: var(--text-xs);
    line-height: 1.7;
    max-width: 720px;
    margin: 0;
}

.gfooter__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    text-align: center;
    color: var(--text-tertiary);
    font-size: var(--text-xs);
}

.gfooter__bottom span {
    display: inline-flex;
    align-items: center;
}

.gfooter__bottom span:not(:last-child)::after {
    content: '·';
    margin-left: var(--space-sm);
    color: var(--text-tertiary);
    opacity: 0.5;
}

.gfooter__developer a,
.gfooter__contact a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: var(--weight-semibold);
    transition: color 0.15s, text-shadow 0.15s;
}

.gfooter__developer a:hover,
.gfooter__contact a:hover {
    color: var(--purple, #8B5CF6);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

/* ── Notification Bell ──────────────────────────────── */
.notif-bell {
    position: relative;
}

@keyframes bellPulse {
    0%,100% { transform: rotate(0); }
    25% { transform: rotate(-18deg); }
    75% { transform: rotate(18deg); }
}
.notif-bell.is-pulsing svg { animation: bellPulse 0.5s ease; }

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 99px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
    font-family: var(--font-body);
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    max-height: 420px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light, rgba(255,255,255,0.1));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl, 0 20px 60px rgba(0,0,0,0.4));
    z-index: calc(var(--z-sticky) + 200);
    overflow: hidden;
    flex-direction: column;
}

.notif-dropdown.is-open { display: flex; }

.notif-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.07));
    flex-shrink: 0;
}

.notif-dropdown__title {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
}

.notif-dropdown__mark-all {
    background: none;
    border: none;
    font-size: var(--text-xs);
    color: var(--accent-primary);
    cursor: pointer;
    padding: 0;
    font-family: var(--font-body);
}
.notif-dropdown__mark-all:hover { text-decoration: underline; }

.notif-list {
    overflow-y: auto;
    flex: 1;
    max-height: 320px;
}

.notif-empty {
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.04));
}
.notif-item:hover { background: var(--glass-bg); }
.notif-item.is-unread { background: rgba(59,130,246,0.06); }

.notif-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-card);
}
.notif-avatar--emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.notif-body { flex: 1; min-width: 0; }

.notif-msg {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.4;
}
.notif-msg strong { color: var(--text-primary); }

.notif-time {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: 2px;
}

.notif-actions {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.btn--xs {
    padding: 0.25rem 0.6rem !important;
    font-size: var(--text-xs) !important;
    border-radius: var(--radius-md) !important;
}

.notif-dropdown__footer {
    display: block;
    padding: 10px 16px;
    text-align: center;
    font-size: var(--text-xs);
    color: var(--accent-primary);
    text-decoration: none;
    border-top: 1px solid var(--border-light, rgba(255,255,255,0.07));
    flex-shrink: 0;
    transition: background 0.15s;
}
.notif-dropdown__footer:hover { background: var(--glass-bg); }

@media (max-width: 480px) {
    .notif-dropdown { width: calc(100vw - 24px); right: -60px; max-width: 320px; }
}

/* ═══════════════════════════════════════════════════════
   Theme Toggle (borderless)
   ═══════════════════════════════════════════════════════ */

.header__theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
    cursor: pointer;
    padding: 0;
}

.header__theme-toggle:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
}

/* ═══════════════════════════════════════════════════════
   Mobile Menu — User Section
   ═══════════════════════════════════════════════════════ */

.mobile-nav__user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    background: var(--accent-primary-light);
}

.mobile-nav__user-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}

.mobile-nav__avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent-primary), var(--purple, #8B5CF6));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.mobile-nav__user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mobile-nav__username {
    font-weight: var(--weight-bold);
    font-size: var(--text-sm);
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-nav__user-gems {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    color: var(--gem-gold);
    font-weight: var(--weight-semibold);
}

.mobile-nav__notif-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.mobile-nav__notif-link:hover {
    color: var(--accent-primary);
    background: var(--glass-bg);
}

.mobile-nav__notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 99px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════
   Mobile Menu — Theme Toggle Switch
   ═══════════════════════════════════════════════════════ */

.mobile-nav__theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-sm);
}

.mobile-nav__theme-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
}

.mobile-nav__theme-switch {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.mobile-nav__theme-switch-track {
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--border-color, #ccc);
    position: relative;
    transition: background 0.3s ease;
}

.mobile-nav__theme-switch.is-active .mobile-nav__theme-switch-track {
    background: var(--accent-primary);
}

.mobile-nav__theme-switch-thumb {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.mobile-nav__theme-switch.is-active .mobile-nav__theme-switch-thumb {
    transform: translateX(20px);
}

/* ═══════════════════════════════════════════════════════
   Mobile Login Button (non-logged-in users)
   ═══════════════════════════════════════════════════════ */

.header__mobile-login {
    display: none; /* Hidden on desktop by default */
}

/* ═══════════════════════════════════════════════════════
   Responsive: Mobile
   ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .gnav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Hide desktop-only header elements on mobile */
    .header__desktop-only {
        display: none !important;
    }

    /* Show mobile login button for non-logged-in users */
    .header__mobile-login {
        display: inline-flex !important;
    }

    /* Shrink header action icons for mobile */
    .header__actions {
        gap: var(--space-xs);
    }

    .header__gem-count {
        padding: 4px 10px;
        font-size: var(--text-xs);
    }

    .header__gem-icon {
        width: 14px;
        height: 14px;
    }

    .header__profile-link svg,
    .notif-bell svg {
        width: 18px;
        height: 18px;
    }

    .header__profile-link {
        padding: 4px;
    }

    .notif-bell {
        width: 32px;
        height: 32px;
        padding: 0;
    }

    .gfooter__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }
}

/* ── Extra-small phones (≤ 375px) — compact mobile menu ── */
@media (max-width: 375px) {
    .mobile-nav__link {
        padding: 10px 14px;
        font-size: var(--text-sm);
    }

    .mobile-nav__section-title {
        padding: 6px 14px 2px;
    }

    .mobile-nav__footer {
        padding: var(--space-sm) var(--space-md);
        padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom, 0px));
    }

    .mobile-nav__user {
        padding: var(--space-sm) var(--space-md);
    }

    .mobile-nav__header {
        padding: var(--space-sm) var(--space-md);
    }
}

/* ── Ultra-small / foldables (≤ 320px) — minimal menu ── */
@media (max-width: 320px) {
    .mobile-nav__link {
        padding: 8px 12px;
        font-size: var(--text-xs);
    }

    .mobile-nav__divider {
        margin: 2px 0;
    }

    .mobile-nav__section-title {
        padding: 4px 12px 2px;
        font-size: 0.6rem;
    }

    .mobile-nav__links {
        padding: var(--space-xs) var(--space-sm);
        gap: 1px;
    }

    .mobile-nav__footer .btn {
        padding: 8px;
        font-size: var(--text-sm);
    }
}

@media (max-width: 480px) {
    .gfooter__grid {
        grid-template-columns: 1fr;
    }
}
/* premium-layout.css */
/* ═══════════════════════════════════════════════════════
   WordDuel — Premium Layout System
   Astros-inspired layout patterns (theme-agnostic)
   ═══════════════════════════════════════════════════════ */

/* ── Premium Hero ─────────────────────────────────── */
.premium-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-2xl) 0 var(--space-lg);
    position: relative;
    overflow: hidden;
}

.premium-hero::before,
.premium-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
    opacity: 0.5;
}

.premium-hero::before {
    width: 600px;
    height: 600px;
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--accent-primary-light) 0%, transparent 70%);
}

.premium-hero::after {
    width: 500px;
    height: 500px;
    bottom: -5%;
    right: -10%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
}

.premium-hero > * {
    position: relative;
    z-index: 1;
}

.premium-hero__title {
    font-size: var(--text-6xl);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

.premium-hero__subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    line-height: var(--leading-relaxed);
}

.premium-hero__actions {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Premium Section ──────────────────────────────── */
.premium-section {
    padding: var(--space-xl) 0;
    position: relative;
}

.premium-section--compact {
    padding: var(--space-md) 0;
}

.premium-section__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.premium-section__title {
    font-size: var(--text-4xl);
    font-weight: 900;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

.premium-section__subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
}

/* ── Premium Card ─────────────────────────────────── */
.premium-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: transform var(--transition-smooth),
                box-shadow var(--transition-smooth),
                border-color var(--transition-base);
    position: relative;
    overflow: hidden;
}

.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 0 30px var(--accent-primary-light);
    border-color: var(--accent-primary);
}

.premium-card--interactive {
    cursor: pointer;
}

.premium-card--no-hover:hover {
    transform: none;
    box-shadow: none;
}

.premium-card--centered {
    text-align: center;
}

/* ── Premium Badge (Pill) ─────────────────────────── */
.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

.premium-badge--primary {
    background: var(--accent-primary);
    color: #FFFFFF;
}

.premium-badge--success {
    background: var(--correct);
    color: #FFFFFF;
}

.premium-badge--warning {
    background: var(--present);
    color: #0F172A;
}

.premium-badge--purple {
    background: var(--purple);
    color: #FFFFFF;
}

.premium-badge--outline {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.premium-badge--live {
    background: var(--danger);
    color: #FFFFFF;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ── Premium Stat ─────────────────────────────────── */
.premium-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    padding: var(--space-xl) 0;
}

.premium-stat {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-lg) var(--space-xl);
    text-align: center;
    min-width: 140px;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.premium-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.premium-stat__value {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--weight-extrabold);
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.premium-stat__label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: var(--weight-medium);
}

/* ── Premium Grid ─────────────────────────────────── */
.premium-grid {
    display: grid;
    gap: var(--space-xl);
}

.premium-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.premium-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.premium-grid--auto {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ── Premium CTA Banner ──────────────────────────── */
.premium-cta {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    background: linear-gradient(135deg, 
        var(--accent-primary-light) 0%, 
        rgba(139, 92, 246, 0.08) 50%,
        rgba(0, 214, 143, 0.06) 100%
    );
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.premium-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, var(--accent-primary-light) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0.5;
}

.premium-cta > * {
    position: relative;
    z-index: 1;
}

.premium-cta__title {
    font-size: var(--text-4xl);
    font-weight: 900;
    margin-bottom: var(--space-sm);
}

.premium-cta__desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    font-size: var(--text-lg);
}

/* ── Premium Button (gradient) ────────────────────── */
.btn--gradient {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--purple) 100%);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.btn--gradient:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
}

.btn--glow {
    box-shadow: 0 0 20px var(--accent-primary-light), 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn--glow:hover {
    box-shadow: 0 0 30px var(--accent-primary-light), 0 6px 25px rgba(59, 130, 246, 0.4);
}

/* ── Premium Timeline (How to Play) ───────────────── */
.premium-timeline {
    display: flex;
    gap: var(--space-xl);
    position: relative;
    justify-content: center;
    flex-wrap: wrap;
}

.premium-timeline::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), var(--purple), transparent);
    opacity: 0.3;
    z-index: 0;
}

.premium-timeline__step {
    flex: 1;
    min-width: 200px;
    max-width: 260px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.premium-timeline__number {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--purple) 100%);
    color: #FFFFFF;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--text-xl);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.premium-timeline__title {
    font-weight: var(--weight-bold);
    font-size: var(--text-lg);
    margin-bottom: var(--space-xs);
}

.premium-timeline__desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: var(--leading-relaxed);
}

/* ── Premium Feature (side-by-side) ───────────────── */
.premium-feature {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
}

.premium-feature__icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary-light);
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
    transition: transform var(--transition-base);
}

.premium-card:hover .premium-feature__icon {
    transform: scale(1.1);
}

.premium-feature__title {
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-xs);
}

.premium-feature__desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: var(--leading-relaxed);
}

/* ── Premium FAQ Accordion ────────────────────────── */
.premium-faq {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.premium-faq__item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: border-color var(--transition-base);
}

.premium-faq__item.is-open {
    border-color: var(--accent-primary);
    border-left: 3px solid var(--accent-primary);
}

.premium-faq__question {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: var(--weight-semibold);
    font-size: var(--text-base);
    color: var(--text-primary);
    cursor: pointer;
    background: none;
    text-align: left;
    transition: color var(--transition-fast);
}

.premium-faq__question:hover {
    color: var(--accent-primary);
}

.premium-faq__question::after {
    content: '+';
    font-size: var(--text-xl);
    color: var(--text-tertiary);
    transition: transform var(--transition-base);
    flex-shrink: 0;
    margin-left: var(--space-md);
}

.premium-faq__item.is-open .premium-faq__question::after {
    content: '−';
    color: var(--accent-primary);
}

.premium-faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-smooth);
}

.premium-faq__item.is-open .premium-faq__answer {
    max-height: 400px;
}

.premium-faq__answer-inner {
    padding: 0 var(--space-xl) var(--space-xl);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* ── Mini Leaderboard ─────────────────────────────── */
.mini-leaderboard {
    max-width: 600px;
    margin: 0 auto;
}

.mini-leaderboard__row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.mini-leaderboard__row:nth-child(odd) {
    background: var(--glass-bg-subtle);
}

.mini-leaderboard__row--gold {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.02) 100%) !important;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.mini-leaderboard__rank {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    width: 32px;
    text-align: center;
}

.mini-leaderboard__name {
    flex: 1;
    font-weight: var(--weight-semibold);
}

.mini-leaderboard__score {
    font-family: var(--font-heading);
    color: var(--accent-primary);
    font-weight: var(--weight-bold);
}

/* ── Testimonial Card ─────────────────────────────── */
.testimonial-card {
    padding: var(--space-xl);
    text-align: left;
}

.testimonial-card__stars {
    color: var(--gem-gold);
    font-size: var(--text-lg);
    margin-bottom: var(--space-md);
    letter-spacing: 0.1em;
}

.testimonial-card__text {
    font-size: var(--text-base);
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: var(--space-md);
    line-height: var(--leading-relaxed);
}

.testimonial-card__author {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: var(--weight-semibold);
}

/* ── Word of the Day ──────────────────────────────── */
.wotd {
    display: flex;
    gap: var(--space-2xl);
    align-items: center;
}

.wotd__content {
    flex: 1;
}

.wotd__word {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.wotd__type {
    font-size: var(--text-sm);
    color: var(--accent-primary);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-sm);
}

.wotd__pronunciation {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    margin-bottom: var(--space-md);
}

.wotd__definition {
    font-size: var(--text-lg);
    color: var(--text-primary);
    font-weight: var(--weight-medium);
    margin-bottom: var(--space-md);
    line-height: var(--leading-relaxed);
}

.wotd__example {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-style: italic;
    padding-left: var(--space-lg);
    border-left: 3px solid var(--accent-primary);
    margin-bottom: var(--space-lg);
}

.wotd__decoration {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    opacity: 0.8;
}

/* ── Scroll Animations ────────────────────────────── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll[data-delay="1"] { transition-delay: 100ms; }
.animate-on-scroll[data-delay="2"] { transition-delay: 200ms; }
.animate-on-scroll[data-delay="3"] { transition-delay: 300ms; }
.animate-on-scroll[data-delay="4"] { transition-delay: 400ms; }
.animate-on-scroll[data-delay="5"] { transition-delay: 500ms; }

/* ── Explore Games Hub ────────────────────────────── */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.explore-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    text-decoration: none;
    color: inherit;
}

.explore-card__icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary-light);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

.explore-card:hover .explore-card__icon {
    transform: scale(1.1) rotate(-5deg);
}

.explore-card__title {
    font-weight: var(--weight-bold);
    font-size: var(--text-base);
    margin-bottom: 2px;
}

.explore-card__desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

/* ── About Section ────────────────────────────────── */
.about-section {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-section p {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}

/* ── Daily Challenge Widget ───────────────────────── */
.daily-widget {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.daily-widget__info {
    flex: 1;
    min-width: 250px;
}

.daily-widget__label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-xs);
}

.daily-widget__stat {
    font-size: var(--text-2xl);
    font-weight: var(--weight-extrabold);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.daily-widget__sub {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.daily-widget__yesterday {
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg-subtle);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .premium-hero__title {
        font-size: var(--text-4xl);
    }

    .premium-section {
        padding: var(--space-lg) 0;
    }

    .premium-section__title {
        font-size: var(--text-3xl);
    }

    .premium-grid--2,
    .premium-grid--3 {
        grid-template-columns: 1fr;
    }

    .premium-timeline {
        flex-direction: column;
        align-items: center;
    }

    .premium-timeline::before {
        display: none;
    }

    .premium-timeline__step {
        max-width: 100%;
    }

    .premium-cta__title {
        font-size: var(--text-3xl);
    }

    .wotd {
        flex-direction: column;
        text-align: center;
    }

    .wotd__example {
        text-align: left;
    }

    .wotd__decoration {
        width: 120px;
        height: 120px;
        font-size: 4rem;
    }

    .daily-widget {
        flex-direction: column;
        text-align: center;
    }

    .premium-hero {
        min-height: auto;
        padding: var(--space-2xl) 0 var(--space-lg);
    }
}

@media (max-width: 480px) {
    .premium-hero__title {
        font-size: var(--text-3xl);
    }

    .premium-stats {
        gap: var(--space-sm);
    }

    .premium-stat {
        min-width: 0;
        flex: 1 1 45%;
        padding: var(--space-md);
    }

    .premium-stat__value {
        font-size: var(--text-2xl);
    }
}

