:root {
    --bg-body: #0f172a;       
    --bg-card: #1e293b;       
    --bg-glass: rgba(30, 41, 59, 0.6); 
    --bg-glass-heavy: rgba(15, 23, 42, 0.95);
    
    --bg-input: rgba(255, 255, 255, 0.03);
    --bg-input-focus: rgba(0, 0, 0, 0.3);
    --border-light: rgba(255, 255, 255, 0.08); 
    --border-focus: rgba(99, 102, 241, 0.5);

    --primary: #6366f1;       
    --primary-hover: #4f46e5; 
    --primary-glow: rgba(99, 102, 241, 0.4);
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

    --gold: #fbbf24;
    --gold-glow: rgba(251, 191, 36, 0.4);
    --success: #22c55e;
    --success-glow: rgba(34, 197, 94, 0.3);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);

    --sub-physics: #3b82f6;   
    --sub-chem: #22c55e;      
    --sub-bio: #f97316;       
    --sub-math: #a855f7;      
    --sub-ict: #06b6d4;       
    --sub-eng: #ec4899;       
    --sub-ban: #eab308;       

    --text-main: #f8fafc;     
    --text-muted: #94a3b8;    

    --border: 1px solid var(--border-light);
    --radius-lg: 16px;
    --radius-md: 10px;
    
    --heat-0: #334155;
    --heat-1: #064e3b;
    --heat-2: #10b981;
    --heat-3: #34d399;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

*:focus:not(:focus-visible) {
    outline: none;
}

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}

::-webkit-scrollbar { width: 0px; height: 0px; background: transparent; }
html { 
    scrollbar-width: none; 
    -ms-overflow-style: none; 
    scroll-behavior: smooth; 
    overflow-x: hidden; 
    width: 100%;
}
.scrollable-list, .chapter-list, .landing-scroll-wrapper, .custom-multi-select, .modal-card, .modal-body-clean {
    scrollbar-width: none; -ms-overflow-style: none;
}

.scrollable-list {
    overflow-y: auto;
    max-height: 300px;
    border-radius: var(--radius-md);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99,102,241,0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236,72,153,0.08) 0px, transparent 50%);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; 
    width: 100%;
    position: relative;
    padding-bottom: 90px;
}

.hidden { display: none !important; }
.full-width { width: 100%; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-gold { color: var(--gold); }
.text-primary { color: var(--primary); }

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.display-block { display: block; }
.p-3 { padding: 1rem; }

.text-white { color: #ffffff !important; }
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

.badge {
    display: inline-block; padding: 4px 10px; border-radius: 6px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0 20px; height: 48px; border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.95rem; cursor: pointer; border: none;
    transition: all 0.2s ease; white-space: nowrap; user-select: none;
    will-change: transform;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
    background: var(--accent-gradient); color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4); transform: translateY(-1px); }

.btn-secondary {
    background: rgba(255,255,255,0.05); color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: white; border-color: rgba(255,255,255,0.2); }

.btn-secondary-dark {
    background: #334155; color: #e2e8f0; border: 1px solid #475569;
}
.btn-secondary-dark:hover { background: #475569; color: white; }

.btn-study-now {
    width: 100%; padding: 12px; margin-top: 12px;
    background: var(--accent-gradient); color: white; font-weight: 700;
    border: none; border-radius: 12px; cursor: pointer;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2); transition: transform 0.2s;
    will-change: transform;
}
.btn-study-now:active { transform: scale(0.98); }

.btn-sm { height: 32px; font-size: 0.8rem; padding: 0 12px; }

.icon-btn, .icon-btn-small {
    background: rgba(255,255,255,0.05); border: none; color: var(--text-muted);
    border-radius: 8px; cursor: pointer; transition: 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.icon-btn { font-size: 1.2rem; padding: 10px; }
.icon-btn:hover { background: rgba(255,255,255,0.1); color: white; transform: translateY(-2px); }
.icon-btn-small { width: 32px; height: 32px; border-radius: 6px; }
.icon-btn-small:hover { background: rgba(255,255,255,0.2); color: white; }

input, select, textarea {
    width: 100%; background: var(--bg-input); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 14px; color: white;
    font-family: inherit; font-size: 1rem; transition: all 0.2s;
    backdrop-filter: blur(5px);
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary); background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, 0.3); }

select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 15px center; background-size: 16px;
    padding-right: 40px; background-color: var(--bg-input);
}
select option { background-color: var(--bg-card); color: white; }

.step-item {
    display: flex; align-items: center; gap: 12px; padding: 12px;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px; margin-bottom: 8px; cursor: pointer;
    transition: all 0.2s ease; position: relative; overflow: hidden;
}
.step-item:hover { background: rgba(255,255,255,0.05); transform: translateX(4px); }
.step-item.done { opacity: 0.75; }

.step-item input[type="checkbox"] { position: absolute; opacity: 0; height: 0; width: 0; }
.step-item .checkmark {
    position: relative; height: 22px; width: 22px;
    background-color: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 6px; flex-shrink: 0; transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center;
}
.step-item input:checked ~ .checkmark {
    background-color: var(--primary); border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}
.step-item .checkmark::after {
    content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    color: white; font-size: 0.75rem; display: none;
}
.step-item input:checked ~ .checkmark::after { display: block; animation: popIn 0.3s; }
.step-item span { font-size: 0.95rem; color: #e2e8f0; transition: 0.3s; }
.step-item input:checked ~ span:not(.checkmark) { text-decoration: line-through; color: var(--text-muted); opacity: 0.7; }

.step-item.optional { border-style: dashed; border-color: rgba(255,255,255,0.15); }
.step-item.optional::before {
    content: "OPTIONAL"; position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%); font-size: 0.6rem; letter-spacing: 1px;
    color: var(--text-muted); opacity: 0.5; font-weight: 700;
}
@keyframes popIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }

.custom-multi-select {
    display: flex; flex-wrap: wrap; gap: 8px; background: var(--bg-input);
    padding: 10px; border-radius: var(--radius-md); border: 1px solid var(--border-light);
    max-height: 150px; overflow-y: auto;
}
.subject-tag {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px; padding: 6px 14px; font-size: 0.8rem; color: var(--text-muted);
    cursor: pointer; transition: 0.2s; user-select: none; display: flex; align-items: center; gap: 6px;
}
.subject-tag:hover { background: rgba(255,255,255,0.1); color: white; }
.subject-tag.selected {
    background: var(--primary); border-color: var(--primary);
    color: white; box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.glass-panel {
    background: var(--bg-glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.05); box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: 60px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; width: 100%; overflow: visible !important;
}

.nav-brand {
    display: flex; align-items: center; gap: 10px; font-weight: 800;
    font-size: 1.2rem; flex-shrink: 0; min-width: max-content;
}
.nav-brand img { height: 32px; width: 32px; border-radius: 6px; }
.nav-brand span { white-space: nowrap !important; }

.nav-actions {
    display: flex; align-items: center; justify-content: flex-end; gap: 15px;
    width: auto !important; flex-shrink: 0; white-space: nowrap !important;
}

#landing-view {
    position: fixed; inset: 0; height: 100dvh; width: 100%;
    background: #000000; overflow-y: auto; overflow-x: hidden;
    overscroll-behavior: none;
}
.landing-scroll-wrapper { position: relative; width: 100%; min-height: 100%; }

.cinematic-glow {
    position: fixed; top: -150px; left: 50%; transform: translateX(-50%) translateZ(0);
    width: 600px; height: 400px;
    background: radial-gradient(50% 50% at 50% 50%, rgba(99, 102, 241, 0.25) 0%, rgba(0, 0, 0, 0) 100%);
    filter: blur(80px); z-index: 1; pointer-events: none;
    will-change: transform;
}
.floating-orb {
    position: fixed; width: 300px; height: 300px; border-radius: 50%;
    filter: blur(80px); opacity: 0.15; z-index: 0; pointer-events: none;
    animation: floatOrb 20s infinite ease-in-out alternate;
    will-change: transform; transform: translateZ(0);
}
.orb-1 { top: 10%; left: -50px; background: var(--primary); }
.orb-2 { bottom: 10%; right: -50px; background: #ec4899; animation-delay: -5s; }
@keyframes floatOrb { 0% { transform: translate(0,0); } 100% { transform: translate(30px, 50px); } }

.grid-floor {
    position: fixed; inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
    z-index: 0; transform: perspective(1000px) rotateX(20deg) translateY(-50px) scale(1.5) translateZ(0);
    opacity: 0.4; pointer-events: none;
    will-change: transform;
}

.landing-container {
    position: relative; z-index: 10; width: 100%; max-width: 1000px;
    margin: 0 auto; padding-top: 30px;
}

.landing-nav {
    width: 100%; display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 60px; padding: 0 20px;
}

.btn-login-premium {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    will-change: transform; transform: translateZ(0);
}
.btn-login-premium::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}
.btn-login-premium:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
}
.btn-login-premium:hover::before { left: 150%; }
.btn-login-premium:active { transform: translateY(0) scale(0.96); }

.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: white; font-size: 1.1rem; }
.nav-logo img { width: 28px; height: 28px; border-radius: 6px; }
.nav-right { display: flex; align-items: center; gap: 15px; }

.hero-content-premium {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; margin: 0 auto; padding: 0 20px;
}
.hero-text-wrapper { 
    max-width: 700px; margin-bottom: 50px; 
    display: flex; flex-direction: column; align-items: center;
}
.pill-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 30px;
    background: rgba(99, 102, 241, 0.1); border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc; font-size: 0.85rem; font-weight: 600;
    margin-bottom: 24px; box-shadow: 0 0 15px rgba(99,102,241,0.2);
}
.display-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -0.04em;
    line-height: 1.1; color: #fff; margin: 0 0 20px 0;
}
.text-gradient-animate {
    background: linear-gradient(to right, #fff, #818cf8, #c084fc, #fff);
    background-size: 200%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: textShimmer 4s linear infinite;
}
@keyframes textShimmer { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
.display-desc {
    font-size: 1.1rem; color: #94a3b8; line-height: 1.6; margin-bottom: 32px; max-width: 90%;
}
.cta-group { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }

.btn-titanium-glow {
    position: relative; overflow: hidden;
    background: white; color: black; font-weight: 700;
    padding: 16px 36px; border-radius: 50px; border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.3s; box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    will-change: transform; transform: translateZ(0);
}
.btn-titanium-glow:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 255, 255, 0.5); }
.btn-content { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; }
.btn-glow-anim {
    position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transform: skewX(-20deg); animation: glowSweep 3s infinite;
}
@keyframes glowSweep { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }

.btn-glass-outline {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.2);
    color: white; padding: 16px 32px; border-radius: 50px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: 0.3s;
}
.btn-glass-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); }

.trust-badge { display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0.7; }
.avatars { display: flex; }
.avatars span {
    width: 28px; height: 28px; border-radius: 50%; border: 2px solid #0f172a;
    background: #334155; overflow: hidden; margin-left: -8px;
}
.avatars span:first-child { margin-left: 0; }
.avatars img { width: 100%; height: 100%; }

