@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

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

:root {
    --primary: #4F46E5;
    --primary-light: #6366F1;
    --primary-dark: #4338CA;
    --secondary: #059669;
    --accent: #F59E0B;
    --danger: #DC2626;
    --dark: #111827;
    --gray-900: #1F2937;
    --gray-800: #374151;
    --gray-700: #4B5563;
    --gray-600: #6B7280;
    --gray-500: #9CA3AF;
    --gray-400: #D1D5DB;
    --gray-300: #E5E7EB;
    --gray-200: #F3F4F6;
    --gray-100: #F9FAFB;
    --gray-50: #FAFBFC;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-cool: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    min-height: 100vh;
    line-height: 1.6;
}

.screen { display: none; }
.screen.active { display: block; }
.hidden { display: none !important; }

/* ==================== AUTH SCREEN ==================== */
#auth-screen {
    min-height: 100vh;
    background: url('../mascot/face-closeup.png') center 35% / cover no-repeat;
    background-color: #f5eef0;
    position: relative;
}

#auth-screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.auth-brand {
    font-family: 'DM Serif Display', serif;
    font-size: 3.8rem;
    font-weight: 400;
    color: #2d1b4e;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 30px rgba(255,255,255,0.9), 0 0 60px rgba(255,255,255,0.6);
    margin: 0 0 12px 0;
    z-index: 2;
    position: relative;
}

.auth-panel {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    padding: 36px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 8px 48px rgba(45, 27, 78, 0.12);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 340px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-subtitle {
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.auth-form {
    margin-bottom: 24px;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 1rem;
}

.input-group input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--gray-900);
    transition: all 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-group input::placeholder {
    color: var(--gray-500);
}

.switch-auth {
    text-align: center;
    margin-top: 20px;
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.switch-auth a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.switch-auth a:hover {
    text-decoration: underline;
}

.auth-divider {
    text-align: center;
    margin: 12px 0;
    position: relative;
    color: var(--gray-400);
    font-size: 0.8125rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--gray-200);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.google-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: white !important;
    color: var(--gray-700) !important;
    border: 1px solid var(--gray-200) !important;
    font-weight: 500;
}
.google-btn:hover {
    background: var(--gray-50) !important;
    border-color: var(--gray-300) !important;
}
.google-btn::before { display: none !important; }

.auth-help-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
}

.auth-help-links a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.85rem;
}

.auth-help-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.forgot-email-contact {
    text-align: center;
    padding: 20px;
    background: var(--gray-200);
    border-radius: 12px;
    margin-bottom: 15px;
}

.forgot-email-contact i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}

.forgot-email-contact p {
    color: var(--gray-700);
    font-size: 0.9rem;
}

.error-message {
    background: #FEE2E2;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 10px;
    margin-top: 16px;
    font-size: 0.875rem;
    border: 1px solid #FECACA;
}

.auth-features {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    font-size: 0.8125rem;
}

.feature i {
    font-size: 1.25rem;
    color: var(--primary);
}

/* ==================== BRAND SLOGANS ==================== */
.brand-slogan {
    text-align: center;
    font-style: italic;
    font-size: 0.7rem;
    color: var(--gray-500);
    opacity: 0.5;
    margin-top: 16px;
    letter-spacing: 0.5px;
}
.nav-tagline {
    display: block;
    font-size: 0.55rem;
    font-style: italic;
    color: var(--gray-500);
    opacity: 0.4;
    letter-spacing: 0.3px;
    margin-top: -2px;
}
.section-slogan {
    text-align: center;
    font-style: italic;
    font-size: 0.65rem;
    color: var(--gray-500);
    opacity: 0.35;
    padding: 24px 0 8px;
    letter-spacing: 0.5px;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn.primary {
    background: var(--gradient-primary);
    color: var(--white);
    width: 100%;
    padding: 14px 24px;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn.primary:hover::before {
    left: 100%;
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
}

.btn.secondary {
    background: var(--white);
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn.secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn.icon-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    background: transparent;
}

.btn.icon-btn:hover {
    background: var(--gray-100);
}

.btn.rating {
    flex: 1;
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 600;
}

.btn.rating.wrong {
    background: #FEE2E2;
    color: var(--danger);
    border: 1px solid #FECACA;
}

.btn.rating.wrong:hover {
    background: #FECACA;
}

.btn.rating.okay {
    background: #FEF3C7;
    color: #B45309;
    border: 1px solid #FDE68A;
}

.btn.rating.okay:hover {
    background: #FDE68A;
}

.btn.rating.easy {
    background: #D1FAE5;
    color: #047857;
    border: 1px solid #A7F3D0;
}

.btn.rating.easy:hover {
    background: #A7F3D0;
}

/* ==================== NAVBAR ==================== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-family: 'DM Serif Display', serif;
    font-size: 1.625rem;
    font-weight: 400;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-badge {
    background: var(--accent);
    color: var(--white);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: 12px;
}

.nav-link {
    color: var(--gray-600);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link i {
    font-size: 0.875rem;
}

.nav-link:hover {
    color: var(--gray-900);
    background: var(--white);
}

.nav-link.active {
    color: var(--primary);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.875rem;
}

#display-name {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.9375rem;
}

/* ==================== SECTIONS ==================== */
.section {
    display: none;
    position: relative;
    min-height: calc(100vh - 73px);
}

.section.active {
    display: block;
}

.section-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.section-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.08;
}

.section-content {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 48px 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.header-text h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.header-text p {
    color: var(--gray-600);
    font-size: 1rem;
}

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

.admin-container .section {
    min-height: auto;
}

/* ==================== FLASHCARD ==================== */
.flashcard {
    background: var(--white);
    border-radius: 24px;
    padding: 56px 48px;
    max-width: 620px;
    margin: 0 auto;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.15), 0 18px 36px -18px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
}

.flashcard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.card-inner {
    text-align: center;
}

.word-level {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.word-level i {
    font-size: 0.75rem;
}

.card-front .word,
.card-back .word {
    font-family: 'DM Serif Display', serif;
    font-size: 2.75rem;
    font-weight: 400;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.card-front .part-of-speech,
.card-back .part-of-speech {
    color: var(--gray-500);
    font-style: italic;
    margin-bottom: 32px;
    font-size: 1rem;
}

.card-back .part-of-speech {
    display: inline-block;
    background: var(--gray-100);
    padding: 4px 12px;
    border-radius: 4px;
    font-style: normal;
    font-size: 0.8125rem;
    margin-bottom: 20px;
}

.answer-content {
    text-align: left;
    margin-bottom: 32px;
}

.answer-content .word {
    text-align: center;
    margin-bottom: 4px;
}

.answer-content .part-of-speech {
    display: block;
    text-align: center;
}

.definition-box {
    background: var(--gray-50);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 0 10px 10px 0;
    margin: 20px 0;
}

.definition-box .definition {
    color: var(--gray-800);
    font-size: 1.0625rem;
    line-height: 1.7;
}

.tldr-box {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border: 1px solid #C7D2FE;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tldr-label {
    background: var(--gradient-primary);
    color: var(--white);
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.definition-simple {
    display: inline;
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: 600;
}

.korean {
    color: var(--primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.example-box {
    background: var(--gray-50);
    padding: 16px 20px;
    border-radius: 10px;
    position: relative;
}

.example-box i {
    color: var(--gray-400);
    font-size: 1rem;
    margin-bottom: 8px;
}

.example-box .example {
    color: var(--gray-600);
    font-size: 0.9375rem;
    line-height: 1.6;
}

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

.show-answer {
    margin-top: 32px;
}

.session-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 32px;
}

.session-stats .stat {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.session-stats .stat i {
    color: var(--primary);
}

.session-stats strong {
    color: var(--gray-900);
    font-weight: 700;
}

/* ==================== STATS GRID ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    padding: 28px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(79, 70, 229, 0.2);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: #EFF6FF;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.stat-icon.gold {
    background: #FEF3C7;
    color: #B45309;
}

.stat-icon.green {
    background: #D1FAE5;
    color: #047857;
}

.stat-icon.orange {
    background: #FFEDD5;
    color: #C2410C;
}

.stat-info h4 {
    color: var(--gray-500);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-number {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--gray-900);
}

/* ==================== LEVEL PROGRESS ==================== */
.level-progress {
    background: var(--white);
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.8);
}

.level-progress h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.level-progress h3 i {
    color: var(--primary);
}

.level-bar {
    margin-bottom: 20px;
}

.level-bar:last-child {
    margin-bottom: 0;
}

.level-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.level-bar-track {
    background: var(--gray-200);
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}

.level-bar-fill {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* ==================== LEADERBOARD ==================== */
.leaderboard-table {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.8);
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px;
    padding: 16px 24px;
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-500);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--gray-200);
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px;
    padding: 16px 24px;
    align-items: center;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s;
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-row:hover {
    background: var(--gray-50);
}

.leaderboard-row.current-user {
    background: #EFF6FF;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.875rem;
    background: var(--gray-100);
    color: var(--gray-600);
}

.rank-badge.gold {
    background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
    color: #78350F;
}

.rank-badge.silver {
    background: linear-gradient(135deg, #E5E7EB 0%, #9CA3AF 100%);
    color: #374151;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #FDBA74 0%, #EA580C 100%);
    color: #7C2D12;
}

/* ==================== DATA TABLES (ADMIN) ==================== */
.data-table {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.table-header,
.table-row {
    display: grid;
    padding: 14px 24px;
    align-items: center;
}

.table-header {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-500);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--gray-200);
}

.table-row {
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.table-row:hover {
    background: var(--gray-50);
}

.table-row strong {
    color: var(--gray-900);
}

.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    position: relative;
}

.search-input i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-input input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--white);
    color: var(--gray-900);
    transition: all 0.2s;
}

.search-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-bar select {
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
}

/* ==================== LEVEL SELECTOR ==================== */
.level-selector select {
    padding: 12px 20px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
}

.level-selector select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.375rem;
    font-weight: 400;
}

.modal-close {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--gray-500);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

#word-form {
    padding: 28px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-row .form-group.small {
    flex: 0 0 100px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--white);
    color: var(--gray-900);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.modal-buttons .btn {
    flex: 1;
}

/* ==================== QUIZ CARD ==================== */
/* Loading screen for AI inflection prep */
.quiz-loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}
.quiz-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary, #6366f1);
    border-radius: 50%;
    animation: quiz-spin 0.8s linear infinite;
}
@keyframes quiz-spin { to { transform: rotate(360deg); } }
.quiz-loading-text {
    color: #6b7280;
    font-size: 0.95rem;
}

