/* ==============================
   Minecraft English Adventure
   ============================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Nunito:wght@400;600;700;800&display=swap');

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

:root {
  /* Minecraft palette */
  --mc-green: #5D8C3E;
  --mc-green-light: #7EC850;
  --mc-dirt: #8B6B47;
  --mc-dirt-dark: #5C4A2F;
  --mc-stone: #7F7F7F;
  --mc-stone-dark: #5A5A5A;
  --mc-diamond: #4AEDD9;
  --mc-emerald: #17DD62;
  --mc-gold: #FCDB05;
  --mc-red: #E04040;
  --mc-dark: #1A1C2A;
  --mc-darker: #12141F;
  --mc-panel: #222640;
  --mc-panel-light: #2C3050;
  --mc-text: #E8EAF0;
  --mc-text-dim: #9A9DB8;
  --mc-border: #3A3F5C;

  /* Pixel font for headings */
  --font-pixel: 'Press Start 2P', monospace;
  /* Clean font for body */
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;

  /* Pixel border helper */
  --pixel-border: 3px solid;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--mc-text);
  background: var(--mc-darker);
  background-image:
    radial-gradient(circle at 20% 50%, rgba(93,140,62,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(74,237,217,0.04) 0%, transparent 50%);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--mc-darker); }
::-webkit-scrollbar-thumb { background: var(--mc-green); border-radius: 4px; }

/* ==============================
   EMERALD COUNTER (floating)
   ============================== */
.emerald-counter {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--mc-panel);
  border: 3px solid var(--mc-emerald);
  border-radius: 12px;
  padding: 8px 14px;
  box-shadow: 0 4px 20px rgba(23,221,98,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--mc-emerald);
  cursor: default;
  user-select: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.emerald-counter:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(23,221,98,0.4);
}

.emerald-counter.pulse {
  animation: emerald-pulse 0.4s ease;
}

@keyframes emerald-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); box-shadow: 0 0 30px rgba(23,221,98,0.6); }
  100% { transform: scale(1); }
}

.emerald-icon {
  font-size: 20px;
  filter: drop-shadow(0 0 6px rgba(23,221,98,0.5));
  animation: emerald-glow 2s ease-in-out infinite alternate;
}

@keyframes emerald-glow {
  from { filter: drop-shadow(0 0 4px rgba(23,221,98,0.3)); }
  to   { filter: drop-shadow(0 0 10px rgba(23,221,98,0.7)); }
}

.emerald-count {
  min-width: 28px;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 8px rgba(23,221,98,0.5);
}

