/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Apple-inspired palette */
    --brand-bg: #ffffff;
    --brand-surface: #f2f2f7;
    --brand-text: #1c1c1e;
    --brand-muted: #8e8e93;
    --brand-tint: #0a84ff;  /* iOS system blue */
    --brand-red: #ff3b30;   /* iOS system red */
    --brand-green: #34c759; /* iOS system green */
    --brand-orange: #ff9500;/* iOS system orange */
    --brand-yellow: #ffcc00;/* iOS system yellow */

    /* Map legacy tokens to Apple brand */
    --color-primary: var(--brand-tint);
    --color-secondary: var(--brand-text);
    --color-accent: var(--brand-tint);
    --color-yellow: var(--brand-yellow);
    --color-green: var(--brand-green);
    --color-blue: var(--brand-tint);
    --color-purple: var(--brand-tint);
    --color-orange: var(--brand-orange);
    --color-red: var(--brand-red);
    --bg-gradient: linear-gradient(180deg, var(--brand-bg) 0%, var(--brand-surface) 100%);
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.12);
}

body {
    font-family: 'Baloo 2', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--brand-bg);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* iOS PWA Safe Area Support - Support both constant() and env() */
@supports (padding: max(0px)) {
    body {
        /* Ensure content doesn't go under notch/home indicator */
        /* Fallback → constant() → env() (browser picks last supported) */
        padding-left: 0px;
        padding-left: constant(safe-area-inset-left);
        padding-left: env(safe-area-inset-left);
        
        padding-right: 0px;
        padding-right: constant(safe-area-inset-right);
        padding-right: env(safe-area-inset-right);
        
        padding-bottom: 0px;
        padding-bottom: constant(safe-area-inset-bottom);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* PWA Standalone Mode - align with subpages padding-top formula */
    body.pwa-standalone {
        /* Keep horizontal/bottom from above and add consistent top spacing (match subpages) */
        padding-top: calc(64px + env(safe-area-inset-top) + 14px);
    }
}

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

/* ===== HEADER ===== */
.main-header {
    text-align: center;
    padding: 30px 0;
    animation: fadeIn 0.8s ease-in;
}

.logo h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.logo p {
    font-size: 1.2rem;
    color: #5A67D8;
    font-weight: 600;
}

/* ===== HERO SECTION ===== */
.hero {
    text-align: center;
    background: white;
    border-radius: 30px;
    padding: 40px 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    animation: slideUp 0.8s ease-out;
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 15px;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== MENU GRID ===== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.menu-card {
    background: white;
    border-radius: 25px;
    padding: 35px 25px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.menu-card:nth-child(1) { animation-delay: 0.1s; }
.menu-card:nth-child(2) { animation-delay: 0.2s; }
.menu-card:nth-child(3) { animation-delay: 0.3s; }
.menu-card:nth-child(4) { animation-delay: 0.4s; }
.menu-card:nth-child(5) { animation-delay: 0.5s; }
.menu-card:nth-child(6) { animation-delay: 0.6s; }

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    transition: height 0.3s ease;
}

.menu-card.english::before { background: linear-gradient(90deg, #FF6B9D, #FDB44B); }
.menu-card.stories::before { background: linear-gradient(90deg, #A367B1, #4ECDC4); }
.menu-card.softskills::before { background: linear-gradient(90deg, #00D9A3, #00B8A9); }
.menu-card.science::before { background: linear-gradient(90deg, #5F72E4, #4ECDC4); }
.menu-card.math::before { background: linear-gradient(90deg, #FF8C42, #FDB44B); }
.menu-card.arts::before { background: linear-gradient(90deg, #C06C84, #F67280); }

.menu-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.menu-card:hover::before {
    height: 100%;
    opacity: 0.1;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.menu-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: #2D3748;
}

.menu-card p {
    color: #718096;
    font-size: 1rem;
    margin-bottom: 15px;
}

.card-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--brand-surface);
    color: var(--brand-text);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 10px;
}

.card-badge.coming-soon {
    background: linear-gradient(135deg, #CBD5E0, #A0AEC0);
}

/* ===== LIST PAGE ===== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    margin-bottom: 20px;
}

.back-button:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-hover);
}

.page-title {
    font-size: 3rem;
    color: white;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    margin-bottom: 15px;
}

.lessons-grid,
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.lesson-card,
.story-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.lesson-card:hover,
.story-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.lesson-image,
.story-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.lesson-content,
.story-content {
    padding: 20px;
}

.lesson-subject,
.story-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2D3748;
    margin-bottom: 10px;
    line-height: 1.3;
}

.lesson-preview,
.story-preview {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lesson-meta,
.story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #E2E8F0;
}

.lesson-date,
.story-date {
    font-size: 0.85rem;
    color: #A0AEC0;
}

/* ===== DETAIL PAGE ===== */
.detail-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.detail-image {
    width: 100%;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.detail-title {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 25px;
    font-weight: 800;
}

/* ===== AUDIO PLAYER ===== */
.audio-player {
    background: var(--brand-surface);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.audio-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.audio-controls audio {
    width: 100%;
    border-radius: 10px;
}

.loop-control {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 600;
}

.loop-control input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

/* ===== CONTENT DISPLAY ===== */
.content-display {
    font-size: 1.21rem; /* Increased by 10% from 1.1rem */
    line-height: 1.8;
    color: #2D3748;
}

.content-display p {
    margin-bottom: 15px;
}

.content-display strong {
    color: var(--color-primary);
    font-weight: 700;
}

/* ===== LOADING & EMPTY STATES ===== */
.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.2rem;
    color: white;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.empty-state-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: #2D3748;
    margin-bottom: 10px;
}

.empty-state p {
    color: #718096;
    font-size: 1.1rem;
}

/* ===== FOOTER ===== */
.main-footer {
    text-align: center;
    padding: 30px 0;
    color: white;
    font-size: 0.95rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Remove nested containers for maximum screen space on mobile */
    .container {
        padding: 0;
    }
    
    .detail-container {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }
    
    .page-title {
        font-size: 2rem;
        padding: 0 10px;
    }
    
    .detail-title {
        font-size: 2rem;
    }
}

/* ===== AUTH / USER MENU ===== */
.btn-login {
    padding: 10px 20px;
    background: linear-gradient(135deg, #FF6B6B, #FFB347);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.user-dropdown {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.95rem;
}

.user-button:hover {
    border-color: #FF6B6B;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 1.2rem;
}

.user-name {
    font-weight: 600;
    color: #333;
}

.admin-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: #999;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    min-width: 260px;
    max-width: 320px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    z-index: 1000;
    animation: dropdown-fade-in 0.2s ease-out;
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
}

.user-menu-item:hover {
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    color: #FF6B6B;
}

.user-email {
    color: #64748b;
    font-size: 0.875rem;
    padding: 12px 20px 14px;
    border-bottom: 1px solid #e2e8f0;
    cursor: default;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #f8fafc;
}

.user-email:hover {
    background: #f8fafc;
    color: #64748b;
}

.user-menu-divider {
    margin: 8px 0;
    border: none;
    border-top: 1px solid #e2e8f0;
}

.user-menu-header {
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 8px;
}

.user-menu-section {
    margin: 8px 0;
}

.user-menu-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 8px 16px 4px;
    letter-spacing: 0.05em;
}

.user-menu-signout {
    color: #dc2626;
    font-weight: 600;
    border-top: 1px solid #e2e8f0;
    margin-top: 4px;
}

.user-menu-signout:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* ===== DESKTOP FONT SIZES (Larger for better readability) ===== */
@media (min-width: 1024px) {
    body {
        font-size: 18px;
        line-height: 1.8;
    }
    
    .logo h1 {
        font-size: 4.5rem;
    }
    
    .logo p {
        font-size: 1.5rem;
    }
    
    .hero h2 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.4rem;
    }
    
    .menu-card h2 {
        font-size: 2rem;
    }
    
    .menu-card p {
        font-size: 1.2rem;
    }
    
    .menu-emoji {
        font-size: 4rem;
    }
    
    .page-title {
        font-size: 3rem;
    }
    
    .lesson-card h3, .story-card h3 {
        font-size: 1.6rem;
    }
    
    .lesson-card p, .story-card p {
        font-size: 1.1rem;
    }
    
    .detail-title {
        font-size: 2.8rem;
    }
    
    .detail-subtitle {
        font-size: 1.3rem;
    }
    
    .content-display {
        font-size: 1.32rem; /* Increased by 10% from 1.2rem */
        line-height: 1.9;
    }
    
    .main-footer {
        font-size: 1.1rem;
    }
    
    /* Buttons */
    .btn, .btn-back, .btn-primary {
        font-size: 1.1rem;
        padding: 14px 32px;
    }
    
    /* User menu */
    .user-button {
        font-size: 1.1rem;
    }
    
    .user-menu-item {
        font-size: 1.1rem;
        padding: 14px 22px;
    }
    
    .user-email {
        font-size: 1rem;
    }
}

/* ===== UNIFIED TOP NAVBAR (ALL PAGES) ===== */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #1E293B;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #334155;
    padding: 14px 24px;
    /* iOS Safe Area - Add breathing room (design padding + safe area) */
    /* Support both env() and constant() for older iOS */
    padding-top: 14px;
    padding-top: constant(safe-area-inset-top); /* iOS 11.0-11.2 */
    padding-top: env(safe-area-inset-top); /* iOS 11.2+ */
    padding-top: calc(constant(safe-area-inset-top) + 14px); /* iOS 11.0-11.2 */
    padding-top: calc(env(safe-area-inset-top) + 14px); /* iOS 11.2+ */
    
    padding-left: 24px;
    padding-left: calc(constant(safe-area-inset-left) + 24px);
    padding-left: calc(env(safe-area-inset-left) + 24px);
    
    padding-right: 24px;
    padding-right: calc(constant(safe-area-inset-right) + 24px);
    padding-right: calc(env(safe-area-inset-right) + 24px);
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    height: 64px; /* Base height (without safe area) */
}

.navbar-logo {
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    line-height: 1;
}

.navbar-logo:hover {
    color: white;
    transform: translateY(-1px);
}

/* Logo parts */
.navbar-logo .logo-icon { color: #FF3131; }
.navbar-logo .logo-text { color: white; }

.navbar-right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar-menu a {
    text-decoration: none;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
    padding: 4px 0;
    white-space: nowrap;
}

.navbar-menu a:hover {
    color: #09BEBC;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1E293B 0%, #09BEBC 100%);
    transition: width 0.3s ease;
}

.navbar-menu a:hover::after {
    width: 100%;
}

/* ===== USER MENU ALIGNMENT WITH NAVBAR ===== */
.btn-login {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 8px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    white-space: nowrap;
}

.btn-login:hover {
    color: #667eea;
    border-color: #667eea;
    background: #f8fafc;
}

/* Icon-based menu button (hamburger) */
.menu-icon-button {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.menu-icon-button:hover {
    border-color: #667eea;
    background: #f8fafc;
    color: #667eea;
}

.menu-icon-button svg {
    width: 24px;
    height: 24px;
}

/* Legacy user-button (kept for backwards compatibility) */
.user-button {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.user-button:hover {
    border-color: #667eea;
    background: #f8fafc;
}

.user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-avatar,
.user-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-arrow {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* ===== USER INFO LOADING SKELETON ===== */
.user-info-skeleton {
    width: 120px;
    height: 36px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== RESPONSIVE NAVBAR ===== */
@media (max-width: 1024px) {
    .top-navbar {
        /* Don't use shorthand 'padding' - it overrides safe-area-inset! */
        padding-left: 20px;
        padding-left: calc(constant(safe-area-inset-left) + 20px);
        padding-left: calc(env(safe-area-inset-left) + 20px);
        
        padding-right: 20px;
        padding-right: calc(constant(safe-area-inset-right) + 20px);
        padding-right: calc(env(safe-area-inset-right) + 20px);
        
        padding-bottom: 12px;
        /* padding-top keeps safe-area-inset-top from parent rule (14px breathing room) */
    }
    
    .navbar-right {
        gap: 24px;
    }
    
    .navbar-menu {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .top-navbar {
        /* Don't use shorthand 'padding' - it overrides safe-area-inset! */
        /* Only adjust horizontal padding, keep safe area padding-top */
        padding-left: 16px;
        padding-left: calc(constant(safe-area-inset-left) + 16px);
        padding-left: calc(env(safe-area-inset-left) + 16px);
        
        padding-right: 16px;
        padding-right: calc(constant(safe-area-inset-right) + 16px);
        padding-right: calc(env(safe-area-inset-right) + 16px);
        
        padding-bottom: 10px;
        
        /* Keep safe area padding-top from parent rule */
        /* padding-top = safe-area-inset-top + 14px (breathing room) */
        
        height: auto;
        min-height: 56px;
        min-height: calc(56px + constant(safe-area-inset-top));
        min-height: calc(56px + env(safe-area-inset-top));
    }
    
    .navbar-logo {
        font-size: 1.1rem;
    }
    
    .navbar-menu {
        display: none;
    }
    
    .navbar-right {
        gap: 16px;
    }
    
    .user-button {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
    
    .user-name {
        display: none;
    }
    
    /* User menu with scroll on mobile - FORCE SCROLL */
    .user-menu {
        max-height: 70vh !important;
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain;
    }
    
    /* When menu is visible on mobile */
    .user-menu[style*="display: block"],
    .user-menu[style*="display:block"] {
        display: block !important;
    }
}

/* ===== USER MENU CUSTOM SCROLLBAR ===== */
.user-menu {
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

.user-menu::-webkit-scrollbar {
    width: 6px;
}

.user-menu::-webkit-scrollbar-track {
    background: transparent;
}

.user-menu::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 3px;
}

.user-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

/* ===== LYRICS SYNC CUSTOM SCROLLBAR ===== */
/* Custom scrollbar for lyrics content area - Brand Colors (Cyan) */
#lyrics-sync-container > div[style*="height: 14.4rem"] {
    /* Webkit browsers (Chrome, Safari, Edge) */
    scrollbar-width: thin;
    scrollbar-color: #09BEBC rgba(9, 190, 188, 0.1);
}

#lyrics-sync-container > div[style*="height: 14.4rem"]::-webkit-scrollbar {
    width: 8px;
}

#lyrics-sync-container > div[style*="height: 14.4rem"]::-webkit-scrollbar-track {
    background: rgba(9, 190, 188, 0.1);
    border-radius: 10px;
}

#lyrics-sync-container > div[style*="height: 14.4rem"]::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #09BEBC 0%, #08a5a3 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
}

#lyrics-sync-container > div[style*="height: 14.4rem"]::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0ad1cf 0%, #09BEBC 100%);
    box-shadow: 0 2px 8px rgba(9, 190, 188, 0.4);
}

/* Firefox scrollbar */
@supports (scrollbar-color: auto) {
    #lyrics-sync-container > div[style*="height: 14.4rem"] {
        scrollbar-width: thin;
        scrollbar-color: #09BEBC rgba(9, 190, 188, 0.1);
    }
}

/* Smooth fade effect removed - was causing readability issues */