.quiz-card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    padding-top: 46px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
    overflow: visible;
}

.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

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

.quiz-level {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.quiz-progress {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.quiz-sentence {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
}

.quiz-sentence p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--gray-800);
}

.quiz-sentence .blank {
    display: inline-block;
    min-width: 120px;
    border-bottom: 3px solid var(--primary);
    margin: 0 4px;
    color: var(--primary);
    font-weight: 600;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.quiz-option {
    padding: 16px 20px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-size: 1rem;
    font-family: inherit;
    color: var(--gray-800);
}

.quiz-option:hover {
    border-color: var(--primary-light);
    background: #F8FAFF;
}

.quiz-option.selected {
    border-color: var(--primary);
    background: #EEF2FF;
}

.quiz-option.correct {
    border-color: #10B981;
    background: #D1FAE5;
    color: #047857;
}

.quiz-option.incorrect {
    border-color: #EF4444;
    background: #FEE2E2;
    color: #B91C1C;
}

.quiz-option.correct-answer {
    border-color: #10B981;
    background: #D1FAE5;
}

.quiz-option:disabled {
    cursor: default;
}

.quiz-feedback {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border-radius: 16px;
    border: 1px solid #C7D2FE;
}

.feedback-word {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.feedback-word h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--gray-900);
    margin: 0;
}

.feedback-word span {
    background: var(--gray-200);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.feedback-definition {
    color: var(--gray-700);
    margin-bottom: 16px;
    line-height: 1.6;
}

/* Flashcard Actions */
.flashcard-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.flashcard-actions .btn {
    flex: 1;
}

.btn.mark-difficult {
    background: #FEF3C7;
    color: #B45309;
    border: 1px solid #FDE68A;
}

.btn.mark-difficult:hover {
    background: #FDE68A;
}

.btn.mark-difficult.marked {
    background: #F59E0B;
    color: white;
    border-color: #F59E0B;
}

/* ==================== NO REVIEWS ==================== */
.no-reviews {
    text-align: center;
    padding: 60px 40px;
    color: var(--gray-500);
}

.no-reviews i {
    font-size: 3.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
    display: block;
}

.no-reviews p {
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Review Card Styles */
.review-card-front,
.review-card-back {
    text-align: center;
}

.review-card-front .word,
.review-card-back .word {
    font-family: 'DM Serif Display', serif;
    font-size: 2.75rem;
    font-weight: 400;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.review-card-front .part-of-speech {
    color: var(--gray-500);
    font-style: italic;
    margin-bottom: 32px;
    font-size: 1rem;
}

.review-card-front .show-review-answer {
    margin-top: 24px;
}

.review-card-back .answer-content {
    text-align: left;
    margin-bottom: 32px;
}

.review-card-back .rating-buttons {
    display: flex;
    gap: 12px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .auth-brand {
        font-size: 2.8rem;
    }

    .auth-panel {
        width: 90vw;
        padding: 28px;
        border-radius: 20px;
    }

    .navbar {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .nav-links {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 4px 2px;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    .nav-link {
        padding: 8px 14px;
        font-size: 0.8125rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .nav-link i {
        font-size: 0.75rem;
    }

    .section-content {
        padding: 24px 16px;
    }

    .flashcard {
        padding: 32px 24px;
    }

    .card-front .word,
    .card-back .word {
        font-size: 2rem;
    }

    .rating-buttons {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 20px;
    }

    .leaderboard-header,
    .leaderboard-row {
        grid-template-columns: 60px 1fr 80px;
    }

    .leaderboard-header span:last-child,
    .leaderboard-row span:last-child {
        display: none;
    }

    .auth-features {
        flex-direction: column;
        gap: 16px;
    }

    .feature {
        flex-direction: row;
    }
}

/* ==================== STREAK FIRE EFFECT ==================== */
@keyframes fireGlow {
    0%, 100% {
        box-shadow:
            0 0 15px rgba(255, 107, 53, 0.7),
            0 0 30px rgba(255, 107, 53, 0.5),
            0 0 45px rgba(247, 147, 30, 0.3);
    }
    50% {
        box-shadow:
            0 0 20px rgba(255, 140, 66, 0.8),
            0 0 40px rgba(255, 204, 51, 0.6),
            0 0 60px rgba(255, 107, 53, 0.4);
    }
}

@keyframes borderGlow {
    0%, 100% { border-color: #ff6b35; }
    33% { border-color: #ff8c42; }
    66% { border-color: #ffcc33; }
}

.quiz-card.on-fire {
    animation: fireGlow 2s ease-in-out infinite;
    border: 3px solid #ff6b35 !important;
    position: relative;
    overflow: visible;
}

.quiz-card.on-fire::before,
.quiz-card.on-fire::after {
    display: none;
}

/* Streak indicator */
.streak-indicator {
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: streakPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

@keyframes streakPop {
    0% { transform: translateX(-50%) scale(0); opacity: 0; }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

.streak-flames {
    font-size: 20px;
    animation: flameWave 0.6s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.8));
}

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

.streak-count {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(180deg, #ffcc33 0%, #ff6b35 50%, #ff4500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    animation: countGlow 1s ease-in-out infinite;
}

@keyframes countGlow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(255, 107, 53, 0.8)); }
    50% { filter: drop-shadow(0 0 15px rgba(255, 204, 51, 1)); }
}

.streak-label {
    font-size: 11px;
    font-weight: 700;
    color: #ff6b35;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.8);
}

/* Fire particles */
.fire-particles {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.fire-particle {
    position: absolute;
    bottom: -10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffcc33 0%, #ff6b35 60%, transparent 70%);
    animation: particleRise linear infinite;
    opacity: 0;
}

.fire-particle:nth-child(odd) {
    width: 4px;
    height: 10px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: linear-gradient(to top, #ff4500, #ff6b35, #ffcc33);
}

@keyframes particleRise {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 0.9;
    }
    85% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) scale(0.2) rotate(30deg);
        opacity: 0;
    }
}

/* ==================== PLASMA EFFECT (10+ streak) ==================== */
@keyframes plasmaGlow {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(0, 150, 255, 0.8),
            0 0 40px rgba(100, 200, 255, 0.6),
            0 0 60px rgba(0, 100, 255, 0.4),
            inset 0 0 20px rgba(0, 150, 255, 0.1);
    }
    50% {
        box-shadow:
            0 0 30px rgba(100, 200, 255, 0.9),
            0 0 50px rgba(150, 220, 255, 0.7),
            0 0 80px rgba(0, 150, 255, 0.5),
            inset 0 0 30px rgba(100, 200, 255, 0.15);
    }
}

@keyframes electricBorder {
    0%, 100% { border-color: #00bfff; }
    25% { border-color: #00ffff; }
    50% { border-color: #87ceeb; }
    75% { border-color: #1e90ff; }
}

.quiz-card.on-plasma {
    animation: plasmaGlow 1.5s ease-in-out infinite, electricBorder 0.8s linear infinite;
    border: 3px solid #00bfff !important;
    position: relative;
    overflow: visible;
}

/* Plasma streak indicator */
.streak-indicator.plasma .streak-flames {
    filter: drop-shadow(0 0 10px rgba(0, 191, 255, 0.9));
    animation: electricFlash 0.3s ease-in-out infinite;
}

@keyframes electricFlash {
    0%, 100% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(-1px); }
}

.streak-indicator.plasma .streak-count {
    background: linear-gradient(180deg, #00ffff 0%, #00bfff 50%, #1e90ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: plasmaCountGlow 0.8s ease-in-out infinite;
}

@keyframes plasmaCountGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(0, 191, 255, 0.9)); }
    50% { filter: drop-shadow(0 0 20px rgba(135, 206, 235, 1)) drop-shadow(0 0 30px rgba(0, 255, 255, 0.8)); }
}

.streak-indicator.plasma .streak-label {
    color: #00bfff;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.9), 0 0 20px rgba(0, 255, 255, 0.5);
}

/* Plasma particles */
.fire-particles.plasma .fire-particle {
    background: radial-gradient(circle, #00ffff 0%, #00bfff 50%, transparent 70%);
}

.fire-particles.plasma .fire-particle:nth-child(odd) {
    background: linear-gradient(to top, #1e90ff, #00bfff, #00ffff);
    border-radius: 50%;
    width: 5px;
    height: 5px;
}

.fire-particles.plasma .fire-particle:nth-child(3n) {
    animation-duration: 0.6s;
    width: 3px;
    height: 8px;
}

/* ==================== CONFETTI EFFECT ==================== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confettiFall linear forwards;
}

.confetti:nth-child(odd) {
    width: 8px;
    height: 16px;
    border-radius: 2px;
}

.confetti:nth-child(even) {
    border-radius: 50%;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ==================== MODULE COMPLETE STYLES ==================== */
.module-complete .trophy-icon {
    font-size: 60px;
    margin-bottom: 16px;
    animation: trophyPop 0.6s ease-out;
}

@keyframes trophyPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.module-complete .encouragement {
    font-size: 1.1rem;
    color: var(--primary-light);
    margin: 12px 0;
    font-weight: 500;
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

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

/* ==================== QUIZ PROGRESS BAR (Duolingo-style) ==================== */

.quiz-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gray-200);
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    z-index: 5;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-progress-fill.correct-flash {
    background: linear-gradient(90deg, var(--primary), #10b981);
}

.quiz-progress-fill.wrong-flash {
    background: linear-gradient(90deg, var(--primary), #ef4444);
}

/* ==================== FLOATING XP ==================== */

.floating-xp {
    position: fixed;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #10b981;
    pointer-events: none;
    z-index: 9999;
    animation: floatUp 0.8s ease-out forwards;
    text-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.8);
    }
}

/* ==================== STREAK TOAST (center screen, colored text) ==================== */

.streak-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
    animation: toastPop 1.5s ease-out forwards;
}

.streak-toast-text {
    display: inline-block;
    font-weight: 800;
    font-size: 1.5rem;
    color: #10b981;
    white-space: nowrap;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 1),
        0 0 40px rgba(255, 255, 255, 0.8),
        0 0 60px rgba(255, 255, 255, 0.5),
        0 2px 12px rgba(16, 185, 129, 0.4);
    letter-spacing: 0.02em;
    -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.1);
}

.streak-toast.hot .streak-toast-text {
    font-size: 1.75rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.4));
}

.streak-toast.fire .streak-toast-text {
    font-size: 2rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 12px rgba(239, 68, 68, 0.5));
}

.streak-toast.legendary .streak-toast-text {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 16px rgba(99, 102, 241, 0.5));
}

@keyframes toastPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    25% {
        transform: translate(-50%, -50%) scale(1);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.8);
    }
}

