/* CSS Stylesheet for Ekstrateia */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-main: #060814;
  --bg-glass: rgba(11, 16, 31, 0.75);
  --border-glass: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-muted: #6b7c96;
  
  /* Morphological Segment Colors */
  --color-stem: #cbd5e1;         /* Stem: Neutral Light Slate */
  --color-augment: #10b981;      /* Augment: Vibrant Green */
  --color-redup: #3b82f6;        /* Reduplication: Vibrant Blue */
  --color-marker: #06b6d4;       /* Tense Marker: Cyan (Default) */
  --color-marker-future-aorist: #ef4444; /* Future/Aorist Marker: Red/Orange */
  --color-marker-perfect: #f59e0b;       /* Perfect Marker: Yellow/Gold */
  --color-marker-passive: #06b6d4;       /* Passive Marker: Cyan */
  --color-vowel: #3b82f6;        /* Connecting Vowel (Fallback) */
  --color-ending: #d946ef;       /* Personal Ending: Pink/Magenta */
  
  /* UI Accents */
  --accent-cyan: #00f2fe;
  --accent-cyan-glow: rgba(0, 242, 254, 0.35);
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.3);
  --accent-gold: #ffd700;
  --accent-gold-glow: rgba(255, 215, 0, 0.25);
  --accent-green: #10b981;
  --accent-red: #ef4444;
  
  --shadow-card: 0 12px 40px 0 rgba(0, 0, 0, 0.6);
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 242, 254, 0.12) 0px, transparent 40%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.12) 0px, transparent 40%),
    radial-gradient(at 50% 50%, rgba(255, 215, 0, 0.03) 0px, transparent 60%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  padding: 2rem 1.25rem;
}

/* Glassmorphism utility */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  border-radius: 16px;
  transition: var(--transition-smooth);
}

/* Container */
.container {
  max-width: 720px; /* Kept focused and mobile-friendly for syntax game reading */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.5rem;
}

.header-logo-group {
  display: flex;
  flex-direction: column;
}

.brand-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #fff 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(0, 242, 254, 0.25);
  line-height: 1;
}

.brand-tagline {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.2rem;
  font-weight: 500;
}

/* Navigation & Controls */
.controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10000;
}

.select-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.control-select {
  background: rgba(30, 41, 59, 0.7);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-smooth);
}

.control-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.btn {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  transform: translateY(-1px);
}

/* Active Mode Container styling */
.mode-section {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.mode-section.active {
  display: block;
}

/* 1. QUIZ SECTION (STEM SELECTOR) */
.quiz-card {
  max-width: 650px;
  margin: 3rem auto;
  padding: 2.5rem;
  text-align: center;
}

.quiz-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent-cyan);
}

.quiz-question {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 1.5rem 0 2rem;
  line-height: 1.6;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.option-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 1.2rem;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-purple);
  transform: translateX(4px);
}

.option-btn.correct {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: var(--accent-green) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.option-btn.incorrect {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.quiz-feedback {
  margin-top: 2rem;
  padding: 1.2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition-smooth);
  text-align: left;
}

.quiz-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

.feedback-success {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid var(--accent-green);
  color: #a7f3d0;
}

.feedback-error {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid var(--accent-red);
  color: #fca5a5;
}

.quiz-action {
  margin-top: 2rem;
  display: none;
}

.quiz-action.show {
  display: block;
}

/* 2. CONJUGATION PRACTICE GRID */
.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.verb-meta {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.verb-meta h2 {
  font-size: 1.8rem;
  color: var(--text-primary);
}

.verb-badge {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.grid-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  align-items: start;
}

.mood-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mood-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-cyan);
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.conjugation-table {
  width: 100%;
  border-collapse: collapse;
}

.conjugation-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.conjugation-table td {
  padding: 0.75rem 0.5rem;
  vertical-align: middle;
}

.person-cell {
  color: var(--text-muted);
  font-size: 0.9rem;
  width: 30%;
}

.verb-cell {
  width: 70%;
  font-size: 1.15rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}

/* Color Coding for Segments */
.segment {
  display: inline-block;
  line-height: 1;
}

.segment.augment {
  color: var(--color-augment);
  font-weight: normal;
}

.segment.redup {
  color: var(--color-redup);
  font-weight: normal;
}

.segment.stem {
  color: var(--color-stem);
  font-weight: normal;
}

.segment.marker {
  color: var(--color-marker);
  font-weight: normal;
}

.segment.marker.marker-future-aorist {
  color: var(--color-marker-future-aorist);
}

.segment.marker.marker-perfect {
  color: var(--color-marker-perfect);
}

.segment.marker.marker-passive {
  color: var(--color-marker-passive);
}

.segment.vowel {
  color: var(--color-vowel);
  font-weight: normal;
}

.segment.ending {
  color: var(--color-ending);
  font-weight: bold;
}

.segment.separator {
  color: rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  margin: 0 1px;
}

/* Hiding / Revealing Endings */
.hidden-segment-placeholder {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px dashed rgba(6, 182, 212, 0.4);
  border-radius: 4px;
  color: var(--accent-cyan);
  padding: 0.05rem 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0.15rem;
  user-select: none;
  display: inline-block;
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.1);
  transition: var(--transition-smooth);
}

.interactive-verb-wrapper:hover .hidden-segment-placeholder {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.interactive-verb-wrapper {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  align-items: center;
  cursor: pointer;
}

.hidden-box {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px dashed rgba(6, 182, 212, 0.4);
  border-radius: 6px;
  color: var(--accent-cyan);
  padding: 0.1rem 0.75rem;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  font-family: inherit;
  transition: var(--transition-smooth);
  min-width: 50px;
  text-align: center;
  display: inline-block;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.1);
}

.hidden-box:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
  transform: translateY(-1px);
}

.hidden-box.revealed {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  cursor: default !important;
  transform: none !important;
  animation: revealIn 0.3s ease-out forwards;
}

/* Non-finite elements (Infinitive & Participle) card */
.non-finite-card {
  grid-column: 1 / -1;
  padding: 1.5rem;
}

.non-finite-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1rem;
}

.non-finite-group {
  flex: 1;
  min-width: 250px;
}

.non-finite-group h3 {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.25rem;
}

/* 3. PARADIGM REFERENCE DRAWER */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.open {
  display: block;
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  right: -550px;
  width: 550px;
  max-width: 90vw;
  height: 100vh;
  z-index: 101;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.drawer.open {
  right: 0;
}

.drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0f172a;
  border-top-left-radius: 16px;
}

.drawer-header h2 {
  font-size: 1.3rem;
  color: var(--accent-cyan);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: #0b0f19;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

/* Animation utilities */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes revealIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Controls Panel & Selector Rows */
.controls-panel {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  z-index: 10;
}

/* Sticky Progression (v1.4) */
.syntax-sticky-progression {
  position: sticky !important;
  top: 68px;
  z-index: 80;
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  margin-bottom: 1.25rem;
  border-radius: 12px;
}

.controls-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 1rem;
}

.select-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.selector-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.helper-group {
  display: flex;
  gap: 0.4rem;
}

.helper-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.helper-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Selector Chips styling */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-smooth);
  user-select: none;
}

.chip:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.chip.active {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
}

.chip.active:hover {
  box-shadow: 0 6px 16px rgba(6, 182, 212, 0.4);
}

.chip.disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

/* Collapsible Quiz Widget styling */
.quiz-collapse-card {
  margin-bottom: 2rem;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.quiz-header {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
  user-select: none;
  transition: var(--transition-smooth);
}

.quiz-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.quiz-header h3 {
  font-size: 1.05rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin: 0;
}

.chevron-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-collapse-card.expanded .chevron-arrow {
  transform: rotate(180deg);
}

.quiz-collapse-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-collapse-card.expanded .quiz-collapse-content {
  max-height: 800px;
}

.quiz-card-body {
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 1.5rem;
}

/* Collapsible Accordion Cards styling */
.accordion-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.accordion-header {
  padding: 1.1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
  user-select: none;
  transition: var(--transition-smooth);
}

.accordion-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.accordion-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tense-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-weight: 600;
}

.mood-tag {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.accordion-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-card.expanded .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 1.5rem;
}

