/* ══════════════════════════════════════════════════════════════
   LINGUA_NEWS — style.css
   Glassmorphism dark-mode design system
   Font: Outfit (headings) + Inter (body)
   ══════════════════════════════════════════════════════════════ */

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

:root {
  /* Background */
  --bg-base:        #060b18;
  --bg-deep:        #030610;

  /* Glass surfaces */
  --glass-bg:       rgba(255, 255, 255, 0.045);
  --glass-bg-hover: rgba(255, 255, 255, 0.075);
  --glass-border:   rgba(255, 255, 255, 0.10);
  --glass-border-h: rgba(255, 255, 255, 0.20);

  /* Text */
  --text-primary:   #e2e8f8;
  --text-secondary: #7b8ab8;
  --text-muted:     #3d4a6a;

  /* Accent */
  --accent:         #6366f1;
  --accent-glow:    rgba(99, 102, 241, 0.35);

  /* Verb category colors */
  --c-impact:    #ef4444;
  --c-assertion: #38bdf8;
  --c-cognition: #a78bfa;
  --c-economic:  #34d399;
  --c-creation:  #fbbf24;

  /* Verb highlight backgrounds (subtle, not blinding) */
  --h-impact:    rgba(239, 68,  68,  0.22);
  --h-assertion: rgba(56,  189, 248, 0.22);
  --h-cognition: rgba(167, 139, 250, 0.22);
  --h-economic:  rgba(52,  211, 153, 0.22);
  --h-creation:  rgba(251, 191, 36,  0.22);

  /* Layout */
  --nav-h:    64px;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ════════════════════════ ANIMATED BG ORBS ════════════════════ */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  animation: driftOrb 18s ease-in-out infinite alternate;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  top: -200px; left: -150px;
  animation-duration: 22s;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
  top: 40%; right: -180px;
  animation-duration: 18s;
  animation-delay: -6s;
}
.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  bottom: -150px; left: 35%;
  animation-duration: 26s;
  animation-delay: -12s;
}
@keyframes driftOrb {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 40px) scale(1.08); }
}

/* ════════════════════════ NAV ════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(6, 11, 24, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.brand-icon { font-size: 1.4rem; }
.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.brand-accent { color: var(--accent); }
.brand-tag {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 4px;
}

/* Section tabs */
.section-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.section-tabs::-webkit-scrollbar { display: none; }

.tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-s);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.tab:hover { color: var(--text-primary); background: var(--glass-bg); }
.tab.active {
  color: #fff;
  background: var(--glass-bg-hover);
  box-shadow: inset 0 0 0 1px var(--glass-border);
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Toggle */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.toggle-text {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  user-select: none;
}
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: background 0.25s var(--ease);
  cursor: pointer;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  top: 2px; left: 2px;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.toggle-switch input:checked + .toggle-slider {
  background: rgba(99, 102, 241, 0.3);
  border-color: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(18px);
  background: var(--accent);
}

/* Refresh button */
.refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-s);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.3s;
}
.refresh-btn:hover { color: #fff; border-color: var(--glass-border-h); }
.refresh-btn.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════ MAIN LAYOUT ════════════════════════ */
.main-layout {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 120px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  transition: grid-template-columns 0.4s var(--ease);
}

/* When panel is open: shrink grid */
.main-layout.panel-open {
  grid-template-columns: 1fr 420px;
}

/* ════════════════════════ FEED STATUS ════════════════════════ */
.feed-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.status-dot.spinning {
  animation: pulseDot 1.2s ease-in-out infinite;
}
.status-dot.ok { background: #34d399; animation: none; }
.status-dot.err { background: #ef4444; animation: none; }

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* ════════════════════════ ARTICLE GRID ════════════════════════ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

/* ── Card ── */
.article-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-l);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.28s var(--ease),
    border-color 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    background 0.28s var(--ease);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.article-card:hover {
  transform: translateY(-5px);
  border-color: var(--glass-border-h);
  background: var(--glass-bg-hover);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99,102,241,0.15);
}
.article-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 30px var(--accent-glow);
}

.card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--glass-bg);
}
.card-thumbnail-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.4;
}