.hero-visual-3d {
    perspective: 1200px; width: 100%; max-width: 600px;
    display: flex; justify-content: center; padding-bottom: 40px; margin-top: 20px;
}
.dashboard-preview-card {
    width: 100%; aspect-ratio: 16/10; background: #0f172a;
    border: 1px solid rgba(255,255,255,0.15); border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 30px 60px rgba(0,0,0,0.8), 0 0 100px rgba(99, 102, 241, 0.15);
    transform: rotateX(20deg) scale(0.95); transition: transform 0.5s ease;
    overflow: hidden; position: relative; display: flex; flex-direction: column;
}
.dashboard-preview-card:hover { transform: rotateX(5deg) scale(1) translateY(-10px); border-color: rgba(255,255,255,0.3); }
.glass-sheen {
    position: absolute; inset: 0; 
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
    pointer-events: none;
}
.preview-header {
    height: 40px; border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; padding: 0 16px; gap: 12px;
    background: rgba(255,255,255,0.02);
}
.dots { display: flex; gap: 6px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: #334155; }
.d1 { background: #ef4444 !important; }
.d2 { background: #f59e0b !important; }
.d3 { background: #10b981 !important; }
.bar { flex: 1; height: 6px; background: rgba(255,255,255,0.05); border-radius: 4px; max-width: 200px; }
.preview-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; height: 100%; }
.p-row {
    display: flex; align-items: center; gap: 10px; padding: 10px;
    background: rgba(255,255,255,0.03); border-radius: 8px; border: 1px solid rgba(255,255,255,0.05);
}
.p-circle { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #8b5cf6); flex-shrink: 0; }
.c2 { background: linear-gradient(135deg, #22c55e, #10b981); }
.p-lines { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.l1 { width: 60%; height: 6px; background: #334155; border-radius: 2px; }
.l2 { width: 30%; height: 6px; background: #1e293b; border-radius: 2px; }
.p-badge { width: 40px; height: 16px; background: rgba(99,102,241,0.2); border-radius: 4px; }
.b2 { background: rgba(34,197,94,0.2); }
.p-graph {
    margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between;
    height: 60px; padding: 0 10px; gap: 8px;
}
.g-bar { flex: 1; background: #1e293b; border-radius: 4px 4px 0 0; opacity: 0.5; }
.g-bar.active { background: #6366f1; opacity: 1; box-shadow: 0 0 15px rgba(99,102,241,0.4); }

.seo-section { position: relative; z-index: 5; margin-bottom: 100px; }
.glass-panel-feature {
    max-width: 1000px; margin: 0 auto; padding: 60px 20px;
    background: linear-gradient(180deg, rgba(30,41,59,0.3) 0%, rgba(15,23,42,0) 100%);
    border-radius: 30px; border: 1px solid rgba(255,255,255,0.05);
}
.feature-header { text-align: center; margin-bottom: 50px; }
.feature-header .sub-title { color: var(--primary); font-weight: 700; font-size: 0.8rem; letter-spacing: 1px; }
.feature-header h2 { font-size: 2.5rem; margin: 10px 0; background: linear-gradient(to bottom, white, #94a3b8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.feature-header p { color: var(--text-muted); font-size: 1.1rem; }
.feature-grid-premium { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.bento-card {
    padding: 30px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05);
    background: rgba(30, 41, 59, 0.4); backdrop-filter: blur(10px); transition: 0.3s;
}
.bento-card:hover { transform: translateY(-8px); border-color: rgba(99,102,241,0.3); background: rgba(30, 41, 59, 0.6); }
.icon-box {
    width: 50px; height: 50px; border-radius: 12px;
    background: rgba(99,102,241,0.1); color: #6366f1;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 20px;
}
.icon-box.green { background: rgba(34,197,94,0.1); color: #22c55e; }
.icon-box.pink { background: rgba(236,72,153,0.1); color: #ec4899; }
.bento-card h3 { margin: 0 0 10px; color: white; font-size: 1.2rem; }
.bento-card p { color: var(--text-muted); margin: 0; line-height: 1.5; font-size: 0.95rem; }

.faq-grid-premium { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.faq-column { display: flex; flex-direction: column; gap: 15px; }
.faq-item { border-radius: 16px; overflow: hidden; transition: background 0.3s ease; }
.faq-item:hover { background: rgba(255,255,255,0.05); }
.faq-item summary {
    padding: 24px; cursor: pointer; font-weight: 600; color: white;
    list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { transition: transform 0.3s ease; color: var(--text-muted); font-size: 0.8rem; }
.faq-item[open] .faq-icon { transform: rotate(180deg); color: var(--primary); }
.faq-content { padding: 0 24px 24px 24px; color: var(--text-muted); line-height: 1.6; animation: fadeIn 0.3s ease; font-size: 0.95rem; }

.fade-in-up { opacity: 0; animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.3s; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.fade-on-scroll { opacity: 0; animation: fadeInUp 0.8s ease forwards; animation-delay: 0.2s; }

#auth-view {
    position: fixed; inset: 0;
    overflow-y: auto; overflow-x: hidden;
    overscroll-behavior: none;
}
.auth-wrapper {
    min-height: 100%; display: flex; align-items: center; justify-content: center;
    padding: 20px; background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 70%);
}
.auth-card {
    width: 100%; max-width: 400px; padding: 40px 30px; border-radius: 24px;
    text-align: center; background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.7);
    position: relative; overflow: visible !important;
}
.auth-logo { width: 80px; height: 80px; margin-bottom: 20px; }
.premium-title {
    font-size: 2.5rem; font-weight: 800; margin: 0 0 5px 0;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.3));
}
.relative-container { position: relative; }
.btn-google-premium {
    background: white; color: black; border: 1px solid rgba(255,255,255,0.2);
    margin-top: 15px; overflow: visible; font-weight: 700;
}
.btn-google-premium:hover { background: #f8fafc; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.rec-badge-container {
    position: absolute; top: -12px; right: -10px;
    transform: rotate(10deg); z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); pointer-events: none;
}
.rec-badge {
    background: var(--gold); color: #000; font-size: 0.6rem;
    font-weight: 800; padding: 4px 8px; border-radius: 4px;
    text-transform: uppercase; border: 1px solid #fff;
    display: flex; align-items: center; gap: 4px;
}
.btn-content-row { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.divider { 
    display: flex; align-items: center; color: var(--text-muted); 
    font-size: 0.7rem; margin: 25px 0; font-weight: 700; letter-spacing: 1px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,0.1); margin: 0 10px; }
#emailAuthForm { position: relative; z-index: 1; }
#emailInput, #passwordInput { background: rgba(0,0,0,0.2); }
.auth-footer { margin-top: 25px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.auth-footer p { font-size: 0.8rem; color: var(--text-muted); margin: 0; line-height: 1.5; }
.terms-link { color: var(--primary); text-decoration: none; font-weight: 700; }
.terms-link:hover { text-decoration: underline; color: white; }

.main-content {
    max-width: 1000px;
    margin: 80px auto 20px auto; 
    padding: 0 20px; 
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.desktop-menu { display: flex; gap: 10px; }

.nav-link-btn {
    background: transparent; border: none; color: var(--text-muted); font-weight: 600;
    font-size: 0.95rem; cursor: pointer; padding: 8px 12px; border-radius: 8px;
    display: flex; align-items: center; gap: 8px; transition: 0.2s;
}

.animated-nav-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}
.animated-nav-btn i { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.animated-nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}
.animated-nav-btn:hover i { transform: scale(1.15) translateY(-1px); color: white; }
.animated-nav-btn.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}
.animated-nav-btn.active i { color: var(--primary); }

.dashboard-grid { 
    display: grid; 
    grid-template-columns: 1fr 320px; 
    gap: 20px; 
    width: 100%; 
}

.grid-main, .grid-sidebar {
    min-width: 0; 
    width: 100%;
}

.hero-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: 20px; padding: 24px; border: 1px solid rgba(99, 102, 241, 0.3);
    position: relative; overflow: hidden; box-shadow: 0 10px 30px -5px rgba(49, 46, 129, 0.4);
    width: 100%;
}
.hero-content { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; }
.hero-badge {
    background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 20px;
    display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem;
    line-height: 1;
}
.circular-progress-wrapper { display: flex; flex-direction: column; align-items: center; }

.hero-text-area { flex: 1; padding-right: 20px; min-width: 0; }

.progress-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }
.circular-progress {
    width: 100px; height: 100px; border-radius: 50%;
    background: conic-gradient(var(--primary) 0deg, rgba(255,255,255,0.1) 0deg);
    display: flex; align-items: center; justify-content: center; position: relative;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}
.circular-progress::before { content: ""; position: absolute; width: 85px; height: 85px; border-radius: 50%; background: #252368; }
.progress-value { position: relative; z-index: 2; font-size: 1.8rem; font-weight: 800; color: white; }

.subject-progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; width: 100%; }
.subject-progress-card {
    background: var(--bg-card); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; padding: 15px 10px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    position: relative; box-shadow: 0 4px 10px rgba(0,0,0,0.2); height: 100%;
    transition: transform 0.2s;
    cursor: pointer;
}
.subject-progress-card:hover { transform: translateY(-3px); background: rgba(30, 41, 59, 0.8); border-color: rgba(255,255,255,0.1); }
.mini-circular-chart {
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    position: relative; margin-bottom: 8px;
    background: conic-gradient(#334155 0deg, #334155 360deg);
}
.mini-circular-chart::before { content: ""; position: absolute; width: 50px; height: 50px; border-radius: 50%; background: var(--bg-card); }
.mini-chart-value { position: relative; z-index: 2; font-size: 0.9rem; font-weight: 800; color: white; }
.mini-chart-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; line-height: 1.2; }

.accent-physics { --acc: var(--sub-physics); }
.accent-chem { --acc: var(--sub-chem); }
.accent-bio { --acc: var(--sub-bio); }
.accent-math { --acc: var(--sub-math); }
.accent-ict { --acc: var(--sub-ict); }
.accent-eng { --acc: var(--sub-eng); }
.accent-ban { --acc: var(--sub-ban); }

.card {
    background: var(--bg-card); border: var(--border);
    border-radius: var(--radius-lg); padding: 20px; transition: border-color 0.3s;
    width: 100%; 
    box-sizing: border-box; 
}
.card:hover { border-color: rgba(255,255,255,0.15); }
.full-width-card { width: 100% !important; }

.premium-stats-card {
    background: linear-gradient(145deg, rgba(30,41,59,0.7) 0%, rgba(15,23,42,0.9) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.premium-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    border-color: rgba(99,102,241,0.3);
}

.view-section { display: block; width: 100%; }

.widget { padding: 16px; }
.widget-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.widget-header h3 { margin: 0; font-size: 0.9rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.action-group { display: flex; align-items: center; gap: 8px; }
.progress-bar-bg { width: 100%; height: 6px; background: #334155; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress-bar-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.6s ease; box-shadow: 0 0 10px var(--primary-glow); }
.time-bar-fill { height: 100%; background: var(--gold); border-radius: 3px; transition: width 0.6s ease; box-shadow: 0 0 10px var(--gold-glow); }
.countdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; text-align: center; }
.countdown-box { background: rgba(0,0,0,0.3); padding: 8px 4px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); }
.count-val { font-weight: 800; font-size: 1.1rem; color: white; display: block; }
.count-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; }
.chart-container { 
    position: relative; height: 250px; width: 100%;
    overflow: hidden;
}


.heatmap-container { width: 100%; overflow-x: hidden; padding: 4px 4px 8px; }
.heatmap-grid-30 {
    display: grid;
    grid-template-columns: repeat(15, minmax(0, 32px));
    gap: 5px;
    margin-top: 8px;
    justify-content: start;
}
.heatmap-day { 
    aspect-ratio: 1; 
    width: 100%;
    border-radius: 4px; 
    background-color: var(--heat-0); 
    transition: 0.2s; 
}
.heatmap-day:hover { transform: scale(1.3); z-index: 5; border: 1px solid rgba(255,255,255,0.5); box-shadow: 0 0 10px rgba(0,0,0,0.5); }
.heatmap-day.level-1 { background-color: var(--heat-1); }
.heatmap-day.level-2 { background-color: var(--heat-2); }
.heatmap-day.level-3 { background-color: var(--heat-3); box-shadow: 0 0 5px rgba(52, 211, 153, 0.4); }

.trophy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 10px; width: 100%; }
.expanded-trophy-grid { overflow: visible !important; }
.trophy-item {
    position: relative; display: flex; flex-direction: column; align-items: center;
    justify-content: center; text-align: center; background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05); padding: 10px 8px; border-radius: 12px;
    transition: all 0.3s; opacity: 0.6; filter: grayscale(80%); overflow: visible !important; height: 100%;
}
.trophy-item:hover { transform: translateY(-3px); background: rgba(255,255,255,0.05); opacity: 1; filter: grayscale(0%); z-index: 10; }
.trophy-item.unlocked {
    opacity: 1; filter: none; border: 1px solid rgba(251, 191, 36, 0.4);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.02) 100%);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.1);
}
.trophy-icon { font-size: 1.3rem; margin-bottom: 6px; color: #cbd5e1; }
.trophy-item.unlocked .trophy-icon { color: var(--gold); text-shadow: 0 0 10px var(--gold-glow); }
.trophy-name { font-size: 0.65rem; font-weight: 700; line-height: 1.2; }
.trophy-item::after {
    content: attr(data-tooltip); position: absolute; top: 115%; left: 50%;
    transform: translateX(-50%); background: #0f172a; border: 1px solid rgba(255,255,255,0.2);
    color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 500;
    white-space: normal; width: 140px; text-align: center; z-index: 1000;
    opacity: 0; visibility: hidden; transition: all 0.2s ease; pointer-events: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
.trophy-item:hover::after { opacity: 1; visibility: visible; }

.lb-user-info { display: flex; flex-direction: column; gap: 2px; }
.lb-user-name { font-weight: 700; color: white; font-size: 0.95rem; }
.lb-user-inst { font-size: 0.7rem; color: var(--text-muted); }

.leaderboard-list > div > span:last-child { font-weight: 800; color: white; }
.leaderboard-list > div:nth-child(2) { border-left: 3px solid #94a3b8 !important; }
.leaderboard-list > div:nth-child(3) { border-left: 3px solid #b45309 !important; }

.user-rank-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
    position: relative; z-index: 2;
}
.user-rank-container .rank-badge-user {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
}

.section-header { display: flex; justify-content: space-between; align-items: center; }
.section-header h2 { margin: 0; }
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.subject-card {
    background: var(--bg-card); border: var(--border); border-radius: var(--radius-lg);
    padding: 20px; cursor: pointer; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    width: 100%; box-sizing: border-box;
}
.subject-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3); }
.chapter-list { display: flex; flex-direction: column; gap: 10px; }
.chapter-item { background: rgba(255,255,255,0.02); border: var(--border); border-radius: 10px; overflow: hidden; transition: background 0.2s; }
.chapter-header { padding: 16px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.chapter-header:hover { background: rgba(255,255,255,0.05); }

.chapter-body { 
    max-height: 0; padding: 0 20px; overflow: hidden; 
    border-top: 1px solid transparent; background: rgba(0,0,0,0.15); 
    transition: all 0.3s ease; opacity: 0;
}
.chapter-body.open { 
    max-height: 2000px; padding: 20px; 
    border-top-color: rgba(255,255,255,0.05); opacity: 1; 
}

.premium-detail-header {
    position: relative;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.premium-detail-bg-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    background: var(--primary);
    filter: blur(80px);
    opacity: 0.3;
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}
.premium-detail-content {
    position: relative;
    z-index: 2;
}
.premium-detail-content h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    margin: 0 0 16px 0;
    color: #ffffff;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.premium-badge-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #cbd5e1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

#toast-container { position: fixed; top: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast-msg {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.1); border-left: 4px solid var(--primary);
    color: white; padding: 16px 20px; border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6); display: flex; align-items: center; gap: 12px;
    animation: toastSlide 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    min-width: 280px; pointer-events: auto;
}
.toast-msg.error { border-left-color: var(--danger); }
.toast-msg.success { border-left-color: var(--success); }
@keyframes toastSlide { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center; padding: 16px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
    background: var(--bg-card); width: 100%; max-width: 450px;
    padding: 24px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6); max-height: 90vh; overflow-y: auto;
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.input-group-row { display: flex; gap: 10px; margin-top: 10px; }
.stats-row { display: flex; gap: 12px; width: 100%; }
.stat-box { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); padding: 12px; border-radius: 12px; text-align: center; flex: 1; }

.clean-modal-ui {
    background: #18181b; border: 1px solid #27272a;
    box-shadow: 0 0 0 1px rgba(0,0,0,1), 0 20px 60px rgba(0,0,0,0.8);
    padding: 0; display: flex; flex-direction: column;
}
.clean-modal-header { padding: 20px; border-bottom: 1px solid #27272a; display: flex; justify-content: space-between; align-items: center; }
#customSelectOptions.modal-body-clean { padding: 8px 0; flex: 1; overflow-y: auto; }
.modal-body-clean { padding: 20px; flex: 1; overflow-y: auto; }
.clean-modal-footer { padding: 20px; border-top: 1px solid #27272a; background: #18181b; }
.clean-input { background: transparent; border: none; font-size: 1rem; color: white; padding: 10px; border-radius: 8px; width: 100%; }
.clean-input:focus { background: rgba(255,255,255,0.05); box-shadow: none; border: none; outline: none; }
.apply-section-clean { background: #27272a; border-radius: 8px; padding: 10px; }
.clean-tags-container { border: none; background: transparent; padding: 0; max-height: none; }
.add-step-wrapper { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); padding: 8px 12px; border-radius: 10px; }
.add-step-wrapper input { flex: 1; }

.step-editor-item { 
    display: grid; grid-template-columns: 60px 1fr 40px; gap: 12px; 
    align-items: center; background: rgba(15, 23, 42, 0.6); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    padding: 10px; border-radius: 12px; margin-bottom: 8px; 
    transition: 0.2s;
}
.step-editor-item:hover { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.15); }

.step-opt-label { 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    cursor: pointer; color: var(--text-muted); 
    background: rgba(255,255,255,0.05); border-radius: 6px; padding: 4px;
}
.step-opt-label input { appearance: none; width: 18px; height: 18px; border: 2px solid var(--text-muted); border-radius: 4px; background: transparent; cursor: pointer; margin-bottom: 2px; position: relative !important; opacity: 1 !important; }
.step-opt-label input:checked { background: var(--primary); border-color: var(--primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='12px' height='12px'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E"); background-position: center; background-repeat: no-repeat; }
.step-opt-label span { font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.step-editor-item input[type="text"] { background: transparent; border: none; border-bottom: 1px solid transparent; border-radius: 0; padding: 8px 0; height: auto; font-size: 0.95rem; width: 100%; transition: 0.2s; }
.step-editor-item input[type="text"]:focus { border-bottom-color: var(--primary); }
.close-modal-icon {
    width: 32px; height: 32px;
    border-radius: 8px; 
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s ease;
}
.close-modal-icon:hover { 
    background: rgba(239, 68, 68, 0.15); 
    color: var(--danger); 
    border-color: var(--danger); 
}
.footer-actions-row { 
    display: flex; gap: 12px; width: 100%; margin-bottom: 10px; 
}
.footer-actions-row:last-child { margin-bottom: 0; }
.footer-actions-row button { flex: 1; }

.large-modal { max-width: 600px !important; }

.section-label {
    display: block; font-size: 0.75rem; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 8px;
}

.steps-list-container { display: flex; flex-direction: column; }

.custom-select-wrapper { cursor: pointer; user-select: none; position: relative; }
.custom-select-display { color: white; font-size: 1rem; }

.custom-select-option {
    padding: 15px 20px 15px 52px;
    color: #cbd5e1;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    position: relative;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.custom-select-option::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    background: transparent;
    transition: all 0.2s ease;
}
.custom-select-option:last-child { border-bottom: none; }
.custom-select-option:hover {
    background: rgba(99, 102, 241, 0.08);
    color: white;
    padding-left: 56px;
}
.custom-select-option:hover::before {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.15);
    background: rgba(99,102,241,0.2);
}
.custom-select-option:active::before {
    background: var(--primary);
    border-color: var(--primary);
}

.player-modal-card {
    background: #0f1117;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    max-width: 480px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0,0,0,1),
        0 30px 80px rgba(0,0,0,0.9),
        0 0 60px rgba(99,102,241,0.08);
    animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
}

.player-modal-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px 24px 20px;
    overflow: hidden;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.player-header-glow-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(236,72,153,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.pm-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
    z-index: 10;
}
.pm-close-btn:hover {
    background: rgba(239,68,68,0.15);
    color: var(--danger);
    border-color: rgba(239,68,68,0.4);
}

.pm-avatar-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: conic-gradient(
        #fbbf24 0deg 180deg,
        #6366f1 180deg 360deg
    );
    padding: 2.5px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.pm-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--gold);
}

.pm-header-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.pm-player-name {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
}

.pm-header-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pm-rank-pill {
    background: rgba(251,191,36,0.12);
    border: 1px solid rgba(251,191,36,0.3);
    color: var(--gold);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
}

.pm-score-pill {
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.3);
    color: #a5b4fc;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
}

.pm-tabs {
    display: flex;
    position: relative;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.pm-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 14px 8px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: color 0.25s ease;
    position: relative;
    font-family: inherit;
}

.pm-tab i {
    font-size: 1rem;
    transition: transform 0.25s ease;
}

.pm-tab:hover { color: #e2e8f0; }
.pm-tab:hover i { transform: translateY(-2px); }
.pm-tab.active { color: white; }
.pm-tab.active i { color: var(--primary); }

.pm-tab-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2.5px;
    width: 33.333%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 0 12px rgba(99,102,241,0.6);
    transition: left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pm-pane {
    padding: 22px 24px 26px;
    animation: paneSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes paneSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pm-radar-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}
.pm-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}
.pm-dot-you  { background: #6366f1; box-shadow: 0 0 6px rgba(99,102,241,0.6); }
.pm-dot-them { background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,0.6); }

.pm-radar-wrap {
    position: relative;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    aspect-ratio: 1;
}

.pm-radar-note {
    text-align: center;
    font-size: 0.72rem;
    color: rgba(148,163,184,0.6);
    margin: 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.pm-rank-stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.pm-rank-stat {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
}

.pm-stat-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.pm-stat-val {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
}

.pm-rank-chart-wrap {
    position: relative;
    width: 100%;
    height: 180px;
}

.h2h-vs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 8px;
}

.h2h-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.h2h-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
}

.h2h-avatar-them {
    background: rgba(251,191,36,0.1);
    border: 2px solid rgba(251,191,36,0.4);
    color: var(--gold);
    animation: winnerPulse 2.5s ease-in-out infinite;
}
.h2h-avatar-you {
    background: rgba(99,102,241,0.1);
    border: 2px solid rgba(99,102,241,0.4);
    color: var(--primary);
}

@keyframes winnerPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0.3); }
    50% { box-shadow: 0 0 0 10px rgba(251,191,36,0); }
}