.accordion-card.expanded .accordion-content {
  max-height: 900px;
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

/* Practice grid meta adjustments */
.grid-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Responsive fixes */
@media (max-width: 768px) {
  body {
    padding: 1rem 0.5rem;
  }
  
  header h1 {
    font-size: 1.8rem;
  }

  header p {
    font-size: 0.95rem;
  }

  .controls-top-row {
    flex-direction: column;
    align-items: stretch;
  }

  .select-group {
    width: 100%;
  }

  .control-select {
    width: 100%;
  }

  .btn-group {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }

  .btn-group .btn {
    flex: 1;
    justify-content: center;
    padding: 0.6rem;
    font-size: 0.85rem;
  }
  
  .grid-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .grid-controls {
    flex-wrap: wrap;
    width: 100%;
  }

  .grid-controls .btn {
    flex: 1;
    min-width: 100px;
    justify-content: center;
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  .grid-wrapper {
    grid-template-columns: 1fr;
  }
  
  .drawer {
    width: 100vw;
    right: -100vw;
  }

  .quiz-card {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }

  .quiz-question {
    font-size: 1.1rem;
    margin: 1rem 0 1.5rem;
  }

  .option-btn {
    padding: 0.9rem;
    font-size: 0.95rem;
  }
}

/* Inline quiz select dropdown */
.inline-quiz-select {
  background: transparent;
  color: var(--accent-purple);
  border: none;
  border-bottom: 2px dashed rgba(139, 92, 246, 0.4);
  font-size: inherit;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  padding: 0 0.2rem;
  transition: var(--transition-smooth);
}
.inline-quiz-select:hover {
  border-bottom-color: var(--accent-purple);
  color: #c084fc;
}
.inline-quiz-select option {
  background: #1e293b;
  color: var(--text-primary);
}

/* Verb Search Autocomplete styling */
.verb-search-wrapper {
  position: relative;
  min-width: 250px;
}

.verb-search-container {
  position: relative;
  width: 100%;
}

.control-input {
  background: rgba(30, 41, 59, 0.7);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  width: 100%;
  font-family: inherit;
  transition: var(--transition-smooth);
}

.control-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.suggestions-dropdown {
  position: absolute;
  top: 105%;
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 450px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  z-index: 9999;
  margin-top: 4px;
}

.verb-search-wrapper:focus-within,
.noun-search-wrapper:focus-within,
.syntax-search-wrapper:focus-within {
  z-index: 10005 !important;
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.35rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 5;
  padding: 0;
  line-height: 1;
}

.clear-search-btn:hover {
  color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.08);
}


.suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.95rem;
  text-align: left;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover, .suggestion-item.highlighted {
  background: rgba(255, 255, 255, 0.08);
}

.suggestion-item .suggestion-voice {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--text-muted);
}

.suggestion-item mark {
  background: rgba(6, 182, 212, 0.3);
  color: var(--text-primary);
  border-radius: 2px;
  padding: 0 1px;
}

.suggestion-header {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-no-results {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Global Mode Tabs styling */
.mode-tabs-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: rgba(17, 24, 39, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.mode-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition-smooth);
  font-family: inherit;
}

.mode-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.mode-tab.active {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

/* Syntaktiko specific styling */
.syntax-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.syntax-sentence-card {
  padding: 2.5rem 2rem;
  text-align: center;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}

.syntax-tokens-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 0.5rem;
  font-size: 1.6rem;
  line-height: 2;
}

.syntax-token {
  display: inline-block;
  cursor: pointer;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  user-select: none;
}

.syntax-token:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.syntax-token.correct {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: var(--accent-green) !important;
  color: #a7f3d0;
}

.syntax-token.incorrect {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--accent-red) !important;
  color: #fca5a5;
  animation: shake 0.3s ease-in-out;
}

.syntax-token.attempted {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: var(--accent-gold) !important;
  color: #fde68a;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
}

.syntax-token.active-target {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 0 1px var(--accent-gold) !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.syntax-translation {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-style: italic;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.syntax-translation.collapsed:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(6, 182, 212, 0.3);
}

.translation-toggle-badge {
  font-size: 0.8rem;
  font-style: normal;
  color: var(--accent-cyan);
  align-self: flex-start;
  background: rgba(6, 182, 212, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  margin-top: 0.25rem;
  font-weight: 600;
  transition: all 0.2s ease;
  user-select: none;
}

.syntax-translation:hover .translation-toggle-badge {
  background: var(--accent-cyan);
  color: #0f172a;
}


/* Syntaktiko role picker popover */
.syntax-role-popover {
  position: absolute;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 0.75rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  backdrop-filter: blur(16px);
  min-width: 160px;
  animation: revealIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) rgba(15, 23, 42, 0.5);
}

.syntax-role-popover::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.syntax-role-popover::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
}

.syntax-role-popover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.syntax-role-popover::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.syntax-role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  min-width: 300px;
}

.syntax-role-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.syntax-role-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
}

/* Pro Verb Swipeable Slider Styles */
.slider-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  touch-action: pan-y;
}
.slides-container {
  display: flex;
  width: 400%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-item {
  width: 25%;
  padding: 0.25rem 0.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.slide-opt-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 0.55rem 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  user-select: none;
}
.slide-opt-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}
.slide-opt-btn.correct {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}
.slide-opt-btn.incorrect {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-muted) !important;
  text-decoration: line-through;
  opacity: 0.35;
  pointer-events: none;
}
.slide-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}
.slide-dot.active {
  border-color: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
}
.slide-dot.correct {
  background: #10b981 !important;
  border-color: #10b981 !important;
}
.slide-dot.incorrect {
  background: #eab308 !important;
  border-color: #eab308 !important;
}

/* Syntaktiko explanations panel */
.syntax-explanations-card {
  padding: 1.5rem;
}

.syntax-explanations-card h3 {
  font-size: 1.15rem;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.5rem;
}

.syntax-explanations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.syntax-explanation-item {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border-left: 3px solid var(--accent-purple);
  font-size: 0.95rem;
  animation: revealIn 0.3s ease-out forwards;
}

.syntax-explanation-item .token-word {
  font-weight: 700;
  color: var(--accent-cyan);
  margin-right: 0.5rem;
}

.syntax-explanation-item .token-role {
  font-size: 0.8rem;
  text-transform: uppercase;
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-right: 0.5rem;
}

/* Polytonic Editor Toolbar Overlay styling */
.polytonic-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.polytonic-toolbar.show {
  transform: translateY(0);
}

.polytonic-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.polytonic-btns {
  display: flex;
  gap: 0.5rem;
}

.polytonic-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.polytonic-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

/* Syntaktiko Vocab and Gloss Styles */
.syntax-popover-vocab {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.25rem;
  text-align: center;
  word-break: break-word;
}

.syntax-explanation-item .token-meaning {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-right: 0.5rem;
  font-style: italic;
}

.syntax-punctuation {
  color: var(--text-muted);
  user-select: none;
  pointer-events: none;
}

/* Syntaktiko Social Feed Styles */
.syntax-feed-container {
  max-width: 550px;
  margin: 0 auto;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feed-card {
  border-radius: 16px;
  padding: 1.25rem;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.feed-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.1);
}

.feed-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.feed-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
}

.feed-header-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feed-author-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.feed-author-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.2;
}

.feed-verified-badge {
  background: #38bdf8;
  color: #0f172a;
  font-size: 0.6rem;
  font-weight: 900;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

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

.feed-dot, .feed-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.feed-author-row + .feed-handle-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.feed-card-header .feed-header-info {
  line-height: 1.3;
}

.feed-header-info .feed-author-row {
  display: flex;
  align-items: center;
}

.feed-header-info .feed-handle {
  display: inline-block;
}

.feed-card-header .feed-header-info {
  flex: 1;
}

.feed-card-header .feed-header-info div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.feed-card-caption {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0 0.1rem;
}

.feed-card-visual {
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 2rem;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.feed-card-visual:hover {
  border-color: rgba(6, 182, 212, 0.3);
}

.feed-card-visual:hover .feed-visual-cta {
  background: var(--accent-cyan);
  color: #0f172a;
  transform: scale(1.05);
}

.feed-visual-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.08) 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

.feed-visual-quote {
  font-size: 1.2rem;
  font-weight: 500;
  font-style: italic;
  text-align: center;
  color: var(--accent-cyan);
  font-family: 'Outfit', 'Inter', sans-serif;
  line-height: 1.6;
  z-index: 2;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  max-width: 90%;
}

.feed-visual-cta {
  z-index: 2;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 0.45rem 1.15rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.feed-play-button {
  z-index: 2;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent-cyan);
  font-size: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.feed-card-visual:hover .feed-play-button {
  transform: scale(1.15);
  background: var(--accent-cyan);
  color: #0f172a;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
  border-color: #ffffff;
}


.feed-card-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.25rem 0.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.75rem;
}

.feed-action-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: default;
  user-select: none;
}

.feed-action-btn .action-icon {
  font-size: 1.1rem;
}

.feed-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.feed-tag {
  font-size: 0.8rem;
  color: #c084fc;
  font-weight: 500;
}

/* Local file warning banner for YouTube embeds */
.local-warning {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  font-size: 0.9rem;
  color: #f87171;
  text-align: center;
  line-height: 1.6;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.local-warning code {
  background: rgba(239, 68, 68, 0.15);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  color: #fca5a5;
  font-family: monospace;
}

.local-warning-link {
  color: var(--accent-cyan);
  text-decoration: underline;
  font-weight: 600;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-smooth);
}