/* ==================== CARD SHAKE (wrong answer) ==================== */

.quiz-card.shake {
    animation: cardShake 0.5s ease-in-out;
}

@keyframes cardShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-8px); }
    30% { transform: translateX(8px); }
    45% { transform: translateX(-6px); }
    60% { transform: translateX(6px); }
    75% { transform: translateX(-3px); }
    90% { transform: translateX(3px); }
}

/* ==================== MODULE COMPLETE SCREEN (Duolingo-style) ==================== */

.module-complete-screen {
    text-align: center;
    padding: 20px 10px;
}

.module-complete-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: trophyBounce 0.6s ease-out;
}

@keyframes trophyBounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.module-complete-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.module-complete-encouragement {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-bottom: 24px;
}

.module-complete-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.module-complete-stat {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 14px 20px;
    min-width: 90px;
}

.module-complete-stat.accent {
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    border-color: #C7D2FE;
}

.module-stat-value {
    display: block;
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.module-complete-stat.accent .module-stat-value {
    color: var(--primary);
}

.module-stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.module-bonus-xp {
    display: inline-block;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 1px solid #FCD34D;
    color: #92400E;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.module-bonus-xp i {
    color: #F59E0B;
}

.module-wrong-note {
    color: #ef4444;
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.module-wrong-note i {
    margin-right: 4px;
}

.module-perfect-note {
    color: #10b981;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.module-perfect-note i {
    margin-right: 4px;
}

.module-tease {
    color: var(--gray-500);
    font-size: 0.8125rem;
    margin-top: 12px;
}

.module-all-done {
    margin-bottom: 16px;
}

.module-all-done p:first-child {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.module-total-xp {
    color: var(--primary);
    font-size: 1rem;
}

/* ==================== QUIZ START SCREEN ==================== */

.quiz-start-screen {
    text-align: center;
    padding: 20px 10px;
}

.quiz-start-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2rem;
    color: var(--white);
    box-shadow: 0 12px 32px -8px rgba(79, 70, 229, 0.4);
}

.quiz-start-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.quiz-start-subtitle {
    color: var(--gray-500);
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto 28px;
}

.quiz-start-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 28px;
}

.quiz-start-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.quiz-start-stat-value {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    color: var(--primary);
}

.quiz-start-stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.quiz-start-difficult {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 24px;
    background: #FEF3C7;
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #FDE68A;
}

.quiz-start-difficult i {
    color: #F59E0B;
    margin-right: 4px;
}

.quiz-start-btn {
    font-size: 1.0625rem;
    padding: 14px 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px -6px rgba(79, 70, 229, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -6px rgba(79, 70, 229, 0.5);
}

/* ==================== VERIFICATION SCREEN ==================== */

.verify-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
}

.verify-content {
    text-align: center;
    background: var(--white);
    padding: 60px 48px;
    border-radius: 24px;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}

.verify-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 24px;
}

.verify-content h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.verify-content > p {
    color: var(--gray-600);
    margin-bottom: 8px;
    line-height: 1.6;
}

.verify-status {
    color: var(--primary);
    font-weight: 500;
    min-height: 24px;
    margin: 16px 0;
}

.verify-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* ==================== STUDENT DETAIL MODAL ==================== */

.student-detail-modal-content {
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
}

.student-detail-body {
    padding: 28px;
}

.student-info-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.student-avatar-large {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.75rem;
    flex-shrink: 0;
}

.student-info-text h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 4px;
}

.student-info-text p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.student-join-date {
    color: var(--gray-500) !important;
    font-size: 0.8125rem !important;
}