.emerald-btn {
  background: rgba(23,221,98,0.15);
  border: 2px solid var(--mc-emerald);
  color: var(--mc-emerald);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-family: var(--font-pixel);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.emerald-btn:hover {
  background: var(--mc-emerald);
  color: var(--mc-dark);
  transform: scale(1.1);
}

.emerald-btn--reset {
  font-size: 14px;
  border-color: var(--mc-red);
  color: var(--mc-red);
  background: rgba(224,64,64,0.1);
}

.emerald-btn--reset:hover {
  background: var(--mc-red);
  color: #fff;
}

/* ==============================
   HERO HEADER
   ============================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px 40px;
  overflow: hidden;
  background:
    linear-gradient(180deg,
      rgba(26,28,42,0) 0%,
      rgba(26,28,42,0.8) 70%,
      var(--mc-darker) 100%
    );
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 31px,
      rgba(93,140,62,0.04) 31px,
      rgba(93,140,62,0.04) 32px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 31px,
      rgba(93,140,62,0.04) 31px,
      rgba(93,140,62,0.04) 32px
    );
  pointer-events: none;
}

.hero__blocks {
  display: flex;
  gap: 0;
  margin-bottom: 40px;
  animation: hero-blocks-float 3s ease-in-out infinite alternate;
}

@keyframes hero-blocks-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-8px); }
}

/* Minecraft CSS blocks */
.mc-block {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  position: relative;
}

.mc-block--grass {
  background:
    linear-gradient(180deg, #5D8C3E 0%, #5D8C3E 35%, #8B6B47 35%, #8B6B47 100%);
  border: 2px solid #4A7030;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.15), inset -2px -2px 0 rgba(0,0,0,0.2);
}

.mc-block--dirt {
  background: #8B6B47;
  border: 2px solid #6B5030;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.1), inset -2px -2px 0 rgba(0,0,0,0.2);
}

.mc-block--dirt::after {
  content: '';
  position: absolute;
  inset: 4px;
  background:
    radial-gradient(circle at 30% 40%, #7A5C3A 2px, transparent 2px),
    radial-gradient(circle at 70% 60%, #7A5C3A 1.5px, transparent 1.5px),
    radial-gradient(circle at 50% 20%, #9A7B57 1px, transparent 1px);
}

.mc-block--stone {
  background: #7F7F7F;
  border: 2px solid #606060;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.12), inset -2px -2px 0 rgba(0,0,0,0.2);
}

.mc-block--stone::after {
  content: '';
  position: absolute;
  inset: 4px;
  background:
    linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.08) 35%, transparent 35%),
    linear-gradient(-30deg, transparent 55%, rgba(0,0,0,0.08) 55%, rgba(0,0,0,0.08) 60%, transparent 60%);
}

.mc-block--diamond {
  background: linear-gradient(135deg, #4AEDD9 0%, #2BC4B0 50%, #4AEDD9 100%);
  border: 2px solid #1FA89A;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.3), inset -2px -2px 0 rgba(0,0,0,0.15), 0 0 16px rgba(74,237,217,0.3);
  animation: diamond-shimmer 2s ease-in-out infinite alternate;
}

@keyframes diamond-shimmer {
  from { box-shadow: inset 2px 2px 0 rgba(255,255,255,0.3), inset -2px -2px 0 rgba(0,0,0,0.15), 0 0 12px rgba(74,237,217,0.2); }
  to   { box-shadow: inset 2px 2px 0 rgba(255,255,255,0.4), inset -2px -2px 0 rgba(0,0,0,0.15), 0 0 24px rgba(74,237,217,0.5); }
}

.mc-block--emerald {
  background: linear-gradient(135deg, #17DD62 0%, #12B84E 50%, #17DD62 100%);
  border: 2px solid #0F9A40;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.3), inset -2px -2px 0 rgba(0,0,0,0.15), 0 0 16px rgba(23,221,98,0.3);
}

.mc-block--gold {
  background: linear-gradient(135deg, #FCDB05 0%, #E0C000 50%, #FCDB05 100%);
  border: 2px solid #C4A800;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.35), inset -2px -2px 0 rgba(0,0,0,0.15), 0 0 12px rgba(252,219,5,0.25);
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__subtitle {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--mc-green-light);
  letter-spacing: 2px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero__title {
  font-family: var(--font-pixel);
  font-size: clamp(20px, 5vw, 42px);
  line-height: 1.4;
  color: #fff;
  text-shadow:
    3px 3px 0 var(--mc-green),
    6px 6px 0 rgba(0,0,0,0.3);
  margin-bottom: 32px;
}

.hero__info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  color: var(--mc-text-dim);
}

.hero__info span {
  background: var(--mc-panel);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--mc-border);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 30px;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--mc-text-dim);
  animation: bounce-down 1.5s ease-in-out infinite;
}

@keyframes bounce-down {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50%      { transform: translateY(8px); opacity: 1; }
}

/* ==============================
   TIMELINE NAV
   ============================== */
.timeline {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18,20,31,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--mc-border);
  padding: 10px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.timeline__track {
  display: flex;
  gap: 4px;
  justify-content: center;
  min-width: max-content;
}

.timeline__dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--mc-panel);
  border: 2px solid var(--mc-border);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 64px;
  color: var(--mc-text-dim);
}

.timeline__dot:hover {
  border-color: var(--mc-green);
  background: var(--mc-panel-light);
}

.timeline__dot.active {
  border-color: var(--mc-emerald);
  background: rgba(23,221,98,0.1);
  color: var(--mc-emerald);
  box-shadow: 0 0 12px rgba(23,221,98,0.2);
}

.timeline__time {
  font-family: var(--font-pixel);
  font-size: 7px;
  white-space: nowrap;
}

.timeline__icon {
  font-size: 18px;
}

/* ==============================
   MAIN CONTENT
   ============================== */
.main {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* ==============================
   SECTIONS
   ============================== */
.section {
  margin-top: 48px;
  padding-top: 24px;
  scroll-margin-top: 80px;
}

.section__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.section__badge {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--mc-dark);
  background: var(--mc-green-light);
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.section__title {
  font-family: var(--font-pixel);
  font-size: clamp(12px, 3vw, 16px);
  color: #fff;
  line-height: 1.6;
}

/* Section decorative divider */
.section + .section::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--mc-green) 20%,
    var(--mc-emerald) 50%,
    var(--mc-green) 80%,
    transparent 100%
  );
  margin-bottom: 24px;
  border-radius: 2px;
}