.card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.card-source {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 2px 8px;
  border-radius: 20px;
}
.card-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-cta {
  margin-top: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.article-card:hover .card-cta {
  opacity: 1;
  transform: none;
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--glass-bg) 25%, rgba(255,255,255,0.07) 50%, var(--glass-bg) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-s);
}
.skeleton-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 0;
}
.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
}
.skeleton-line.w70 { width: 70%; }
.skeleton-line.w90 { width: 90%; }
.skeleton-line.w55 { width: 55%; }
@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ════════════════════════ READER PANEL ════════════════════════ */
.reader-panel {
  position: sticky;
  top: calc(var(--nav-h) + 12px);
  height: calc(100vh - var(--nav-h) - 28px);
  background: rgba(8, 14, 30, 0.8);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-l);
  overflow: hidden;
  display: none;
  flex-direction: column;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  opacity: 0;
  transform: translateX(20px);
}
.reader-panel.visible {
  display: flex;
  opacity: 1;
  transform: none;
}

.panel-inner {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
  flex: 1;
  padding-bottom: 32px;
}
.panel-inner::-webkit-scrollbar { width: 4px; }
.panel-inner::-webkit-scrollbar-track { background: transparent; }
.panel-inner::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

/* Panel close */
.panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.panel-close:hover { color: #fff; border-color: var(--glass-border-h); }

/* Hero image */
.panel-hero {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.04));
  overflow: hidden;
}
.panel-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Panel content */
.panel-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px 0;
  flex-wrap: wrap;
}
.panel-source {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 3px 10px;
  border-radius: 20px;
}
.panel-date { font-size: 0.75rem; color: var(--text-muted); }

.panel-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  padding: 14px 22px 0;
}

.panel-body {
  padding: 16px 22px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-secondary);
}
.panel-placeholder {
  color: var(--text-muted);
  font-style: italic;
}

/* Highlights off */
body.no-highlights mark { background: transparent; color: inherit; border-bottom: none; }

.panel-readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 22px 24px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-s);
  background: var(--accent-glow);
  transition: background 0.2s, border-color 0.2s;
}
.panel-readmore:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--accent);
}

