/* ===================================================
   JAPANESE QUIZ APP — STYLESHEET
   Design: Dark glassmorphism + Japanese aesthetic
=================================================== */

/* ── RESET & ROOT ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base:       #0d0f1a;
  --bg-surface:    #13162a;
  --bg-card:       #1a1d35;
  --bg-card-hover: #1f2340;
  --bg-glass:      rgba(26, 29, 53, 0.7);

  --accent:        #7c3aed;
  --accent-light:  #a855f7;
  --accent-glow:   rgba(124, 58, 237, 0.35);
  --blue:          #3b82f6;
  --blue-glow:     rgba(59, 130, 246, 0.3);
  --green:         #10b981;
  --green-light:   #34d399;
  --red:           #ef4444;
  --red-light:     #f87171;
  --yellow:        #f59e0b;

  --text-primary:  #f0f2ff;
  --text-secondary:#a8b0d4;
  --text-muted:    #636b8a;

  --border:        rgba(255,255,255,0.07);
  --border-light:  rgba(255,255,255,0.12);

  --sidebar-w:     240px;
  --topbar-h:      60px;
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:     0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:     0 16px 64px rgba(0,0,0,0.5);
  --shadow-glow:   0 0 40px var(--accent-glow);

  --font-main: 'Inter', 'Noto Sans JP', sans-serif;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SCROLLBAR ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-light); }

/* ── LAYOUT ────────────────────────────────────── */
#app {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ───────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #10132b 0%, #0d0f1a 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 24px 24px;
  border-bottom: 1px solid var(--border);
}

.logo-icon { font-size: 28px; }
.logo-text {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav-list {
  list-style: none;
  padding: 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: all var(--transition);
  text-align: left;
  position: relative;
}

.nav-btn:hover {
  background: rgba(124,58,237,0.12);
  color: var(--text-primary);
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(59,130,246,0.15));
  color: var(--accent-light);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(124,58,237,0.3);
}

.nav-btn.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--accent-light);
  border-radius: 0 2px 2px 0;
}

.nav-icon { font-size: 18px; }

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.version-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── TOPBAR (mobile) ───────────────────────────── */
.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  padding: 0 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
}

.topbar-title {
  font-weight: 800;
  font-size: 18px;
  background: linear-gradient(135deg, var(--accent-light), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px; height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  backdrop-filter: blur(4px);
}

/* ── MAIN CONTENT ──────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-base);
  position: relative;
}

/* ── SCREENS ───────────────────────────────────── */
.screen {
  display: none;
  padding: 36px 40px;
  max-width: 1100px;
  animation: fadeSlideIn 0.3s ease;
}

.screen.active { display: block; }

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

/* ── SCREEN HEADER ─────────────────────────────── */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}

.screen-title {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

/* ── BUTTONS ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
}

.btn-secondary {
  background: rgba(59,130,246,0.15);
  color: var(--blue);
  border: 1px solid rgba(59,130,246,0.3);
}

.btn-secondary:hover {
  background: rgba(59,130,246,0.25);
}

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--red-light);
  border: 1px solid rgba(239,68,68,0.3);
}

.btn-danger:hover {
  background: rgba(239,68,68,0.25);
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-light);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.btn-icon-round {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon-round:hover {
  background: rgba(239,68,68,0.15);
  color: var(--red-light);
  border-color: rgba(239,68,68,0.3);
}

.btn-icon-sm {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-icon-sm:hover {
  background: rgba(124,58,237,0.15);
  color: var(--accent-light);
  border-color: rgba(124,58,237,0.4);
}

/* ── STATS BAR ─────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.stat-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── EMPTY STATE ───────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 40px;
}

.empty-icon { font-size: 64px; margin-bottom: 20px; }

.empty-state h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 15px;
}

/* ── QUIZ GRID ─────────────────────────────────── */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.quiz-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.quiz-card:hover {
  border-color: rgba(124,58,237,0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), 0 0 30px rgba(124,58,237,0.1);
}

.quiz-card-topic {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.quiz-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.quiz-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.quiz-card-meta span {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.quiz-card-actions {
  display: flex;
  gap: 10px;
}

.quiz-card-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 8px 14px;
  font-size: 13px;
}

/* AI Provider Selector Redesign */
.provider-group {
  transition: opacity 0.3s, transform 0.3s;
}

[data-active-provider="anthropic"] #group-gemini { display: none !important; }
[data-active-provider="gemini"] #group-anthropic { display: none !important; }

/* Focus colors per provider */
[data-active-provider="anthropic"] input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

[data-active-provider="gemini"] input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.ai-provider-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
  gap: 6px;
}
.provider-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.provider-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
/* Claude Active */
.provider-btn.active[data-provider="anthropic"] {
  background: rgba(124, 58, 237, 0.15);
  color: #a855f7;
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2);
}
/* Gemini Active */
.provider-btn.active[data-provider="gemini"] {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

/* ── UPLOAD SCREEN ─────────────────────────────── */
.upload-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 700px;
}