.h2h-player-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h2h-player-score {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}
.h2h-score-them { color: var(--gold); text-shadow: 0 0 20px rgba(251,191,36,0.4); }
.h2h-score-you  { color: #a5b4fc; text-shadow: 0 0 20px rgba(99,102,241,0.4); }

.h2h-vs-orb {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.h2h-vs-text {
    position: relative;
    z-index: 2;
    font-size: 0.85rem;
    font-weight: 900;
    font-style: italic;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.h2h-vs-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #18181b;
    border: 1.5px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

.h2h-row-wrap {
    margin-bottom: 10px;
}

.h2h-row-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.h2h-dual-track {
    display: flex;
    align-items: center;
    height: 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    overflow: hidden;
    gap: 2px;
}

.h2h-fill-them {
    height: 100%;
    background: linear-gradient(90deg, #b45309, #fbbf24);
    border-radius: 6px 0 0 6px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(251,191,36,0.4);
    width: 50%;
}

.h2h-track-gap {
    width: 2px;
    height: 100%;
    background: #0f1117;
    flex-shrink: 0;
}

.h2h-fill-you {
    height: 100%;
    background: linear-gradient(90deg, #4338ca, #818cf8);
    border-radius: 0 6px 6px 0;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(99,102,241,0.4);
    width: 50%;
}

.h2h-subject-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    margin-bottom: 16px;
}

.h2h-subject-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}

.h2h-sub-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    padding: 0 4px;
}

.h2h-sub-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.h2h-sub-bar-wrap.them-side {
    align-items: flex-end;
}
.h2h-sub-bar-wrap.you-side {
    align-items: flex-start;
}

.h2h-sub-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.h2h-sub-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.h2h-sub-bar-fill.fill-them {
    background: linear-gradient(90deg, #b45309, #fbbf24);
    float: right;
}
.h2h-sub-bar-fill.fill-you {
    background: linear-gradient(90deg, #4338ca, #818cf8);
}

.h2h-sub-pct {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
}

.h2h-sub-name-wrap {
    text-align: center;
    position: relative;
}
.h2h-win-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
}
.h2h-win-dot.them { background: var(--gold); box-shadow: 0 0 5px rgba(251,191,36,0.6); }
.h2h-win-dot.you  { background: var(--primary); box-shadow: 0 0 5px rgba(99,102,241,0.6); }

.h2h-message-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.55;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.h2h-message-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4), transparent);
}

