/* Quizzes & Games - Modern Scholar Aesthetic */

.game-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* (media queries moved lower) */

/* ── Sidebar Insights ── */
.game-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.insight-card {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-editorial);
  border: none;
}

@media (max-width: 900px) {
  .game-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .game-sidebar {
    order: 2;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm) !important;
    width: 100%;
  }
  
  .quiz-main {
    order: 1;
    width: 100%;
  }

  .game-sidebar .insight-card {
    padding: var(--space-md);
    margin: 0;
  }

  .game-sidebar > button,
  .game-sidebar > a {
    grid-column: span 2;
    width: 100%;
    margin: 0;
  }
}

.insight-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--on-surface-variant);
  margin-bottom: var(--space-lg);
  display: block;
}

.score-display {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--on-surface);
}

.score-num {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 800;
}

.score-num.correct { color: var(--primary); }
.score-num.wrong { color: var(--error); }

/* ── Quiz Area ── */
.quiz-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.quiz-card {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  text-align: center;
  position: relative;
  overflow: visible; /* Allow stickers to overlap edges */
  box-shadow: var(--shadow-editorial);
  border: none;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.quiz-card-badge {
  position: absolute;
  top: var(--space-xl);
  left: var(--space-xl);
}

.aq-word-main {
  font-family: var(--font-headline);
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.aq-placeholder {
  display: inline-block;
  color: var(--primary);
  opacity: 0.3;
  margin-right: 0.2em;
}

.quiz-translation {
  font-style: italic;
  color: var(--on-surface-variant);
  font-size: 1.15rem;
  margin-top: var(--space-md);
  opacity: 0.9;
}

.aq-article-placeholder {
  color: var(--primary);
  opacity: 0.4;
  margin-right: 0.15em;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.aq-article-placeholder.aq-article-correct {
  color: var(--accent);
  opacity: 1;
}

.aq-article-placeholder.aq-article-wrong {
  color: var(--error);
  opacity: 1;
}

/* ── Options Grid ── */
.options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 600px) {
  .options-grid {
    gap: var(--space-sm);
  }
}

.option-btn, .aq-option-btn {
  background: var(--surface-container-lowest);
  border: 2px solid var(--surface-container-high);
  border-radius: var(--radius-xl);
  padding: var(--space-lg) var(--space-md);
  font-family: var(--font-headline);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--on-surface);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: lowercase;
}

.option-btn:hover, .aq-option-btn:hover {
  transform: translateY(-4px) rotate(-1deg);
  border-color: var(--on-surface);
  background: var(--surface-container);
  box-shadow: 6px 6px 0px var(--primary); /* Playful offset shadow */
}

.option-btn:active, .aq-option-btn:active {
  transform: translateY(0) scale(0.98);
}

/* ── Feedback States ── */
.quiz-feedback {
  font-weight: 700;
  font-size: 1.1rem;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  margin-top: var(--space-lg);
}

.quiz-feedback.correct {
  color: var(--accent);
  background: rgba(34, 197, 94, 0.1);
  animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quiz-feedback.incorrect {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 0.9; transform: scale(1.1); }
  80% { opacity: 1; transform: scale(0.89); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.tq-options-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (max-width: 600px) {
  .tq-options-stack {
    grid-template-columns: 1fr;
  }
}

.tq-option-btn, .iq-option-btn {
  width: 100%;
  text-align: left;
  padding: var(--space-lg) var(--space-xl);
  font-family: var(--font-headline);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--surface-container-lowest);
  border: 2px solid var(--surface-container-high);
  border-radius: var(--radius-xl);
  color: var(--on-surface);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tq-option-btn:hover, .iq-option-btn:hover {
  transform: translateY(-4px) rotate(0.5deg);
  border-color: var(--on-surface);
  background: var(--surface-container);
  box-shadow: 4px 4px 0px var(--primary);
}

.tq-option-btn.correct, .iq-option-btn.iq-correct, .iq-option-btn.tq-correct {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.tq-option-btn.wrong, .iq-option-btn.iq-wrong, .iq-option-btn.tq-wrong {
  background: var(--error);
  color: var(--on-error);
  border-color: var(--error);
}

.tq-option-index {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-container-high);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--on-surface-variant);
  transition: all 0.2s;
}

.tq-option-btn:hover .tq-option-index, .iq-option-btn:hover .tq-option-index {
  background: var(--primary-light);
  color: white;
}

/* ── Sentence Builder Specifics ── */
.sb-assembly-area {
  min-height: 120px;
  background: var(--surface-container-low);
  border: 2px dashed var(--surface-container-highest);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-content: flex-start;
  margin-bottom: var(--space-xl);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sb-assembly-area.active {
  border-color: var(--primary-light);
  background: rgba(99, 102, 241, 0.05);
}

.sb-word-pool {
  background: var(--surface-container-low);
  border: 1px solid var(--surface-container-high);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  min-height: 100px;
  margin-bottom: var(--space-2xl);
}

.sb-tile {
  padding: 0.75rem 1.25rem;
  background: var(--surface-container-lowest);
  border: 1px solid var(--surface-container-high);
  border-radius: var(--radius-md);
  font-weight: 700;
  color: var(--on-surface);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 1.1rem;
}

.sb-tile:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  color: var(--primary);
}

.sb-tile:active {
  transform: translateY(0);
}

.sb-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-xl);
}

/* ── Done States ── */
.done-card {
  padding: var(--space-3xl) var(--space-xl);
}

.done-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.done-subtitle {
  color: var(--on-surface-variant);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto var(--space-2xl);
}

/* ── Completion Quiz Specifcs ── */
.letter-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  margin: var(--space-xl) 0;
}

.letter-box {
  width: 42px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 800;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.letter-box.filled {
  background: var(--surface-container-high);
  color: var(--on-surface);
}

.letter-box.blank {
  background: var(--surface-container-low);
  border: 2px solid var(--surface-container-highest);
}

.letter-box.blank:focus-within {
  border-color: var(--primary);
  background: var(--surface-container-lowest);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 600px) {
  .letter-box {
    width: 32px !important;
    height: 44px !important;
    font-size: 1.25rem !important;
  }
  .article-btn {
    padding: 0.5rem 1rem !important;
    font-size: 1rem !important;
  }
}

.letter-input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: var(--primary);
  outline: none;
  text-transform: lowercase;
}

.letter-input.hinted {
  color: var(--accent);
}

.letter-input.wrong {
  color: var(--error);
}

.letter-input.correct-letter {
  color: var(--accent);
}

/* Timer Bar */
.timer-bar-container {
  height: 6px;
  background: var(--surface-container-high);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-xl);
}

.timer-bar {
  height: 100%;
  width: 100%;
  background: var(--accent);
  transition: width 250s linear;
}