.upload-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.step-number {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.step-header h2 {
  font-size: 16px;
  font-weight: 700;
}

.step-body { padding: 24px; }

/* Input group */
.input-group { display: flex; flex-direction: column; gap: 8px; }

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-with-toggle {
  position: relative;
  display: flex;
}

.input-with-toggle input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  padding: 11px 48px 11px 14px;
  outline: none;
  transition: var(--transition);
}

.input-with-toggle input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.btn-eye {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 44px;
  background: none; border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

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

.input-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Standalone inputs/selects */
input[type="text"], input[type="number"], input[type="search"], select, textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: var(--transition);
  width: 100%;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

select { cursor: pointer; }

select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ── DROPZONE ──────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--accent-light);
  background: rgba(124,58,237,0.07);
}

.dropzone.file-loaded {
  border-color: var(--green);
  border-style: solid;
  background: rgba(16,185,129,0.07);
}

.dropzone-icon { font-size: 48px; margin-bottom: 12px; }

.basic-test-word-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.basic-test-word {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 44px;
  font-weight: 800;
  color: var(--text-primary);
}

.dropzone-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.dropzone-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.dropzone-sub .link {
  color: var(--accent-light);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dropzone-formats {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.sample-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── PREVIEW ───────────────────────────────────── */
.preview-info {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.preview-info span {
  font-size: 13px;
  color: var(--green-light);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vocab-preview {
  max-height: 220px;
  overflow-y: auto;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.vocab-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.vocab-preview th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  text-align: left;
  z-index: 1;
  border-bottom: 1px solid var(--border);
}

.vocab-preview td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
}

.vocab-preview tr:last-child td { border-bottom: none; }
.vocab-preview tr:hover td { background: rgba(255,255,255,0.03); }

.config-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.config-item { display: flex; flex-direction: column; gap: 6px; }
.config-item label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

.btn-generate {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn-icon { font-size: 18px; }

.btn-icon-sm {
  font-size: 14px;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon-sm:hover { background: var(--accent); color: #fff; }

/* ── GENERATING STATE ──────────────────────────── */
.generating-state {
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.spinner-ring {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  border: 4px solid rgba(255,255,255,0.06);
  border-top-color: var(--accent-light);
  border-right-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.generating-state h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.generating-state p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 14px;
}

.progress-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
  max-width: 400px;
  margin: 0 auto;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s ease;
  animation: shimmer 1.5s ease infinite;
}

@keyframes shimmer {
  0%   { filter: brightness(1); }
  50%  { filter: brightness(1.3); }
  100% { filter: brightness(1); }
}

/* ── QUIZ SCREEN ───────────────────────────────── */
#screen-quiz {
  padding: 0;
  max-width: 100%;
  min-height: 100vh;
  display: none;
  flex-direction: column;
}

#screen-quiz.active { display: flex; }

.quiz-topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 32px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-track {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}

.timer-display {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  color: var(--yellow);
  font-weight: 700;
  font-size: 15px;
}

.timer-icon { font-size: 16px; }

.quiz-body {
  flex: 1;
  padding: 40px 32px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  position: relative;
  overflow: hidden;
}

.question-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--blue), var(--green));
}

.question-type-badge {
  display: inline-flex;
  padding: 4px 12px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.question-text {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
}

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

.option-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  color: var(--text-primary);
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.4;
}

.option-label {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  transition: var(--transition);
}

.option-btn:hover:not(:disabled) {
  border-color: var(--accent-light);
  background: rgba(124,58,237,0.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.option-btn:hover:not(:disabled) .option-label {
  background: var(--accent);
  color: #fff;
}

.option-btn.correct {
  border-color: var(--green);
  background: rgba(16,185,129,0.12);
  color: var(--green-light);
}

.option-btn.correct .option-label {
  background: var(--green);
  color: #fff;
}

.option-btn.wrong {
  border-color: var(--red);
  background: rgba(239,68,68,0.1);
  color: var(--red-light);
}

.option-btn.wrong .option-label {
  background: var(--red);
  color: #fff;
}

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

.explanation-panel {
  background: var(--bg-card);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  animation: fadeSlideIn 0.3s ease;
}

.explanation-icon { font-size: 24px; }

.explanation-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
}

/* ── RESULT SCREEN ─────────────────────────────── */
#screen-result {
  background: linear-gradient(160deg, #0d0f1a 0%, #10132b 50%, #0d0f1a 100%);
}

.result-hero {
  text-align: center;
  padding: 60px 40px 40px;
  position: relative;
}

.result-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.result-emoji {
  font-size: 64px;
  margin-bottom: 16px;
  animation: bounceIn 0.6s cubic-bezier(0.36,0.07,0.19,0.97);
}

@keyframes bounceIn {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.1); opacity: 1; }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.result-title {
  font-size: 36px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-light), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 32px;
}

.result-score-ring {
  margin: 0 auto 32px;
  display: inline-block;
  animation: fadeSlideIn 0.5s ease 0.2s both;
}

/* SVG text inside ring */
.score-big {
  font-size: 24px;
  font-weight: 900;
  fill: var(--text-primary);
  font-family: 'Inter', sans-serif;
}

.score-sub {
  font-size: 13px;
  fill: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

.result-stats-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  animation: fadeSlideIn 0.5s ease 0.4s both;
}

.flash-word-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 5px;
}