.student-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.student-stat {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.student-stat-number {
    display: block;
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.student-stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.student-detail-section {
    margin-bottom: 24px;
}

.student-detail-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.wrong-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wrong-word-tag {
    background: #FEE2E2;
    color: #B91C1C;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #FECACA;
}

.wrong-word-tag small {
    color: #DC2626;
    opacity: 0.7;
}

.study-day-group {
    margin-bottom: 16px;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.study-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.study-day-date {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.875rem;
}

.study-day-stats {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.study-day-words {
    padding: 8px 16px;
}

.study-log-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.study-log-entry:last-child {
    border-bottom: none;
}

.session-type-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.session-type-badge.quiz {
    background: #EEF2FF;
    color: var(--primary);
}

.session-type-badge.review {
    background: #FEF3C7;
    color: #B45309;
}

.log-time {
    margin-left: auto;
    color: var(--gray-400);
    font-size: 0.8125rem;
}

/* Admin student nickname editor */
.admin-student-nickname {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.admin-student-nickname label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.admin-nickname-row {
    display: flex;
    gap: 8px;
}
.admin-nickname-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    background: white;
    color: var(--gray-700);
}
.admin-nickname-row input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.admin-student-danger {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}
.btn.danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.btn.danger:hover {
    background: #fecaca;
    border-color: #f87171;
}
.btn.small {
    padding: 8px 14px;
    font-size: 0.8125rem;
    border-radius: 8px;
}

/* ==================== MODAL OVERLAY ==================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-overlay .modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInScale 0.2s ease-out;
}

.modal-overlay .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-overlay .modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--gray-800);
}

.modal-overlay .close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    line-height: 1;
}

.modal-overlay .close-btn:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ==================== BUG REPORTING ==================== */

/* Floating bug report button */
.bug-report-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: none;
    font-size: 1.125rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    z-index: 5000;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bug-report-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* "Is there a bug?" inline button */
.bug-question-btn {
    display: block;
    margin: 12px auto 0;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    color: var(--gray-400);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.bug-question-btn:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: #fef2f2;
}
.bug-question-btn i { margin-right: 4px; }

/* Toast notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
}
.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== EXERCISE SETS ==================== */

/* Level badges */
.level-1-badge { background: #10b981; color: white; padding: 4px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.level-2-badge { background: #f59e0b; color: white; padding: 4px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.level-3-badge { background: #ef4444; color: white; padding: 4px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.level-4-badge { background: #8b5cf6; color: white; padding: 4px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.level-5-badge { background: #ec4899; color: white; padding: 4px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.hw-badge { background: #2563eb; color: white; padding: 4px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.hw-set-card { border-left: 4px solid #2563eb; }

/* No sets message */
.es-no-sets {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}
.es-no-sets i { font-size: 48px; margin-bottom: 15px; display: block; color: var(--primary); }
.es-no-sets h3 { color: var(--gray-700); margin-bottom: 8px; }

/* Student assigned sets */
.es-set-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--gray-100);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.es-set-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.es-set-title { font-size: 1.125rem; font-weight: 700; color: var(--gray-900); }
.es-set-progress {
    display: flex;
    gap: 18px;
    margin-bottom: 12px;
    font-size: 0.8125rem;
    color: var(--gray-500);
}
.es-set-progress i { color: var(--primary); margin-right: 4px; }
.es-progress-bar {
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    margin-bottom: 15px;
    overflow: hidden;
}
.es-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    border-radius: 3px;
    transition: width 0.3s;
}
.es-set-actions { display: flex; gap: 10px; }
.es-set-actions .btn { flex: 1; font-size: 0.875rem; padding: 10px 14px; }
.es-btn-flashcards { background: linear-gradient(135deg, var(--primary), #8b5cf6) !important; color: white !important; border: none !important; }
.es-btn-practice { background: linear-gradient(135deg, #059669, #10b981) !important; color: white !important; border: none !important; }
.es-btn-words { background: var(--gray-100) !important; color: var(--gray-700) !important; border: 1px solid var(--gray-200) !important; }
.es-btn-words:hover { background: var(--gray-200) !important; }

/* Back button */
.es-back-btn { padding: 6px 14px !important; font-size: 0.8125rem !important; }

/* Flashcard view */
.es-fc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
    flex-wrap: wrap;
}
.es-fc-title { font-weight: 600; color: var(--gray-700); font-size: 0.9375rem; }
.es-fc-counter { font-size: 0.8125rem; color: var(--gray-400); }
.es-fc-progress-bar {
    height: 4px;
    background: var(--gray-100);
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}
.es-fc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    border-radius: 2px;
    transition: width 0.3s;
}
.es-fc-card {
    background: white;
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--gray-100);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.es-fc-counter-text { font-size: 0.8125rem; color: var(--gray-400); margin-bottom: 16px; }
.es-fc-word { font-size: 2rem; font-weight: 700; margin-bottom: 8px; color: var(--gray-900); }
.es-fc-pos { font-size: 0.875rem; color: var(--gray-400); margin-bottom: 20px; }
.es-fc-reveal { padding: 12px 24px !important; font-size: 1rem !important; }
.es-fc-back { text-align: left; }
.es-fc-definition { font-size: 0.9375rem; color: var(--gray-600); line-height: 1.6; margin-bottom: 10px; }
.es-fc-tldr {
    display: inline-block;
    background: #EEF2FF;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.es-fc-korean { font-size: 1.125rem; color: var(--primary); font-weight: 600; margin-bottom: 10px; }
.es-fc-example {
    font-size: 0.8125rem;
    color: var(--gray-400);
    font-style: italic;
    border-left: 3px solid var(--gray-100);
    padding-left: 12px;
}
.es-fc-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.es-fc-buttons button { flex: 1; padding: 14px !important; font-size: 1rem !important; }
.es-fc-buttons button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Practice view */
.es-practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.8125rem;
    color: var(--gray-500);
    gap: 10px;
    flex-wrap: wrap;
}
.es-practice-progress-bar {
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}
.es-practice-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, var(--primary));
    border-radius: 3px;
    transition: width 0.3s;
}
.es-practice-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid var(--gray-100);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.es-practice-sentence {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-700);
    margin-bottom: 20px;
}
.es-practice-sentence .blank {
    display: inline-block;
    min-width: 100px;
    border-bottom: 3px solid var(--primary);
    text-align: center;
    color: var(--primary);
    font-weight: 700;
    padding: 2px 8px;
}
.es-practice-options { display: flex; flex-direction: column; gap: 10px; }
.es-practice-option {
    padding: 14px 18px;
    border: 2px solid var(--gray-100);
    border-radius: 12px;
    background: transparent;
    color: var(--gray-700);
    font-size: 0.9375rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.es-practice-option:hover { border-color: var(--primary); background: #EEF2FF; }
.es-practice-option.correct { border-color: #10b981; background: #ecfdf5; color: #059669; }
.es-practice-option.incorrect { border-color: #ef4444; background: #fef2f2; color: #dc2626; }
.es-practice-option.correct-answer { border-color: #10b981; }
.es-practice-option:disabled { cursor: default; }
.es-practice-feedback {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
}
.es-practice-feedback h4 { color: var(--primary); margin-bottom: 4px; }
.es-pf-pos { font-size: 0.8125rem; color: var(--gray-400); }
.es-pf-def { font-size: 0.875rem; color: var(--gray-600); margin-top: 8px; }
.es-pf-tldr { color: var(--primary); font-weight: 600; }
.es-practice-next {
    width: 100%;
    padding: 14px !important;
    font-size: 1rem !important;
    margin-top: 15px;
}

/* Module complete */
.es-module-complete {
    text-align: center;
    padding: 30px 20px;
}
.es-mc-icon { font-size: 48px; margin-bottom: 15px; }
.es-module-complete h3 { font-size: 1.375rem; margin-bottom: 10px; color: var(--gray-900); }
.es-mc-encourage { color: var(--gray-400); margin-bottom: 20px; font-size: 0.9375rem; }
.es-mc-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}
.es-mc-stat-value { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.es-mc-stat-label { font-size: 0.75rem; color: var(--gray-400); }

/* Set summary */
.es-set-summary { text-align: center; padding: 30px 20px; }
.es-set-summary h3 { font-size: 1.375rem; margin-bottom: 10px; color: var(--gray-900); }
.es-summary-subtitle { color: var(--gray-500); margin-bottom: 20px; }
.es-module-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    margin-bottom: 8px;
}
.es-module-result-score { font-weight: 700; color: #10b981; }

/* Word list view */
.es-words-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.es-words-title { font-weight: 600; color: var(--gray-700); font-size: 0.9375rem; }
.es-words-count { font-size: 0.8125rem; color: var(--gray-400); }
.es-words-list { display: flex; flex-direction: column; gap: 8px; }
.es-word-item {
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    padding: 14px 18px;
}
.es-word-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}
.es-word-text { font-weight: 700; color: var(--gray-900); font-size: 1rem; }
.es-word-pos { font-size: 0.75rem; color: var(--gray-400); font-style: italic; }
.es-word-bookmark {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-300);
    font-size: 1rem;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.15s, transform 0.15s;
}
.es-word-bookmark:hover { color: #F59E0B; transform: scale(1.15); }
.es-word-bookmark.marked { color: #F59E0B; }
.es-word-item.es-word-difficult { border-left: 3px solid #F59E0B; }
.es-word-def { font-size: 0.8125rem; color: var(--gray-600); line-height: 1.5; }
.es-word-korean { font-size: 0.875rem; color: var(--primary); margin-top: 4px; font-weight: 500; }

/* Admin passage edit button */
.passage-edit-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-300);
    font-size: 0.75rem;
    padding: 4px 7px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.passage-edit-btn:hover {
    color: var(--primary);
    background: var(--gray-50);
}
.quiz-sentence { position: relative; }

/* Admin passage edit modal form */
.passage-edit-form .pe-form-group { margin-bottom: 12px; }
.passage-edit-form .pe-form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 4px;
}
.passage-edit-form textarea,
.passage-edit-form input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    background: white;
    color: var(--gray-700);
}
.passage-edit-form textarea { resize: vertical; }

/* Admin options editor modal */
.oe-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    transition: border-color 0.15s;
}
.oe-option-row:hover { border-color: var(--gray-200); }
.oe-option-correct {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.oe-option-correct:hover { border-color: #86efac; }
.oe-option-label {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 110px;
}
.oe-option-letter {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--gray-200);
    color: var(--gray-600);
}
.oe-option-correct .oe-option-letter {
    background: #dcfce7;
    color: #16a34a;
}
.oe-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.oe-badge-correct {
    background: #dcfce7;
    color: #16a34a;
}
.oe-badge-distractor {
    background: var(--gray-100);
    color: var(--gray-500);
}
.oe-option-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    background: white;
    color: var(--gray-700);
    transition: border-color 0.15s;
}
.oe-option-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.oe-option-correct .oe-option-input {
    border-color: #bbf7d0;
}
.oe-option-correct .oe-option-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Admin exercise sets */
.es-admin-level-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 0;
    margin-bottom: 16px;
}
.es-level-tab {
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.es-level-tab:hover { background: var(--gray-200); }
.es-level-tab.active { background: var(--primary); color: white; }
.es-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.es-admin-set-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid var(--gray-100);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.es-admin-set-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.es-admin-set-title { font-size: 1.125rem; font-weight: 700; color: var(--gray-900); }
.es-admin-set-count { font-size: 0.75rem; }
.es-admin-set-preview {
    font-size: 0.8125rem;
    color: var(--gray-400);
    margin-bottom: 14px;
    line-height: 1.5;
}

/* Student row in assign modal */
.es-student-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}
.es-student-row label { flex: 1; cursor: pointer; font-size: 0.875rem; color: var(--gray-700); }
.es-student-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ==================== MASCOT ==================== */
.mascot-container {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 4999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.mascot-container.mascot-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}
.mascot-img {
    width: 350px;
    height: 350px;
    pointer-events: auto;
    cursor: pointer;
    filter: drop-shadow(0 8px 30px rgba(0,0,0,0.18));
    transition: opacity 0.15s ease, transform 0.2s ease;
    animation: mascot-idle 3s ease-in-out infinite;
    user-select: none;
    -webkit-user-drag: none;
}
.mascot-img:hover {
    transform: scale(1.08);
}
.mascot-img:active {
    transform: scale(0.95);
}
.mascot-img-fading {
    opacity: 0.3;
}
.mascot-bubble {
    background: var(--white);
    color: var(--gray-800);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    padding: 8px 14px;
    border-radius: 14px;
    max-width: 200px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
    position: relative;
}
.mascot-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--white);
}
.mascot-bubble-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes mascot-idle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Responsive mascot sizing */
@media (max-width: 1024px) {
    .mascot-img { width: 280px; height: 280px; }
    .mascot-container { bottom: 72px; right: 16px; }
    .mascot-bubble { font-size: 0.9375rem; max-width: 220px; }
}
@media (max-width: 640px) {
    .mascot-img { width: 200px; height: 200px; }
    .mascot-container { bottom: 68px; right: 12px; }
    .mascot-bubble { font-size: 0.875rem; max-width: 200px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .mascot-img { animation: none; }
    .mascot-img-fading { opacity: 1; }
    .mascot-bubble { transition: none; }
    .mascot-container { transition: none; }
}

/* ==================== SWIPE FLASHCARDS ==================== */

/* Instructions overlay */
.fc-instructions {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}
.fc-instructions h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--gray-900);
}
.fc-instructions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
    text-align: left;
}
.fc-instruction-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9375rem;
    color: var(--gray-700);
}
.fc-instruction-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 36px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--gray-600);
    flex-shrink: 0;
    padding: 0 10px;
}