/* Article Choice Buttons in Completion */
.cq-article-group {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.article-btn {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 700;
  border: 2px solid var(--surface-container-high);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: all 0.2s;
}

.article-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.article-btn.selected {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.btn-inverse-primary {
  background: var(--surface-container-lowest);
  color: var(--primary);
  border: 2px solid var(--primary-container);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-inverse-primary:hover {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0px var(--primary-container);
}

.btn-cta-secondary {
  background: transparent;
  color: var(--on-surface);
  border: 2px solid var(--surface-container-high);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-cta-secondary:hover {
  background: var(--surface-container-low);
  border-color: var(--on-surface);
  transform: translateY(-2px);
}

/* --- RTL Support --- */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .sidebar {
  left: auto;
  right: -320px;
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -20px 0 60px rgba(46, 51, 53, 0.08);
}

[dir="rtl"] .sidebar.sidebar-open {
  transform: translateX(-320px);
  right: -320px;
}

[dir="rtl"] .sidebar-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-links a {
  text-align: right;
  padding: 0.8rem 1rem 0.8rem 0;
}

[dir="rtl"] .nav-level-select {
  padding: 0.6rem 1rem 0.6rem 2rem;
  background-position: left 0.5rem center;
}

[dir="rtl"] .nav-user {
  align-items: flex-end;
}

@media (min-width: 1024px) {
  [dir="rtl"] .sidebar.sidebar-open~.main-content {
    margin-left: 0;
    margin-right: 250px;
  }
}

[dir="rtl"] .badge {
  right: auto;
  left: 1.5rem;
}

[dir="rtl"] .flash-close-btn {
  right: auto;
  left: 1.5rem;
}

[dir="rtl"] .social-share-bar {
  right: auto;
  left: 0;
  border-radius: 0 12px 12px 0;
  border-left: none;
  border-right: 1px solid var(--border);
}

@media (max-width: 768px) {
  [dir="rtl"] .social-share-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

[dir="rtl"] .card-back,
[dir="rtl"] .auth-form,
[dir="rtl"] .vocabulary-table th {
  text-align: right;
}

[dir="rtl"] .game-difficulty {
  margin-left: 0;
  margin-right: 8px;
}

[dir="rtl"] .sentence-part.dropped {
  padding-left: 0;
  padding-right: 1rem;
  border-left: none;
  border-right: 4px solid var(--primary);
}

[dir="rtl"] #error_explanation {
  border-left: none;
  border-right: 4px solid var(--accent);
}

[dir="rtl"] #error_explanation ul {
  padding-left: 0;
  padding-right: 1.5rem;
}

[dir="rtl"] .flashcard-container .controls {
  flex-direction: row-reverse;
}

[dir="rtl"] .flashcard-container .controls .btn {
  direction: ltr;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

.users-table td .badge {
  position: relative;
  top: auto;
  right: auto;
}

.btn-report-unified {
  background: transparent !important;
  border: none !important;
  color: #ef4444 !important;
  font-size: 0.9rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  opacity: 0.8 !important;
  transition: all 0.2s ease-in-out !important;
  padding: 0.5rem 1rem !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  width: auto !important;
  height: auto !important;
  z-index: 10 !important;
}

.btn-report-unified:hover {
  opacity: 1 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  transform: translateY(-1px) !important;
}

.btn-report-absolute {
  position: absolute !important;
  top: -2.2rem !important;
  right: 0 !important;
  padding: 0.5rem !important;
}

.btn-report-unified span {
  font-size: 1.1rem !important;
}


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

:root {
  /* Specification: Editorial Playfulness */
  --font-main: 'Work Sans', system-ui, -apple-system, sans-serif;
  --font-headline: 'Plus Jakarta Sans', sans-serif;

  /* Color Palette - Vibrant Purple & Warm Peach */
  --primary: #742fe5;
  --primary-light: #9458f3;
  --primary-dark: #581eb0;
  --primary-container: #ceb5ff;
  --on-primary: #ffffff;
  --secondary: #ff9a8b;
  /* Warm Peach */
  --secondary-container: #ffefe1;
  --on-secondary: #2e3335;
  --tertiary: #5d5fef;
  --tertiary-container: #e0e0ff;
  --on-tertiary-container: #1a1a5e;

  /* Specification: "No Pure Black" */
  --on-surface: #2e3335;
  --on-surface-variant: #5f6368;
  --text-main: var(--on-surface);
  --text-muted: var(--on-surface-variant);

  /* Surface Hierarchy - Physical Layers */
  --bg-primary: #ffffff;
  --bg-secondary: #fffaf8;
  /* Soft peach/off-white */
  --surface: #ffffff;
  --surface-dim: #f5f3f2;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #fdfaf8;
  --surface-container: #f7f1ee;
  --surface-container-high: #f0e9e6;
  --surface-container-highest: #e8e1de;
  --inverse-surface: #2e3335;
  --inverse-on-surface: #ffffff;

  /* Status Colors */
  --accent: #22c55e;
  --error: #ef4444;
  --on-error: #ffffff;

  /* Spacing - Breathable Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Radius - Soft Playful */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;

  /* Elevation - Ambient & Tonal */
  --shadow-editorial: 0px 20px 40px rgba(46, 51, 53, 0.06);
  --shadow-sm: 0 2px 4px rgba(46, 51, 53, 0.04);
  --shadow-md: 0 8px 16px rgba(46, 51, 53, 0.06);
  --shadow-lg: 0 20px 40px rgba(46, 51, 53, 0.08);

  /* System Defaults */
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: var(--radius-xl);
  --navbar-bg: rgba(255, 255, 255, 0.7);
  --stats-success: #16a34a;
  --stats-success-bg: #f0fdf4;
  --stats-warning: #ca8a04;
  --stats-warning-bg: #fefce8;
  --stats-error: #dc2626;
  --stats-error-bg: #fef2f2;
  --stats-info: #2563eb;
  --stats-info-bg: #eff6ff;
  --stats-neutral-bg: #ffffff;
}

[data-theme='dark'] {
  --bg-primary: #020617;
  --bg-secondary: #0f172a;
  --surface: #1e293b;
  --surface-dim: #020617;
  --surface-container-lowest: #0f172a;
  --surface-container-low: #1e293b;
  --surface-container: #334155;
  --surface-container-high: #475569;
  --surface-container-highest: #64748b;
  --on-surface: #f8fafc;
  --on-surface-variant: #94a3b8;
  --text-main: var(--on-surface);
  --text-muted: var(--on-surface-variant);
  --on-secondary: #f1f5f9;
  --primary: #c084fc;
  --primary-light: #d8b4fe;
  --primary-dark: #a855f7;
  --primary-container: #581c87;
  --on-primary: #ffffff;
  --secondary: #fb923c;
  --secondary-container: #7c2d12;
  --tertiary: #818cf8;
  --tertiary-container: #312e81;
  --on-tertiary-container: #c7d2fe;
  --navbar-bg: rgba(2, 6, 23, 0.8);
  --shadow-editorial: 0px 20px 40px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.7);
  --stats-success: #4ade80;
  --stats-success-bg: rgba(34, 197, 94, 0.1);
  --stats-warning: #facc15;
  --stats-warning-bg: rgba(234, 179, 8, 0.1);
  --stats-error: #f87171;
  --stats-error-bg: rgba(239, 68, 68, 0.1);
  --stats-info: #60a5fa;
  --stats-info-bg: rgba(59, 130, 246, 0.1);
  --stats-neutral-bg: var(--surface);
}

* {
  box-sizing: border-box;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Specification: Editorial Glass */
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: none;
  padding: var(--space-md) 0;
  transition: var(--transition);
}

.nav-brand {
  font-weight: 800;
  font-size: 1.25rem;
  background: linear-gradient(to right, var(--primary), #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-transform: none;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-main);
  margin: 0;
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.headline-font {
  font-family: var(--font-headline);
  letter-spacing: -0.01em;
}

h1,
.display-lg {
  font-family: var(--font-headline);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--on-surface);
}

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

.app-container {
  width: 100%;
  max-width: 1100px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 0 auto;
  box-sizing: border-box;
}

.flashcard-container {
  width: 100%;
  max-width: 1100px;
  padding: 2rem;
  margin: 0 auto;
  box-sizing: border-box;
}

header {
  text-align: center;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
  line-height: 1.2;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: var(--surface-container-low);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  transition: width 0.3s ease;
}

/* Flashcard Styles */
.flashcard-scene {
  perspective: 1000px;
  height: 400px;
  width: 100%;
  margin: 0 auto;
}

.flashcard {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
  direction: ltr !important;
}

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

.flashcard-inner {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--border-radius-lg);
  padding: 3rem;
  box-sizing: border-box;
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--card-shadow-hover);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card-back {
  transform: rotateY(180deg);
  background: var(--bg-card);
  align-items: flex-start;
  text-align: left;
}

.badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(99, 102, 241, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--primary);
}

#card-english {
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  word-break: break-word;
  color: var(--text-main);
}

.instruction {
  color: var(--text-muted);
  font-size: 1rem;
  opacity: 0.8;
  animation: pulse 2s infinite;
}

.translations {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  margin: 0 0 0.4rem 0;
  font-weight: 600;
  display: block;
}

.translation-group h3 {
  font-size: 2.2rem;
  margin: 0;
  font-weight: 600;
  color: var(--text-main);
}

.arabic-word {
  font-family: Tahoma, 'Amiri', serif;
  font-size: 2.5rem !important;
  color: var(--secondary);
}

.plural-form {
  font-size: 1.2rem;
  color: #64748b;
  margin: 0.5rem 0 0 0;
}

.example-sentence {
  font-size: 1.2rem;
  font-style: italic;
  margin: 0;
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
  color: #334155;
  line-height: 1.5;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.btn {
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.btn:not(:disabled):active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(116, 47, 229, 0.25);
}

.btn-primary:not(:disabled):hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(116, 47, 229, 0.35);
}

.auth-btn-primary {
  background: var(--primary) !important;
  color: white !important;
  border: none !important;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid #e2e8f0;
}

.btn-secondary:not(:disabled):hover {
  background: var(--bg-secondary);
}

/* Action Buttons */
.btn-action {
  flex: 1;
  justify-content: center;
  font-size: 1rem;
  padding: 0.8rem 1rem;
}

.btn-not-yet {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
}

.btn-not-yet:not(:disabled):hover {
  background: #fee2e2;
}

.btn-maybe {
  background: #fefce8;
  color: #eab308;
  border: 1px solid #fef08a;
}

.btn-maybe:not(:disabled):hover {
  background: #fef9c3;
}

.btn-learned {
  background: #f0fdf4;
  color: #22c55e;
  border: 1px solid #bbf7d0;
}

.btn-learned:not(:disabled):hover {
  background: #dcfce7;
}

/* Badges */
.badge-learned {
  background: #f0fdf4;
  color: #22c55e;
  position: static;
  display: inline-block;
  font-size: 0.8rem;
}

.badge-maybe {
  background: #fefce8;
  color: #eab308;
  position: static;
  display: inline-block;
  font-size: 0.8rem;
}

.badge-not-yet {
  background: #fef2f2;
  color: #ef4444;
  position: static;
  display: inline-block;
  font-size: 0.8rem;
}

/* Swipe Animations */
.swipe-out-right {
  animation: swipeRight 0.3s forwards;
}

.swipe-out-left {
  animation: swipeLeft 0.3s forwards;
}

.swipe-out-down {
  animation: swipeDown 0.3s forwards;
}

@keyframes swipeRight {
  to {
    transform: translateX(150%) rotate(20deg);
    opacity: 0;
  }
}

@keyframes swipeLeft {
  to {
    transform: translateX(-150%) rotate(-20deg);
    opacity: 0;
  }
}

@keyframes swipeDown {
  to {
    transform: translateY(150%) rotate(10deg);
    opacity: 0;
  }
}

@keyframes pulse {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.5;
  }
}