.flash-word {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 64px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.r-stat { text-align: center; }

.r-val {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.r-lbl {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 0 40px 40px;
  flex-wrap: wrap;
}

.result-actions .btn {
  padding: 12px 28px;
  font-size: 15px;
}

.wrong-review {
  padding: 0 40px 60px;
  max-width: 800px;
  margin: 0 auto;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.wrong-item {
  background: var(--bg-card);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
}

.wrong-item-q {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.wrong-item-answers {
  display: flex;
  gap: 20px;
  font-size: 13px;
}

.wrong-q-selected {
  color: var(--red-light);
}

.wrong-q-selected::before { content: '✗ '; }

.wrong-q-correct {
  color: var(--green-light);
}

.wrong-q-correct::before { content: '✓ '; }

/* ── VOCAB SCREEN ──────────────────────────────── */
.vocab-controls {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
  align-items: center;
}

.vocab-controls input[type="search"] {
  flex: 1;
}

.view-toggle {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.view-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  padding: 9px 14px;
  cursor: pointer;
  transition: var(--transition);
}

.view-btn.active {
  background: rgba(124,58,237,0.2);
  color: var(--accent-light);
}

/* Vocab table */
.vocab-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.vocab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
}

.vocab-table th {
  padding: 12px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.vocab-table td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
  vertical-align: top;
}

.vocab-table tr:last-child td { border-bottom: none; }
.vocab-table tr:hover td { background: rgba(124,58,237,0.05); }

.vocab-table .word-cell {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.vocab-table .reading-cell {
  font-size: 13px;
  color: var(--accent-light);
}

.tag-pill {
  display: inline-flex;
  padding: 2px 8px;
  background: rgba(124,58,237,0.15);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-light);
  margin: 2px 3px 2px 0;
}

/* Flashcard */
.flashcard-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
}

.flashcard {
  width: 100%;
  max-width: 480px;
  height: 280px;
  perspective: 1000px;
  cursor: pointer;
}

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

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

.flashcard-front,
.flashcard-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  border: 1px solid var(--border);
  gap: 16px;
}

.flashcard-front {
  background: linear-gradient(135deg, var(--bg-card), #1d2040);
}

.flashcard-back {
  background: linear-gradient(135deg, #1a2a1a, #0d1a0d);
  border-color: rgba(16,185,129,0.25);
  transform: rotateY(180deg);
}

.flash-word {
  font-size: 48px;
  font-weight: 900;
  color: var(--text-primary);
  font-family: 'Noto Sans JP', sans-serif;
}

.flash-reading {
  font-size: 20px;
  color: var(--accent-light);
  font-family: 'Noto Sans JP', sans-serif;
}

.flash-meaning {
  font-size: 28px;
  font-weight: 700;
  color: var(--green-light);
  text-align: center;
}

.flash-example {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.6;
}

.flash-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.flash-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-secondary);
}

.flash-nav {
  width: 44px; height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: var(--radius-md);
}

.flash-hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── HISTORY ───────────────────────────────────── */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.history-item:hover {
  border-color: rgba(124,58,237,0.3);
  transform: translateX(4px);
}

.history-score-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.history-info { flex: 1; }

.history-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.history-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 14px;
}

/* ─── UI COMPONENTS ─── */
.spinner-ring {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 4px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

.settings-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

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

.setting-label {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
}

.setting-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.toggle-switch {
  position: relative;
  width: 48px; height: 26px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 26px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 4px; top: 4px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--accent), var(--blue));
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* ── TOAST ─────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  max-width: 360px;
  backdrop-filter: blur(12px);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }
.toast.info    { border-color: rgba(59,130,246,0.4); }

/* ── MODAL ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: fadeSlideIn 0.25s ease;
}

.modal-box h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}

.modal-box p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ── DELETE BTN ON QUIZ CARD ───────────────────── */
.btn-delete-quiz {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 1;
}

.btn-delete-quiz:hover {
  background: rgba(239,68,68,0.15);
  color: var(--red-light);
}

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-overlay.show {
    display: block;
  }

  .topbar { display: flex; }

  .main-content {
    margin-left: 0;
    padding-top: var(--topbar-h);
  }

  .screen { padding: 24px 20px; }

  .stats-bar { grid-template-columns: repeat(2, 1fr); }

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

  .quiz-body { padding: 24px 20px; }

  .quiz-topbar { padding: 12px 16px; }

  .result-actions { padding: 0 20px 32px; }

  .wrong-review { padding: 0 20px 40px; }

  .config-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .screen-title { font-size: 22px; }
  .question-text { font-size: 20px; }
  .result-title { font-size: 28px; }
  .result-stats-row { gap: 24px; }
  .r-val { font-size: 26px; }
  .flash-word { font-size: 36px; }
}

/* ── QUIZ CARD BADGES ──────────────────────────── */
.difficulty-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.difficulty-badge.easy   { background: rgba(16,185,129,0.15); color: var(--green-light); }
.difficulty-badge.medium { background: rgba(245,158,11,0.15); color: var(--yellow); }
.difficulty-badge.hard   { background: rgba(239,68,68,0.15);  color: var(--red-light); }

/* ── KEYBOARD FOCUS STYLES ─────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* ── BASIC KNOWLEDGE SCREEN STYLES ─────────── */
.basic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.basic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.basic-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--card-color, var(--accent));
  opacity: 0.6;
  transition: opacity 0.3s;
}

.basic-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--card-color, var(--accent));
  box-shadow: 0 12px 40px -10px rgba(0,0,0,0.5), 
              0 0 20px -5px var(--card-color, var(--accent));
}

.basic-card:hover::before {
  opacity: 1;
}

.basic-card-icon {
  font-size: 40px;
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  transition: all 0.3s;
}

.basic-card:hover .basic-card-icon {
  transform: scale(1.1) rotate(5deg);
  background: var(--card-color, var(--accent));
  color: #fff;
  border-color: transparent;
}

.basic-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.basic-card-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0,0,0,0.2);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ─── BASIC CARD ACTIONS ────────────────────────── */
.basic-card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
  width: 100%;
}

.basic-card-actions .btn {
  flex: 1;
  padding: 8px 4px;
  font-size: 0.85rem;
}

/* ─── BASIC TEST SCREEN ─────────────────────────── */
.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.test-progress-info {
  font-weight: 600;
  color: var(--text-muted);
}

.test-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 40px;
}

.test-progress-fill {
  height: 100%;
  background: var(--accent-primary);
  transition: width 0.3s ease;
}

.basic-test-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.basic-test-q-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 500px;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.basic-test-topic {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.basic-test-word {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 40px;
  color: #fff;
}

.basic-test-input-wrapper {
  position: relative;
  margin-bottom: 20px;
}

#basic-test-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 15px 20px;
  font-size: 1.2rem;
  color: #fff;
  text-align: center;
  transition: all 0.3s ease;
}

#basic-test-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255,255,255,0.1);
}

#basic-test-input.correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

#basic-test-input.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.test-feedback {
  margin-top: 10px;
  font-weight: 600;
  height: 24px;
}

.test-feedback.correct { color: #10b981; }
.test-feedback.incorrect { color: #ef4444; }

.basic-test-hint {
  margin-top: 10px;
  padding: 10px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 0.95rem;
}

.basic-test-actions {
  margin-top: 30px;
}

/* Result Overlay */
.test-result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.result-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.result-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 30px 0;
}

.res-stat-item {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 20px;
}

.res-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.res-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.incorrect-section {
  margin: 20px 0;
  text-align: left;
  border-top: 1px solid var(--glass-border);
  padding-top: 20px;
}

.incorrect-section h3 {
  font-size: 0.9rem;
  color: #fca5a5;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.incorrect-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 10px;
}

.incorrect-list::-webkit-scrollbar {
  width: 4px;
}

.incorrect-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.incorrect-item {
  background: rgba(239, 68, 68, 0.1);
  padding: 10px 15px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid #ef4444;
}

.inc-word {
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
}

.inc-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.inc-reading {
  color: #fca5a5;
  font-weight: 500;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