/* ==============================
   TEACHER SAY BUBBLE
   ============================== */
.teacher-say {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.teacher-say__icon {
  font-size: 36px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 4px;
}

.teacher-say__bubble {
  background: var(--mc-panel);
  border: 2px solid var(--mc-green);
  border-radius: 12px;
  padding: 16px 20px;
  position: relative;
  flex: 1;
  font-weight: 600;
}

.teacher-say__bubble::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 14px;
  border: 6px solid transparent;
  border-right-color: var(--mc-green);
}

.teacher-say__bubble p + p {
  margin-top: 8px;
}

.teacher-say--danger .teacher-say__bubble {
  border-color: var(--mc-red);
  background: rgba(224,64,64,0.1);
}

.teacher-say--danger .teacher-say__bubble::before {
  border-right-color: var(--mc-red);
}

.teacher-say--boss .teacher-say__bubble {
  border-color: var(--mc-diamond);
  background: rgba(74,237,217,0.08);
}

.teacher-say--boss .teacher-say__bubble::before {
  border-right-color: var(--mc-diamond);
}

.teacher-say--win .teacher-say__bubble {
  border-color: var(--mc-gold);
  background: rgba(252,219,5,0.08);
}

.teacher-say--win .teacher-say__bubble::before {
  border-right-color: var(--mc-gold);
}

/* ==============================
   TASK CARDS
   ============================== */