/* Stats Dashboard Styling */
.stats-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.stats-dashboard .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.stats-dashboard h1 {
  font-size: 2.5rem;
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stat-total .stat-value {
  color: var(--text-main);
}

.stat-learned .stat-value {
  color: #22c55e;
}

.stat-maybe .stat-value {
  color: #eab308;
}

.stat-not-yet .stat-value {
  color: #ef4444;
}

.stat-unseen .stat-value {
  color: var(--primary);
}

.progress-section {
  background: var(--bg-card);
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius);
  padding: 1.5rem 2rem;
  margin-top: 1.5rem;
}

.stats-dashboard .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.stats-dashboard h1 {
  font-size: 2.5rem;
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.game-stats,
.trans-stats,
.artikel-stats,
.build-stats {
  grid-template-columns: repeat(4, 1fr);
}

.stat-card {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-editorial);
  /* Boundary defined via surface shift, no 1px border */
}

.stat-card:hover {
  transform: translateY(-8px) rotate(1deg);
  /* Intentional asymmetry */
  box-shadow: var(--shadow-lg);
}

.stat-card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stat-total .stat-value {
  color: var(--text-main);
}

.stat-learned .stat-value {
  color: #4ade80;
}

.stat-maybe .stat-value {
  color: #facc15;
}

.stat-not-yet .stat-value {
  color: #fb7185;
}

.stat-unseen .stat-value {
  color: #818cf8;
}

.progress-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-container-high);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-top: 1.5rem;
}

.progress-section h3 {
  margin: 0 0 1rem 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stats-section-header {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 1.2rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-icon {
  font-size: 1.5rem;
}

@media (max-width: 600px) {
  #card-english {
    font-size: 2.5rem;
  }

  .translation-group h3 {
    font-size: 1.8rem;
  }

  .arabic-word {
    font-size: 2rem !important;
  }

  .flashcard-front,
  .flashcard-back {
    padding: 2rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
  }
}

/* Global Sidebar Navigation */
.main-content {
  flex: 1;
  transition: margin-left 0.3s ease;
  box-sizing: border-box;
}

/* Sidebar Container */
.sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100vh;
  /* Specification: Editorial Glass */
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  padding: 0;
  box-sizing: border-box;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2001;
  box-shadow: var(--shadow-editorial);
  overflow-y: auto;
}