/* Progress container */
.fc-progress-container {
    max-width: 620px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.fc-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}
.fc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}
.fc-progress-text {
    font-size: 0.8125rem;
    color: var(--gray-500);
    white-space: nowrap;
}
.fc-progress-counts {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 8px;
}
.fc-count-known, .fc-count-learning {
    font-size: 0.8125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}
.fc-count-known { color: #059669; }
.fc-count-learning { color: #D97706; }

/* Card stack */
.fc-stack {
    position: relative;
    max-width: 620px;
    height: 480px;
    margin: 0 auto;
    perspective: 1200px;
}

.fc-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    z-index: 2;
    will-change: transform;
}
.fc-card:active { cursor: grabbing; }

.fc-card-behind {
    z-index: 1;
    transform: scale(0.95) translateY(12px);
    opacity: 0.6;
    pointer-events: none;
    cursor: default;
}

.fc-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
}

.fc-card.fc-flipped .fc-card-inner {
    transform: rotateY(180deg);
}

.fc-card-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 20px 50px -12px rgba(0,0,0,0.15), 0 10px 24px -8px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.8);
    overflow: hidden;
}

.fc-card-face::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

/* Front face */
.fc-card-front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}
.fc-card-front .fc-word {
    font-family: 'DM Serif Display', serif;
    font-size: 2.75rem;
    font-weight: 400;
    color: var(--gray-900);
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.2;
}
.fc-card-front .fc-pos {
    color: var(--gray-500);
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 32px;
}
.fc-flip-hint {
    color: var(--gray-400);
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fc-pulse 2s ease-in-out infinite;
}
.fc-flip-hint .fc-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
}
@keyframes fc-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Back face */
.fc-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    padding: 36px 36px 24px;
    overflow-y: auto;
}
.fc-card-back .fc-word-back {
    text-align: center;
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    margin-bottom: 6px;
    color: var(--gray-900);
}
.fc-card-back .fc-pos-back {
    display: block;
    text-align: center;
    background: var(--gray-100);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8125rem;
    margin: 0 auto 16px;
    width: fit-content;
    color: var(--gray-600);
}
.fc-card-back .fc-tldr-box {
    background: linear-gradient(135deg, #667eea15, #764ba215);
    border: 1px solid #667eea30;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.fc-card-back .fc-tldr-label {
    font-weight: 700;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-right: 6px;
}
.fc-card-back .fc-tldr-text {
    font-size: 0.9375rem;
    color: var(--gray-700);
}
.fc-card-back .fc-definition {
    background: var(--gray-50);
    border-left: 4px solid var(--primary);
    padding: 12px 16px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 12px;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-700);
}
.fc-card-back .fc-korean {
    text-align: center;
    color: var(--primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 8px 0;
}
.fc-card-back .fc-example-box {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    color: var(--gray-500);
    font-size: 0.875rem;
}
.fc-card-back .fc-example-box i {
    color: var(--gray-300);
    margin-top: 3px;
    flex-shrink: 0;
}
.fc-card-back .fc-example-box em { font-style: italic; }
.fc-card-back .fc-bookmark-btn {
    margin-top: auto;
    padding-top: 12px;
    text-align: center;
}
.fc-card-back .fc-bookmark-btn button {
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 0.8125rem;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
}
.fc-card-back .fc-bookmark-btn button:hover {
    background: #FEF3C7;
    border-color: #FDE68A;
    color: #B45309;
}
.fc-card-back .fc-bookmark-btn button.marked {
    background: #F59E0B;
    color: white;
    border-color: #F59E0B;
}

/* Swipe indicators */
.fc-swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px 24px;
    border-radius: 12px;
    border: 4px solid;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 10;
    pointer-events: none;
}
.fc-indicator-know {
    right: 20px;
    color: #059669;
    border-color: #059669;
    background: rgba(5, 150, 105, 0.08);
}
.fc-indicator-learning {
    left: 20px;
    color: #D97706;
    border-color: #D97706;
    background: rgba(217, 119, 6, 0.08);
}

/* Swipe animations */
@keyframes fc-swipe-right {
    0% { transform: translateX(0) rotate(0deg); opacity: 1; }
    100% { transform: translateX(150%) rotate(20deg); opacity: 0; }
}
@keyframes fc-swipe-left {
    0% { transform: translateX(0) rotate(0deg); opacity: 1; }
    100% { transform: translateX(-150%) rotate(-20deg); opacity: 0; }
}
.fc-card.fc-swiping-right {
    animation: fc-swipe-right 0.4s ease forwards;
    pointer-events: none;
}
.fc-card.fc-swiping-left {
    animation: fc-swipe-left 0.4s ease forwards;
    pointer-events: none;
}