#feedback-popup {
    position: fixed; bottom: 20px; right: 20px; width: 340px;
    background: #1e293b; 
    border: 1px solid rgba(255,255,255,0.1); border-left: 4px solid var(--primary);
    border-radius: 16px; padding: 20px; z-index: 9999;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: transform 0.5s, visibility 0.5s;
}
.hidden-popup { transform: translateY(150%); visibility: hidden; }
.show-popup { transform: translateY(0); visibility: visible; }
.fb-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.fb-title { font-size: 1.1rem; font-weight: 700; color: white; }
.fb-close-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem; padding: 0; }
.fb-text { font-size: 0.9rem; color: #cbd5e1; line-height: 1.5; margin-bottom: 15px; }
.fb-actions { display: flex; flex-direction: column; gap: 10px; }
.fb-footer { margin-top: 15px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 8px; }
.fb-footer label { font-size: 0.8rem; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.fb-footer input[type="checkbox"] { width: 16px; height: 16px; appearance: auto; background: transparent; border: 1px solid var(--text-muted); }

.main-footer-premium { margin-top: 100px; padding: 0 20px 40px; }
.footer-glass-container {
    background: rgba(30, 41, 59, 0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.05); border-radius: 24px;
    padding: 40px; max-width: 1100px; margin: 0 auto;
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5);
}
.footer-top-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-brand-area { display: flex; flex-direction: column; gap: 5px; }
.footer-logo-premium { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.4rem; color: white; }
.footer-logo-premium img { width: 32px; height: 32px; border-radius: 8px; }
.footer-tagline { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.footer-social-pill {
    background: rgba(255,255,255,0.05); border-radius: 50px; padding: 8px 16px;
    display: flex; gap: 15px; border: 1px solid rgba(255,255,255,0.1);
}
.footer-social-pill a { color: var(--text-muted); font-size: 1rem; transition: 0.2s; }
.footer-social-pill a:hover { color: var(--primary); transform: translateY(-2px); }
.footer-divider { height: 1px; background: rgba(255,255,255,0.08); width: 100%; margin: 30px 0; }
.footer-links-compact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 40px; }
.link-group { display: flex; flex-direction: column; align-items: flex-start; }
.link-group h4 { color: white; font-size: 0.95rem; margin-bottom: 15px; font-weight: 600; }
.link-group a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; margin-bottom: 8px; transition: 0.2s; }
.link-group a:hover { color: white; padding-left: 5px; }