[data-theme='light'] .sidebar {
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar.sidebar-open {
  transform: translateX(320px);
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Header & Mobile Toggle */
.header-mobile {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--surface-container-low);
  border-bottom: 1px solid var(--surface-container-high);
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.menu-toggle,
.menu-close {
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.menu-toggle:hover {
  opacity: 0.7;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

.menu-close {
  font-size: 1.5rem;
  line-height: 1;
}

.nav-brand {
  font-weight: 800;
  font-size: 1.2rem;
  background: linear-gradient(to right, #818cf8, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.nav-brand a {
  text-decoration: none;
  color: inherit;
}

/* Vertical Links */
.nav-links {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 2rem;
  text-decoration: none;
  color: var(--on-surface);
  font-weight: 500;
  transition: var(--transition);
  border: none;
}

.nav-item .material-symbols-outlined {
  font-size: 1.5rem;
  color: var(--on-surface);
  opacity: 0.6;
}

.nav-item:hover {
  color: var(--primary);
  background: var(--surface-container-low);
}

.nav-item:hover .material-symbols-outlined {
  opacity: 1;
  color: var(--primary);
}

.sidebar .nav-item:hover {
  padding-left: 2.25rem;
}

/* Navbar Desktop Links */
.nav-desktop {
  display: none;
  gap: 0.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }

  .nav-desktop .nav-item {
    padding: 0.5rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border-left: none;
    gap: 0.5rem;
  }

  .nav-desktop .nav-item .material-symbols-outlined {
    display: none;
  }

  .nav-desktop .nav-item:hover {
    background: var(--surface-container);
    color: var(--primary);
  }
}

[data-theme='dark'] .nav-desktop .nav-item:hover {
  background: rgba(192, 132, 252, 0.1);
}

/* Theme Toggle Button */
.btn-theme-toggle {
  background: var(--surface-container);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--on-surface);
  transition: var(--transition);
}

.btn-theme-toggle:hover {
  background: var(--surface-container-high);
  transform: rotate(15deg);
}

/* Level Toggle Button */
.btn-lvl-toggle {
  background: var(--pastel-lavender);
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--primary);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-lvl-toggle:hover {
  background: #decff3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.sidebar-lvl-btn {
  width: 100%;
  justify-content: center;
  font-size: 0.95rem;
  padding: 0.8rem 1rem;
}

/* User Section at Bottom */
.nav-user {
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--surface-container-high);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.nav-avatar-link {
  display: flex;
  align-items: center;
}

.nav-level-select {
  appearance: none;
  background-color: var(--surface-container);
  color: var(--on-surface);
  border: 1px solid var(--surface-container-high);
  border-radius: 8px;
  padding: 0.6rem 2rem 0.6rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1em;
  width: 100%;
}

.nav-level-select:hover {
  background-color: var(--surface-container-high);
  border-color: rgba(255, 255, 255, 0.4);
}

.nav-level-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.nav-level-select option {
  background-color: #1a1b41;
  color: #ffffff;
}

/* Header & Navbar Styles */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Specification: Editorial Glass */
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--space-md) 0;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme='dark'] .navbar {
  border-bottom: 1px solid rgba(192, 132, 252, 0.1);
  /* Subtle purple glow */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

[data-theme='light'] .navbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
}

.nav-brand {
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-transform: none;
  letter-spacing: -0.03em;
  text-decoration: none;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 1023px) {
  .nav-desktop {
    display: none !important;
  }
  
  .navbar div:first-child {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

@media (max-width: 1023px) {
  .header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--surface-container-low);
    border-bottom: 1px solid var(--surface-container-high);
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
  }
}

/* Desktop Styles (Wide screens) */
@media (min-width: 1024px) {

  /* Offset the main page so it doesn't overlap the sidebar only when open */
  .sidebar.sidebar-open~.main-content {
    margin-left: 250px;
  }
}

/* =====================
   FILL-IN-BLANKS GAME
   ===================== */

.game-container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  box-sizing: border-box;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.game-score {
  display: flex;
  gap: 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.score-correct {
  color: #22c55e;
}

.score-wrong {
  color: #ef4444;
}

.game-difficulty {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: 8px;
}

/* Timer Bar */
.timer-bar-container {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 10px;
  transition: width 1s linear, background 0.5s;
}

/* Game Card */
.game-card {
  background: var(--surface);
  border: 1px solid var(--surface-container-high);
  border-radius: 20px;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-editorial);
}

.game-english {
  font-size: 2.6rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-main);
  line-height: 1.2;
  direction: ltr !important;
}

.game-article-prompt,
.masked-word-prompt {
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Article Buttons */
.article-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 5px;
}

.article-btn {
  padding: 0.7rem 2rem;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: var(--bg-secondary);
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.article-btn:hover {
  background: #eef2ff;
  border-color: var(--primary);
}

.article-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: scale(1.05);
}

/* Letter Row */
.letter-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  direction: ltr !important;
}

.letter-box {
  display: flex;
  align-items: center;
  justify-content: center;
  direction: ltr !important;
  width: 44px;
  height: 52px;
  border-radius: 10px;
  font-size: 1.6rem;
  font-weight: 700;
}

.letter-box.filled {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
}

.letter-box.blank {
  background: rgba(255, 255, 255, 0.02);
  border: 2px solid rgba(129, 140, 248, 0.5);
}

.letter-box.space {
  width: 20px;
  background: transparent;
}

.letter-input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #c084fc;
  font-size: 1.6rem;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  text-transform: uppercase;
  caret-color: #818cf8;
}

.letter-input.hinted {
  color: #eab308;
}

.letter-input.wrong {
  color: #ef4444;
}

.letter-input.correct-letter {
  color: #22c55e;
}

/* Hint & Submit Buttons */
.btn-hint {
  background: var(--stats-warning-bg);
  border: 1px solid rgba(250, 204, 21, 0.3);
  color: var(--stats-warning);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  padding: 0.6rem 1.25rem;
  border-radius: 12px;
  font-weight: 700;
}

.btn-hint:hover {
  background: var(--stats-warning-bg);
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-submit {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 0.9rem 3rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hint-cost {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Feedback */
.feedback {
  width: 100%;
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  animation: fadeInUp 0.3s ease;
}

.feedback.correct {
  background: #f0fdf4;
  border: 1px solid #22c55e;
  color: #22c55e;
}

.feedback.incorrect {
  background: #fef2f2;
  border: 1px solid #ef4444;
  color: #ef4444;
}

.hidden {
  display: none !important;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Image Quiz */
.iq-photo {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  display: block;
}

.iq-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 0;
  color: var(--text-muted);
}

.iq-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.iq-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.iq-option-btn {
  background: var(--bg-card);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.9rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  word-break: break-word;
}

.iq-option-btn:hover:not(:disabled) {
  background: #eef2ff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.iq-option-btn.iq-correct {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #22c55e;
}

.iq-option-btn.iq-wrong {
  background: #fef2f2;
  border-color: #ef4444;
  color: #ef4444;
}

/* ── Landing Page ────────────────────────────────────────────────────────── */
.landing-hero {
  text-align: center;
  padding: 4rem 2rem 3rem;
  max-width: 700px;
  margin: 0 auto;
}

.landing-badge {
  display: inline-block;
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #818cf8;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.35rem 1.1rem;
  margin-bottom: 1.5rem;
}

.landing-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--text-main);
}

.landing-accent {
  background: linear-gradient(90deg, #818cf8, #c084fc, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 auto 2.5rem;
  max-width: 480px;
  line-height: 1.6;
}

.landing-stats-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.landing-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.landing-stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-main);
}