/* Action buttons */
.fc-actions {
    display: flex;
    gap: 16px;
    max-width: 620px;
    margin: 20px auto 0;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.fc-actions.fc-actions-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.fc-action-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}
.fc-action-btn i { font-size: 1.125rem; }
.fc-btn-learning {
    background: #FEF3C7;
    color: #B45309;
    border: 1px solid #FDE68A;
}
.fc-btn-learning:hover {
    background: #FDE68A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}
.fc-btn-know {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}
.fc-btn-know:hover {
    background: #A7F3D0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

/* Undo button */
.fc-undo-row {
    max-width: 620px;
    margin: 10px auto 0;
    text-align: center;
}
.fc-undo-btn {
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    padding: 8px 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.fc-undo-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-700);
}

/* Results card */
.fc-results-card {
    background: var(--white);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}
.fc-results-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}
.fc-results-card h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    margin-bottom: 8px;
    color: var(--gray-900);
}
.fc-results-subtitle {
    color: var(--gray-500);
    margin-bottom: 24px;
    font-size: 0.9375rem;
}
.fc-results-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 28px;
}
.fc-results-stat {
    text-align: center;
}
.fc-results-stat-value {
    font-size: 2rem;
    font-weight: 700;
}
.fc-results-stat-value.fc-stat-known { color: #059669; }
.fc-results-stat-value.fc-stat-learning { color: #D97706; }
.fc-results-stat-value.fc-stat-score { color: var(--primary); }
.fc-results-stat-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 4px;
}
.fc-results-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fc-results-actions .btn {
    width: 100%;
}

/* Empty state */
.fc-empty {
    text-align: center;
    padding: 60px 40px;
    color: var(--gray-500);
    max-width: 620px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.fc-empty i {
    font-size: 3.5rem;
    color: var(--primary-light);
    margin-bottom: 20px;
    display: block;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .fc-stack { height: 420px; }
    .fc-card-front { padding: 36px 28px; }
    .fc-card-front .fc-word { font-size: 2.25rem; }
    .fc-card-back { padding: 28px 24px 20px; }
    .fc-card-back .fc-word-back { font-size: 1.75rem; }
    .fc-actions { gap: 12px; margin: 16px 16px 0; }
    .fc-action-btn { padding: 14px; font-size: 0.9375rem; }
    .fc-progress-container { margin: 0 16px 12px; }
    .fc-instructions { padding: 32px 24px; margin: 0 16px; }
    .fc-results-card { padding: 36px 28px; margin: 0 16px; }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .fc-stack { height: 380px; }
    .fc-card-front { padding: 28px 20px; }
    .fc-card-front .fc-word { font-size: 1.875rem; }
    .fc-card-back { padding: 24px 18px 16px; }
    .fc-card-back .fc-word-back { font-size: 1.5rem; }
    .fc-actions { gap: 10px; margin: 12px 12px 0; }
    .fc-action-btn { padding: 12px; font-size: 0.875rem; }
    .fc-progress-container { margin: 0 12px 10px; }
    .fc-swipe-indicator { font-size: 1.125rem; padding: 8px 16px; }
    .fc-results-stats { gap: 20px; }
    .fc-results-stat-value { font-size: 1.5rem; }
    .fc-instructions { padding: 28px 20px; margin: 0 12px; }
    .fc-results-card { padding: 28px 20px; margin: 0 12px; }
}

/* ===================== DIAGNOSTICS (VST) ===================== */

/* Test Selection Grid */
.vst-test-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.vst-test-card { background: white; border-radius: 16px; padding: 20px; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; border-left: 4px solid var(--gray-300); }
.vst-test-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.vst-test-card.completed { border-left-color: var(--primary); }
.vst-test-number { font-size: 1.25rem; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
.vst-test-info { display: flex; gap: 16px; font-size: 0.85rem; color: var(--gray-500); margin-bottom: 12px; }
.vst-test-attempts { font-size: 0.8rem; color: var(--gray-400); margin-top: 8px; }

/* Badges */
.vst-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.vst-badge-new { background: var(--gray-100); color: var(--gray-500); }
.vst-band-below { background: #fef2f2; color: #dc2626; }
.vst-band-g5 { background: #fff7ed; color: #c2410c; }
.vst-band-g6 { background: #fffbeb; color: #d97706; }
.vst-band-g7 { background: #fefce8; color: #a16207; }
.vst-band-g8 { background: #f0fdf4; color: #16a34a; }
.vst-band-g9 { background: #ecfdf5; color: #059669; }
.vst-band-g10 { background: #f0fdfa; color: #0d9488; }
.vst-band-p50 { background: #eff6ff; color: #2563eb; }
.vst-band-p70 { background: #eef2ff; color: #4f46e5; }
.vst-band-p80 { background: #e8e0ff; color: #6d28d9; }
.vst-band-p90 { background: #f5f3ff; color: #7c3aed; }
.vst-band-sat0 { background: #fdf4ff; color: #a855f7; }
.vst-band-p99 { background: #fef1f8; color: #db2777; }

/* Empty state */
.vst-empty { text-align: center; padding: 60px 20px; color: var(--gray-500); }
.vst-empty h3 { color: var(--gray-600); margin-bottom: 8px; }

/* Intro Screen */
.vst-intro { max-width: 600px; margin: 0 auto; }
.vst-back-btn { margin-bottom: 16px; }
.vst-intro-card { background: white; border-radius: 16px; padding: 32px; box-shadow: var(--shadow); text-align: center; }
.vst-intro-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 16px; }
.vst-intro-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
.vst-intro-card > p { color: var(--gray-500); margin-bottom: 24px; }
.vst-intro-details { display: flex; gap: 16px; margin-bottom: 24px; }
.vst-intro-detail { flex: 1; background: var(--gray-50); border-radius: 10px; padding: 14px; text-align: left; }
.vst-intro-detail strong { display: block; font-size: 0.9rem; margin-bottom: 4px; }
.vst-intro-detail span { font-size: 0.8rem; color: var(--gray-500); }
.vst-intro-rules { text-align: left; list-style: none; padding: 0; margin-bottom: 24px; }
.vst-intro-rules li { padding: 6px 0; font-size: 0.9rem; color: var(--gray-600); }
.vst-intro-rules li i { color: var(--primary); margin-right: 8px; }
.vst-start-btn { font-size: 1.1rem; padding: 14px 32px; }

/* Progress Bar */
.vst-progress-bar { margin-bottom: 20px; }
.vst-progress-label { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--gray-500); margin-bottom: 6px; }
.vst-progress-track { height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.vst-progress-fill { height: 100%; background: var(--gradient-primary); border-radius: 3px; transition: width 0.3s ease; }

/* Question Card */
.vst-question-wrapper { max-width: 700px; margin: 0 auto; }
.vst-question-card { background: white; border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.vst-passage { font-size: 1.05rem; line-height: 1.7; color: var(--gray-700); margin-bottom: 24px; }
.vst-blank { background: #ede9fe; padding: 2px 8px; border-radius: 4px; font-weight: 600; color: var(--primary); }
.vst-options { display: flex; flex-direction: column; gap: 8px; }
.vst-option { width: 100%; text-align: left; padding: 14px 18px; border: 2px solid var(--gray-200); border-radius: 10px; background: white; font-size: 0.95rem; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 10px; }
.vst-option:hover { border-color: var(--primary-light); background: #f5f3ff; }
.vst-option-letter { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gray-100); font-weight: 700; font-size: 0.8rem; color: var(--gray-600); flex-shrink: 0; }
.vst-option:hover .vst-option-letter { background: #ede9fe; color: var(--primary); }
.vst-option-idk { border-style: dashed; color: var(--gray-500); font-style: italic; }
.vst-option-idk:hover { border-color: var(--gray-400); background: var(--gray-50); }

/* Routing Screen */
.vst-routing { max-width: 500px; margin: 0 auto; }
.vst-routing-card { background: white; border-radius: 16px; padding: 32px; box-shadow: var(--shadow); text-align: center; }
.vst-routing-card h3 { font-size: 1.4rem; margin-bottom: 16px; }
.vst-routing-score { margin-bottom: 24px; }
.vst-routing-score-num { font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.vst-routing-score-max { font-size: 1.1rem; color: var(--gray-400); }
.vst-routing-breakdown { margin-bottom: 24px; }
.vst-routing-level { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.vst-routing-level-label { font-size: 0.8rem; font-weight: 600; color: var(--gray-600); width: 50px; flex-shrink: 0; }
.vst-routing-bar-track { flex: 1; height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.vst-routing-bar-fill { height: 100%; background: var(--gradient-primary); border-radius: 4px; transition: width 0.8s ease; }
.vst-routing-level-score { font-size: 0.8rem; color: var(--gray-500); width: 50px; text-align: right; flex-shrink: 0; }
.vst-routing-route { margin: 20px 0; padding: 16px; background: #f5f3ff; border-radius: 10px; }
.vst-routing-route i { color: var(--primary); margin-right: 6px; }
.vst-routing-route p { font-size: 0.85rem; color: var(--gray-500); margin-top: 4px; }
.vst-continue-btn { margin-top: 8px; }

/* Results Screen */
.vst-results { max-width: 500px; margin: 0 auto; }
.vst-results-card { background: white; border-radius: 16px; padding: 32px; box-shadow: var(--shadow); text-align: center; }
.vst-results-card h3 { font-size: 1.4rem; margin-bottom: 16px; }
.vst-score-display { font-size: 3rem; font-weight: 700; color: var(--primary); }
.vst-score-max { font-size: 1.1rem; color: var(--gray-400); margin-bottom: 12px; }
.vst-score-band { display: inline-block; padding: 6px 18px; border-radius: 20px; font-weight: 600; margin-bottom: 24px; }
.vst-results-breakdown { text-align: left; margin-bottom: 24px; }
.vst-results-module { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-200); }
.vst-results-module h4 { font-size: 0.9rem; color: var(--gray-600); }
.vst-results-module span { font-weight: 600; color: var(--gray-700); }
.vst-results-total { border-bottom: none; padding-top: 12px; }
.vst-results-total h4 { color: var(--primary); }
.vst-results-actions { display: flex; gap: 12px; justify-content: center; }

/* Admin: Question Edit Bar */
.vst-admin-bar { display: flex; align-items: center; justify-content: space-between; background: #fef3c7; border: 1px solid #f59e0b; border-radius: 8px; padding: 8px 14px; margin-bottom: 12px; font-size: 0.85rem; }
.vst-admin-bar-word { font-weight: 600; color: #92400e; }
.vst-admin-bar-word i { margin-right: 4px; }
.vst-admin-edit-passage { font-size: 0.8rem; padding: 4px 10px; background: white; border: 1px solid #f59e0b; border-radius: 6px; color: #92400e; cursor: pointer; }
.vst-admin-edit-passage:hover { background: #fef3c7; }

/* Admin: Diagnostics Grid */
.vst-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.vst-admin-card { background: white; border-radius: 12px; padding: 16px; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform 0.2s; }
.vst-admin-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.vst-admin-card-header { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.vst-admin-card-stats { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.8rem; color: var(--gray-500); }
.vst-admin-card-stats span { background: var(--gray-50); padding: 2px 8px; border-radius: 6px; }

/* Admin: Detail Tabs */
.vst-detail-tabs { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.vst-detail-tab { font-size: 0.85rem; padding: 8px 16px; border-radius: 8px; }
.vst-detail-tab.active { background: var(--primary); color: white; }

/* Admin: Word Table */
.vst-admin-table { overflow-x: auto; margin-top: 8px; }
.vst-admin-table table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.vst-admin-table th { text-align: left; padding: 10px 12px; background: var(--gray-50); color: var(--gray-600); font-weight: 600; border-bottom: 2px solid var(--gray-200); }
.vst-admin-table td { padding: 8px 12px; border-bottom: 1px solid var(--gray-100); }
.vst-admin-passage-preview { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gray-500); font-size: 0.8rem; }

/* Student request section */
.vst-request-section { text-align: center; margin-top: 20px; }
.vst-request-btn { gap: 6px; }
.vst-request-wordcount {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-align: right;
    margin-top: 4px;
    transition: color 0.2s;
}
.vst-request-wordcount-ok { color: #16a34a; font-weight: 600; }

/* Admin: test access management */
.vst-admin-section { margin-top: 28px; }
.vst-admin-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 12px;
}
.vst-admin-requests { display: flex; flex-direction: column; gap: 10px; }
.vst-request-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 14px 16px;
}
.vst-request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.vst-request-card-header strong { font-size: 0.9rem; }
.vst-request-date { font-size: 0.75rem; color: var(--gray-400); }
.vst-request-reason {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 10px;
    background: var(--gray-50);
    padding: 8px 12px;
    border-radius: 8px;
}
.vst-request-actions { display: flex; gap: 8px; }
.vst-admin-access-table { margin-top: 8px; }
.vst-access-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr 160px;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: 10px 10px 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.vst-access-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 160px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-100);
    align-items: center;
    font-size: 0.875rem;
}
.vst-access-name { font-weight: 500; color: var(--gray-700); }
.vst-access-tests { display: flex; gap: 4px; flex-wrap: wrap; }
.vst-access-badge {
    background: #eef2ff;
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.vst-access-action { display: flex; gap: 6px; align-items: center; }
.vst-assign-select {
    padding: 5px 8px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: inherit;
    background: white;
    color: var(--gray-700);
}

/* ==================== LEARN MODE ==================== */

/* Start screen */
.lm-start {
    max-width: 420px;
    margin: 60px auto;
    text-align: center;
    background: var(--white);
    border-radius: 24px;
    padding: 48px 36px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-300);
}
.lm-start-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 16px;
}
.lm-start h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    color: var(--gray-900);
    margin-bottom: 8px;
}
.lm-start p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.5;
}
.lm-level-select {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}
.lm-level-select label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}
.lm-level-select select {
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
}
.lm-word-count {
    color: var(--gray-500);
    font-size: 0.8125rem;
    margin-bottom: 16px;
    min-height: 20px;
}
.lm-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}
.lm-empty p { margin-bottom: 16px; }

/* Active card view */
.lm-active {
    max-width: 620px;
    margin: 0 auto;
    padding: 0 16px;
}
.lm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.lm-module-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 600;
}
.lm-card-counter {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 600;
}

/* Progress bar */
.lm-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}
.lm-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Badges */
.lm-review-badge, .lm-new-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.lm-review-badge {
    background: #FEF3C7;
    color: #92400E;
}
.lm-new-badge {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Card */
.lm-card {
    position: relative;
    width: 100%;
    height: 420px;
    perspective: 1200px;
    cursor: pointer;
    margin-bottom: 16px;
}
.lm-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
}
.lm-card.lm-flipped .lm-card-inner {
    transform: rotateY(180deg);
}

/* Card enter/exit animations */
.lm-card.lm-card-enter {
    animation: lmCardEnter 0.25s ease-out;
}
.lm-card.lm-card-exit-right {
    animation: lmCardExitRight 0.25s ease-in forwards;
    pointer-events: none;
}
.lm-card.lm-card-exit-left {
    animation: lmCardExitLeft 0.25s ease-in forwards;
    pointer-events: none;
}
@keyframes lmCardEnter {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes lmCardExitRight {
    to { opacity: 0; transform: translateX(60px) rotate(4deg); }
}
@keyframes lmCardExitLeft {
    to { opacity: 0; transform: translateX(-60px) rotate(-4deg); }
}
.lm-card-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 20px 50px -12px rgba(0,0,0,0.15), 0 10px 24px -8px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.8);
    overflow: hidden;
}
.lm-card-face::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

/* Front face */
.lm-card-front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}
.lm-word {
    font-family: 'DM Serif Display', serif;
    font-size: 2.75rem;
    font-weight: 400;
    color: var(--gray-900);
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.2;
}
.lm-pos {
    color: var(--gray-500);
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 32px;
}
.lm-flip-hint {
    color: var(--gray-400);
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fc-pulse 2s ease-in-out infinite;
}
.lm-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
}

/* Back face */
.lm-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    padding: 36px 36px 24px;
    overflow-y: auto;
}
.lm-word-back {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    color: var(--gray-900);
    margin-bottom: 2px;
}
.lm-pos-back {
    color: var(--gray-500);
    font-style: italic;
    font-size: 0.875rem;
    margin-bottom: 16px;
}
.lm-tldr {
    background: #EEF2FF;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}
.lm-tldr-label {
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 6px;
    color: var(--primary);
}
.lm-definition {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
}
.lm-korean {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: 8px;
}
.lm-example {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: 10px;
    border-left: 3px solid var(--primary-light);
}
.lm-example i {
    color: var(--primary-light);
    font-size: 0.75rem;
    margin-right: 4px;
}

/* Action buttons */
.lm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.lm-btn-learning, .lm-btn-know {
    flex: 1;
    max-width: 200px;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
}
.lm-btn-learning {
    background: #FEF3C7;
    color: #92400E;
}
.lm-btn-learning:hover {
    background: #FDE68A;
    transform: translateY(-1px);
}
.lm-btn-know {
    background: #D1FAE5;
    color: #065F46;
}
.lm-btn-know:hover {
    background: #A7F3D0;
    transform: translateY(-1px);
}
.lm-key-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.08);
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

/* Round summary */
.lm-round-summary {
    max-width: 420px;
    margin: 60px auto;
    text-align: center;
    background: var(--white);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-300);
}
.lm-round-summary h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 20px;
}
.lm-round-results {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 16px;
}
.lm-round-result {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
}
.lm-round-know { color: #059669; }
.lm-round-learning { color: #D97706; }
.lm-cleared-msg {
    color: #B45309;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.lm-review-count {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

/* Module / session summary */
.lm-summary {
    max-width: 480px;
    margin: 60px auto;
    text-align: center;
    background: var(--white);
    border-radius: 24px;
    padding: 48px 36px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-300);
}
.lm-summary-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}
.lm-summary h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    color: var(--gray-900);
    margin-bottom: 24px;
}
.lm-summary-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 28px;
}
.lm-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lm-stat-num {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
}
.lm-stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
    .lm-card { height: 380px; }
    .lm-word { font-size: 2.2rem; }
    .lm-card-front { padding: 36px 28px; }
    .lm-card-back { padding: 28px 24px 20px; }
    .lm-start { margin: 40px 16px; padding: 36px 24px; }
    .lm-summary { margin: 40px 16px; padding: 36px 24px; }
    .lm-round-summary { margin: 40px 16px; padding: 32px 20px; }
    .lm-summary-stats { gap: 20px; }
}
@media (max-width: 480px) {
    .lm-card { height: 340px; }
    .lm-word { font-size: 1.8rem; }
    .lm-word-back { font-size: 1.4rem; }
    .lm-actions { gap: 8px; }
    .lm-btn-learning, .lm-btn-know { padding: 12px 16px; font-size: 0.875rem; }
    .lm-round-results { gap: 20px; }
    .lm-summary-stats { flex-direction: column; gap: 12px; }
}

/* ==================== LEARN MODE — SET GRID ==================== */

.lm-set-start {
    max-width: 680px;
    text-align: center;
}
.lm-set-stats {
    color: var(--gray-500);
    font-size: 0.8125rem;
    margin-bottom: 16px;
}
.lm-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    margin-top: 24px;
    text-align: left;
}
.lm-section-label i {
    color: var(--primary);
    font-size: 0.9rem;
}
.lm-set-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
    text-align: left;
}
.lm-set-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lm-set-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.12);
    transform: translateY(-2px);
}
.lm-set-card.lm-set-complete {
    border-color: #A7F3D0;
    background: #F0FDF4;
}
.lm-set-card.lm-set-in-progress {
    border-color: #C7D2FE;
    background: #FAFAFE;
}
.lm-set-card.lm-set-assigned {
    border-color: #FDE68A;
}
.lm-set-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.lm-set-number {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gray-800);
}
.lm-set-assigned-icon {
    color: #D97706;
    font-size: 0.75rem;
}
.lm-set-level {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    background: #EEF2FF;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    width: fit-content;
}
.lm-set-done {
    color: #059669;
    font-size: 1.4rem;
    margin: 4px 0;
}
.lm-set-new {
    color: var(--gray-400);
    font-size: 0.75rem;
    margin: 4px 0;
}
.lm-set-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}
.lm-set-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}
.lm-set-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s;
}
.lm-set-progress-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    flex-shrink: 0;
}
.lm-set-card-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    margin-top: 2px;
}
.lm-set-restart-btn,
.lm-set-assign-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-400);
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}
.lm-set-restart-btn:hover {
    background: #FEE2E2;
    color: #DC2626;
    border-color: #FECACA;
}
.lm-set-assign-btn:hover {
    background: #EEF2FF;
    color: var(--primary);
    border-color: #C7D2FE;
}