.footer-link-btn {
    background: none; border: none; padding: 0; cursor: pointer;
    display: block; color: var(--text-muted); font-size: 0.9rem;
    margin-bottom: 8px; text-align: left; font-family: inherit;
    transition: color 0.2s, padding-left 0.2s;
}
.footer-link-btn:hover { color: white; padding-left: 5px; }
.footer-bottom-row {
    margin-top: 40px; display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px;
    color: rgba(255,255,255,0.3); font-size: 0.8rem;
}
.made-with { display: flex; align-items: center; gap: 5px; }

.mobile-bottom-nav, .mobile-only { display: none !important; }

.premium-cta-section {
    max-width: 900px; margin: 100px auto 40px; padding: 0 20px; position: relative; z-index: 5;
}
.cta-glass-box {
    background: linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(139,92,246,0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3); border-radius: 24px; padding: 60px 40px;
    backdrop-filter: blur(20px); text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3), inset 0 0 40px rgba(99,102,241,0.1);
}
.cta-glass-box h2 { font-size: 2.5rem; font-weight: 800; color: white; margin-bottom: 15px; }
.cta-glass-box p { color: #cbd5e1; font-size: 1.1rem; margin-bottom: 30px; }


@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .grid-sidebar { order: -1; }
    .mobile-hide { display: none !important; }
    .mobile-bottom-nav { 
        display: flex !important; 
        position: fixed; bottom: 0; left: 0; right: 0; 
        z-index: 999; height: 80px; 
        justify-content: space-around; align-items: center; 
        border-top: 1px solid rgba(255,255,255,0.1); 
        background: rgba(15, 23, 42, 0.98); 
        padding-bottom: 15px; 
        backdrop-filter: blur(10px); 
    }
    .nav-item { 
        background: none; border: none; color: var(--text-muted); 
        display: flex; flex-direction: column; align-items: center; gap: 6px; 
        font-size: 0.75rem; width: 100%; cursor: pointer; 
    }
    
    .animated-nav-item {
        transition: all 0.3s ease;
    }
    .animated-nav-item i {
        transition: transform 0.3s ease, color 0.3s ease, filter 0.3s ease;
        display: inline-block;
    }
    .animated-nav-item:hover i {
        transform: scale(1.05);
        color: #fff;
    }
    .animated-nav-item.active i {
        transform: scale(1.15);
        color: var(--primary);
        filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.6));
    }
    .animated-nav-item span {
        transition: color 0.3s ease, font-weight 0.3s ease;
    }
    .animated-nav-item:hover span { color: #fff; }
    .animated-nav-item.active span { color: white; font-weight: 700; }

    .nav-item.active { color: var(--primary); }
    .nav-item i { font-size: 1.4rem; }

    a.nav-item, a.animated-nav-item {
        font-family: 'Manrope', sans-serif;
        font-size: 0.75rem;
        text-decoration: none;
        color: var(--text-muted);
        padding: 0;
        height: auto;
        border: none;
        background: none;
    }
    a.nav-item i, a.animated-nav-item i { font-size: 1.4rem; }
}

