/* StudentAssist — Design System & Styles */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');
:root {
    /* Colors */
    --bg-deep: #0B0D14;
    --bg-sidebar: #0F1117;
    --bg-card: #13161F;
    --bg-input: #0B0D14;
    
    --text-primary: #E2E4EE;
    --text-secondary: #9CA3AF;
    --text-muted: #4B5563;
    
    --accent-primary: #818CF8;
    --accent-primary-hover: #A5B4FC;
    --accent-secondary: #6D28D9;
    --accent-success: #10B981;
    --accent-warning: #F59E0B;
    --accent-error: #EF4444;
    
    --border-color: #1E2130;
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Gradients */
    --grad-hero: linear-gradient(135deg, #312E81, #4C1D95);
    --grad-primary: linear-gradient(135deg, #4338CA, #6D28D9);
    --grad-surface: linear-gradient(135deg, #1E1B4B, #2E1065);
    
    /* Spacing & Radius */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;
    
    /* Fonts */
    --font-heading: 'Sora', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Base Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .font-heading { font-family: var(--font-heading); font-weight: 700; }
/* Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
}
/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}
.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}
.logo {
    font-size: 20px;
    font-weight: 800;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, #818CF8, #C084FC);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.user-snippet {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}
.user-snippet span { color: var(--accent-primary-hover); font-weight: 600; }
.nav-links {
    padding: 20px 12px;
    flex: 1;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}
.nav-item:hover {
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
}
.nav-item.active {
    background: linear-gradient(135deg, #312E81, #1E1B4B);
    color: #C4B5FD;
    border-color: rgba(67, 56, 202, 0.2);
}
.nav-item i { font-size: 18px; }
.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-color);
}
/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    min-height: 100vh;
    position: relative;
}
.content-section {
    max-width: 1200px;
    margin: 0 auto;
}
/* Hero Bar */
.hero-bar {
    background: var(--grad-hero);
    border-radius: var(--radius-xl);
    padding: 32px 36px;
    margin-bottom: 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: fadeIn 0.5s ease-out;
}
.hero-bar h1 { font-size: 28px; margin-bottom: 6px; }
.hero-bar p { font-size: 14px; opacity: 0.8; }
/* Cards & Grid */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}
.stat-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); }
.stat-num { font-size: 32px; font-weight: 800; font-family: var(--font-heading); margin-bottom: 4px; }
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin: 2px;
}
.b-blue   { background: #172554; color: #93C5FD; border: 1px solid rgba(29, 78, 216, 0.2); }
.b-purple { background: #1E1B4B; color: #C4B5FD; border: 1px solid rgba(109, 40, 217, 0.2); }
.b-green  { background: #052E16; color: #6EE7B7; border: 1px solid rgba(22, 163, 74, 0.2); }
.b-red    { background: #1F0808; color: #FCA5A5; border: 1px solid rgba(220, 38, 38, 0.2); }
/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
}
.btn-primary {
    background: var(--grad-primary);
    color: white;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}
.btn-block { width: 100%; }
/* Inputs */
.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.input-field {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition);
}
.input-field:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.1);
}
/* Auth Screens */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-deep);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    animation: slideUp 0.4s ease-out;
}
/* Tabs */
.tabs-container { margin-top: 24px; }
.tabs-header {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}
.tab-btn {
    padding: 12px 20px;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}