.landing-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* Mode Cards */
.landing-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 0 1.5rem;
}

@media (max-width: 700px) {
  .landing-modes {
    grid-template-columns: 1fr;
  }
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--surface-container-lowest);
  border: 1px solid var(--surface-container-high);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow: var(--shadow-editorial);
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  background: var(--surface-container-low);
}

.mode-card-icon {
  font-size: 2.2rem;
}

.mode-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
}

.mode-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.mode-card-cta {
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 700;
  color: #818cf8;
  letter-spacing: 0.02em;
}

.landing-stats-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 2px;
  transition: color 0.2s;
}

.landing-stats-link:hover {
  color: #818cf8;
}

/* Authentication UI */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-editorial);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--surface-container-highest);
  border-radius: 12px;
  color: var(--on-surface);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-container);
  background: var(--surface);
}

.form-input::placeholder {
  color: var(--on-surface-variant);
  opacity: 0.6;
}

.form-group-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-checkbox {
  accent-color: var(--primary);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.form-checkbox-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.auth-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(116, 47, 229, 0.25);
}

.auth-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(116, 47, 229, 0.35);
  background: var(--primary-light);
}

.auth-links {
  margin-top: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-links a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}

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

/* Error Explanations */
#error_explanation {
  background: rgba(225, 29, 72, 0.1);
  border-left: 4px solid #e11d48;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

#error_explanation h2 {
  font-size: 1rem;
  color: #e11d48;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

#error_explanation ul {
  margin: 0;
  padding-left: 1.5rem;
  color: #be123c;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .header-auth-links {
    display: none !important;
  }
}

/* Global Flash Messages */
.flash-messages-global {
  width: 100%;
  position: absolute;
  top: 60px;
  /* Below the navbar */
  left: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  /* Enable clicking the close button */
}

.flash-message-global {
  width: 100%;
  padding: 1rem 2rem;
  color: #fff;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.flash-close-btn {
  position: absolute;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.flash-close-btn:hover {
  color: white;
}

.flash-notice {
  background: rgba(16, 185, 129, 0.9);
  border-bottom: 2px solid #059669;
}

.flash-alert {
  background: rgba(244, 63, 94, 0.9);
  border-bottom: 2px solid #e11d48;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Nav Avatar */
.nav-avatar-link {
  text-decoration: none;
  flex-shrink: 0;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: border-color 0.3s ease, transform 0.2s ease;
}

.nav-avatar:hover {
  border-color: var(--primary);
  transform: scale(1.1);
}

.nav-avatar-default {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

/* Edit Profile Avatar Preview */
.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card-border);
  margin-bottom: 0.5rem;
}

/* Translation Quiz */
.tq-prompt {
  text-align: center;
  margin-bottom: 2rem;
}

.tq-label {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tq-english-word {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  text-shadow: 0 0 20px rgba(129, 140, 248, 0.3);
}

/* ── Artikel Quiz ───────────────────────────────────────────────────────────── */
.aq-word-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0 0.5rem;
}

.aq-article-placeholder {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary);
  background: #fdf2f8;
  border: 2px dashed var(--secondary);
  border-radius: 12px;
  padding: 0.2rem 0.8rem;
  min-width: 80px;
  text-align: center;
}

.aq-article-placeholder.aq-article-correct {
  color: #22c55e;
  background: #f0fdf4;
  border: 2px solid #22c55e;
}

.aq-article-placeholder.aq-article-wrong {
  color: #ef4444;
  background: #fef2f2;
  border: 2px solid #ef4444;
}

.aq-word {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.aq-english {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  font-style: italic;
}

.aq-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.aq-option-btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  padding: 1rem 2.5rem;
  border-radius: 14px;
  border: 2px solid var(--surface-container-high);
  background: var(--surface);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 100px;
}

.aq-option-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  background: var(--surface-container-low);
}

.aq-option-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.aq-option-btn.aq-correct {
  background: var(--stats-success-bg) !important;
  border-color: var(--stats-success) !important;
  color: var(--stats-success) !important;
  transform: scale(1.05);
}

.aq-option-btn.aq-wrong {
  background: var(--stats-error-bg) !important;
  border-color: var(--stats-error) !important;
  color: var(--stats-error) !important;
  animation: shake 0.4s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px);
  }

  75% {
    transform: translateX(6px);
  }
}

/* Social Share Bar */
.social-share-bar {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(20, 21, 44, 0.8);
  backdrop-filter: blur(10px);
  padding: 1rem 0.5rem;
  border-radius: 12px 0 0 12px;
  border: 1px solid var(--border);
  border-right: none;
  z-index: 1000;
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease;
}

.social-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-container-high);
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-share-btn:hover {
  transform: scale(1.1) translateX(-5px);
  color: #fff;
}

.social-share-btn.twitter:hover {
  background: #1DA1F2;
}

.social-share-btn.facebook:hover {
  background: #1877F2;
}

.social-share-btn.linkedin:hover {
  background: #0A66C2;
}

.social-share-btn.whatsapp:hover {
  background: #25D366;
}

.social-share-btn.email:hover {
  background: #ea4335;
}

@media (max-width: 768px) {
  .social-share-bar {
    top: auto;
    bottom: 0px;
    right: 50%;
    transform: translateX(50%);
    flex-direction: row;
    border-radius: 12px 12px 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    padding: 0.5rem 1rem;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    gap: 1rem;
    width: max-content;
  }

  .social-share-btn:hover {
    transform: scale(1.1) translateY(-5px);
  }

  footer {
    padding-bottom: 5rem !important;
    /* To prevent overlapping the bottom sticky share bar on mobile */
  }
}

/* ========================================= */
/*  RESPONSIVE LAYOUT (TABLET & MOBILE)      */
/* ========================================= */

/* Large Tablets & Small Desktops */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .app-container,
  .flashcard-container,
  .game-container,
  .stats-dashboard {
    padding: 1.5rem;
  }

  .game-english {
    font-size: 2.2rem;
  }

  .article-btn {
    padding: 0.6rem 1.5rem;
    font-size: 1.1rem;
  }

  .aq-word {
    font-size: 2.2rem;
  }

  .tq-english-word {
    font-size: 2.2rem;
  }
}