.task-card {
  background: var(--mc-panel);
  border: 2px solid var(--mc-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.task-card:hover {
  border-color: var(--mc-green);
}

.task-card__title {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--mc-green-light);
  margin-bottom: 12px;
  line-height: 1.6;
}

.task-card__prompt {
  color: var(--mc-text-dim);
  margin-bottom: 12px;
  font-size: 14px;
}

.task-card--advanced {
  border-color: var(--mc-gold);
}

.task-card--advanced:hover {
  border-color: var(--mc-gold);
}

.task-card--advanced .task-card__title {
  color: var(--mc-gold);
}

.task-card--fun {
  background: linear-gradient(135deg, var(--mc-panel), rgba(23,221,98,0.08));
  border-color: var(--mc-emerald);
}

.task-card--final {
  background: linear-gradient(135deg, var(--mc-panel), rgba(252,219,5,0.06));
  border-color: var(--mc-gold);
}

/* ==============================
   EXAMPLES
   ============================== */
.examples {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.example {
  font-size: 15px;
  padding: 10px 16px;
  background: rgba(93,140,62,0.08);
  border-left: 3px solid var(--mc-green);
  border-radius: 0 8px 8px 0;
  font-weight: 600;
}

.example strong {
  color: var(--mc-diamond);
}

/* ==============================
   TEMPLATES
   ============================== */
.templates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template {
  display: inline-block;
  font-size: 14px;
  padding: 8px 14px;
  background: rgba(74,237,217,0.08);
  border: 1px solid rgba(74,237,217,0.3);
  border-radius: 8px;
  font-weight: 600;
}

.template strong {
  color: var(--mc-emerald);
}

.template-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.template-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--mc-text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==============================
   VOCABULARY CARDS
   ============================== */
.vocab-section {
  margin-bottom: 20px;
}

.vocab-section__title {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--mc-text-dim);
  margin-bottom: 12px;
  line-height: 1.6;
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.vocab-card {
  background: var(--mc-panel);
  border: 2px solid var(--mc-border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  transition: all 0.2s;
  cursor: default;
}

.vocab-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.vocab-card__emoji {
  display: block;
  font-size: 32px;
  margin-bottom: 6px;
}

.vocab-card__word {
  display: block;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: #fff;
  margin-bottom: 2px;
}

.vocab-card__ru {
  display: block;
  font-size: 12px;
  color: var(--mc-text-dim);
  font-weight: 600;
}

/* Vocab card color themes */
.vocab-card--nature:hover { border-color: var(--mc-green); }
.vocab-card--animal:hover { border-color: #F4A261; }
.vocab-card--item:hover   { border-color: var(--mc-diamond); }
.vocab-card--block:hover  { border-color: var(--mc-dirt); }
.vocab-card--ore:hover    { border-color: var(--mc-gold); }
.vocab-card--mob:hover    { border-color: var(--mc-red); }
.vocab-card--village:hover { border-color: #A78BFA; }

/* ==============================
   GRAMMAR PILLS
   ============================== */
.grammar-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.grammar-pill {
  font-family: var(--font-pixel);
  font-size: 9px;
  padding: 6px 12px;
  background: rgba(141,121,201,0.12);
  border: 1px solid rgba(141,121,201,0.4);
  border-radius: 20px;
  color: #B0A0E0;
  white-space: nowrap;
}

/* ==============================
   QUIZ CARD
   ============================== */
.quiz-card {
  background: var(--mc-panel);
  border: 2px solid var(--mc-diamond);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.quiz-card__title {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--mc-diamond);
  margin-bottom: 12px;
  line-height: 1.6;
}

.quiz-card__question {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.quiz-card__options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.quiz-option {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  background: var(--mc-panel-light);
  border: 2px solid var(--mc-border);
  border-radius: 10px;
  color: var(--mc-text);
  cursor: pointer;
  transition: all 0.2s;
}

.quiz-option:hover {
  border-color: var(--mc-diamond);
  background: rgba(74,237,217,0.1);
  transform: scale(1.05);
}

.quiz-option.correct {
  border-color: var(--mc-emerald) !important;
  background: rgba(23,221,98,0.2) !important;
  animation: correct-flash 0.6s ease;
}

.quiz-option.wrong {
  border-color: var(--mc-red) !important;
  background: rgba(224,64,64,0.2) !important;
  animation: wrong-shake 0.4s ease;
}

@keyframes correct-flash {
  0%   { box-shadow: none; }
  50%  { box-shadow: 0 0 20px rgba(23,221,98,0.5); }
  100% { box-shadow: none; }
}

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

.quiz-card__answer {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--mc-emerald);
  line-height: 1.6;
}

.quiz-card--contest {
  border-color: var(--mc-gold);
}

.quiz-card--contest .quiz-card__title {
  color: var(--mc-gold);
}

/* ==============================
   VOCAB REVEAL CARDS
   ============================== */
.vocab-card--reveal {
  cursor: pointer;
  position: relative;
}

.vocab-card--reveal .vocab-card__ru {
  display: block;
}

.vocab-card--reveal .vocab-card__en {
  display: none;
  font-weight: 700;
  color: #00e676;
}

.vocab-card--reveal.revealed .vocab-card__ru {
  display: none;
}

.vocab-card--reveal.revealed .vocab-card__en {
  display: block;
}

/* ==============================
   VOTE BUTTONS
   ============================== */
.vote-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 20px;
  background: var(--mc-panel-light);
  border: 2px solid var(--mc-border);
  border-radius: 12px;
  color: var(--mc-text);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  min-width: 100px;
}

.vote-btn:hover {
  border-color: var(--mc-red);
  transform: translateY(-2px);
}

.vote-btn.voted {
  border-color: var(--mc-red);
  background: rgba(224,64,64,0.15);
}

.vote-emoji {
  font-size: 28px;
}

.vote-label {
  font-family: var(--font-pixel);
  font-size: 9px;
}

.vote-count {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--mc-red);
}

/* ==============================
   DIALOG
   ============================== */
.dialog {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialog__line {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 10px;
}

.dialog--teacher {
  background: rgba(93,140,62,0.1);
  border-left: 3px solid var(--mc-green);
  margin-right: 40px;
}

.dialog--student {
  background: rgba(74,237,217,0.08);
  border-left: 3px solid var(--mc-diamond);
  margin-left: 40px;
}

.dialog__speaker {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--mc-text-dim);
  line-height: 1.6;
}

.dialog__text {
  font-weight: 700;
  font-size: 15px;
}

/* ==============================
   QUEST TASKS (Final quest)
   ============================== */
.quest-tasks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quest-task {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--mc-panel);
  border: 2px solid var(--mc-border);
  border-radius: 12px;
  padding: 16px 20px;
  transition: all 0.3s;
}

.quest-task:hover {
  border-color: var(--mc-diamond);
  transform: translateX(4px);
}

.quest-task__number {
  font-family: var(--font-pixel);
  font-size: 18px;
  color: var(--mc-diamond);
  background: rgba(74,237,217,0.1);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 2px solid var(--mc-diamond);
  flex-shrink: 0;
}

.quest-task__content h3 {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.6;
}

.quest-task__template {
  font-size: 14px;
  color: var(--mc-text-dim);
  font-weight: 600;
}

.quest-task__template strong {
  color: var(--mc-emerald);
}

.quest-task--boss {
  border-color: var(--mc-gold);
  background: linear-gradient(135deg, var(--mc-panel), rgba(252,219,5,0.06));
}

.quest-task--boss:hover {
  border-color: var(--mc-gold);
}

.quest-task--boss .quest-task__number {
  color: var(--mc-gold);
  background: rgba(252,219,5,0.1);
  border-color: var(--mc-gold);
}

.quest-task--boss .quest-task__content h3 {
  color: var(--mc-gold);
}

/* ==============================
   STATS (Final section)
   ============================== */
.final-stats {
  margin-top: 32px;
  text-align: center;
}

.final-stats h3 {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--mc-gold);
  margin-bottom: 20px;
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.stat-card {
  background: var(--mc-panel);
  border: 2px solid var(--mc-border);
  border-radius: 12px;
  padding: 20px 12px;
  text-align: center;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-card__icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.stat-card__value {
  font-family: var(--font-pixel);
  font-size: 24px;
  color: var(--mc-emerald);
  margin-bottom: 6px;
}

.stat-card__label {
  font-size: 12px;
  color: var(--mc-text-dim);
  font-weight: 700;
}

/* ==============================
   FOOTER BLOCKS
   ============================== */
.footer-banner {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 48px;
  opacity: 0.6;
}

.footer-banner .mc-block {
  width: 40px;
  height: 40px;
}

/* ==============================
   BREAK SECTION
   ============================== */
.section--break {
  text-align: center;
}

.section--break .task-card {
  display: inline-block;
  text-align: left;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 600px) {
  .hero__title {
    font-size: 18px;
  }

  .mc-block {
    width: 36px;
    height: 36px;
  }

  .timeline__dot {
    min-width: 52px;
    padding: 4px 6px;
  }

  .timeline__time {
    font-size: 6px;
  }

  .timeline__icon {
    font-size: 14px;
  }

  .vocab-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }

  .vocab-card__emoji {
    font-size: 24px;
  }

  .vocab-card__word {
    font-size: 8px;
  }

  .dialog--teacher { margin-right: 16px; }
  .dialog--student { margin-left: 16px; }

  .emerald-counter {
    top: 8px;
    right: 8px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .emerald-btn {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

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

  .quest-task {
    padding: 12px 14px;
  }

  .quest-task__number {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
}

/* ==============================
   SECTION COLORS
   ============================== */
.section--battle .section__badge {
  background: var(--mc-red);
}

.section--final .section__badge {
  background: linear-gradient(135deg, var(--mc-diamond), var(--mc-gold));
}

.section--ending .section__badge {
  background: var(--mc-gold);
}

/* ==============================
   PRINT
   ============================== */
@media print {
  .emerald-counter,
  .timeline,
  .hero__scroll-hint {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .section {
    page-break-inside: avoid;
  }
}

/* ==============================
   PAGE-BY-PAGE NAVIGATION
   ============================== */

/* Top bar */
.page-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(18,20,31,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--mc-border);
}

.page-topbar__home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--mc-panel);
  border: 2px solid var(--mc-border);
  font-size: 20px;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}
.page-topbar__home:hover {
  background: var(--mc-green);
  border-color: var(--mc-green);
  transform: scale(1.08);
}

.page-topbar__title {
  font-family: var(--font-pixel);
  font-size: clamp(9px, 2vw, 13px);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
}

.page-topbar .emerald-counter {
  position: static;
  transform: none;
  padding: 4px 10px;
  font-size: 12px;
  flex-shrink: 0;
}
.page-topbar .emerald-counter .emerald-icon { font-size: 16px; }

/* Content area */
.page-content {
  padding: 72px 20px 90px;
  max-width: 900px;
  margin: 0 auto;
}

/* Bottom navigation */
.page-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(18,20,31,0.95);
  backdrop-filter: blur(10px);
  border-top: 2px solid var(--mc-border);
}

.page-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--mc-panel);
  border: 2px solid var(--mc-border);
  color: var(--mc-text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.page-nav__btn:hover {
  background: var(--mc-green);
  border-color: var(--mc-green);
  color: #fff;
  transform: translateY(-2px);
}
.page-nav__btn--disabled {
  opacity: 0.3;
  pointer-events: none;
}

.page-nav__progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.page-nav__progress-bar {
  width: 100%;
  height: 8px;
  background: var(--mc-panel);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--mc-border);
}

.page-nav__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mc-emerald), var(--mc-diamond));
  border-radius: 4px;
  transition: width 0.4s ease;
}

.page-nav__progress-text {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--mc-text-dim);
}

/* Landing page start button */
.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--mc-green), var(--mc-green-light));
  border: 3px solid #4A7030;
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 6px 24px rgba(93,140,62,0.4);
  margin-top: 20px;
}
.start-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 36px rgba(93,140,62,0.5);
}
.start-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Section index grid on landing */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 32px;
}
.section-grid__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--mc-panel);
  border: 2px solid var(--mc-border);
  text-decoration: none;
  color: var(--mc-text);
  transition: all 0.2s;
}
.section-grid__item:hover {
  border-color: var(--mc-green);
  background: var(--mc-panel-light);
  transform: translateY(-2px);
}
.section-grid__num {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--mc-text-dim);
  min-width: 28px;
}
.section-grid__icon {
  font-size: 22px;
}
.section-grid__name {
  font-weight: 700;
  font-size: 14px;
}

/* Remove old floating emerald from section pages */
.page-topbar ~ .emerald-counter { display: none; }