/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
/* Boxes */
.tipbox { background: rgba(245, 158, 11, 0.05); border: 1px solid rgba(245, 158, 11, 0.2); border-radius: 10px; padding: 16px; font-size: 13px; color: var(--accent-warning); margin: 12px 0; }
.successbox { background: rgba(16, 185, 129, 0.05); border: 1px solid rgba(16, 185, 129, 0.2); border-radius: 10px; padding: 16px; font-size: 13px; color: var(--accent-success); margin: 12px 0; }
.errorbox { background: rgba(239, 68, 68, 0.05); border: 1px solid rgba(239, 68, 68, 0.2); border-radius: 10px; padding: 16px; font-size: 13px; color: var(--accent-error); margin: 12px 0; }
/* Steps */
.step { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: rgba(255,255,255,0.02); border-radius: 10px; border: 1px solid var(--border-color); margin-bottom: 10px; }
.step-num { background: var(--grad-primary); color: white; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
/* IFrame Container */
.iframe-container {
    width: 100%;
    height: 800px;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--bg-deep);
}
/* Utils */
.hidden { display: none !important; }
/* Arena / Duel Styles */
.arena { padding: var(--space-xl) 0; }
.arena-header { text-align: center; margin-bottom: var(--space-xl); }
.arena-header h1 { font-size: 2rem; }
.arena-header h1 span { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
/* Lobby */
.lobby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.lobby-section { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: var(--space-lg); }
.lobby-section h3 { margin-bottom: var(--space-md); }
.online-player { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md); border-radius: var(--radius-md); transition: background var(--transition-fast); }
.online-player:hover { background: var(--bg-elevated); }
.online-player .player-info { flex: 1; }
.online-player .player-name { font-weight: 600; font-size: 0.95rem; }
.online-player .player-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: var(--space-xs); }
/* Status Dot */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.online { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.status-dot.offline { background: #6b7280; }
/* Duel View */
.duel-view { display: none; }
.duel-view.active { display: block; }
.duel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-xl); padding: var(--space-lg); background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--glass-border); }
.player-side { display: flex; align-items: center; gap: var(--space-md); flex: 1; }
.player-side.right { flex-direction: row-reverse; text-align: right; }
.player-score { font-size: 2rem; font-weight: 800; font-family: var(--font-mono); }
.player-score.leading { color: var(--accent-success); }
.vs-divider { display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); padding: 0 var(--space-lg); }
.vs-text { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.round-counter { font-size: 0.75rem; color: var(--accent-primary); font-weight: 600; }
/* Word Display */
.word-display { text-align: center; margin-bottom: var(--space-xl); padding: var(--space-2xl); background: var(--bg-card); border-radius: var(--radius-xl); border: 1px solid var(--glass-border); position: relative; overflow: hidden; }
.word-display::before { content: ''; position: absolute; inset: 0; background: var(--gradient-primary); opacity: 0.03; }
.word-display .the-word { font-size: 2.5rem; font-weight: 800; margin-bottom: var(--space-sm); color: var(--text-primary); position: relative; }
.word-display .the-definition { font-size: 1rem; color: var(--text-secondary); position: relative; max-width: 500px; margin: 0 auto; }
.options-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); max-width: 600px; margin: 0 auto var(--space-xl); }
.option-btn {
    padding: var(--space-md) var(--space-lg); background: var(--bg-card); border: 2px solid var(--glass-border);
    border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.95rem; font-weight: 500;
    cursor: pointer; transition: all var(--transition-normal); text-align: left;
    display: flex; align-items: center; gap: var(--space-md); font-family: var(--font-primary);
}
.option-btn:hover { border-color: var(--accent-primary); background: rgba(99,102,241,0.05); transform: translateX(4px); }
.option-btn.selected { border-color: var(--accent-primary); background: rgba(99,102,241,0.1); }
.option-btn.correct { border-color: var(--accent-success); background: var(--accent-success-dim); }
.option-btn.wrong { border-color: var(--accent-danger); background: var(--accent-danger-dim); }
.option-btn .option-letter { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
/* Timer */
.timer-bar { max-width: 600px; margin: 0 auto var(--space-xl); }
.timer-bar .timer-track { width: 100%; height: 6px; background: var(--bg-elevated); border-radius: var(--radius-full); overflow: hidden; }
.timer-bar .timer-fill { height: 100%; background: var(--gradient-primary); border-radius: var(--radius-full); transition: width 0.1s linear; }
.timer-bar .timer-fill.warning { background: var(--gradient-warm); }
.timer-bar .timer-fill.danger { background: var(--gradient-danger); }
.timer-bar .timer-text { text-align: center; font-family: var(--font-mono); font-size: 1.2rem; font-weight: 700; margin-top: var(--space-sm); }
/* Power-ups */
.powerups-bar { display: flex; justify-content: center; gap: var(--space-md); margin-bottom: var(--space-xl); }
.powerup-btn {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: 10px 20px; background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius-full); cursor: pointer; font-family: var(--font-primary);
    font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
    transition: all var(--transition-normal);
}
.powerup-btn:hover:not(:disabled) { border-color: var(--accent-warning); color: var(--accent-warning); background: var(--accent-warning-dim); }
.powerup-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.powerup-btn .powerup-count { background: var(--accent-warning-dim); color: var(--accent-warning); padding: 2px 8px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; }
/* Fog overlay */
.fog-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(20px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease-out;
}
.fog-overlay .fog-text { font-size: 2rem; font-weight: 800; color: var(--accent-warning); animation: countPulse 1s ease-in-out infinite; }
/* Result Screen */
.duel-result { text-align: center; padding: var(--space-3xl) var(--space-xl); }
.duel-result .result-title { font-size: 2.5rem; font-weight: 900; margin-bottom: var(--space-md); }
.duel-result .result-title.win { background: var(--gradient-success); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.duel-result .result-title.lose { background: var(--gradient-danger); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.result-scores { display: flex; justify-content: center; gap: var(--space-3xl); margin: var(--space-xl) 0; }
.result-player { text-align: center; }
.result-player .result-score { font-size: 3rem; font-weight: 900; font-family: var(--font-mono); }
.result-player .result-name { font-size: 0.9rem; color: var(--text-muted); margin-top: var(--space-xs); }
.result-stats { display: flex; justify-content: center; gap: var(--space-xl); margin: var(--space-xl) 0; }
.result-stat { text-align: center; }
.result-stat .stat-val { font-size: 1.3rem; font-weight: 700; }
.result-stat .stat-lbl { font-size: 0.75rem; color: var(--text-muted); }
@media (max-width: 768px) {
    .lobby-grid { grid-template-columns: 1fr; }
    .duel-header { flex-direction: column; gap: var(--space-md); }
    .player-side.right { flex-direction: row; text-align: left; }
}
/* Creative Duel Styles */
.word-results-mini { background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--glass-border); max-height: 200px; overflow-y: auto; }
.word-result-item { padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--glass-border); cursor: pointer; transition: background 0.2s; }
.word-result-item:hover { background: var(--bg-elevated); }
.word-result-item:last-child { border-bottom: none; }
.check-container { display: flex; align-items: center; gap: var(--space-sm); position: relative; cursor: pointer; font-size: 0.9rem; user-select: none; }
.check-container input { opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark { height: 20px; width: 20px; background-color: var(--bg-elevated); border: 1px solid var(--glass-border); border-radius: 4px; display: inline-block; position: relative; }
.check-container:hover input ~ .checkmark { background-color: var(--glass-bg); }
.check-container input:checked ~ .checkmark { background-color: var(--accent-primary); border-color: var(--accent-primary); }
.checkmark:after { content: ""; position: absolute; display: none; left: 7px; top: 3px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check-container input:checked ~ .checkmark:after { display: block; }
/* VocabArena    Base Reset, Typography & Animations */
@import url('./variables.css');
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
body::before {
    content: '';
    position: fixed; inset: 0;
    background: var(--gradient-bg);
    pointer-events: none;
    z-index: 0;
}
a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-primary-hover); }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: 2.5rem; letter-spacing: -0.03em; }
h2 { font-size: 1.75rem; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { color: var(--text-secondary); }
code, .mono { font-family: var(--font-mono); }
/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
/* Selection */
::selection { background: rgba(99,102,241,0.3); color: var(--text-primary); }
/* Utility */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); position: relative; z-index: 1; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.text-center { text-align: center; }
.hidden { display: none !important; }
.relative { position: relative; }
/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,0.2); }
    50% { box-shadow: 0 0 40px rgba(99,102,241,0.4); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes countPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes flipIn {
    from { transform: rotateY(90deg); opacity: 0; }
    to { transform: rotateY(0); opacity: 1; }
}
.animate-fade { animation: fadeIn 0.5s ease-out forwards; }
.animate-slide { animation: slideUp 0.6s ease-out forwards; }
.animate-pulse-glow { animation: pulseGlow 2s ease-in-out infinite; }
/* VocabArena    Reusable Component Styles */
/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
}
.glass-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
}
/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
    padding: 12px 24px;
    border: none; border-radius: var(--radius-md);
    font-family: var(--font-primary); font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all var(--transition-normal);
    text-decoration: none; position: relative; overflow: hidden;
}
.btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    opacity: 0; transition: opacity var(--transition-fast);
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 25px rgba(99,102,241,0.5); transform: translateY(-1px); }
.btn-success {
    background: var(--gradient-success); color: white;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}