.local-warning-link:hover {
  color: #22d3ee;
  transform: translateY(-1px);
}

/* Drawer Trigger Button */
.btn-tools-trigger {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.btn-tools-trigger:hover {
  background: rgba(6, 242, 254, 0.1);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

/* Tools Drawer Backdrop */
.tools-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tools-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Tools Drawer Panel */
.tools-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: rgba(8, 12, 24, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tools-drawer.open {
  right: 0;
}

.tools-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tools-drawer-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.03em;
  margin: 0;
}

.close-tools-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: var(--transition-smooth);
}

.close-tools-btn:hover {
  color: #fff;
}

.tools-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.tools-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.9rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
  border-bottom: 2px solid transparent;
}

.tools-tab:hover {
  color: #fff;
}

.tools-tab.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.04);
}

.tools-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Hide non-active sections inside drawer */
.drawer-section {
  display: none;
}

.drawer-section.active {
  display: block;
  animation: fadeIn 0.3s ease-out forwards;
}

/* Premium size tags inside drawer */
.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* Manifesto Card Styling */
.manifesto-card {
  border: 1px solid rgba(255, 215, 0, 0.15);
  background: linear-gradient(135deg, rgba(11, 16, 31, 0.85) 0%, rgba(8, 12, 24, 0.95) 100%);
  padding: 1.5rem;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(255, 215, 0, 0.03);
}

.manifesto-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-gold), var(--accent-purple));
}

.manifesto-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
  position: relative;
}

.manifesto-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
}

.manifesto-header h3 {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.01em;
}

.manifesto-toggle-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.manifesto-card:hover .manifesto-toggle-btn {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.manifesto-content {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: revealIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.manifesto-lead {
  font-size: 1.05rem;
  color: #fff;
  font-weight: 500;
}

.manifesto-content strong {
  color: var(--accent-gold);
}

.manifesto-content em {
  font-style: italic;
  color: var(--accent-cyan);
}

/* Feed visual adjustments */
.feed-card-visual {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.feed-visual-cta {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  border-radius: 30px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Polishing Syntax Tokens & Commute Mechanics */
.syntax-tokens-wrapper {
  gap: 0.85rem 0.6rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
}

.syntax-token {
  border-radius: 8px;
  padding: 0.25rem 0.65rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.syntax-token:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 242, 254, 0.1);
}

.syntax-token:active {
  transform: scale(0.95);
}

.syntax-token.correct {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: var(--accent-green) !important;
  border-bottom-color: var(--accent-green) !important;
  color: #34d399;
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15) !important;
  transform: scale(1.03);
}

.syntax-token.incorrect {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: var(--accent-red) !important;
  border-bottom-color: var(--accent-red) !important;
  color: #fca5a5;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15) !important;
  animation: shake 0.35s cubic-bezier(.36,.07,.19,.97) both;
}

.syntax-token.attempted {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: var(--accent-gold) !important;
  border-bottom-color: var(--accent-gold) !important;
  color: #fde68a;
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.15) !important;
}

@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); }
}

/* Mobile-Responsive Bottom Drawer for Syntax Roles Popover (Applies to all phones/tablets up to 768px) */
@media (max-width: 768px) {
  .syntax-role-popover {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 1rem 1rem 1.75rem 1rem !important;
    background: rgba(8, 12, 24, 0.99) !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7) !important;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
    box-sizing: border-box !important;
    z-index: 100005 !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
  }
  
  .syntax-popover-vocab {
    width: 100% !important;
    margin-bottom: 0.25rem !important;
    font-size: 0.88rem !important;
    padding: 0.5rem 0.75rem !important;
    box-sizing: border-box !important;
    text-align: left !important;
  }

  .syntax-role-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .syntax-role-btn {
    padding: 0.7rem 0.5rem !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Make the last odd button (like "Άλλο") span full 100% width across both columns */
  .syntax-role-grid > .syntax-role-btn:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }
  
  .main-header {
    padding: 0.25rem 0 1rem 0;
  }
  
  .brand-logo {
    font-size: 1.75rem;
  }

  /* Prevent campaign progress letters from wrapping on mobile */
  .lives-letter {
    width: 1.6rem !important;
    height: 1.6rem !important;
    font-size: 1rem !important;
    border-radius: 4px !important;
  }
  .lives-letters-wrapper {
    gap: 0.2rem !important;
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Landing View Styles */
.landing-view {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  animation: fadeIn 0.4s ease-out forwards;
}

/* Interactive Sleek Virtual Card Trigger styling */
.virtual-nfc-card-trigger {
  margin: 2.25rem auto 0 auto;
  width: 280px;
  height: 170px;
  perspective: 1000px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.virtual-nfc-card-trigger:hover {
  transform: translateY(-8px) rotateX(10deg) rotateY(-5deg);
}

.virtual-card-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(11, 16, 31, 0.9) 0%, rgba(6, 8, 20, 0.95) 100%);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 14px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 254, 0.15);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.virtual-card-inner::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(0, 242, 254, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.virtual-card-chip {
  width: 38px;
  height: 28px;
  background: linear-gradient(135deg, #ffd700 0%, #cca300 100%);
  border-radius: 6px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.virtual-card-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #fff 40%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  align-self: flex-end;
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.virtual-card-prompt {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  text-shadow: 0 0 8px var(--accent-cyan-glow);
  margin-top: auto;
  text-align: left;
}

.virtual-card-wifi {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.landing-main {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.landing-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  min-height: 90vh; /* Takes up the initial viewport */
  padding: 2rem 0;
  box-sizing: border-box;
  position: relative;
}

.hero-linguistic-highlight {
  margin-bottom: 0.5rem;
}

.hero-word {
  font-family: 'Outfit', sans-serif;
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 0 45px rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
}

.landing-hero:hover .hero-word {
  transform: scale(1.02);
  text-shadow: 0 0 30px rgba(0, 242, 254, 0.3);
}

.highlight-consonants {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
  font-weight: 950;
}

.hero-linguistic-fact {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 0.4rem 1.25rem;
  border-radius: 9999px;
  max-width: fit-content;
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.scroll-arrow {
  font-size: 1.35rem;
  color: var(--text-muted);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
  animation: scrollBounce 2s infinite ease-in-out;
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  40% {
    transform: translateY(-8px);
    opacity: 0.95;
    color: var(--accent-cyan);
    text-shadow: 0 0 12px var(--accent-cyan-glow);
  }
  60% {
    transform: translateY(-4px);
    opacity: 0.6;
  }
}

/* Time Comparison Section */
.landing-comparison {
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comparison-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  font-family: 'Outfit', sans-serif;
}

.comparison-intro {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.comparison-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comparison-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comparison-icon {
  font-size: 1.25rem;
}

.comparison-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.time-meter {
  height: 24px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.time-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-red) 0%, #b91c1c 100%);
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.time-fill.optimized {
  background: linear-gradient(90deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.time-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

.comparison-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Souvlaki Pricing Section */
.landing-pricing {
  padding: 2.25rem 2rem;
  border: 1px solid rgba(0, 242, 254, 0.15);
  background: radial-gradient(circle at top right, rgba(0, 242, 254, 0.03) 0%, rgba(8, 12, 24, 0.4) 100%);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 242, 254, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pricing-header-minimal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1.25rem;
}

.souvlaki-emoji {
  font-size: 2.25rem;
  line-height: 1;
}

.price-badge {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-cyan);
  text-shadow: 0 0 15px var(--accent-cyan-glow);
  font-family: 'Outfit', sans-serif;
  line-height: 1;
}

.price-period {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pricing-quote-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.pricing-quote-box blockquote {
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 600;
  color: var(--accent-gold);
  line-height: 1.6;
}

/* Key Login Modal Overlay */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 15, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: fadeIn 0.25s ease-out forwards;
}

.login-modal.open {
  display: flex;
}

.login-modal-content {
  width: 100%;
  max-width: 440px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  animation: modalScale 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.login-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  font-family: 'Outfit', sans-serif;
}

.close-login-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}

.close-login-btn:hover {
  color: #fff;
}

.login-modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.login-input-group {
  display: flex;
  gap: 0.5rem;
}

.login-input-group input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: #fff;
  outline: none;
  font-family: inherit;
}

.login-input-group input:focus {
  border-color: var(--accent-cyan);
}

.login-feedback {
  font-size: 0.85rem;
  color: var(--accent-red);
  min-height: 1.25rem;
  display: none;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .hero-word {
    font-size: 3rem;
  }
  
  .hero-title {
    font-size: 1.6rem;
  }
}


/* remaining light theme overrides removed */

/* ============================================================================
   PLAY MODE SWITCHER & CAMPAIGN LIVES
   ============================================================================ */
.practice-mode-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

.mode-selector-group {
  display: flex;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 10px;
  padding: 0.2rem;
  border: 1px solid var(--border-glass);
}

/* removed */

.mode-selector-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mode-selector-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mode-selector-btn.active {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(6, 182, 212, 0.15);
}

/* Campaign Lives Container */
.active-lives-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  width: 100%;
  animation: fadeIn 0.3s ease-out;
}

.lives-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.lives-letters-wrapper {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  flex-wrap: nowrap;
}

.lives-letter {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-muted);
  opacity: 0.25;
  transition: var(--transition-smooth);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.01);
}

/* removed */

.lives-letter.lit {
  opacity: 1;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-green) 0%, #059669 100%);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

/* Badges for Feed List (v1.4 Circular) */
.feed-card-status-badge {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 10;
}

.badge-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-in-progress {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ============================================================================
   TOKEN FILTERING CHIPS
   ============================================================================ */
.filter-chips-container {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* removed */

.filter-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

/* removed */

.filter-chip:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}

.filter-chip.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ============================================================================
   SYNTAX CHEAT SHEET & HELP TOOL DRAWER
   ============================================================================ */
.cheat-sheet-section {
  margin-bottom: 1.5rem;
}

.cheat-sheet-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.25rem;
}

/* removed */

.cheat-sheet-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

/* removed */

.cheat-sheet-question {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cheat-sheet-term {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.cheat-sheet-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.cheat-sheet-example {
  font-size: 0.8rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.01);
  padding: 0.4rem 0.6rem;
  border-left: 3px solid var(--accent-purple);
  border-radius: 0 4px 4px 0;
  font-style: italic;
}

/* removed */

/* Floating Syntax Guide Button */
.floating-guide-btn {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90; /* Positioned below drawer backdrop (100) but above content */
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  color: #fff;
  border: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  font-size: 1.5rem;
  display: none; /* Controlled dynamically in app.js depending on active view */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
  transition: var(--transition-smooth);
}

.floating-guide-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.6);
}

/* removed */

.total-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  width: fit-content;
}