/* ════════════════════════ VERB LEGEND ════════════════════════ */
.verb-legend {
  margin: 0 22px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.legend-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-empty {
  padding: 14px 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}
.legend-group {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.legend-group:last-child { border-bottom: none; }
.legend-group-name {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.legend-words {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.legend-word {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-s);
  font-weight: 500;
}

/* ════════════════════════ POWER VERB MARKS ════════════════════ */
mark {
  border-radius: 3px;
  padding: 1px 3px;
  font-style: normal;
  transition: opacity 0.2s;
  cursor: help;
}
mark.pv-impact    { background: var(--h-impact);    color: var(--c-impact);    border-bottom: 1.5px solid var(--c-impact); }
mark.pv-assertion { background: var(--h-assertion); color: var(--c-assertion); border-bottom: 1.5px solid var(--c-assertion); }
mark.pv-cognition { background: var(--h-cognition); color: var(--c-cognition); border-bottom: 1.5px solid var(--c-cognition); }
mark.pv-economic  { background: var(--h-economic);  color: var(--c-economic);  border-bottom: 1.5px solid var(--c-economic); }
mark.pv-creation  { background: var(--h-creation);  color: var(--c-creation);  border-bottom: 1.5px solid var(--c-creation); }

/* ════════════════════════ CATEGORY LEGEND (footer) ════════════ */
.category-legend {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(6, 11, 24, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  padding: 8px 18px;
  pointer-events: none;
}

.cat-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}
.cat-chip.cat-impact    { background: var(--h-impact);    color: var(--c-impact);    border: 1px solid var(--c-impact); }
.cat-chip.cat-assertion { background: var(--h-assertion); color: var(--c-assertion); border: 1px solid var(--c-assertion); }
.cat-chip.cat-cognition { background: var(--h-cognition); color: var(--c-cognition); border: 1px solid var(--c-cognition); }
.cat-chip.cat-economic  { background: var(--h-economic);  color: var(--c-economic);  border: 1px solid var(--c-economic); }
.cat-chip.cat-creation  { background: var(--h-creation);  color: var(--c-creation);  border: 1px solid var(--c-creation); }

/* ════════════════════════ RESPONSIVE ════════════════════════ */
@media (max-width: 900px) {
  .main-layout.panel-open {
    grid-template-columns: 1fr;
  }
  .reader-panel {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    height: calc(100vh - var(--nav-h));
    border-radius: 0;
    z-index: 80;
  }
  .brand-tag { display: none; }
  .category-legend { display: none; }
  .article-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav-inner { padding: 0 16px; gap: 12px; }
  .main-layout { padding: 20px 16px 100px; }
  .toggle-text { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   LESSON PANEL v2 components
   ══════════════════════════════════════════════════════════════ */
.panel-excerpt { padding: 10px 22px 0; font-size: 0.85rem; line-height: 1.65; color: var(--text-secondary); }

/* ── Simple Summary Card ─────────────────────────────────────── */
.simple-summary-card {
  margin: 16px 22px 0;
  background: rgba(251, 191, 36, 0.04);
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.simple-summary-card:hover {
  border-color: rgba(251, 191, 36, 0.35);
}
.simple-summary-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s;
}
.simple-summary-toggle:hover {
  background: rgba(251, 191, 36, 0.06);
}
.simple-summary-icon {
  font-size: 1rem;
}
.simple-summary-label {
  flex: 1;
  text-align: left;
}
.simple-summary-level {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}
.simple-summary-chevron {
  transition: transform 0.25s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}
.simple-summary-toggle.open .simple-summary-chevron {
  transform: rotate(180deg);
}
.simple-summary-body {
  padding: 0 16px 16px;
  animation: fadeIn 0.2s ease;
}
.simple-summary-body[hidden] {
  display: none;
}
.simple-summary-text {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
  padding: 12px 14px;
  background: rgba(251, 191, 36, 0.04);
  border-left: 3px solid rgba(251, 191, 36, 0.4);
  border-radius: 0 8px 8px 0;
}

.lesson-container { margin: 20px 0 0; padding: 0 22px 24px; }
.lesson-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px 20px; text-align: center; }
.lesson-state-icon { font-size: 2.2rem; }
.lesson-state-msg { font-size: 0.85rem; color: var(--text-muted); max-width: 260px; line-height: 1.5; }
.lesson-state-msg.error { color: #f87171; }
.lesson-spinner { width: 36px; height: 36px; border: 3px solid rgba(99,102,241,0.2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; margin-bottom: 4px; }
.lesson-tabs { display: flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.lesson-tab { background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-secondary); font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 500; padding: 7px 13px; border-radius: var(--radius-s); cursor: pointer; white-space: nowrap; transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease); }
.lesson-tab:hover { color: var(--text-primary); background: var(--glass-bg-hover); }
.lesson-tab.active { color: #fff; background: rgba(99,102,241,0.18); border-color: rgba(99,102,241,0.45); }
.lesson-section { animation: fadeIn 0.25s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.vocab-grid { display: flex; flex-direction: column; gap: 10px; }
.vocab-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-m); padding: 14px 16px; transition: border-color 0.2s, background 0.2s; }
.vocab-card:hover { border-color: var(--glass-border-h); background: var(--glass-bg-hover); }
.vocab-word-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.vocab-word { font-family: 'Outfit', sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--accent); }
.vocab-pos { font-size: 0.7rem; font-style: italic; color: var(--text-muted); background: var(--glass-bg); padding: 1px 7px; border-radius: 20px; border: 1px solid var(--glass-border); }
.vocab-definition { font-size: 0.83rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 6px; }
.vocab-context { font-size: 0.78rem; color: var(--text-muted); font-style: italic; border-left: 2px solid rgba(99,102,241,0.35); padding-left: 10px; line-height: 1.5; }
.grammar-list { display: flex; flex-direction: column; gap: 14px; }
.grammar-card { background: rgba(139,92,246,0.06); border: 1px solid rgba(139,92,246,0.2); border-radius: var(--radius-m); padding: 14px 16px; }
.grammar-structure-name { font-family: 'Outfit', sans-serif; font-size: 0.88rem; font-weight: 700; color: #a78bfa; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.grammar-structure-name::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #a78bfa; flex-shrink: 0; }
.grammar-example { font-size: 0.83rem; color: var(--text-primary); font-style: italic; line-height: 1.55; border-left: 2px solid rgba(139,92,246,0.45); padding-left: 10px; margin-bottom: 8px; }
.grammar-why { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }
.quiz-questions { display: flex; flex-direction: column; gap: 18px; margin-bottom: 16px; }
.quiz-question { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-m); padding: 14px 16px; }
.quiz-question-text { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; line-height: 1.45; }
.quiz-options { display: flex; flex-direction: column; gap: 7px; }
.quiz-option { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 7px 10px; border-radius: var(--radius-s); border: 1px solid transparent; transition: background 0.15s, border-color 0.15s; }
.quiz-option:hover { background: var(--glass-bg-hover); border-color: var(--glass-border); }
.quiz-option input[type="radio"] { accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
.quiz-option-label { font-size: 0.82rem; color: var(--text-secondary); cursor: pointer; line-height: 1.4; }
.quiz-option.correct-answer { background: rgba(52,211,153,0.1); border-color: #34d399; }
.quiz-option.correct-answer .quiz-option-label { color: #34d399; font-weight: 600; }
.quiz-option.wrong-answer { background: rgba(239,68,68,0.08); border-color: #ef4444; }
.quiz-option.wrong-answer .quiz-option-label { color: #f87171; }
.quiz-submit { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(139,92,246,0.2)); border: 1px solid rgba(99,102,241,0.45); color: #fff; font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 600; padding: 9px 20px; border-radius: var(--radius-s); cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.15s; }
.quiz-submit:hover { background: linear-gradient(135deg, rgba(99,102,241,0.45), rgba(139,92,246,0.3)); border-color: var(--accent); transform: translateY(-1px); }
.quiz-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.secondary-btn { background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-secondary); }
.secondary-btn:hover { background: var(--glass-bg-hover); border-color: var(--glass-border-h); color: var(--text-primary); }
.quiz-result { margin-top: 12px; font-size: 0.82rem; font-weight: 600; padding: 10px 14px; border-radius: var(--radius-s); line-height: 1.45; }
.quiz-result.pass { background: rgba(52,211,153,0.1); color: #34d399; border: 1px solid rgba(52,211,153,0.25); }
.quiz-result.fail { background: rgba(239,68,68,0.08); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.cloze-instructions { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px; font-style: italic; }
.cloze-paragraph { font-size: 0.88rem; line-height: 2.2; color: var(--text-secondary); background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-m); padding: 16px; margin-bottom: 16px; }
.cloze-input { display: inline-block; background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.35); border-radius: 5px; color: #fff; font-family: 'Inter', sans-serif; font-size: 0.84rem; padding: 2px 8px; min-width: 80px; width: 110px; text-align: center; outline: none; transition: border-color 0.2s, background 0.2s; vertical-align: baseline; }
.cloze-input:focus { border-color: var(--accent); background: rgba(99,102,241,0.15); }
.cloze-input.correct { border-color: #34d399; background: rgba(52,211,153,0.12); color: #34d399; }
.cloze-input.wrong { border-color: #ef4444; background: rgba(239,68,68,0.10); color: #f87171; }
.cloze-bank-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 8px; }
.cloze-bank { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.cloze-bank-word { font-size: 0.8rem; font-weight: 600; color: var(--accent); background: var(--accent-glow); border: 1px solid rgba(99,102,241,0.3); padding: 4px 12px; border-radius: 20px; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.cloze-bank-word:hover { background: rgba(99,102,241,0.22); border-color: rgba(99,102,241,0.6); }
.cloze-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

/* ── Two-Part Cloze Sub-sections ──────────────────────────────────────── */
.cloze-sub-section { margin-bottom: 8px; }
.cloze-sub-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.cloze-sub-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 20px;
  flex-shrink: 0;
}
.grammar-badge {
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.35);
  color: #2dd4bf;
}
.vocab-badge {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #a78bfa;
}
.cloze-sub-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.cloze-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 24px 0 28px;
}
/* Grammar cloze inputs — slightly different placeholder style */
.cloze-grammar-input::placeholder {
  color: rgba(45, 212, 191, 0.4);
  font-style: italic;
}


/* Generate Lesson button */
.generate-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(139,92,246,0.18));
  border: 1px solid rgba(99,102,241,0.5);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 12px 24px;
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease), transform 0.18s var(--ease), box-shadow 0.22s var(--ease);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulseBtn 2.8s ease-in-out infinite;
}
.generate-btn:hover {
  background: linear-gradient(135deg, rgba(99,102,241,0.45), rgba(139,92,246,0.32));
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99,102,241,0.35);
  animation: none;
}
.generate-btn:active { transform: translateY(0); }
@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.35); }
  50%       { box-shadow: 0 0 0 8px rgba(99,102,241,0); }
}

/* Cache hit badge */
.cache-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 0.73rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.22);
  padding: 5px 12px;
  border-radius: 20px;
  width: fit-content;
}
.cache-badge-icon { font-size: 0.85rem; }