.btn-danger {
    background: var(--gradient-danger); color: white;
    box-shadow: 0 4px 15px rgba(239,68,68,0.3);
}
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}
.btn-ghost:hover { border-color: var(--accent-primary); color: var(--accent-primary); background: rgba(99,102,241,0.05); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-md); }
/* Inputs */
.input-group { display: flex; flex-direction: column; gap: var(--space-xs); }
.input-group label { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.input-field {
    width: 100%; padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary); font-size: 0.95rem;
    transition: all var(--transition-normal);
    outline: none;
}
.input-field::placeholder { color: var(--text-muted); }
.input-field:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
/* Select */
.select-field {
    appearance: none;
    background: var(--bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center;
    padding: 12px 40px 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary); font-size: 0.95rem;
    cursor: pointer; outline: none;
    transition: all var(--transition-normal);
}
.select-field:focus { border-color: var(--accent-primary); }
/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-primary { background: rgba(99,102,241,0.15); color: var(--accent-primary); }
.badge-success { background: var(--accent-success-dim); color: var(--accent-success); }
.badge-warning { background: var(--accent-warning-dim); color: var(--accent-warning); }
.badge-danger { background: var(--accent-danger-dim); color: var(--accent-danger); }
/* Online Status Dot */
.status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot.online { background: var(--accent-success); box-shadow: 0 0 8px var(--accent-success); }
.status-dot.offline { background: var(--text-muted); }
.status-dot.in-game { background: var(--accent-warning); box-shadow: 0 0 8px var(--accent-warning); }
/* Progress Bar */
.progress-bar {
    width: 100%; height: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}