/* Header Icon Orb Hover Extensions */
#openToolsDrawerBtn:hover {
  background: rgba(124, 107, 255, 0.18);
  border-color: rgba(124, 107, 255, 0.45);
}

/* Discord Auth & Onboarding Styling */
.btn-discord {
  background: #5865F2 !important;
  color: white !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  font-weight: 700;
  border: none !important;
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
  transition: all 0.2s ease;
}

.btn-discord:hover {
  background: #4752C4 !important;
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6);
  transform: translateY(-2px);
}

.btn-discord:active {
  transform: translateY(1px);
}

.btn-discord svg {
  width: 20px;
  height: 20px;
}

/* Custom styling for birth year select option box */
#birthYearSelect option {
  background: #0f172a;
  color: #fff;
}

/* Floating Points Animation for Gamified Scoring (v1.3.0 Flying Target) */
.floating-points {
  position: fixed;
  color: #5ce6e6; /* Bright cyan goldish color */
  font-size: 1.35rem;
  font-weight: 900;
  pointer-events: none;
  z-index: 9999;
  text-shadow: 0 0 10px rgba(92, 230, 230, 0.8), 0 0 20px rgba(0, 0, 0, 0.9);
  transition: all 1.8s cubic-bezier(0.25, 1, 0.3, 1);
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.05em;
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 1;
}

.floating-points.fly {
  top: 30px !important;
  left: 50% !important; /* Flies toward the campaign score center bar */
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}

/* Syntaktiko role picker feedback styles */
.syntax-role-btn.incorrect-feedback {
  opacity: 0.35;
  text-decoration: line-through;
  border-color: rgba(255, 255, 255, 0.05) !important;
  background: rgba(0, 0, 0, 0.2) !important;
  color: var(--text-muted) !important;
  pointer-events: none;
}

.syntax-role-btn.correct-feedback {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #a7f3d0 !important;
  pointer-events: none;
}

/* Extracts Grid Styles (v1.2.0) */
.extract-grid-cell {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.extract-grid-cell:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.extract-grid-cell.completed {
  border-color: var(--accent-green, #10b981);
  color: var(--accent-green, #10b981);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.extract-grid-cell.completed::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--accent-green, #10b981);
}

.extract-grid-cell.in-progress {
  border-color: #eab308;
  color: #eab308;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.15);
}

.extract-grid-cell .progress-ring-svg {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
}

.feed-card-visual-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

#authorsStoriesBar::-webkit-scrollbar {
  display: none;
}

#authorsStoriesBar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Pro Mode Golden Styles */
.pro-gold .pro-live-letter {
  color: rgba(255, 215, 0, 0.15) !important;
  text-shadow: none !important;
  font-weight: 800;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.pro-gold .pro-live-letter.filled {
  color: var(--accent-gold) !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6) !important;
}

.mode-selector-btn.pro-active {
  background: rgba(255, 215, 0, 0.15) !important;
  color: var(--accent-gold) !important;
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.25) !important;
}

/* Verb Analyzer Slider Options */
.analyzer-options::-webkit-scrollbar {
  display: none;
}

.analyzer-options {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.analyzer-chip {
  padding: 0.25rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.analyzer-chip:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.analyzer-chip.active {
  border-color: var(--accent-gold) !important;
  color: var(--accent-gold) !important;
  background: rgba(255, 215, 0, 0.08) !important;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.15) !important;
}

.analyzer-select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  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='%23ffd700' 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.85rem center;
  background-size: 1.1rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.analyzer-select:focus {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.35), inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.analyzer-select option {
  background: #0f172a;
  color: #fff;
  font-weight: 500;
  padding: 0.5rem;
}

.verb-analyzer-panel {
  grid-column: span 3 !important;
  width: 100%;
}

/* Custom Select Simulator */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-trigger:after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--accent-gold);
  transition: transform 0.2s ease;
}

.custom-select-wrapper.open .custom-select-trigger:after {
  transform: rotate(180deg);
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #0f172a;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.8);
  z-index: 1010;
  display: none;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.35rem;
}

.custom-select-wrapper.open .custom-select-options {
  display: block;
}

.custom-select-wrapper.open-up .custom-select-options {
  top: auto;
  bottom: calc(100% + 4px);
  box-shadow: 0 -10px 25px rgba(0,0,0,0.8);
}

.custom-select-option {
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.custom-select-option:hover {
  background: rgba(255, 215, 0, 0.1);
}

.custom-select-option.selected {
  background: rgba(255, 215, 0, 0.15);
  color: var(--accent-gold);
  font-weight: 700;
}

.custom-select-option.disabled {
  opacity: 0.35;
  text-decoration: line-through;
  pointer-events: none;
}

/* Grammar badge highlights for cheat sheet and mini games */
.badge-article {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  padding: 0.1rem 0.3rem !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
}

.badge-adj {
  background: rgba(34, 211, 238, 0.15) !important;
  color: #22d3ee !important;
  border: 1px solid rgba(34, 211, 238, 0.3) !important;
  padding: 0.1rem 0.3rem !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
}

.badge-noun {
  background: rgba(192, 132, 252, 0.15) !important;
  color: #c084fc !important;
  border: 1px solid rgba(192, 132, 252, 0.3) !important;
  padding: 0.1rem 0.3rem !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
}



.badge-trick {
  background: rgba(251, 191, 36, 0.08) !important;
  border: 1px dashed var(--accent-gold) !important;
  padding: 0.4rem 0.65rem !important;
  border-radius: 6px !important;
  margin-top: 0.35rem !important;
  font-size: 0.8rem !important;
  color: #fef08a !important;
  line-height: 1.4 !important;
}

/* Mini Games Styles */
.game-opt-btn {
  transition: all 0.2s ease-in-out !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.game-opt-btn:hover {
  transform: translateY(-2px) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.15) !important;
}

.game-opt-btn.correct {
  background: var(--accent-green) !important;
  color: #000 !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4) !important;
}

.game-opt-btn.incorrect {
  background: var(--accent-red) !important;
  color: #fff !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4) !important;
}


/* ============================================================================
   ✦ SCROLL OF THE ANCIENTS — 2026 feed redesign
   Mobile-first, story-driven vertical feed. Overrides base rules above.
   ============================================================================ */

:root {
  --ink-0: #07070f;
  --ink-1: #0d0d1a;
  --surface: rgba(22, 22, 40, 0.72);
  --surface-border: rgba(255, 255, 255, 0.07);
  --electric: #7c6bff;
  --electric-2: #00e0ff;
  --pop-pink: #ff5da2;
  --pop-amber: #ffb648;
  --radius-xl: 22px;
  --radius-2xl: 28px;
}

html {
  scroll-padding-top: 84px;
}

body {
  background-color: var(--ink-0);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(124, 107, 255, 0.14) 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(0, 224, 255, 0.08) 0%, transparent 55%),
    radial-gradient(700px 700px at 50% 110%, rgba(255, 93, 162, 0.06) 0%, transparent 60%);
  background-attachment: fixed;
  padding: 0 0 4rem 0;
}