/* Tablets (Portrait) & Large Phones */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-modes {
    grid-template-columns: 1fr;
  }

  .app-container,
  .flashcard-container,
  .game-container,
  .stats-dashboard {
    padding: 1rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .flashcard-scene {
    height: 350px;
  }

  .card-front,
  .card-back {
    padding: 1.5rem;
  }

  #card-english {
    font-size: 2.5rem;
  }

  .translation-group h3 {
    font-size: 1.6rem;
  }

  .arabic-word {
    font-size: 1.8rem !important;
  }

  .example-sentence {
    font-size: 1rem;
  }

  .btn {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }

  .btn-action {
    padding: 0.8rem 0.5rem;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  .btn-action span {
    font-size: 0.7rem;
    opacity: 0.8;
  }

  .controls {
    gap: 0.5rem;
    width: 100%;
  }

  .game-english {
    font-size: 1.8rem;
  }

  .article-btn {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
  }

  .letter-box {
    width: 32px;
    height: 40px;
    font-size: 1.2rem;
  }

  .form-input {
    padding: 0.7rem 1rem;
  }

  .game-card {
    padding: 1.5rem;
    gap: 1rem;
  }

  .aq-option-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1.2rem;
  }

  .aq-article-placeholder {
    font-size: 2rem;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.8rem;
  }

  .flashcard-scene {
    height: 400px;
  }

  #card-english {
    font-size: 1.8rem;
  }

  .example-sentence {
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .translations {
    gap: 1rem;
  }

  .game-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .game-score {
    width: 100%;
    justify-content: flex-start;
  }

  .game-english {
    font-size: 1.5rem;
  }

  .letter-box {
    width: 28px;
    height: 36px;
    font-size: 1.1rem;
    border-radius: 6px;
  }

  .article-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .btn-submit {
    padding: 0.8rem 1.5rem;
    width: 100%;
  }

  .article-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }

  .stats-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .aq-word {
    font-size: 1.6rem;
  }

  .tq-english-word {
    font-size: 1.6rem;
  }

  .aq-option-btn {
    width: 100%;
    padding: 0.8rem;
  }

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

  .landing-title {
    font-size: 2rem;
  }

  .landing-hero {
    padding: 2rem 1rem;
  }

  footer {
    padding: 1.5rem 1rem 6rem;
  }
}

/* =====================
   SEO PAGES STYLES (New Clean Design)
   ===================== */

.seo-layout {
  --seo-bg: #ffffff;
  --seo-text: #1a1a1a;
  --seo-text-muted: #3f3f46;
  --seo-primary: #6366f1;
  --seo-accent: #f8fafc;
  --seo-border: #e2e8f0;
  --seo-card-bg: #ffffff;
  --seo-header-bg: rgba(255, 255, 255, 0.8);

  background: var(--seo-bg);
  color: var(--seo-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  line-height: 1.6;
  scroll-behavior: smooth;
}

.seo-layout ::selection {
  background: var(--seo-primary);
  color: white;
}

@media (prefers-color-scheme: dark) {
  .seo-layout {
    --seo-bg: #0f172a;
    --seo-text: #f8fafc;
    --seo-text-muted: #94a3b8;
    --seo-border: #1e293b;
    --seo-card-bg: #1e293b;
    --seo-header-bg: rgba(15, 23, 42, 0.8);
    --seo-accent: #1e293b;
  }
}

.seo-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--seo-header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--seo-border);
  padding: 1rem 0;
}

.seo-nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.seo-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--seo-text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
}

.seo-logo:hover {
  opacity: 0.8;
}

.seo-logo span {
  color: var(--seo-primary);
}

.seo-nav {
  display: flex;
  gap: 1.5rem;
}

.seo-nav a {
  text-decoration: none;
  color: var(--seo-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.seo-nav a:hover {
  color: var(--seo-primary);
}

.seo-main {
  padding: 4rem 0;
}

.seo-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.seo-h1 {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  color: var(--seo-text);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.seo-intro {
  font-size: clamp(1rem, 4vw, 1.25rem);
  color: var(--seo-text-muted);
  margin-bottom: 3rem;
  line-height: 1.8;
}

.seo-section {
  margin-bottom: 3.5rem;
}

.seo-section h2 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  color: var(--seo-text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.seo-section p {
  font-size: clamp(1rem, 3vw, 1.125rem);
  margin-bottom: 1.5rem;
  color: var(--seo-text-muted);
}

.seo-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.seo-premium-card {
  background: var(--seo-card-bg);
  border: 1px solid var(--seo-border);
  border-radius: 20px;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}

.seo-premium-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.vocabulary-table {
  width: 100%;
  margin: 2rem 0;
  border: 1px solid var(--seo-border);
  border-radius: 16px;
  overflow-x: auto;
  background: var(--seo-card-bg);
  -webkit-overflow-scrolling: touch;
}

.vocabulary-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.vocabulary-table th {
  background: var(--seo-accent);
  padding: 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--seo-text-muted);
  border-bottom: 1px solid var(--seo-border);
}

.vocabulary-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--seo-border);
  font-size: 0.95rem;
}

.vocabulary-table tr:last-child td {
  border-bottom: none;
}

.seo-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-blue {
  background: #eff6ff;
  color: #1e40af;
}

.badge-purple {
  background: #f5f3ff;
  color: #5b21b6;
}

.badge-green {
  background: #f0fdf4;
  color: #166534;
}

@media (prefers-color-scheme: dark) {
  .badge-blue {
    background: rgba(30, 64, 175, 0.2);
    color: #93c5fd;
  }

  .badge-purple {
    background: rgba(91, 33, 182, 0.2);
    color: #c4b5fd;
  }

  .badge-green {
    background: rgba(22, 101, 52, 0.2);
    color: #86efac;
  }
}

.alphabet-hub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.alphabet-pill {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--seo-border);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  color: var(--seo-text);
  transition: all 0.2s;
  font-size: 0.85rem;
}

.alphabet-pill:hover,
.alphabet-pill.active {
  background: var(--seo-primary);
  color: white;
  border-color: var(--seo-primary);
}

.seo-footer {
  border-top: 1px solid var(--seo-border);
  background: var(--seo-accent);
  padding: clamp(3rem, 10vw, 5rem) 0;
  margin-top: 4rem;
}

.seo-footer-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
}

.footer-brand p {
  margin-top: 1rem;
  color: var(--seo-text-muted);
}

.footer-links-col h4 {
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.footer-links-col a {
  display: block;
  margin-bottom: 0.65rem;
  text-decoration: none;
  color: var(--seo-text-muted);
  transition: color 0.2s;
  font-size: 0.95rem;
}

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

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--seo-border);
  text-align: center;
  color: var(--seo-text-muted);
  font-size: 0.875rem;
}

.vocabulary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.stat-box {
  flex: 1 1 140px;
  background: var(--seo-card-bg);
  border: 1px solid var(--seo-border);
  padding: 1.25rem;
  border-radius: 16px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--seo-primary), #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--seo-text-muted);
  margin-top: 0.5rem;
}

.seo-internal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.seo-link-card {
  background: var(--seo-card-bg);
  border: 1px solid var(--seo-border);
  border-radius: 16px;
  padding: 1.25rem;
  text-decoration: none;
  transition: all 0.2s;
}