.progress-bar .progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.progress-bar .progress-fill::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}
/* Avatar */
.avatar {
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; color: white;
    position: relative; flex-shrink: 0;
}
.avatar.lg { width: 64px; height: 64px; font-size: 1.5rem; }
.avatar .status-indicator {
    position: absolute; bottom: -1px; right: -1px;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}
/* Modal */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 480px; width: 90%;
    animation: slideUp 0.3s ease-out;
}
.modal h3 { margin-bottom: var(--space-md); }
/* Toast */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: var(--space-sm); }
.toast {
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease-out;
    display: flex; align-items: center; gap: var(--space-sm);
    max-width: 360px;
}
.toast.success { border-left: 3px solid var(--accent-success); }
.toast.error { border-left: 3px solid var(--accent-danger); }
.toast.info { border-left: 3px solid var(--accent-info); }
/* Confidence Slider */
.confidence-slider {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 8px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--accent-danger), var(--accent-warning), var(--accent-success));
    outline: none;
    transition: opacity var(--transition-fast);
}
.confidence-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform var(--transition-fast);
}
.confidence-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
/* Spinner */
.spinner {
    width: 24px; height: 24px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
/* Navbar */
.navbar {
    position: sticky; top: 0;
    background: rgba(6,10,19,0.8);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    padding: var(--space-md) var(--space-lg);
    z-index: 100;
}
.navbar .nav-content {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
}
.navbar .logo {
    font-size: 1.3rem; font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.navbar .nav-links { display: flex; align-items: center; gap: var(--space-lg); }
.navbar .nav-links a {
    color: var(--text-secondary); font-weight: 500; font-size: 0.9rem;
    transition: color var(--transition-fast);
    position: relative;
}
.navbar .nav-links a:hover, .navbar .nav-links a.active { color: var(--text-primary); }
.navbar .nav-links a.active::after {
    content: ''; position: absolute; bottom: -6px; left: 0; right: 0;
    height: 2px; background: var(--gradient-primary); border-radius: 1px;
}
/* Stats Card */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex; flex-direction: column; gap: var(--space-xs);
    transition: all var(--transition-normal);
}
.stat-card:hover { border-color: var(--glass-border-hover); transform: translateY(-2px); }
.stat-card .stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; }
.stat-card .stat-change { font-size: 0.8rem; display: flex; align-items: center; gap: 4px; }
.stat-card .stat-change.positive { color: var(--accent-success); }
.stat-card .stat-change.negative { color: var(--accent-danger); }
/* Dashboard Styles */
.dashboard { padding: var(--space-xl) 0; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-xl); }
.welcome h1 { font-size: 2rem; }
.welcome h1 span { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.welcome p { color: var(--text-muted); margin-top: 4px; }
.xp-section { display: flex; align-items: center; gap: var(--space-md); }
.level-badge {
    width: 48px; height: 48px; border-radius: var(--radius-full);
    background: var(--gradient-primary); display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.1rem; color: white;
    box-shadow: var(--shadow-glow);
}
.xp-info { display: flex; flex-direction: column; gap: 4px; }
.xp-info .xp-text { font-size: 0.8rem; color: var(--text-muted); }
.xp-info .progress-bar { width: 150px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); margin-bottom: var(--space-xl); }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); margin-bottom: var(--space-xl); }
.action-card {
    background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
    padding: var(--space-xl); text-align: center; cursor: pointer;
    transition: all var(--transition-normal); text-decoration: none; display: block;
}
.action-card:hover { border-color: var(--accent-primary); transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.action-card .action-icon { font-size: 2.5rem; margin-bottom: var(--space-md); }
.action-card h3 { margin-bottom: var(--space-xs); color: var(--text-primary); }
.action-card p { font-size: 0.85rem; color: var(--text-muted); }
.dashboard-content { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-xl); }
.recent-activity h3, .online-friends h3 { margin-bottom: var(--space-md); color: var(--text-secondary); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.activity-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.activity-item {
    display: flex; align-items: center; gap: var(--space-md);
    padding: var(--space-md); background: var(--bg-card); border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}
.activity-item .activity-icon { font-size: 1.3rem; }
.activity-item .activity-text { flex: 1; font-size: 0.9rem; }
.activity-item .activity-time { font-size: 0.75rem; color: var(--text-muted); }
.friends-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.friend-item {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}
.friend-item:hover { background: var(--bg-card); }
.friend-info { flex: 1; }
.friend-info .friend-name { font-size: 0.9rem; font-weight: 500; }
.friend-info .friend-level { font-size: 0.75rem; color: var(--text-muted); }
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-actions { grid-template-columns: 1fr; }
    .dashboard-content { grid-template-columns: 1fr; }
}
/* Flash-Flow Styles */
.flashflow { padding: var(--space-xl) 0; max-width: 700px; margin: 0 auto; }
.flashflow-header { text-align: center; margin-bottom: var(--space-xl); }
.flashflow-header h1 span { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.session-stats { display: flex; justify-content: center; gap: var(--space-xl); margin-bottom: var(--space-xl); }
.session-stat { text-align: center; }
.session-stat .s-value { font-size: 1.5rem; font-weight: 800; font-family: var(--font-mono); }
.session-stat .s-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
/* Flashcard */
.flashcard-container { perspective: 1000px; margin-bottom: var(--space-xl); }
.flashcard {
    width: 100%; min-height: 320px; position: relative;
    transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.flashcard.flipped { transform: rotateY(180deg); }
.flashcard-face {
    position: absolute; inset: 0; backface-visibility: hidden;
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl); padding: var(--space-2xl);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; overflow: hidden;
}
.flashcard-face::before { content: ''; position: absolute; inset: 0; background: var(--gradient-primary); opacity: 0.02; }
.flashcard-back { transform: rotateY(180deg); }
.flashcard-word { font-size: 2.5rem; font-weight: 800; margin-bottom: var(--space-sm); position: relative; }
.flashcard-pos { font-size: 0.85rem; color: var(--accent-primary); font-style: italic; margin-bottom: var(--space-md); position: relative; }
.flashcard-hint { font-size: 0.9rem; color: var(--text-muted); position: relative; }
.flashcard-hint::before { content: 'x    '; }
.flashcard-definition { font-size: 1.2rem; font-weight: 500; margin-bottom: var(--space-md); line-height: 1.5; position: relative; }
.flashcard-etymology { font-size: 0.85rem; color: var(--accent-primary); margin-bottom: var(--space-md); font-style: italic; position: relative; }
.flashcard-etymology::before { content: 'x a Etymology: '; font-style: normal; }
.flashcard-details { font-size: 0.9rem; margin-bottom: var(--space-md); position: relative; width: 100%; display: flex; flex-direction: column; gap: var(--space-xs); text-align:left;}
.flashcard-detail-row { display: none; }
.flashcard-detail-row strong { color: var(--accent-primary); font-weight: 600; margin-right: var(--space-xs); }
.flashcard-example { font-size: 0.9rem; color: var(--text-secondary); font-style: italic; padding: var(--space-md) var(--space-md) var(--space-md) var(--space-xl); background: var(--bg-elevated); border-radius: var(--radius-md); position: relative; max-width: 100%; margin-top: var(--space-xs); text-align:left;}
.flashcard-example::before { content: '"'; font-size: 1.5rem; color: var(--accent-primary); position:absolute; left: var(--space-sm); top: var(--space-xs);}
/* Options after flip */
.flashcard-options { display: grid; grid-template-columns: 1fr; gap: var(--space-sm); width: 100%; margin-top: var(--space-md); }
/* Confidence Section */
.confidence-section {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg); padding: var(--space-lg);
    margin-bottom: var(--space-md);
}
.confidence-section h4 { margin-bottom: var(--space-md); text-align: center; }
.confidence-labels { display: flex; justify-content: space-between; margin-top: var(--space-sm); }
.confidence-labels span { font-size: 0.75rem; color: var(--text-muted); }
.confidence-value { text-align: center; font-size: 1.5rem; font-weight: 800; margin-top: var(--space-sm); font-family: var(--font-mono); transition: color var(--transition-fast); }
/* Review Buttons */
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
/* Progress Ring */
.progress-ring-container { display: flex; justify-content: center; margin-bottom: var(--space-lg); }
.progress-ring-bg, .progress-ring-fill { transform: none; }
.progress-ring-bg { fill: none; stroke: var(--bg-elevated); }
.progress-ring-fill { fill: none; stroke: url(#progressGradient); stroke-linecap: round; transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.progress-ring-text { font-size: 1.5rem; font-weight: 800; fill: var(--text-primary); font-family: var(--font-mono); }
.progress-ring-label { font-size: 0.6rem; fill: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
/* Empty state */
.empty-state { text-align: center; padding: var(--space-3xl); }
.empty-state .empty-icon { font-size: 4rem; margin-bottom: var(--space-md); }
.empty-state h3 { margin-bottom: var(--space-sm); }
.empty-state p { color: var(--text-muted); margin-bottom: var(--space-lg); }
/* Profile Styles */
.profile-page { padding: var(--space-xl) 0; }
.profile-header { display: flex; align-items: center; gap: var(--space-xl); margin-bottom: var(--space-xl); padding: var(--space-xl); background: var(--bg-card); border-radius: var(--radius-xl); border: 1px solid var(--glass-border); }
.profile-avatar { width: 80px; height: 80px; border-radius: var(--radius-full); background: var(--gradient-primary); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: white; }
.profile-info { flex: 1; }
.profile-info h2 { margin-bottom: 4px; }
.profile-info .profile-track { font-size: 0.9rem; color: var(--accent-primary); }
.profile-info .profile-theta { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; font-family: var(--font-mono); }
.profile-xp { text-align: right; }
.profile-xp .level-display { font-size: 2rem; font-weight: 900; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.profile-xp .xp-display { font-size: 0.85rem; color: var(--text-muted); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.profile-section { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: var(--space-lg); }
.profile-section h3 { margin-bottom: var(--space-lg); color: var(--text-secondary); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
/* Charts */
.radar-container { display: flex; justify-content: center; align-items: center; min-height: 300px; }
.chart-container { position: relative; height: 300px; width: 100%; margin-top: var(--space-md); }
/* Duel History */
.history-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.history-item { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md); background: var(--bg-elevated); border-radius: var(--radius-md); }
.history-result { width: 50px; height: 50px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.75rem; text-transform: uppercase; }
.history-result.win { background: var(--accent-success-dim); color: var(--accent-success); }
.history-result.loss { background: var(--accent-danger-dim); color: var(--accent-danger); }
.history-result.draw { background: var(--accent-warning-dim); color: var(--accent-warning); }
.history-details { flex: 1; }
.history-details .opponent-name { font-weight: 600; font-size: 0.9rem; }
.history-details .match-score { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }
.history-date { font-size: 0.75rem; color: var(--text-muted); }
/* Leaderboard */
.leaderboard-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.leaderboard-item { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md); border-radius: var(--radius-md); transition: background var(--transition-fast); }
.leaderboard-item:hover { background: var(--bg-elevated); }
.leaderboard-rank { width: 32px; font-weight: 800; font-family: var(--font-mono); color: var(--text-muted); text-align: center; }
.leaderboard-rank.top { color: var(--accent-warning); font-size: 1.1rem; }
.leaderboard-item .lb-info { flex: 1; }
.leaderboard-item .lb-name { font-weight: 600; font-size: 0.9rem; }
.leaderboard-item .lb-track { font-size: 0.75rem; color: var(--text-muted); }
.leaderboard-item .lb-xp { font-weight: 700; font-family: var(--font-mono); color: var(--accent-primary); }
/* Friend management */
.add-friend-form { display: flex; gap: var(--space-sm); margin-bottom: var(--space-md); }
.add-friend-form .input-field { flex: 1; }
@media (max-width: 768px) {
    .profile-grid { grid-template-columns: 1fr; }
    .profile-header { flex-direction: column; text-align: center; }
    .profile-xp { text-align: center; }
}
/* Test Mode Styles */
.test-page { padding: var(--space-xl) 0; max-width: 750px; margin: 0 auto; }
.test-header { text-align: center; margin-bottom: var(--space-xl); }
.test-header h1 span { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.test-header .test-subtitle { color: var(--text-muted); margin-top: 4px; }
/* Question Type Badge */
.q-type-badge {
    display: inline-block; padding: 4px 14px; border-radius: var(--radius-full);
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: var(--space-md);
}
.q-type-badge.synonym { background: rgba(99,102,241,0.15); color: #818cf8; }
.q-type-badge.antonym { background: rgba(239,68,68,0.15); color: #f87171; }
.q-type-badge.fill_blank { background: rgba(34,197,94,0.15); color: #4ade80; }
.q-type-badge.correct_usage { background: rgba(251,191,36,0.15); color: #fbbf24; }
.q-type-badge.one_word_sub { background: rgba(168,85,247,0.15); color: #c084fc; }
.q-type-badge.contextual { background: rgba(6,182,212,0.15); color: #22d3ee; }
/* Question Card */
.question-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl); padding: var(--space-xl) var(--space-2xl);
    margin-bottom: var(--space-lg); position: relative; overflow: hidden;
    animation: slideUp 0.4s ease-out;
}
.question-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-primary); }
.question-number { font-size: 0.8rem; color: var(--text-muted); margin-bottom: var(--space-sm); font-family: var(--font-mono); }
.question-prompt {
    font-size: 1.15rem; font-weight: 500; line-height: 1.6;
    color: var(--text-primary); margin-bottom: var(--space-lg);
    white-space: pre-line;
}
.question-prompt strong { color: var(--accent-primary); font-weight: 700; }
.question-prompt em { color: var(--text-secondary); font-style: italic; }
/* Options */
.test-options { display: flex; flex-direction: column; gap: var(--space-sm); }
.test-option {
    display: flex; align-items: flex-start; gap: var(--space-md);
    padding: var(--space-md) var(--space-lg); border: 2px solid var(--glass-border);
    border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-normal);
    background: transparent; color: var(--text-primary); font-size: 0.95rem;
    font-family: var(--font-primary); text-align: left; line-height: 1.5; width: 100%;
}
.test-option:hover:not(.locked) { border-color: var(--accent-primary); background: rgba(99,102,241,0.04); transform: translateX(4px); }
.test-option.selected { border-color: var(--accent-primary); background: rgba(99,102,241,0.08); }
.test-option.correct { border-color: var(--accent-success); background: var(--accent-success-dim); }
.test-option.wrong { border-color: var(--accent-danger); background: var(--accent-danger-dim); }
.test-option.locked { cursor: default; opacity: 0.7; }
.test-option.correct.locked, .test-option.wrong.locked { opacity: 1; }
.option-key {
    width: 30px; height: 30px; border-radius: var(--radius-sm);
    background: var(--bg-elevated); display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem; flex-shrink: 0; margin-top: 2px;
}
.test-option.correct .option-key { background: var(--accent-success); color: white; }
.test-option.wrong .option-key { background: var(--accent-danger); color: white; }
/* Explanation */
.explanation-box {
    margin-top: var(--space-md); padding: var(--space-md) var(--space-lg);
    background: var(--bg-elevated); border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-primary);
    font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5;
    animation: fadeIn 0.3s ease-out;
}
.explanation-box .exp-label { font-weight: 700; color: var(--accent-primary); margin-bottom: 4px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
/* Progress Bar */
.test-progress { margin-bottom: var(--space-xl); }
.test-progress-bar {
    width: 100%; height: 8px; background: var(--bg-elevated);
    border-radius: var(--radius-full); overflow: hidden;
}
.test-progress-fill {
    height: 100%; background: var(--gradient-primary); border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.test-progress-text { display: flex; justify-content: space-between; margin-top: var(--space-xs); font-size: 0.8rem; color: var(--text-muted); }
/* Timer per question */
.q-timer { display: flex; align-items: center; gap: var(--space-sm); font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); }
.q-timer-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-success); animation: countPulse 1s ease-in-out infinite; }
.q-timer.slow .q-timer-dot { background: var(--accent-warning); }
.q-timer.expired .q-timer-dot { background: var(--accent-danger); animation: none; }
/* Next Button */
.test-next-bar { display: flex; justify-content: flex-end; margin-top: var(--space-lg); }
/* Result Screen */
.test-result { text-align: center; padding: var(--space-2xl); animation: slideUp 0.5s ease-out; }
.test-result h2 { font-size: 2rem; font-weight: 900; margin-bottom: var(--space-sm); }
.test-result h2.great { background: var(--gradient-success); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.test-result h2.good { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.test-result h2.needs-work { background: var(--gradient-warm); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); margin: var(--space-xl) 0; }
.result-grid .stat-card { text-align: center; }
.result-actions { display: flex; gap: var(--space-md); justify-content: center; margin-top: var(--space-lg); }
.wrong-words { text-align: left; margin-top: var(--space-xl); }
.wrong-words h4 { margin-bottom: var(--space-md); color: var(--text-secondary); }
.wrong-word-item {
    display: flex; align-items: center; gap: var(--space-md);
    padding: var(--space-md); background: var(--bg-card); border-radius: var(--radius-md);
    border: 1px solid var(--glass-border); margin-bottom: var(--space-sm);
}
.wrong-word-item .ww-word { font-weight: 700; min-width: 120px; color: var(--accent-primary); }
.wrong-word-item .ww-def { font-size: 0.9rem; color: var(--text-secondary); }
/* Nav actions */
.card-nav-actions {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: var(--space-lg); padding: 0 var(--space-sm);
}
.card-counter { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-muted); }
.test-cta { margin-top: var(--space-xl); }
.test-cta-inner {
    text-align: center; padding: var(--space-lg);
    background: var(--bg-card); border: 1px dashed var(--accent-success);
    border-radius: var(--radius-lg);
}
.test-cta-inner p { color: var(--text-muted); margin-bottom: var(--space-md); }
/* Confidence slider update */
.confidence-slider {
    width: 100%; -webkit-appearance: none; appearance: none;
    height: 8px; border-radius: 4px; background: var(--bg-elevated);
    outline: none;
}
.confidence-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--accent-primary); cursor: pointer;
    box-shadow: 0 0 8px rgba(99,102,241,0.4);
}
/* VocabArena Design Tokens    Premium Dark Fintech Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');
:root {
    /* Background Palette */
    --bg-primary: #060a13;
    --bg-secondary: #0d1321;
    --bg-card: #141b2d;
    --bg-card-hover: #1a2340;
    --bg-elevated: #1e293b;
    --bg-input: #0f172a;
    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-primary-hover: #818cf8;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-success-dim: rgba(16, 185, 129, 0.15);
    --accent-warning: #f59e0b;
    --accent-warning-dim: rgba(245, 158, 11, 0.15);
    --accent-danger: #ef4444;
    --accent-danger-dim: rgba(239, 68, 68, 0.15);
    --accent-info: #06b6d4;
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-success: linear-gradient(135deg, #10b981, #34d399);
    --gradient-danger: linear-gradient(135deg, #ef4444, #f87171);
    --gradient-warm: linear-gradient(135deg, #f59e0b, #fbbf24);
    --gradient-bg: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.08) 0%, transparent 50%),
                   radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.06) 0%, transparent 50%);
    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #a5b4fc;
    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-blur: blur(20px);
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.2);
    --shadow-glow-success: 0 0 30px rgba(16, 185, 129, 0.2);
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
