:root {
    --bg-base: #0f0c29; --neon-purple: #c026d3; --neon-cyan: #06b6d4;   
    --glass-bg: rgba(20, 20, 40, 0.45); --glass-border: rgba(255, 255, 255, 0.1);
    --text-white: #ffffff; --text-gray: #9ca3af; --success: #10b981; --danger: #ef4444;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg-base); color: var(--text-white); display: flex; justify-content: center; min-height: 100vh; overflow-x: hidden; }

.blob { position: absolute; border-radius: 50%; filter: blur(80px); z-index: -1; opacity: 0.6; animation: float 10s infinite ease-in-out alternate; }
.blob-1 { top: -50px; left: -50px; width: 300px; height: 300px; background: var(--neon-purple); }
.blob-2 { bottom: 100px; right: -50px; width: 250px; height: 250px; background: var(--neon-cyan); animation-delay: -5s; }
.blob-3 { top: 50%; left: 30%; width: 200px; height: 200px; background: #4f46e5; animation-duration: 15s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(20px, 40px) scale(1.1); } }

.text-gradient { background: linear-gradient(to right, #f87171, var(--neon-purple), var(--neon-cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.glass-panel { background: var(--glass-bg); backdrop-filter: blur(16px); border: 1px solid var(--glass-border); box-shadow: 0 8px 32px 0 rgba(0,0,0,0.3); }
.glass-panel-main { background: rgba(10, 10, 25, 0.6); backdrop-filter: blur(25px); }

.app-container { width: 100%; max-width: 480px; min-height: 100vh; position: relative; border-left: 1px solid var(--glass-border); border-right: 1px solid var(--glass-border); overflow: hidden; }
.view { display: none; height: 100%; width: 100%; animation: fadeIn 0.4s ease forwards; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.hidden { display: none !important; }

/* ONBOARDING */
.onboarding-step { height: 100vh; display: none; flex-direction: column; justify-content: center; align-items: center; padding: 30px; text-align: center; animation: fadeIn 0.4s forwards; }
.onboarding-step.active { display: flex; }
.app-logo-large { font-size: 3.5rem; font-weight: 900; margin-bottom: 5px; } .app-logo-large i { margin-bottom: 10px; display: block; font-size: 4rem; }
.subtitle { color: var(--text-gray); font-size: 1.1rem; margin-bottom: 40px; font-weight: 300; }
.input-group { display: flex; align-items: center; width: 100%; padding: 15px 20px; border-radius: 50px; margin-bottom: 20px; }
.input-group i { color: var(--neon-cyan); margin-right: 15px; font-size: 1.2rem; } .input-group input { background: transparent; border: none; color: white; font-size: 1.1rem; width: 100%; outline: none; font-weight: 600; }
.btn-primary { background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan)); color: white; border: none; border-radius: 50px; padding: 18px 0; width: 100%; font-size: 1.2rem; font-weight: 800; display: flex; justify-content: center; align-items: center; gap: 10px; cursor: pointer; box-shadow: 0 10px 20px rgba(192,38,211,0.3); transition: 0.2s; }
.btn-primary:active { transform: scale(0.95); }
.target-options { display: flex; flex-direction: column; gap: 15px; width: 100%; } .target-btn { padding: 20px; font-size: 1.2rem; font-weight: 700; color: white; border-radius: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 15px; border: 1px solid var(--glass-border); transition: 0.3s; } .target-btn.active-target { border-color: var(--neon-purple); background: rgba(192,38,211,0.2); box-shadow: 0 0 20px rgba(192,38,211,0.3); }

/* MAIN UI */
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 20px; border-radius: 0 0 30px 30px; border-top: none; position: sticky; top: 0; z-index: 10; }
.greeting h2 { font-size: 1.8rem; font-weight: 800;} .greeting p { color: var(--neon-cyan); font-weight: 600; font-size: 0.9rem; margin-top: 4px; }
.profile-pic { width: 45px; height: 45px; border-radius: 50%; background: linear-gradient(135deg, var(--neon-cyan), #3b82f6); display: flex; justify-content: center; align-items: center; font-size: 1.5rem; }
.views-wrapper { padding: 24px 20px 100px 20px; } .tab-content { display: none; animation: fadeIn 0.3s ease; } .tab-content.active { display: block; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .section-title h3 { font-size: 1.4rem; font-weight: 600; } .badge { background: rgba(192,38,211,0.2); color: #f0abfc; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 800;}

/* Topics */
.subject-card { border-radius: 20px; margin-bottom: 16px; padding: 10px; transition: 0.3s; border-left: 4px solid var(--neon-purple); } .subject-card.is-ayt { border-left: 4px solid var(--neon-cyan); }
.subject-header { display: flex; justify-content: space-between; align-items: center; padding: 12px; cursor: pointer; } .subject-header h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 10px;} .subject-header i { color: rgba(255,255,255,0.7); } .subject-header p { font-size: 0.85rem; color: var(--text-gray); margin-top: 5px;}
.arrow-icon { transition: transform 0.3s; } .rotated { transform: rotate(180deg); }
.topic-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; margin: 10px; background: rgba(0,0,0,0.2); border-radius: 15px; border: 1px solid rgba(255,255,255,0.05); transition: 0.3s; }
.topic-info h4 { font-size: 0.95rem; font-weight: 500; transition: 0.3s; margin-bottom: 4px;} .topic-info p { font-size: 0.75rem; color: var(--text-gray); }
.topic-actions { display: flex; align-items: center; gap: 12px; }
.quiz-btn { background: rgba(6, 182, 212, 0.15); border: 1px solid var(--neon-cyan); color: var(--neon-cyan); padding: 6px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: 0.3s; } .quiz-btn:active { transform: scale(0.9); }
.check-btn { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #4b5563; display: flex; justify-content: center; align-items: center; color: transparent; cursor: pointer; transition: 0.3s; }
.topic-item.completed { border-color: var(--success); background: rgba(16, 185, 129, 0.1); } .topic-item.completed .check-btn { background: var(--success); border-color: var(--success); color: white; box-shadow: 0 0 15px var(--success); }

/* Bottom Nav */
.bottom-nav { position: fixed; bottom: 0; width: 100%; max-width: 480px; display: flex; justify-content: space-around; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--glass-border); border-radius: 30px 30px 0 0; }
.nav-item { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-gray); transition: 0.3s; } .nav-icon { font-size: 1.4rem; position: relative; transition: 0.3s; } .nav-item span { font-size: 0.75rem; font-weight: 600; } .nav-item.active { color: var(--text-white); } .nav-item.active .nav-icon { transform: translateY(-5px); color: var(--neon-cyan); text-shadow: 0 0 15px var(--neon-cyan); }
.indicator::after { content: ''; position: absolute; top: -2px; right: -5px; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; border: 2px solid var(--bg-base); }


/* QUIZ UI */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); z-index: 1000; display: flex; justify-content: center; align-items: center; padding: 20px; animation: fadeInModal 0.3s ease; }
@keyframes fadeInModal { from {opacity:0;} to {opacity:1;} }
.quiz-container { width: 100%; max-width: 440px; border-radius: 25px; padding: 25px; border: 1px solid var(--glass-border); box-shadow: 0 20px 60px rgba(0,0,0,0.5); position: relative; }
.quiz-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px;} .quiz-header-info h3 { font-size: 1.3rem; margin-top: 10px;}
.btn-close { background: rgba(255,255,255,0.1); border: none; color: white; width: 35px; height: 35px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.3s; } .btn-close:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }
.quiz-badge { display: inline-block; padding: 5px 10px; background: rgba(16,185,129,0.2); color: #6ee7b7; font-size: 0.75rem; border-radius: 10px; font-weight:800; margin-bottom: 10px; margin:0;}

.question-meta { color: var(--text-gray); font-size: 0.85rem; font-weight: 600; margin-bottom: 15px;}
.question-text { font-size: 1.2rem; line-height: 1.6; margin-bottom: 25px; color: #f3f4f6;}
.options { display: flex; flex-direction: column; gap: 12px; }
.opt-btn { background: rgba(255,255,255,0.05); border: 2px solid var(--glass-border); color: white; padding: 16px 20px; border-radius: 15px; font-size: 1rem; text-align: left; cursor: pointer; transition: 0.2s; font-weight: 500; }
.opt-btn:active { transform: scale(0.98); }
.opt-btn.correct { background: rgba(16, 185, 129, 0.2); border-color: var(--success); box-shadow: 0 0 15px rgba(16,185,129,0.3); }
.opt-btn.wrong { background: rgba(239, 68, 68, 0.2); border-color: var(--danger); box-shadow: 0 0 15px rgba(239,68,68,0.3);}

.btn-next { background: linear-gradient(135deg, var(--success), #059669); color: white; border: none; padding: 18px; border-radius: 15px; width: 100%; font-size: 1.1rem; font-weight: 800; margin-top: 25px; cursor: pointer; box-shadow: 0 5px 15px rgba(16,185,129,0.3); transition: 0.3s; display: flex; justify-content: center; align-items:center; gap: 10px; animation: fadeIn 0.3s forwards;}
.btn-next:active { transform: scale(0.95); }

/* Results Screen */
.results-screen { text-align: center; padding: 20px 0; animation: fadeIn 0.5s ease;}
.results-icon { font-size: 4rem; color: #fbbf24; text-shadow: 0 0 30px rgba(251,191,36,0.5); margin-bottom: 15px;}
.results-score { font-size: 2.5rem; font-weight: 900; background: linear-gradient(to right, #6ee7b7, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 15px;}
.results-msg { font-size: 1.1rem; color: #e5e7eb; margin-bottom: 30px; line-height: 1.5;}

.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-50px); background: rgba(20,20,30,0.95); backdrop-filter: blur(20px); border: 1px solid var(--neon-purple); padding: 16px 20px; border-radius: 20px; display: flex; align-items: center; gap: 16px; box-shadow: 0 10px 40px rgba(192,38,211,0.5); width: 90%; max-width: 400px; opacity: 0; pointer-events: none; transition: 0.5s; z-index: 2000; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); } .toast h4 { color: var(--neon-cyan); }
