/* ============================================
   DALE-TAINMENT - PROFESSIONAL UI
   No Emoji, No Over Action, Clean & Minimal
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Core Colors */
    --bg-primary: #0A0A0F;
    --bg-secondary: #14141E;
    --bg-card: #1A1A2E;
    --bg-card-hover: #222240;
    --bg-input: #0F0F1A;
    
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0B8;
    --text-muted: #6B6B85;
    
    /* Brand - Clean Purple */
    --brand: #7C3AED;
    --brand-light: #A78BFA;
    --brand-dark: #5B21B6;
    --brand-glow: rgba(124, 58, 237, 0.15);
    
    /* Accent - Clean Blue */
    --accent: #3B82F6;
    --accent-light: #60A5FA;
    
    /* Semantic */
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    
    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-focus: rgba(124, 58, 237, 0.4);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.1);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Transitions */
    --transition: 0.2s ease;
}

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

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: var(--font);
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

input, textarea, select {
    font-family: var(--font);
    outline: none;
    background: none;
    border: none;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px) saturate(1.8);
    -webkit-backdrop-filter: blur(16px) saturate(1.8);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    height: 68px;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.nav-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.125rem;
    letter-spacing: -0.3px;
}

.logo-accent {
    color: var(--brand);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.btn-login {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.btn-signup {
    color: white !important;
    background: var(--brand) !important;
}

.btn-signup:hover {
    background: var(--brand-light) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--brand);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--brand-light);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-ghost {
    padding: 8px 16px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    position: relative;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--brand-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
}

.hero-content h1 .highlight {
    color: var(--brand);
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 440px;
    margin-bottom: 28px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 28px;
}

.hero-stats .stat {
    display: flex;
    flex-direction: column;
}

.hero-stats .stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-stats .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-placeholder {
    width: 320px;
    height: 320px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    font-weight: 100;
    color: var(--text-muted);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 56px;
}

.section-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--brand-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.section-header h2 .highlight {
    color: var(--brand);
}

.section-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   FEATURES
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.feature-card {
    background: var(--bg-card);
    padding: 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.feature-card .icon {
    font-size: 1.75rem;
    margin-bottom: 12px;
    display: block;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   SUBJECTS
   ============================================ */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.subject-card {
    background: var(--bg-card);
    padding: 28px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.subject-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.subject-card .icon {
    font-size: 2.25rem;
    margin-bottom: 10px;
    display: block;
}

.subject-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.subject-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.subject-badge {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--brand-light);
}

/* ============================================
   AUTH
   ============================================ */
.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    margin: 40px auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.auth-container {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 24px;
}

.auth-logo .accent {
    color: var(--brand);
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-form {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
}

.forgot-link {
    color: var(--text-secondary);
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--text-primary);
}

.btn-submit {
    padding: 12px;
    background: var(--brand);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    margin-top: 6px;
}

.btn-submit:hover {
    background: var(--brand-light);
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--brand);
    font-weight: 500;
}

.auth-footer a:hover {
    color: var(--brand-light);
}

.auth-error {
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: var(--error);
    font-size: 0.85rem;
    display: none;
}

.auth-side {
    background: var(--brand);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.auth-side h3 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.auth-side p {
    opacity: 0.9;
    margin-bottom: 24px;
}

.auth-side .benefits {
    list-style: none;
    font-size: 0.9rem;
    line-height: 2.4;
}

.auth-side .benefits li::before {
    content: '— ';
    opacity: 0.6;
}

/* Subject Checkboxes */
.subject-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.subject-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.subject-checkbox:hover {
    border-color: var(--border-hover);
}

.subject-checkbox.selected {
    border-color: var(--brand);
    background: rgba(124, 58, 237, 0.06);
}

.subject-checkbox input[type="checkbox"] {
    display: none;
}

.subject-checkbox .label {
    font-size: 0.85rem;
}

.subject-checkbox .level {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 220px;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.sidebar-header .logo {
    font-size: 1rem;
}

.sidebar-user {
    text-align: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.sidebar-user .avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto 6px;
    color: white;
}

.sidebar-user .name {
    font-weight: 600;
    font-size: 0.875rem;
}

.sidebar-user .level {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8rem;
    transition: var(--transition);
}

.sidebar-nav a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav a.active {
    color: white;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.sidebar-nav .nav-icon {
    width: 20px;
    font-size: 1rem;
    text-align: center;
}

.sidebar-nav .logout {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    color: var(--text-muted);
}

.sidebar-nav .logout:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.06);
}

.main-content {
    margin-left: 220px;
    padding: 28px 32px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.dashboard-header .greeting {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.dashboard-header .greeting span {
    color: white;
    font-weight: 600;
}

.sidebar-toggle {
    display: none;
    font-size: 1.25rem;
    padding: 4px 8px;
    color: var(--text-secondary);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    padding: 18px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
}

.stat-card .icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.08);
    border-radius: var(--radius-sm);
    font-size: 1.125rem;
}

.stat-card .info .value {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.stat-card .info .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.action-item {
    padding: 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.action-item:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}

.action-item .icon {
    font-size: 1.25rem;
    display: block;
    margin-bottom: 4px;
}

.action-item .name {
    font-weight: 500;
    font-size: 0.8rem;
}

.action-item .sub {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Activity */
.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

.activity-item .icon {
    font-size: 1rem;
}

.activity-item .content {
    flex: 1;
}

.activity-item .content .title {
    font-weight: 500;
    font-size: 0.85rem;
}

.activity-item .content .meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.activity-item .score {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--brand-light);
}

/* ============================================
   QUIZ
   ============================================ */
.quiz-container {
    background: var(--bg-card);
    padding: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.quiz-timer {
    font-weight: 600;
    color: var(--brand-light);
    font-size: 1rem;
}

.progress {
    width: 100%;
    height: 3px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 20px;
}

.progress .fill {
    height: 100%;
    background: var(--brand);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

.question .meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.question .text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 18px;
    line-height: 1.7;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.option:hover {
    border-color: var(--border-hover);
}

.option.selected {
    border-color: var(--brand);
    background: rgba(124, 58, 237, 0.06);
}

.option .letter {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.option.selected .letter {
    background: var(--brand);
    color: white;
}

.option .text {
    flex: 1;
    font-size: 0.9rem;
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 12px;
}

.quiz-controls button {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-prev {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-prev:hover:not(:disabled) {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-prev:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-next {
    background: var(--brand);
    color: white;
}

.btn-next:hover {
    background: var(--brand-light);
}

/* Results */
.results {
    text-align: center;
    padding: 28px;
}

.results .icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
}

.results h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.results .subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 420px;
    margin: 0 auto 24px;
}

.results-stats .stat {
    padding: 14px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.results-stats .stat .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-light);
}

.results-stats .stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.results-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.results-actions button {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-retry {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-retry:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-dashboard {
    background: var(--brand);
    color: white;
}

.btn-dashboard:hover {
    background: var(--brand-light);
}

/* ============================================
   FLASHCARDS
   ============================================ */
.flashcard-container {
    background: var(--bg-card);
    padding: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.flashcard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.flashcard-controls button {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.75rem;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.flashcard-controls button:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.flashcard {
    max-width: 480px;
    margin: 0 auto;
    height: 260px;
    cursor: pointer;
    perspective: 1000px;
}

.flashcard .inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flashcard.flipped .inner {
    transform: rotateY(180deg);
}

.flashcard .front,
.flashcard .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-md);
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.flashcard .front {
    background: var(--brand);
    color: white;
}

.flashcard .back {
    background: var(--bg-input);
    color: white;
    transform: rotateY(180deg);
    border: 1px solid var(--border);
}

.flashcard .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.5;
    margin-bottom: 6px;
}

.flashcard .front .term {
    font-size: 1.5rem;
    font-weight: 700;
}

.flashcard .back .definition {
    font-size: 1.1rem;
    line-height: 1.6;
}

.flashcard .back .example {
    margin-top: 10px;
    padding: 8px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.flashcard-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.flashcard-nav button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: var(--transition);
}

.flashcard-nav button:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.flashcard-nav .btn-flip {
    background: var(--brand);
    color: white;
    border: none;
}

.flashcard-nav .btn-flip:hover {
    background: var(--brand-light);
}

/* ============================================
   NOTES
   ============================================ */
.notes-container {
    background: var(--bg-card);
    padding: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.subject-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.subject-tab {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.8rem;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.subject-tab:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.subject-tab.active {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.note-card {
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

.note-card:hover {
    border-color: var(--border-hover);
}

.note-card .title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.note-card .preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-card .topic {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ============================================
   PROFILE
   ============================================ */
.profile-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.profile-info h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.profile-info .username {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.profile-info .email {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.profile-stats {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.profile-stats .stat .value {
    font-weight: 700;
    font-size: 1rem;
}

.profile-stats .stat .label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.profile-edit,
.profile-password,
.profile-subjects {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.profile-edit h3,
.profile-password h3,
.profile-subjects h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.btn-save {
    padding: 10px 24px;
    background: var(--brand);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
    margin-top: 4px;
}

.btn-save:hover {
    background: var(--brand-light);
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-md);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-content .meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.footer-brand .logo {
    font-size: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 8px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.footer-links h4 {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.footer-links a {
    display: block;
    padding: 4px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   TOPICS / SELECTION
   ============================================ */
.selection-container {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.selection-container h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.topic-card {
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.topic-card:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.02);
}

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

.topic-card .meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.btn-start {
    margin-top: 8px;
    padding: 4px 16px;
    background: var(--brand);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.7rem;
    transition: var(--transition);
}

.btn-start:hover {
    background: var(--brand-light);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content p {
        margin: 0 auto;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .auth-wrapper {
        grid-template-columns: 1fr;
        max-width: 440px;
        margin: 20px;
    }
    
    .auth-side {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        gap: 4px;
    }
    
    .nav-links.open {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 14px 16px;
    }
    
    .action-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
    }
    
    .quiz-controls {
        flex-direction: column;
    }
    
    .quiz-controls button {
        width: 100%;
    }
    
    .flashcard {
        height: 200px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .subject-checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-card {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .hero-stats .stat-number {
        font-size: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-container {
        padding: 24px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