.seo-link-card:hover {
  border-color: var(--seo-primary);
  transform: translateY(-2px);
}

.seo-link-card h3 {
  font-size: 1.1rem;
  color: var(--seo-text);
  margin-bottom: 0.4rem;
}

.seo-link-card p {
  font-size: 0.85rem;
  color: var(--seo-text-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .seo-nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .seo-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .seo-main {
    padding: 2rem 0;
  }

  .stat-box {
    padding: 1rem;
  }
}


/* --- SEO Mobile Responsive Overrides --- */
@media (max-width: 480px) {
  .stat-box {
    flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  .seo-verb-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }

  .seo-conjugation-grid,
  .seo-past-perfekt-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ========================================= */
/*    MODERN PASTEL DESIGN SYSTEM            */
/*    Inspired by Chat.hi reference design   */
/* ========================================= */

/* ---------- Pastel Highlight Stickers ---------- */
.sticker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-family: var(--font-headline);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transform: rotate(-2deg);
  /* Editorial asymmetry */
  transition: var(--transition);
}

.sticker:hover {
  transform: rotate(0deg) scale(1.05);
}

.sticker-lavender {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
}

.sticker-pink {
  background: #ffe4e6;
  color: #9f1239;
}

.sticker-mint {
  background: #dcfce7;
  color: #166534;
}

.sticker-yellow {
  background: #fef9c3;
  color: #854d0e;
}

.sticker-coral {
  background: #fee2e2;
  color: #991b1b;
}

.sticker-green {
  background: #dcfce7;
  color: #166534;
}

.sticker-playful {
  background: var(--surface);
  border: 2px solid var(--on-surface);
  box-shadow: 3px 3px 0px var(--on-surface);
}

/* ---------- Hero Section ---------- */
.hero-modern {
  /* Specification: Signature Gradient */
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
  padding: var(--space-4xl) var(--space-xl) var(--space-3xl);
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.hero-modern::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: var(--secondary);
  border-radius: 50%;
  opacity: 0.15;
  filter: blur(100px);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 4rem;
  align-items: center;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 320px;
}

.hero-visual {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
}

.hero-title {
  font-family: var(--font-headline);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-xl);
  color: #ffffff;
}

.hero-sub {
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 540px;
  margin-bottom: var(--space-2xl);
}

.hero-cta-group {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  flex-wrap: wrap;
}

.btn-cta-editorial {
  background: #ffffff;
  color: var(--primary);
  padding: 1.25rem 2.5rem;
  font-family: var(--font-headline);
  font-weight: 800;
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  box-shadow: var(--shadow-editorial);
  transition: var(--transition);
}

.btn-cta-editorial:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.btn-cta-playful {
  display: inline-flex;
  background: var(--secondary);
  color: var(--on-secondary);
  padding: 1.25rem 2.5rem;
  font-family: var(--font-headline);
  font-weight: 800;
  border: 2px solid var(--on-surface);
  border-radius: var(--radius-xl);
  box-shadow: 6px 6px 0px var(--on-surface);
  transition: var(--transition);
}

[data-theme='dark'] .btn-cta-playful {
  box-shadow: 4px 4px 0px var(--primary-light);
}

.btn-cta-playful:hover {
  transform: translateY(-4px) rotate(-1.5deg);
  box-shadow: 10px 10px 0px var(--on-surface);
}

[data-theme='dark'] .btn-cta-playful:hover {
  box-shadow: 6px 6px 15px rgba(192, 132, 252, 0.4);
}

/* Stats row under hero */
.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.hero-stat-item {
  text-align: center;
}

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
}

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

/* Hero flashcard preview */
.hero-card-preview {
  background: var(--surface);
  padding: var(--space-2xl);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-editorial);
  border: 1px solid var(--surface-container-high);
  width: 320px;
  position: relative;
  transform: rotate(3deg);
  transition: var(--transition);
}

.hero-card-preview:hover {
  transform: rotate(0deg) translateY(-10px);
}

.hero-card-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.hero-card-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.hero-card-dots span:nth-child(1) {
  background: #fca5a5;
}

.hero-card-dots span:nth-child(2) {
  background: #fde047;
}

.hero-card-dots span:nth-child(3) {
  background: #86efac;
}

.hero-card-body {
  background: linear-gradient(135deg, #eef2ff, #fdf4ff);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.hero-card-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--secondary);
  color: var(--on-secondary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  font-weight: 800;
  box-shadow: var(--shadow-md);
  transform: rotate(-5deg);
}

/* ---------- Features Grid ---------- */
.features-section {
  padding: 6rem 2rem;
  background: var(--bg-primary);
}

.features-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-family: var(--font-headline);
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--on-surface);
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 1.15rem;
  color: var(--on-surface-variant);
  margin-bottom: 3.5rem;
  max-width: 600px;
  margin-inline: auto;
  line-height: 1.6;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface-container-lowest);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-editorial);
  transition: var(--transition);
  border: none;
}