/* ─── CEFR Level Selector ────────────────────────────────────────────────── */
.level-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
  flex-wrap: wrap;
}
.level-selector-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.level-buttons {
  display: flex;
  gap: 6px;
}
.level-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.level-btn:hover {
  border-color: rgba(99,102,241,0.45);
  color: #fff;
  background: rgba(99,102,241,0.12);
}
.level-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(99,102,241,0.4);
}

/* Level badge shown on rendered lesson */
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  color: #a5b4fc;
  margin-bottom: 10px;
}

/* ─── Glass Select (CEFR level dropdown) ────────────────────────────────────── */
.level-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 4px;
}
.level-selector-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.glass-select {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a5b4fc' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center,
    rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: var(--radius-m, 10px);
  color: #e2e8f0;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 36px 8px 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.glass-select:hover {
  border-color: rgba(99,102,241,0.65);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.glass-select:focus {
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.22);
}
.glass-select option {
  background: #1e1b2e;
  color: #e2e8f0;
  font-weight: 500;
}

/* ─── Read Aloud Practice ────────────────────────────────────────────────── */
.read-aloud-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
}
.read-aloud-container h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0;
}
.read-aloud-container .instructions {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* Target blockquote */
#target-text {
  background: rgba(255,255,255,0.04);
  border-left: 3px solid rgba(99,102,241,0.5);
  border-radius: 8px;
  margin: 0;
  padding: 14px 16px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #cbd5e1;
  font-style: normal;
  letter-spacing: 0.01em;
}