.game-container-wrapper .container {
  max-width: 560px;
  padding: 0 0.9rem;
  gap: 0.75rem;
}

/* --- Sticky glass header ----------------------------------------------- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 5000;
  margin: 0 -0.9rem 0.25rem -0.9rem;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 9, 18, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-logo {
  font-size: 1.35rem;
  letter-spacing: 0.14em;
  background: linear-gradient(120deg, #fff 20%, var(--electric-2) 60%, var(--electric) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.total-score-badge {
  margin-top: 0.15rem !important;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--pop-amber);
  background: rgba(255, 182, 72, 0.09);
  border: 1px solid rgba(255, 182, 72, 0.22);
  border-radius: 9999px;
  padding: 0.12rem 0.55rem;
  width: fit-content;
}

.header-orbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-orb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, border-color 0.2s ease;
}

.icon-orb:hover,
.icon-orb:focus-visible {
  transform: scale(1.12);
  background: rgba(124, 107, 255, 0.18);
  border-color: rgba(124, 107, 255, 0.45);
}

.icon-orb:active { transform: scale(0.94); }

.icon-orb-exit:hover { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.4); }

/* --- Stories bar -------------------------------------------------------- */
.stories-bar {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding: 0.65rem 0.25rem 0.4rem 0.25rem;
  align-items: flex-start;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.stories-bar::-webkit-scrollbar { display: none; }

.story-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  flex-shrink: 0;
  width: 72px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.story-bubble:hover { transform: translateY(-3px) scale(1.05); }
.story-bubble:active { transform: scale(0.95); }

.story-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 2.5px;
  background: conic-gradient(from 210deg, var(--pop-pink), var(--pop-amber), var(--electric-2), var(--electric), var(--pop-pink));
  box-shadow: 0 4px 14px rgba(124, 107, 255, 0.25);
}

.story-ring.followed {
  background: linear-gradient(135deg, var(--electric-2), var(--electric));
  box-shadow: 0 4px 14px rgba(0, 224, 255, 0.22);
}

.story-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--ink-0);
  display: block;
}

.story-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: #dbe2f1;
  max-width: 72px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* --- Collapsed search --------------------------------------------------- */
.feed-search-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, margin 0.3s ease;
  margin: 0;
}

.feed-search-panel.open {
  max-height: 70px;
  opacity: 1;
  margin: 0.25rem 0 0.5rem 0;
}

.feed-search-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 0.65rem 1.2rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feed-search-input:focus {
  border-color: var(--electric);
  box-shadow: 0 0 0 3px rgba(124, 107, 255, 0.18);
}

/* --- Channel pills ------------------------------------------------------ */
.channel-pills {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.35rem 0.25rem 0.65rem 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border: none;
  margin: 0;
}

.channel-pills::-webkit-scrollbar { display: none; }

.channel-pills .filter-chip {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9aa6bd;
}

.channel-pills .filter-chip.active {
  background: linear-gradient(120deg, var(--electric), var(--electric-2));
  border-color: transparent;
  color: #07070f;
  box-shadow: 0 4px 16px rgba(124, 107, 255, 0.35);
}

.admin-add-text-btn {
  align-self: flex-end;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #07070f;
  background: linear-gradient(120deg, var(--electric-2), var(--electric));
  border: none;
  border-radius: 9999px;
}

/* --- The feed ----------------------------------------------------------- */
.syntax-feed-container {
  max-width: none;
  gap: 1.1rem;
  padding: 0.25rem 0 2rem 0;
}

.post-card {
  position: relative;
  border-radius: var(--radius-2xl);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: post-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes post-rise {
  from { opacity: 0; transform: translateY(26px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.post-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem 0.7rem 1rem;
}

.post-head-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--pop-pink), var(--electric));
  cursor: pointer;
}

.post-head-names { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; cursor: pointer; }
.post-head-name { font-size: 0.9rem; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-head-sub { font-size: 0.72rem; color: #8b96ad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.post-follow-chip {
  margin-left: auto;
  flex-shrink: 0;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.32rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid rgba(124, 107, 255, 0.5);
  background: rgba(124, 107, 255, 0.14);
  color: #b9aeff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.post-follow-chip.followed {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #8b96ad;
}

.post-grade-chip {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  white-space: nowrap;
}

/* The stage: big typographic Greek on a per-author gradient */
.post-stage {
  position: relative;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 2rem 1.4rem;
  cursor: pointer;
  isolation: isolate;
}

.post-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(0, 0, 0, 0.42) 100%);
  z-index: 1;
}

.post-stage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: saturate(1.05);
}

.post-stage-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 7, 15, 0.25) 0%, rgba(7, 7, 15, 0.72) 100%);
  z-index: 0;
}