/* Level filter tabs */
.lm-level-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.lm-level-tab {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.lm-level-tab:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}
.lm-level-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Custom / Special set cards */
.lm-custom-grid {
    grid-template-columns: 1fr;
}
.lm-custom-card {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 1px solid #FDE68A;
    border-radius: 14px;
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lm-custom-card:hover {
    border-color: #F59E0B;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
    transform: translateY(-2px);
}
.lm-custom-card.lm-set-complete {
    border-color: #A7F3D0;
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
}
.lm-custom-card.lm-set-in-progress {
    border-color: #FDE68A;
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF9E7 100%);
}
.lm-custom-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lm-custom-icon {
    color: #D97706;
    font-size: 1rem;
}
.lm-custom-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-800);
}
.lm-custom-desc {
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.4;
}

@media (max-width: 480px) {
    .lm-set-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    .lm-set-start {
        margin: 20px 12px;
        padding: 28px 16px;
    }
}

/* ==================== LEARN MODE — VOICE ==================== */

/* Voice toggle on start screen */
.lm-voice-toggle {
    margin-bottom: 20px;
}
.lm-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-700);
    user-select: none;
}
.lm-toggle-label i {
    color: var(--primary);
}
.lm-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.lm-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.lm-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gray-300);
    border-radius: 24px;
    transition: background 0.3s;
}
.lm-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.lm-toggle-switch input:checked + .lm-toggle-slider {
    background: var(--primary);
}
.lm-toggle-switch input:checked + .lm-toggle-slider::before {
    transform: translateX(20px);
}