/* Mic / glass button */
.glass-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.4);
  border-radius: var(--radius-m, 10px);
  color: #e2e8f0;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  width: fit-content;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.glass-btn:hover {
  background: rgba(99,102,241,0.22);
  border-color: rgba(99,102,241,0.7);
  transform: translateY(-1px);
}

/* Feedback text */
.feedback-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 1.4em;
  margin: 0;
}

/* Word Highlighting */
.word-correct {
  color: #4ade80;
  font-weight: bold;
  transition: color 0.3s ease;
}
.word-incorrect {
  color: #f87171;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: #f87171;
}

/* Mic Button Animation */
.listening-active {
  background-color: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(239, 68, 68, 0.4); }
  70%  { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(239, 68, 68, 0);   }
}

/* ─── Vault Nav Button ───────────────────────────────────────────────────── */
.vault-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid rgba(99,102,241,0.4);
  background: rgba(99,102,241,0.1);
  color: #a5b4fc;
  cursor: pointer;
  transition: all 0.2s ease;
}
.vault-nav-btn:hover {
  background: rgba(99,102,241,0.22);
  border-color: rgba(99,102,241,0.7);
  color: #fff;
}
.vault-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--accent, #6366f1);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
}

/* ─── Vault Modal Overlay ─────────────────────────────────────────────────── */
.vault-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 5, 18, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.vault-modal[hidden] { display: none; }

.vault-modal-inner {
  background: rgba(22, 20, 44, 0.92);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.vault-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.vault-modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0;
}
.vault-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Empty state */
.vault-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-muted);
}
.vault-empty-icon { font-size: 2.5rem; }
.vault-empty p    { margin: 0; font-size: 0.9rem; }
.vault-empty-hint { font-size: 0.8rem !important; opacity: 0.7; }
.vault-empty[hidden] { display: none; }

/* ─── Flip-card Grid ──────────────────────────────────────────────────────── */
.vault-flip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 20px 24px 24px;
  overflow-y: auto;
}

/* 3-D flip card */
.flip-card {
  perspective: 900px;
  height: 160px;
  cursor: pointer;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(.4,0,.2,1);
  border-radius: 14px;
}
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

/* Shared face styles */
.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.flip-card-front {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.3);
}
.flip-card-back {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  transform: rotateY(180deg);
  overflow-y: auto;
}

/* Front content */
.flip-word {
  font-size: 1.15rem;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: -0.01em;
}
.flip-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.flip-date {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.25);
}