@media (max-width: 600px) {
    .heatmap-grid-30 { grid-template-columns: repeat(10, 1fr); justify-content: stretch; }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0 16px;
        width: 100%;
        overflow-x: hidden;
    }

    .cinematic-glow { width: 100%; top: -100px; opacity: 0.8; height: 300px; }
    .landing-container { padding-top: 10px; }
    .hero-content-premium { margin-top: 20px; }
    .display-title { font-size: 2.8rem; }
    .pill-badge { font-size: 0.75rem; padding: 4px 12px; }
    .btn-titanium-glow { width: 100%; padding: 14px 20px; font-size: 0.95rem; }
    .btn-glass-outline { width: 100%; padding: 14px 20px; justify-content: center; }
    .hero-visual-3d { margin-top: 40px; transform: scale(0.95); }
    
    .faq-grid-premium { grid-template-columns: 1fr; }

    .premium-cta-section { margin: 60px auto 30px; padding: 0 15px; }
    .cta-glass-box { padding: 40px 20px; }
    .cta-glass-box h2 { font-size: 2rem; }
    .cta-glass-box p { font-size: 1rem; }

    .main-footer-premium { padding: 0 15px 40px; margin-top: 60px; }
    .footer-glass-container { padding: 25px; }
    .footer-top-row { flex-direction: column; align-items: center; text-align: center; }
    .footer-social-pill { width: 100%; justify-content: center; }
    .footer-links-compact-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .link-group { align-items: center; }
    .link-group a { text-align: center; }
    .link-group a:hover { padding-left: 0; }
    .footer-link-btn { text-align: center; }
    .footer-link-btn:hover { padding-left: 0; }
    .footer-bottom-row { flex-direction: column; gap: 10px; text-align: center; }
    
    #feedback-popup { left: 20px; right: 20px; width: auto; bottom: 100px; }
}

@media (max-width: 480px) {
    .player-modal-card { border-radius: 20px 20px 0 0; margin-top: auto; }
    .pm-pane { padding: 18px 18px 22px; }
    .pm-tab span { display: none; }
    .pm-tab { padding: 14px 8px; }
    .pm-tab i { font-size: 1.1rem; }
    .player-modal-header { padding: 24px 18px 18px; }
    .h2h-sub-name { font-size: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .floating-orb, .cinematic-glow, .grid-floor { display: none; }
}

.stats-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .stats-top-grid { grid-template-columns: 1fr; }
}

.avatars span img { object-fit: cover; width: 100%; height: 100%; display: block; }