.feature-card:hover {
  transform: translateY(-8px) rotate(1.5deg);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.feature-icon-green {
  background: linear-gradient(135deg, #dcfce7, #86efac);
}

.feature-icon-yellow {
  background: linear-gradient(135deg, #fef9c3, #fde047);
}

.feature-icon-pink {
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
}

.feature-icon-blue {
  background: linear-gradient(135deg, #dbeafe, #93c5fd);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.feature-card p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.feature-card .feature-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.feature-card .feature-link:hover {
  color: var(--primary-dark);
}

/* ---------- Bento Grid Section ---------- */
.bento-section {
  padding: 6rem 2rem;
  background: var(--bg-primary);
}

.bento-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  gap: 1.5rem;
}

.bento-card {
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  transition: var(--transition);
  position: relative;
  overflow: visible;
  /* Allow overlapping badges */
  border: none;
}

.bento-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

.bento-coral {
  background: var(--secondary);
  color: var(--on-secondary);
}

.bento-yellow {
  background: var(--surface-container);
  color: var(--on-surface);
}

.bento-mint {
  background: var(--surface-container-low);
  color: var(--on-surface);
}

.bento-lavender {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
}

.bento-pink {
  background: #ffe4e6;
  color: #9f1239;
}

.bento-white {
  background: var(--surface-container-lowest);
  color: var(--on-surface);
}

.bento-dark {
  background: var(--inverse-surface);
  color: var(--inverse-on-surface);
}

.bento-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.bento-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.85;
}

.bento-card .bento-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Bento span helpers */
.bento-span-2 {
  grid-column: span 2;
}

.bento-span-row-2 {
  grid-row: span 2;
}

/* ---------- Connect / How it works ---------- */
.connect-section {
  padding: 6rem 2rem;
  background: var(--bg-primary);
  text-align: center;
}

.connect-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.connect-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.connect-feature {
  text-align: center;
  padding: 1.5rem;
}

.connect-feature-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  background: var(--pastel-lavender);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.connect-feature h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.connect-feature p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.connect-feature .feature-link {
  display: block;
  margin-top: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

/* ---------- Scrolling Badge Ticker ---------- */
.badge-ticker {
  overflow: hidden;
  padding: var(--space-xl) 0;
  background: var(--surface-container-low);
}

.badge-ticker-track {
  display: flex;
  gap: var(--space-lg);
  animation: ticker-scroll 25s linear infinite;
  width: max-content;
  will-change: transform;
}

.badge-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ---------- Testimonial ---------- */
.testimonial-section {
  padding: var(--space-4xl) var(--space-2xl);
  background: var(--surface);
}

.testimonial-card {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
  background: var(--surface-container-lowest);
  border-radius: var(--radius-2xl);
  padding: var(--space-3xl);
  box-shadow: var(--shadow-editorial);
  position: relative;
}

.testimonial-quote-icon {
  position: absolute;
  top: var(--space-xl);
  right: var(--space-2xl);
  font-size: 6rem;
  color: var(--surface-container-high);
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-avatar {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  /* Playful shape instead of standard circle */
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  transform: rotate(-3deg);
}

.testimonial-content {
  flex: 1;
  min-width: 250px;
}

.testimonial-content p {
  font-family: var(--font-main);
  font-size: 1.25rem;
  color: var(--on-surface-variant);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  font-style: auto;
}

.testimonial-name {
  font-family: var(--font-headline);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--on-surface);
  margin: 0;
}

.testimonial-role {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- CTA Section ---------- */
.cta-section {
  padding: 6rem 2rem;
  background: var(--bg-primary);
  text-align: center;
}

.cta-inner {
  max-width: 700px;
  margin: 0 auto;
}

.cta-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff !important;
  padding: 1.1rem 3rem;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 16px;
  border: none;
  text-decoration: none;
  box-shadow: var(--shadow-editorial);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

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

/* ---------- Pricing (Pastel) ---------- */
.pricing-section {
  padding: 6rem 2rem;
  background: var(--bg-primary);
}

.pricing-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.pricing-cards {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.pricing-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 2.5rem;
  width: 320px;
  text-align: left;
  transition: transform 0.25s, box-shadow 0.25s;
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.10);
}

.pricing-card.featured {
  background: linear-gradient(135deg, #eef2ff, #fdf4ff);
  border: 2px solid var(--primary);
  position: relative;
}

.pricing-card.featured .pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 0.4rem 1rem;
  font-weight: 600;
  border-radius: 20px;
  font-size: 0.8rem;
}

.pricing-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.pricing-card .pricing-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.pricing-card .pricing-amount {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.pricing-card .pricing-amount span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--text-muted);
}

/* ---------- Responsive for new sections ---------- */
@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bento-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .hero-modern {
    padding: 3rem 1.5rem 2.5rem;
  }

  .hero-inner {
    gap: 2rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-cta-row {
    flex-direction: column;
    border-radius: 14px;
  }

  .hero-cta-row .btn-cta {
    border-radius: 0 0 14px 14px;
    text-align: center;
  }

  .hero-stats {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .hero-card-preview {
    max-width: 100%;
  }

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

  .bento-span-2 {
    grid-column: span 1;
  }

  .testimonial-card {
    padding: 2rem;
    gap: 1.5rem;
  }

  .testimonial-avatar {
    width: 80px;
    height: 80px;
  }

  .pricing-cards {
    flex-direction: column;
    align-items: center;
  }

  .connect-features {
    grid-template-columns: 1fr;
  }
}

/* ─── Modern Flashcards ─── */
.flashcard-modern-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.flashcard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.flashcard-stats-row {
  display: flex;
  gap: 0.75rem;
}

.fc-stat-pill {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.fc-stat-learned {
  background: var(--pastel-mint);
  color: #065f46;
}

.fc-stat-maybe {
  background: var(--pastel-yellow);
  color: #854d0e;
}

.fc-stat-notyet {
  background: var(--pastel-pink);
  color: #9d174d;
}

.fc-stat-value {
  background: rgba(255, 255, 255, 0.5);
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
}

.btn-report-minimal {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  transition: var(--transition);
}

.btn-report-minimal:hover {
  color: var(--pastel-coral);
}

.flashcard-scene {
  perspective: 1000px;
  height: 480px;
  width: 100%;
  margin-bottom: 3rem;
}

.flashcard {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
  direction: ltr !important;
}

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

.card-side {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 24px;
  background: var(--surface);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-editorial);
  border: 1px solid var(--surface-container-high);
}

.card-back {
  transform: rotateY(180deg);
}

.card-badge {
  position: absolute;
  top: 2rem;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-content-main {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin: 1.5rem 0;
}

.card-hint {
  position: absolute;
  bottom: 2rem;
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
}

.plural-text {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 600;
}

#card-german {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.audio-btn-modern {
  background: var(--pastel-lavender);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.audio-btn-modern:hover {
  transform: scale(1.1);
  background: var(--primary);
  color: #fff;
}

.example-container {
  margin-top: 2.1rem;
  padding-top: 1.4rem;
  border-top: 1px dashed #e2e8f0;
  width: 100%;
}

.example-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  display: block;
  margin-bottom: 0.75rem;
}

.example-text {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.flashcard-controls-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  direction: ltr;
}

.fc-control-btn {
  background: var(--surface);
  border: 1px solid var(--surface-container-high);
  padding: 1.25rem 2.1rem;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  min-width: 110px;
  color: var(--on-surface);
  box-shadow: var(--shadow-sm);
}

.fc-btn-icon {
  font-size: 1.5rem;
  font-weight: 800;
}

.fc-control-btn span {
  font-weight: 700;
  font-size: 0.9rem;
}

.fc-btn-notyet:hover {
  background: var(--stats-error-bg);
  border-color: var(--stats-error);
  color: var(--stats-error);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.fc-btn-maybe:hover {
  background: var(--stats-warning-bg);
  border-color: var(--stats-warning);
  color: var(--stats-warning);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.fc-btn-learned:hover {
  background: var(--stats-success-bg);
  border-color: var(--stats-success);
  color: var(--stats-success);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Animation Overrides matching JS */
.swipe-out-right {
  transform: translateX(100vw) rotate(30deg) !important;
  opacity: 0;
}

.swipe-out-left {
  transform: translateX(-100vw) rotate(-30deg) !important;
  opacity: 0;
}

.swipe-out-down {
  transform: translateY(100vh) !important;
  opacity: 0;
}

.swipe-out-top {
  transform: translateY(-100vh) !important;
  opacity: 0;
}

/* Legacy Quiz blocks migrated to quizzes_modern.css */

/* User Dropdown */
.user-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 0.5rem;
  display: none;
  z-index: 1000;
  border: 1px solid var(--surface-container-high);
}

.dropdown-menu.show {
  display: block;
  animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  color: var(--on-surface);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--surface-container);
  color: var(--primary);
}

.dropdown-item.logout-btn {
  color: var(--error);
}

.dropdown-item.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.dropdown-item .material-symbols-outlined {
  font-size: 1.25rem;
}