/* Back content */
.flip-definition {
  font-size: 0.78rem;
  color: #d1fae5;
  line-height: 1.5;
  flex: 1;
}
.flip-context {
  font-size: 0.72rem;
  font-style: italic;
  color: #6ee7b7;
  margin-top: 6px;
}
.flip-remove-btn {
  align-self: flex-end;
  margin-top: 8px;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 9px;
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.flip-remove-btn:hover {
  background: rgba(239,68,68,0.3);
}

/* ─── Vault Quiz Button ──────────────────────────────────────────────────── */
.vault-quiz-btn {
  padding: 7px 14px !important;
  font-size: 0.82rem !important;
  background: rgba(16,185,129,0.12) !important;
  border-color: rgba(16,185,129,0.4) !important;
  color: #6ee7b7 !important;
}
.vault-quiz-btn:hover {
  background: rgba(16,185,129,0.22) !important;
  border-color: rgba(16,185,129,0.7) !important;
  color: #fff !important;
}

/* ─── Quiz View ──────────────────────────────────────────────────────────── */
.vault-quiz-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 24px 28px;
  overflow-y: auto;
}
.vault-quiz-view[hidden] { display: none; }

/* Streak bar */
.quiz-streak-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 10px 16px;
}
.quiz-streak {
  font-size: 1rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: -0.01em;
}
.quiz-total {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Prompt card */
.quiz-prompt-card {
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-prompt-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #818cf8;
  margin: 0;
}
.quiz-definition {
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.6;
  margin: 0;
  font-weight: 500;
}
.quiz-context {
  font-size: 0.82rem;
  font-style: italic;
  color: #94a3b8;
  border-left: 3px solid rgba(99,102,241,0.4);
  margin: 0;
  padding: 8px 14px;
  border-radius: 0 8px 8px 0;
  background: rgba(255,255,255,0.02);
}
.quiz-blank {
  font-weight: 800;
  color: #a5b4fc;
  letter-spacing: 0.08em;
  background: rgba(99,102,241,0.15);
  padding: 1px 6px;
  border-radius: 4px;
  font-style: normal;
}

/* Choice buttons */
.quiz-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quiz-option-btn {
  background: rgba(30, 41, 59, 0.5); /* Slightly transparent dark */
  color: #e2e8f0; /* Brighter white/grey text */
  border: 1px solid rgba(99, 102, 241, 0.3); /* Subtle indigo border */
  padding: 1.2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  text-align: left;
}
.quiz-option-btn:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.15);
  border-color: #6366f1; /* Bright indigo border on hover */
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}
.quiz-option-btn.correct {
  background: rgba(16,185,129,0.2) !important;
  border-color: #10b981 !important;
  color: #6ee7b7 !important;
  animation: correctPulse 0.4s ease;
}
.quiz-option-btn.wrong {
  background: rgba(239,68,68,0.15) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}
.quiz-option-btn:disabled { cursor: default; }

@keyframes correctPulse {
  0%   { transform: scale(1);    }
  40%  { transform: scale(1.03); }
  100% { transform: scale(1);    }
}

/* Feedback */
.quiz-feedback {
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
}
.quiz-feedback[hidden] { display: none; }
.quiz-feedback.correct { color: #6ee7b7; }
.quiz-feedback.wrong   { color: #fca5a5; }

/* Exit button */
.quiz-exit-btn {
  align-self: flex-start;
  margin-top: 4px;
}

/* ─── Quiz Focus Card (replaces quiz-prompt-card) ────────────────────────── */
.quiz-focus-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}


/* ════════════════════════ INLINE CLOZE WIDGET ════════════════════════ */
/* Gap-Fill Inputs */
.cloze-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid #6366f1; /* Indigo underline */
    color: #f8fafc;
    font-size: 1.15rem;
    font-family: inherit;
    width: 120px;
    text-align: center;
    outline: none;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.cloze-input:focus {
    border-bottom-width: 3px;
    border-bottom-color: #a855f7; /* Purple focus */
    background: rgba(168, 85, 247, 0.1);
}

/* Word Bank Chips */
.word-chip {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    color: #c7d2fe;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    user-select: none;
}

.word-chip:hover {
    background: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

/* Validation States */
.cloze-correct {
    border-bottom-color: #10b981 !important;
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.cloze-incorrect {
    border-bottom-color: #ef4444 !important;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}