/* Voice area below card */
.lm-voice-area {
    text-align: center;
    padding: 16px 0;
}
.lm-voice-prompt {
    font-size: 1.05rem;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 16px;
}
.lm-voice-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.lm-mic-indicator {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
.lm-mic-indicator.lm-ready {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    animation: lmMicReady 1.5s ease-in-out infinite;
}
.lm-mic-indicator.lm-listening {
    background: #DC2626;
    color: var(--white);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    animation: lmMicPulse 1.2s ease-in-out infinite;
}
.lm-mic-indicator.lm-thinking {
    background: #F59E0B;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    animation: lmMicReady 1s ease-in-out infinite;
}
@keyframes lmMicReady {
    0%, 100% { box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(79, 70, 229, 0.5); }
}
@keyframes lmMicPulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    70% { box-shadow: 0 0 0 14px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
.lm-voice-hint {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Voice response area */
.lm-voice-response {
    min-height: 24px;
    margin-bottom: 8px;
}
.lm-voice-transcript {
    display: inline-block;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 16px;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 6px;
}
.lm-voice-transcript i {
    color: var(--gray-400);
    margin-right: 4px;
    font-size: 0.8rem;
}
.lm-voice-status-msg {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 4px;
}
.lm-voice-orange {
    color: #92400E;
    background: #FEF3C7;
}
.lm-voice-green {
    color: #065F46;
    background: #D1FAE5;
}
.lm-voice-neutral {
    color: var(--gray-600);
    background: var(--gray-100);
}
.lm-voice-attempts {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Voice result flashes */
.lm-voice-result {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    animation: lmResultPop 0.3s ease-out;
}
.lm-voice-correct {
    color: #065F46;
    background: #D1FAE5;
}
.lm-voice-wrong {
    color: #92400E;
    background: #FEF3C7;
}
@keyframes lmResultPop {
    0% { opacity: 0; transform: scale(0.8); }
    60% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* Reveal action buttons */
.lm-voice-reveal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

/* Voice mode responsive */
@media (max-width: 480px) {
    .lm-mic-indicator { width: 56px; height: 56px; font-size: 1.3rem; }
    .lm-voice-prompt { font-size: 0.95rem; }
    .lm-voice-result { font-size: 1.1rem; padding: 10px 20px; }
}

/* Loading spinner shared */
.loading-spinner { text-align: center; padding: 40px; color: var(--gray-400); font-size: 1.1rem; }

/* Responsive */
@media (max-width: 768px) {
    .vst-test-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .vst-intro-details { flex-direction: column; }
    .vst-question-card { padding: 20px; }
    .vst-routing-card { padding: 24px; }
    .vst-results-card { padding: 24px; }
    .vst-results-actions { flex-direction: column; }
    .vst-admin-grid { grid-template-columns: 1fr 1fr; }
    .vst-access-header, .vst-access-row { grid-template-columns: 1fr 1fr 140px; }
}
@media (max-width: 480px) {
    .vst-test-grid { grid-template-columns: 1fr; }
    .vst-score-display { font-size: 2.2rem; }
    .vst-routing-score-num { font-size: 2rem; }
    .vst-admin-grid { grid-template-columns: 1fr; }
    .vst-detail-tabs { gap: 4px; }
    .vst-detail-tab { padding: 6px 10px; font-size: 0.8rem; }
    .vst-access-header, .vst-access-row { grid-template-columns: 1fr; gap: 6px; }
    .vst-access-header span:first-child { display: none; }
}