.post-stage-quote {
  position: relative;
  z-index: 2;
  font-size: clamp(1.15rem, 4.2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
  max-width: 30ch;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.post-stage-quote .quote-mark { color: rgba(255, 255, 255, 0.5); }

.post-stage-cta {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #07070f;
  background: #ffffff;
  padding: 0.6rem 1.5rem;
  border-radius: 9999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.post-card:hover .post-stage-cta { transform: scale(1.06); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45); }

/* Per-author gradient palette (assigned by hash) */
.stage-grad-0 { background: linear-gradient(140deg, #341d6e 0%, #7c6bff 55%, #00e0ff 130%); }
.stage-grad-1 { background: linear-gradient(140deg, #5b1541 0%, #ff5da2 60%, #ffb648 130%); }
.stage-grad-2 { background: linear-gradient(140deg, #0d3b4f 0%, #0aaec2 60%, #00e0ff 130%); }
.stage-grad-3 { background: linear-gradient(140deg, #402505 0%, #ff9d3c 60%, #ffe14d 140%); }
.stage-grad-4 { background: linear-gradient(140deg, #123c2e 0%, #10b981 65%, #aef4c9 150%); }
.stage-grad-5 { background: linear-gradient(140deg, #3d1030 0%, #a855f7 60%, #ff5da2 140%); }

/* Caption zone under the stage */
.post-caption {
  padding: 0.8rem 1rem 0.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.post-caption-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #eef1f8;
  line-height: 1.35;
}

.post-caption-meta {
  font-size: 0.75rem;
  color: #8b96ad;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.post-citation {
  font-family: monospace;
  font-size: 0.68rem;
  color: #8b96ad;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.08rem 0.4rem;
}

.post-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.35rem;
}

.post-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--electric-2), var(--electric));
  transition: width 0.4s ease;
}

.post-progress-fill.done { background: var(--accent-green); }

.post-progress-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-green);
  text-align: right;
}

/* Share button floats in the stage's bottom-right corner */
.post-stage-share {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: rgba(7, 7, 15, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
}

.post-stage-share:hover { transform: scale(1.12); background: rgba(7, 7, 15, 0.7); }
.post-stage-share:active { transform: scale(0.92); }

/* Image credit, attached to the image it belongs to */
.post-stage-credit {
  position: absolute;
  left: 0.9rem;
  bottom: 1.1rem;
  z-index: 3;
  max-width: 60%;
  font-size: 0.62rem;
  font-style: italic;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

/* Status badge (completed / in progress) sits top-right, clear of the
   share button that now occupies the stage's bottom-right corner */
.post-card .feed-card-status-badge {
  top: 0.85rem;
  bottom: auto;
  right: 0.85rem;
  z-index: 3;
  backdrop-filter: blur(6px);
}

/* --- Surprise cards ------------------------------------------------------ */
.surprise-card {
  border-radius: var(--radius-2xl);
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(140% 120% at 20% 0%, rgba(124, 107, 255, 0.18) 0%, transparent 55%),
    radial-gradient(120% 120% at 90% 100%, rgba(255, 93, 162, 0.14) 0%, transparent 55%),
    rgba(16, 16, 30, 0.75);
  animation: post-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.surprise-emoji { font-size: 2.2rem; line-height: 1; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4)); }

.surprise-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--electric-2);
}

.surprise-text { font-size: 0.95rem; line-height: 1.55; color: #dbe2f1; max-width: 34ch; }

.surprise-btn {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  color: #07070f;
  background: #fff;
  border: none;
  border-radius: 9999px;
  padding: 0.5rem 1.3rem;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.surprise-btn:hover { transform: scale(1.07); }

/* --- Small screens ------------------------------------------------------- */
@media (max-width: 480px) {
  .post-stage { min-height: 46vh; }
  .brand-logo { font-size: 1.15rem; }
  .icon-orb { width: 36px; height: 36px; font-size: 0.95rem; }
  .syntax-sticky-progression { top: 60px !important; }
}

/* Landing + drawers relied on the old body padding; restore their breathing room */
.landing-view { padding: 2.5rem 1.25rem 0 1.25rem; }
.tools-drawer-body, .drawer-content { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }

/* ============================================================================
   ✦ DETECTIVE MAP (cheat sheet) + TOOLBOX restyle — 2026 pass
   ============================================================================ */

/* --- Detective Map ------------------------------------------------------- */
.cs-content { gap: 1rem; padding-top: 1rem; }

.cs-mission-hint {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #aab4c8;
  background: rgba(124, 107, 255, 0.08);
  border: 1px solid rgba(124, 107, 255, 0.22);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  margin: 0;
}

.cs-steps-rail {
  display: flex;
  gap: 0.4rem;
  background: #0b0f19;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}

.cs-step-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  color: #8b96ad;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 0.5rem 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 42px;
}

.cs-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  color: #cfd6e4;
  flex-shrink: 0;
}

.cs-step-pill.active {
  background: linear-gradient(120deg, var(--electric), var(--electric-2));
  border-color: transparent;
  color: #07070f;
  box-shadow: 0 4px 16px rgba(124, 107, 255, 0.35);
}

.cs-step-pill.active .cs-step-num { background: rgba(7, 7, 15, 0.25); color: #07070f; }

.cs-step-panel { display: none; flex-direction: column; gap: 0.85rem; }
.cs-step-panel.active { display: flex; animation: fadeIn 0.25s ease-out; }

.cs-step-kicker {
  display: none;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric-2);
}

.cs-reveal-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.cs-reveal-card.open { border-color: rgba(124, 107, 255, 0.4); }

.cs-reveal-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  color: #eef1f8;
  text-align: left;
  background: none;
  border: none;
  padding: 0.9rem 1rem;
  cursor: pointer;
  min-height: 48px;
}

.cs-reveal-arrow { color: #8b96ad; transition: transform 0.25s ease; flex-shrink: 0; }
.cs-reveal-card.open .cs-reveal-arrow { transform: rotate(180deg); color: var(--electric-2); }

.cs-reveal-a {
  display: none;
  padding: 0 1rem 1rem 1rem;
  flex-direction: column;
  gap: 0.5rem;
}

.cs-reveal-card.open .cs-reveal-a { display: flex; animation: fadeIn 0.2s ease-out; }

.cs-term {
  display: inline-block;
  width: fit-content;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #07070f;
  background: linear-gradient(120deg, var(--electric-2), var(--electric));
  border-radius: 9999px;
  padding: 0.25rem 0.8rem;
}

.cs-desc { font-size: 0.88rem; line-height: 1.6; color: #aab4c8; }

.cs-next-btn {
  align-self: flex-end;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  color: #07070f;
  background: #fff;
  border: none;
  border-radius: 9999px;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cs-next-btn:hover { transform: scale(1.05); }

.cs-done-banner {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--pop-amber);
  background: rgba(255, 182, 72, 0.08);
  border: 1px dashed rgba(255, 182, 72, 0.35);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

/* Refreshed example blocks inside reveal cards */
.cs-reveal-a .cheat-sheet-example {
  background: rgba(0, 224, 255, 0.05);
  border: 1px solid rgba(0, 224, 255, 0.15);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
}

/* Floating lightbulb becomes a gradient orb */
.floating-guide-btn {
  background: linear-gradient(135deg, var(--electric), var(--electric-2));
  border: none;
  box-shadow: 0 10px 28px rgba(124, 107, 255, 0.45);
}

.floating-guide-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 14px 34px rgba(124, 107, 255, 0.6);
}

/* --- Toolbox drawer ------------------------------------------------------ */
.tools-drawer {
  background: rgba(10, 10, 20, 0.97);
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.tools-drawer-header h2 {
  background: linear-gradient(120deg, #fff 30%, var(--electric-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Segmented control tabs */
.tools-tabs {
  border-bottom: none;
  background: none;
  padding: 0.75rem 1.25rem 0.25rem 1.25rem;
  gap: 0.4rem;
}

.tools-tab {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 0.55rem;
  min-height: 42px;
  background: rgba(255, 255, 255, 0.04);
}

.tools-tab.active {
  background: linear-gradient(120deg, var(--electric), var(--electric-2));
  border-color: transparent;
  color: #07070f;
  box-shadow: 0 4px 16px rgba(124, 107, 255, 0.35);
}

/* Toggle chips with a check state */
.chip {
  border-radius: 9999px;
  min-height: 38px;
  padding: 0.4rem 0.95rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9aa6bd;
}

.chip.active {
  background: rgba(0, 224, 255, 0.12);
  border-color: rgba(0, 224, 255, 0.5);
  color: var(--electric-2);
  box-shadow: none;
}

.chip.active::before {
  content: '✓ ';
  font-weight: 900;
}

.helper-btn {
  border-radius: 9999px;
  min-height: 32px;
}

.control-input {
  border-radius: 9999px;
  padding: 0.65rem 1.2rem;
}

.control-input:focus {
  border-color: var(--electric);
  box-shadow: 0 0 0 3px rgba(124, 107, 255, 0.18);
}

/* Accordion cards */
.accordion-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(22, 22, 40, 0.6);
  overflow: hidden;
}

.accordion-header { padding: 0.85rem 1rem; min-height: 52px; }

.tense-tag {
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9aa6bd;
}

.mood-tag {
  border-radius: 9999px;
  background: linear-gradient(120deg, rgba(124, 107, 255, 0.2), rgba(0, 224, 255, 0.2));
  border: 1px solid rgba(124, 107, 255, 0.35);
  color: #cfd6ff;
}

.conjugation-table tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }

.conjugation-table .person-cell { color: #8b96ad; font-weight: 700; }

/* Quiz widget aligns with the surprise-card look */
.quiz-collapse-card {
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(140% 120% at 20% 0%, rgba(124, 107, 255, 0.12) 0%, transparent 55%),
    rgba(16, 16, 30, 0.6);
}

/* --- Mobile: drawers become bottom sheets -------------------------------- */
@media (max-width: 640px) {
  .tools-drawer,
  .drawer {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 92dvh;
    max-height: 92dvh;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 26px 26px 0 0;
    transform: translateY(105%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .tools-drawer.open,
  .drawer.open {
    right: 0;
    transform: translateY(0);
  }

  /* Grabber handle */
  .tools-drawer-header::before,
  .drawer-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
  }

  .tools-drawer-header,
  .drawer-header {
    position: relative;
    border-radius: 26px 26px 0 0;
    padding-top: 1.4rem;
  }
}

/* --- Accessibility ------------------------------------------------------- */
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--electric-2);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================================
   ✦ DETECTIVE MAP · Step 3 decision tree (Προσδιορισμοί)
   Color code: cyan = Ομοιόπτωτοι, violet = Ετερόπτωτοι, amber = Επιρρηματικοί
   ============================================================================ */

.cs-decision { display: flex; flex-direction: column; gap: 0.6rem; }

.cs-decision-q {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #cfd6e4;
}

.cs-decision-q strong { color: #fff; }

.cs-decision-sub {
  font-size: 0.85rem;
  color: #aab4c8;
  padding-left: 0.15rem;
}

.cs-branch-tabs { display: flex; gap: 0.5rem; }

.cs-branch-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  color: #cfd6e4;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.7rem 0.5rem;
  min-height: 58px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cs-branch-sub {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.cs-branch-tab.branch-nominal.active {
  background: linear-gradient(135deg, rgba(124, 107, 255, 0.28), rgba(124, 107, 255, 0.1));
  border-color: var(--electric);
  color: #d6cfff;
  box-shadow: 0 6px 20px rgba(124, 107, 255, 0.25);
}

.cs-branch-tab.branch-adverbial.active {
  background: linear-gradient(135deg, rgba(255, 182, 72, 0.24), rgba(255, 182, 72, 0.08));
  border-color: var(--pop-amber);
  color: #ffe3b3;
  box-shadow: 0 6px 20px rgba(255, 182, 72, 0.2);
}

.cs-branch-panel { display: none; flex-direction: column; gap: 0.9rem; }
.cs-branch-panel.active { display: flex; animation: fadeIn 0.25s ease-out; }

/* Families — each carries its own accent color via --fam */
.cs-family {
  --fam: var(--electric-2);
  border: 1px solid color-mix(in srgb, var(--fam) 25%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--fam) 4%, transparent);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cs-family.family-same   { --fam: #00e0ff; }
.cs-family.family-hetero { --fam: #a98fff; }
.cs-family.family-adv    { --fam: #ffb648; }

.cs-family-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fam);
}

.cs-family-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--fam);
  box-shadow: 0 0 8px var(--fam);
  flex-shrink: 0;
}

.cs-chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.cs-term-chip {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #aab4c8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 0.42rem 0.9rem;
  min-height: 38px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.cs-term-chip:hover { color: #fff; border-color: var(--fam); }

.cs-term-chip.active {
  background: var(--fam);
  border-color: var(--fam);
  color: #07070f;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--fam) 40%, transparent);
}

.cs-term-card {
  display: none;
  flex-direction: column;
  gap: 0.55rem;
  border-left: 3px solid var(--fam);
  background: rgba(7, 7, 15, 0.45);
  border-radius: 0 12px 12px 0;
  padding: 0.75rem 0.85rem;
}

.cs-term-card.open { display: flex; animation: fadeIn 0.2s ease-out; }

.cs-term-rule { font-size: 0.85rem; line-height: 1.5; color: #cfd6e4; }
.cs-term-rule strong { color: var(--fam); }

.cs-mini-example {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
}

.cs-mini-example .cs-gr {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.cs-mini-example .cs-gr mark {
  background: color-mix(in srgb, var(--fam) 22%, transparent);
  color: var(--fam);
  border-radius: 5px;
  padding: 0 0.25rem;
}

.cs-mini-example .cs-el { font-size: 0.76rem; color: #8b96ad; }

/* Tricks: gradient-edged glass instead of yellow dashes */
.cs-trick,
.badge-trick {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #cfd6e4;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--fam, var(--electric));
  border-radius: 0 12px 12px 0;
  padding: 0.6rem 0.8rem;
}

.cs-trick strong { color: var(--fam, var(--electric-2)); }

/* Meanings tag cloud — each meaning gets its own hue for memory anchoring */
.cs-meanings { display: flex; flex-direction: column; gap: 0.45rem; }

.cs-meanings-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b96ad;
}

.cs-meanings-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.cs-meaning-tag {
  --mt: #8b96ad;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mt);
  background: color-mix(in srgb, var(--mt) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--mt) 35%, transparent);
  border-radius: 9999px;
  padding: 0.3rem 0.8rem;
}

.mt-topo    { --mt: #34d399; }
.mt-xrono   { --mt: #60a5fa; }
.mt-tropo   { --mt: #ff5da2; }
.mt-skopo   { --mt: #ffb648; }
.mt-aitia   { --mt: #f87171; }
.mt-poso    { --mt: #00e0ff; }
.mt-anafora { --mt: #a98fff; }

/* The reference/cheat-sheet drawers must cover the sticky feed header */
.drawer-backdrop { z-index: 10000; }
.drawer { z-index: 10001; }

/* Live-passage examples: hide the block until a passage populates it */
.cheat-sheet-example:empty { display: none; }

/* ============================================================================
   ✦ THE HOOK POST — one-off legendary intro card (Steve Jobs, Stanford 2005)
   ============================================================================ */
.hero-post {
  border: 1.5px solid transparent;
  background:
    linear-gradient(rgba(20, 20, 38, 0.96), rgba(20, 20, 38, 0.96)) padding-box,
    linear-gradient(120deg, var(--pop-pink), var(--pop-amber), var(--electric-2), var(--electric)) border-box;
  animation: post-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both, hero-glow 3.8s ease-in-out infinite;
}

@keyframes hero-glow {
  0%, 100% { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 26px rgba(124, 107, 255, 0.22); }
  50%      { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 44px rgba(0, 224, 255, 0.32); }
}

.hero-ribbon {
  background: linear-gradient(120deg, var(--pop-pink), var(--pop-amber));
  color: #07070f;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 0.45rem 1rem;
}

.hero-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: radial-gradient(circle at 35% 30%, #2a2a4a 0%, #14142a 75%);
  box-shadow: 0 0 0 2px rgba(255, 93, 162, 0.55), 0 0 14px rgba(255, 93, 162, 0.35);
}

.hero-chip {
  background: linear-gradient(120deg, var(--pop-pink), var(--pop-amber));
  color: #07070f;
  border: none;
}

.hero-tagline {
  position: relative;
  z-index: 2;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  max-width: 34ch;
}

/* ==========================================================================
   DUEL MODE (Μονομαχία) — classroom team battle
   Phase 1: entry button, setup modal, baseline scoreboard.
   Phase 2 replaces the scoreboard with the projector-scale HUD.
   ========================================================================== */

.mode-duel-btn {
  border-color: rgba(239, 68, 68, 0.35);
  color: rgba(255, 138, 138, 0.9);
  background: rgba(239, 68, 68, 0.02);
  font-weight: 700;
  margin-left: 0.5rem;
}

.mode-duel-btn:hover {
  border-color: rgba(239, 68, 68, 0.6);
  color: #ff8a8a;
}

.mode-duel-btn.duel-on {
  background: rgba(239, 68, 68, 0.18);
  border-color: var(--accent-red);
  color: #fff;
}

/* --- Projector HUD --- */

/* Sticky: on a projector the score must never scroll out of the room's view. */
.duel-scoreboard {
  position: sticky;
  top: 0;
  z-index: 300;
  margin: 1rem 0 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  /* Fully opaque, no backdrop-filter: a blurred sticky layer ghosts badly
     while scrolling on Windows/Chrome, and this sits over scrolling text. */
  background: #080c18;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  /* Promote to its own layer so scrolling repaints cleanly. */
  will-change: transform;
}

/* Compact form once stuck, so the board keeps most of the screen for the text.
   Transitioned rather than snapped, so any residual toggle reads as a smooth
   resize instead of a flicker. */
.duel-scoreboard .duel-team,
.duel-scoreboard .duel-team-score,
.duel-scoreboard .duel-team-name {
  transition: font-size 0.18s ease, padding 0.18s ease, margin 0.18s ease;
}

.duel-scoreboard.duel-stuck .duel-team {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.duel-scoreboard.duel-stuck .duel-team-score {
  font-size: clamp(1.75rem, 4vw, 3rem);
}

.duel-scoreboard.duel-stuck .duel-team-name {
  margin-top: 0.2rem;
  font-size: clamp(0.7rem, 1vw, 0.9rem);
}

.duel-scoreboard.duel-stuck .duel-streak-pips {
  margin-top: 0.2rem;
}

.duel-hud-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 1.1rem;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.02);
}

.duel-hud-mode {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.duel-hud-progress {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.duel-hud-end {
  padding: 0.35rem 0.9rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.duel-hud-end:hover {
  color: #ff8a8a;
  border-color: rgba(239, 68, 68, 0.5);
}

.duel-teams-row {
  display: flex;
  align-items: stretch;
}

.duel-team {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: clamp(1rem, 2.5vw, 2rem) 1rem;
  text-align: center;
  border-top: 4px solid transparent;
  transition: var(--transition-smooth);
}

.duel-team-cyan { border-top-color: rgba(0, 242, 254, 0.25); }
.duel-team-purple { border-top-color: rgba(139, 92, 246, 0.25); }

.duel-team-cyan.duel-team-active {
  border-top-color: var(--accent-cyan);
  background: radial-gradient(ellipse at top, rgba(0, 242, 254, 0.12), transparent 70%);
}

.duel-team-purple.duel-team-active {
  border-top-color: var(--accent-purple);
  background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.12), transparent 70%);
}

.duel-team-header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 0.5rem;
  margin-bottom: 0.4rem;
}

.duel-turn-flag-placeholder {
  min-height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.duel-turn-flag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  white-space: nowrap;
  animation: duelTurnPulse 2s ease-in-out infinite;
}

.duel-team-cyan .duel-turn-flag {
  color: #062c30;
  background: var(--accent-cyan);
}

.duel-team-purple .duel-turn-flag {
  color: #ffffff;
  background: var(--accent-purple);
}

@keyframes duelTurnPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* Wraps rather than truncating — a class needs to see its whole team name. */
.duel-team-name {
  margin-top: 0.6rem;
  padding: 0 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(0.8rem, 1.3vw, 1.1rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}

.duel-team-cyan .duel-team-name { color: var(--accent-cyan); }
.duel-team-purple .duel-team-name { color: var(--accent-purple); }

/* Projector-scale: readable from the back row. */
.duel-team-score {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.duel-streak-pips {
  display: flex;
  justify-content: center;
  gap: 0.2rem;
  margin-top: 0.5rem;
  font-size: clamp(0.75rem, 1.3vw, 1.05rem);
  line-height: 1;
}

.duel-pip {
  opacity: 0.16;
  filter: grayscale(1);
  transition: var(--transition-smooth);
}

.duel-pip.lit {
  opacity: 1;
  filter: none;
  transform: scale(1.12);
}

.duel-pip-overflow {
  margin-left: 0.25rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: var(--accent-gold);
}

.duel-team-pot {
  margin-top: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(0.8rem, 1.3vw, 1rem);
  font-weight: 800;
  color: var(--accent-gold);
}

.duel-team-clock {
  margin-top: 0.4rem;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1rem, 2vw, 1.6rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.duel-team-clock.low {
  color: var(--accent-red);
  animation: duelTurnPulse 1s ease-in-out infinite;
}

.duel-vs-divider {
  display: flex;
  align-items: center;
  padding: 0 clamp(0.5rem, 1.5vw, 1.25rem);
  font-family: 'Outfit', sans-serif;
  font-size: clamp(0.8rem, 1.5vw, 1.25rem);
  font-weight: 900;
  color: var(--text-muted);
  border-left: 1px solid var(--border-glass);
  border-right: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.25);
}

/* --- Winner screen --- */

.duel-winner-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(3, 5, 12, 0.92);
  overflow-y: auto;
}

.duel-winner-panel {
  width: 100%;
  max-width: 720px;
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  box-shadow: var(--shadow-card);
}

.duel-winner-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.duel-winner-name {
  margin: 0.5rem 0 1.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--text-primary);
  word-break: break-word;
}

.duel-winner-cyan {
  color: var(--accent-cyan);
  text-shadow: 0 0 40px var(--accent-cyan-glow);
}

.duel-winner-purple {
  color: var(--accent-purple);
  text-shadow: 0 0 40px var(--accent-purple-glow);
}

.duel-winner-finals {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.duel-final-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.02);
}

.duel-final-row.won.duel-final-cyan {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
}

.duel-final-row.won.duel-final-purple {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.08);
}

.duel-final-name {
  min-width: 0;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.3rem);
  font-weight: 800;
  text-align: left;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: break-word;
}

.duel-final-cyan .duel-final-name { color: var(--accent-cyan); }
.duel-final-purple .duel-final-name { color: var(--accent-purple); }

.duel-final-score {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.duel-winner-reason {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  min-height: 1rem;
}

.duel-winner-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .duel-teams-row { flex-direction: column; }
  .duel-vs-divider {
    justify-content: center;
    padding: 0.35rem;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
  }
}

/* --- Setup modal --- */

.duel-setup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(3, 5, 12, 0.85);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}

.duel-setup-panel {
  width: 100%;
  max-width: 620px;
  padding: 2rem;
  border-radius: 18px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  box-shadow: var(--shadow-card);
}

.duel-setup-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.duel-setup-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.duel-setup-section {
  margin-bottom: 1.5rem;
}

.duel-setup-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.duel-mode-cards {
  display: grid;
  gap: 0.65rem;
}

.duel-mode-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: inherit;
}

.duel-mode-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.duel-mode-card.selected {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.07);
  box-shadow: 0 0 18px var(--accent-cyan-glow);
}

.duel-mode-card-name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.duel-mode-card-desc {
  display: block;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.duel-team-inputs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.duel-team-input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1.5px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
}

.duel-team-input:focus {
  outline: none;
}

.duel-input-cyan:focus { border-color: var(--accent-cyan); }
.duel-input-purple:focus { border-color: var(--accent-purple); }

.duel-vs {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.duel-setup-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
}

.duel-setup-checkbox input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.duel-clock-minutes {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.65rem;
  padding-left: 1.65rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.duel-clock-minutes input {
  width: 4.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1.5px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-family: inherit;
  font-weight: 600;
}

.duel-setup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.duel-start-btn {
  background: var(--accent-red);
  color: #fff;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  border: none;
}

.duel-start-btn:hover {
  background: #ff6b6b;
}

/* ==========================================================================
   DUEL MODE Phase 3 — Spotlight & Decision UI Styling
   ========================================================================== */

/* Dimming all other tokens when a word is spotlighted */
.syntax-tokens-wrapper.has-spotlight .syntax-token {
  opacity: 0.35 !important;
  filter: blur(0.5px) !important;
  transform: scale(0.95) !important;
  transition: all 0.25s ease !important;
}

/* Spotlighted token gets scaled up, fully opaque, and highlighted */
.syntax-tokens-wrapper.has-spotlight .syntax-token.spotlighted {
  opacity: 1 !important;
  filter: none !important;
  transform: scale(1.2) !important;
  z-index: 10 !important;
  border-width: 2px !important;
  border-style: solid !important;
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5) !important;
  animation: spotlightPulse 2s infinite ease-in-out;
  transition: all 0.25s ease !important;
}

@keyframes spotlightPulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.45);
    transform: scale(1.18);
  }
  50% {
    box-shadow: 0 0 22px rgba(255, 215, 0, 0.85);
    transform: scale(1.24);
  }
}

/* Team colored glow and border on spotlighted token */
.duel-turn-cyan .syntax-tokens-wrapper.has-spotlight .syntax-token.spotlighted {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.6) !important;
  animation: none !important;
}

.duel-turn-purple .syntax-tokens-wrapper.has-spotlight .syntax-token.spotlighted {
  border-color: var(--accent-purple) !important;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6) !important;
  animation: none !important;
}

/* Decision UI wrappers and buttons */
.duel-decision-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 0.6rem auto 0.4rem;
  max-width: 160px;
  width: 100%;
  animation: duelFadeIn 0.3s ease-out;
}

.duel-decision-btn {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 0.35rem 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(0.7rem, 1.2vw, 0.85rem);
  font-weight: 800;
  border-radius: 8px;
  border: 1.5px solid var(--border-glass);
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: none;
}

.duel-decision-btn.bank-btn {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
}

.duel-decision-btn.bank-btn:hover {
  background: rgba(52, 211, 153, 0.3);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

.duel-decision-btn.push-btn {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}

.duel-decision-btn.push-btn:hover {
  background: rgba(248, 113, 113, 0.3);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.4);
}

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

/* Hide campaign header during a duel to prevent visual overlap/squeezing */
.duel-active .main-header {
  display: none !important;
}

/* Control buttons & Paused states in Duel Mode */
.duel-add-time-btn {
  padding: 0.15rem 0.45rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.duel-add-time-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.duel-hud-pause {
  padding: 0.35rem 0.9rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.duel-hud-pause:hover {
  background: rgba(0, 242, 254, 0.25);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.syntax-tokens-wrapper.duel-paused {
  opacity: 0.25 !important;
  filter: blur(1.5px) !important;
  pointer-events: none !important;
  transition: all 0.3s ease !important;
}

/* Buzzer Mode HUD Banners & Lockouts */
.duel-hud-status {
  display: inline-block;
  margin-left: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.duel-hud-status.select-word {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.duel-hud-status.buzz-ready {
  color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
  animation: pulseGold 1.5s infinite;
}

.duel-hud-status.buzz-active {
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.duel-hud-status.steal-active {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  animation: pulseRed 1.5s infinite;
}

.duel-lockout-flag {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-block;
}

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.2); }
  50% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.5); }
}

@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 5px rgba(248, 113, 113, 0.2); }
  50% { box-shadow: 0 0 15px rgba(248, 113, 113, 0.5); }
}

/* Mobile responsive hiding for Buzzer mode card */
@media (max-width: 768px) {
  .duel-mode-card[data-duel-mode="buzzer"] {
    display: none !important;
  }
}

/* Assignment Mode selector styles */
.assignment-popover {
  padding: 1rem;
  min-width: 180px;
}

.assignment-btn {
  display: block;
  text-align: center;
  font-weight: 700;
  transition: all 0.2s ease;
}

.assignment-btn.brutal-btn {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.08);
  color: #f43f5e;
  margin-top: 0.5rem;
}

.assignment-btn.brutal-btn:hover {
  background: rgba(244, 63, 94, 0.2);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
}

/* Incorrect choice particle explosion */
.incorrect-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  animation: explodeParticle 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes explodeParticle {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0);
    opacity: 0;
  }
}

/* Desktop Passage Navigation Arrows - Fixed to Viewport Margins */
body.syntax-practice-active .syntax-nav-arrow-btn.hidden,
.syntax-nav-arrow-btn.hidden {
  display: none !important;
}
.syntax-nav-arrow-btn {
  display: none !important; /* Hide by default */
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 2.5rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  font-weight: 300;
  line-height: 1;
  padding: 0;
  
  /* Fixed positioning to viewport sides */
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999; /* Stay on top of page content */
}

body.syntax-practice-active .syntax-nav-arrow-btn {
  display: flex !important; /* Show when practice mode is active */
}

.syntax-nav-arrow-btn.prev-btn {
  left: 3rem;
}

.syntax-nav-arrow-btn.next-btn {
  right: 3rem;
}

.syntax-nav-arrow-btn span {
  display: inline-block;
  transform: translateY(-2px);
}

.syntax-nav-arrow-btn:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 20px rgba(92, 230, 230, 0.35);
  transform: translateY(-50%) scale(1.1); /* Preserve vertical transform! */
}

.syntax-nav-arrow-btn:active {
  transform: translateY(-50%) scale(0.95); /* Preserve vertical transform! */
}

/* Hide on mobile & tablets where screen width is narrow and swipe gestures are preferred */
@media (max-width: 900px) {
  body.syntax-practice-active .syntax-nav-arrow-btn {
    display: none !important;
  }
}
