/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  color: #fff;
  background: #060d1f;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ===== CSS VARIABLES ===== */
:root {
  --ocean-deep: #060d1f;
  --ocean-mid:  #0b1e3e;
  --ocean-light:#1565c0;
  --ocean-surf: #4dd0e1;
  --coral: #ff6b6b;
  --gold:  #ffd54f;
  --mint:  #80cbc4;
  --white: #ffffff;
  --glass: rgba(255,255,255,0.07);
  --glass-border: rgba(255,255,255,0.14);
  --text-soft: rgba(255,255,255,0.65);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 32px rgba(0,0,0,0.35);
  --header-h: 56px;
  --bg1: #060d1f;
  --bg2: #0b1e3e;
  --accent: #4dd0e1;
}

/* ==============================
   TOPIC-BASED THEMES
============================== */
body[data-topic="Neuroscience Cove"] { --bg1:#030d14; --bg2:#062838; --accent:#26c6da; }
body[data-topic="Genetics Reef"]     { --bg1:#031408; --bg2:#062818; --accent:#66bb6a; }
body[data-topic="Fractal Shore"]     { --bg1:#141008; --bg2:#2a2010; --accent:#ffd54f; }
body[data-topic="Language Lagoon"]   { --bg1:#120814; --bg2:#261030; --accent:#ce93d8; }
body[data-topic="Tech Atoll"]        { --bg1:#040c1c; --bg2:#081838; --accent:#29b6f6; }
body[data-topic="Philosophy Bay"]    { --bg1:#180808; --bg2:#301010; --accent:#ef9a9a; }
body[data-topic="Culture Abyss"]     { --bg1:#141005; --bg2:#2a200a; --accent:#ffb74d; }

/* ===== OCEAN BACKGROUND ===== */
#ocean-bg {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden;
}
.ocean-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
  transition: background 1.5s ease;
}

/* ===== CREATURE LAYER ===== */
.creatures-layer {
  position: absolute; inset: 0;
  pointer-events: none;
}
.creature {
  position: absolute;
  font-size: 32px;
  animation: creatureSwim linear infinite;
  opacity: 0.5;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.2));
  transition: opacity 1s;
}
.creature.large { font-size: 48px; opacity: 0.35; }
.creature.small { font-size: 20px; opacity: 0.6; }
@keyframes creatureSwim {
  0%   { transform: translateX(-120px) scaleX(1); }
  49%  { transform: translateX(calc(100vw + 120px)) scaleX(1); opacity: 0.5; }
  50%  { transform: translateX(calc(100vw + 120px)) scaleX(-1); opacity: 0; }
  51%  { transform: translateX(calc(100vw + 120px)) scaleX(-1); opacity: 0.5; }
  100% { transform: translateX(-120px) scaleX(-1); }
}

/* ===== CORAL LAYER ===== */
.coral-layer {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 160px; pointer-events: none;
}
.coral {
  position: absolute; bottom: 0;
  font-size: 36px;
  animation: coralSway ease-in-out infinite;
  transform-origin: bottom center;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
  opacity: 0.6;
}
@keyframes coralSway {
  0%,100% { transform: rotate(-5deg) scale(1); }
  50%      { transform: rotate(5deg) scale(1.05); }
}

/* ===== PARTICLES ===== */
.particles { position: absolute; inset: 0; pointer-events: none; }
.particle {
  position: absolute; width: 3px; height: 3px;
  border-radius: 50%; background: rgba(255,255,255,0.35);
  animation: particleDrift linear infinite;
}
@keyframes particleDrift {
  0%   { transform: translate(0, 100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translate(20px, -100px) rotate(360deg); opacity: 0; }
}

/* ===== WAVES ===== */
.wave {
  position: absolute; bottom: -10px; left: 0; right: 0;
  height: 80px; border-radius: 50% 50% 0 0;
  opacity: 0.10; animation: waveMove linear infinite;
}
.wave1 { background: var(--accent, #4dd0e1); animation-duration: 7s; }
.wave2 { background: var(--mint);  animation-duration: 11s; animation-delay: -3s; bottom: 0; }
.wave3 { background: var(--ocean-light); animation-duration: 15s; animation-delay: -6s; bottom: 5px; }
@keyframes waveMove {
  0%   { transform: translateX(-50%) scaleY(1); }
  50%  { transform: translateX(0%) scaleY(1.3); }
  100% { transform: translateX(-50%) scaleY(1); }
}

/* ===== BUBBLES ===== */
.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubble {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  animation: bubbleRise linear infinite;
}
@keyframes bubbleRise {
  0%   { transform: translateY(100vh) scale(0.5); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-100px) scale(1.1); opacity: 0; }
}

/* ===== SCREENS ===== */
.screen {
  position: relative; z-index: 10;
  display: none; flex-direction: column;
  min-height: 100vh; padding-top: var(--header-h);
  padding-bottom: 32px;
}
.screen.active { display: flex; animation: fadeInUp 0.35s ease; }

/* ===== HEADER ===== */
#app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: rgba(4,10,28,0.90);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
.header-left { display: flex; align-items: center; gap: 8px; }
.logo-shark { font-size: 22px; }
.logo-text {
  font-family: 'Space Mono', monospace;
  font-weight: 700; font-size: 15px;
  color: var(--gold);
  letter-spacing: 2px;
}
.header-stats {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--text-soft);
  display: flex; align-items: center; gap: 6px;
}
.header-stats span { white-space: nowrap; }
.stat-sep { opacity: 0.4; }
#stat-explored { color: var(--mint); font-weight: 700; }
#stat-mastered { color: var(--gold); }
#stat-weak     { color: var(--coral); }

/* ===== SCREEN HEADER ===== */
.screen-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px 8px;
}
.screen-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px; color: var(--white); flex: 1;
}
.back-btn {
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-soft); padding: 6px 12px;
  border-radius: 20px; font-size: 13px; cursor: pointer;
  white-space: nowrap;
}
.back-btn:active { opacity: 0.7; }

/* ===== HOME SCREEN ===== */
.home-hero {
  padding: 24px 24px 8px;
  display: flex; flex-direction: column; align-items: flex-start;
  position: relative;
}
.shark-teacher {
  position: relative; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.shark-body { font-size: 40px; animation: sharkSwim 4s ease-in-out infinite; }
@keyframes sharkSwim {
  0%,100% { transform: translateX(0) rotate(-2deg); }
  50%      { transform: translateX(6px) rotate(2deg); }
}
.shark-bubble {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px 12px 12px 0;
  padding: 8px 12px; font-size: 12px; color: var(--mint);
  max-width: 200px; animation: fadeInUp 0.5s ease;
}
.app-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px; line-height: 1.1; color: var(--white);
  margin-bottom: 6px;
}
.app-sub { font-size: 13px; color: var(--text-soft); }

/* ===== DAY STRIP ===== */
.day-progress-strip {
  padding: 16px 0 8px; overflow-x: auto;
  scrollbar-width: none;
}
.day-progress-strip::-webkit-scrollbar { display: none; }
.day-scroll {
  display: flex; gap: 8px;
  padding: 0 20px; width: max-content;
}
.day-pill {
  display: flex; flex-direction: column; align-items: center;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 8px 10px; min-width: 52px;
  cursor: pointer; transition: all 0.2s;
  flex-shrink: 0;
}
.day-pill:active { transform: scale(0.95); }
.day-pill.today   { border-color: var(--gold);  background: rgba(255,213,79,0.15); }
.day-pill.clear   { border-color: var(--mint);  background: rgba(128,203,196,0.15); }
.day-pill.partial { border-color: var(--ocean-surf); }
.day-num { font-family: 'Space Mono', monospace; font-size: 11px; color: var(--text-soft); }
.day-status { font-size: 14px; margin-top: 2px; }

/* ===== HOME ACTIONS ===== */
.home-actions {
  padding: 16px 20px; display: flex; flex-direction: column; gap: 10px;
}
.btn-primary {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--accent), var(--mint));
  color: var(--ocean-deep); border: none; border-radius: var(--radius);
  padding: 16px 20px; font-size: 16px; font-weight: 700;
  cursor: pointer; width: 100%; box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:active { transform: scale(0.97); box-shadow: none; }
.btn-secondary {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--white); border-radius: var(--radius);
  padding: 14px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; width: 100%;
  transition: transform 0.15s;
}
.btn-secondary:active { transform: scale(0.97); }
.btn-ghost {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: 1px dashed var(--glass-border);
  color: var(--text-soft); border-radius: var(--radius);
  padding: 12px 20px; font-size: 14px;
  cursor: pointer; width: 100%;
}
.btn-ghost:active { opacity: 0.7; }
.btn-icon { font-size: 20px; }
.btn-text { font-family: 'Noto Sans JP', sans-serif; }

/* ===== OVERALL PROGRESS ===== */
.overall-progress {
  margin: 8px 20px 0;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.prog-label { font-size: 12px; color: var(--text-soft); white-space: nowrap; }
.prog-bar-wrap {
  flex: 1; height: 8px; background: rgba(255,255,255,0.1);
  border-radius: 4px; overflow: hidden;
}
.prog-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--mint));
  border-radius: 4px; transition: width 0.6s ease;
}
.prog-pct { font-family: 'Space Mono', monospace; font-size: 12px; color: var(--gold); }

/* ===== TOPIC GRID ===== */
.topic-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 12px 20px;
}
.topic-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 16px 12px;
  cursor: pointer; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-align: center; position: relative; overflow: hidden;
}
.topic-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--card-accent, rgba(77,208,225,0.15)) 0%, transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.topic-card:hover::before { opacity: 1; }
.topic-card:active { transform: scale(0.95); }
.topic-emoji {
  font-size: 36px; margin-bottom: 8px; display: block;
  animation: topicFloat 3s ease-in-out infinite;
}
@keyframes topicFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.topic-name    { font-size: 12px; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.topic-name-jp { font-size: 11px; color: var(--text-soft); margin-bottom: 6px; }
.topic-count   { font-size: 11px; color: var(--mint); }
.topic-mini-bar {
  height: 4px; background: rgba(255,255,255,0.1);
  border-radius: 2px; margin-top: 8px; overflow: hidden;
}
.topic-mini-fill {
  height: 100%; background: var(--accent);
  border-radius: 2px; transition: width 0.5s;
}

/* ===== TOPIC MODE MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-box {
  background: linear-gradient(145deg, var(--bg2, #0b1e3e), var(--bg1, #060d1f));
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 28px; padding: 28px 24px;
  width: 100%; max-width: 360px;
  animation: modalPop 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
@keyframes modalPop {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.modal-topic-badge {
  display: inline-block;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px; padding: 4px 14px;
  font-size: 12px; color: var(--mint);
  margin-bottom: 12px;
}
.modal-topic-creature {
  font-size: 64px; text-align: center; display: block;
  margin-bottom: 12px;
  animation: creatureFloat 2s ease-in-out infinite;
}
@keyframes creatureFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-8px) scale(1.05); }
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px; color: var(--white);
  text-align: center; margin-bottom: 20px;
}
.modal-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 18px; padding: 16px 18px;
  cursor: pointer; margin-bottom: 12px;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  color: var(--white);
}
.modal-btn:active { transform: scale(0.97); }
.mode-full {
  background: linear-gradient(135deg, rgba(77,208,225,0.18), rgba(128,203,196,0.10));
  border-color: rgba(77,208,225,0.45);
}
.mode-full:hover  { border-color: var(--accent); background: linear-gradient(135deg, rgba(77,208,225,0.32), rgba(128,203,196,0.18)); }
.mode-step {
  background: linear-gradient(135deg, rgba(255,213,79,0.18), rgba(255,152,0,0.10));
  border-color: rgba(255,213,79,0.38);
}
.mode-step:hover  { border-color: var(--gold); background: linear-gradient(135deg, rgba(255,213,79,0.28), rgba(255,152,0,0.18)); }
.modal-btn-icon   { font-size: 28px; flex-shrink: 0; }
.modal-btn-content { flex: 1; text-align: left; }
.modal-btn-title  { font-size: 15px; font-weight: 700; color: var(--white); margin-bottom: 2px; }
.modal-btn-sub    { font-size: 11px; color: var(--text-soft); }
.modal-btn-count  {
  font-family: 'Space Mono', monospace;
  font-size: 13px; color: var(--gold);
  background: rgba(255,213,79,0.12); border-radius: 10px;
  padding: 3px 10px; white-space: nowrap;
}
.modal-cancel {
  display: block; width: 100%; background: transparent; border: none;
  color: var(--text-soft); font-size: 14px; padding: 10px;
  cursor: pointer; text-align: center;
}
.modal-cancel:active { opacity: 0.6; }

/* ===== REVIEW SCREEN ===== */
.review-options { padding: 12px 20px; display: flex; flex-direction: column; gap: 12px; }
.review-btn {
  display: flex; align-items: center; gap: 14px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 16px 18px;
  cursor: pointer; width: 100%; transition: transform 0.15s;
  color: var(--white);
}
.review-btn:active { transform: scale(0.97); }
.r-icon  { font-size: 24px; }
.r-label { flex: 1; font-size: 15px; font-weight: 600; text-align: left; }
.r-count { font-size: 12px; color: var(--text-soft); }
.topic-review-list { display: flex; flex-direction: column; gap: 8px; }

/* ===== FLASHCARD ===== */
.flashcard-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 16px 20px; perspective: 1000px;
}
.flashcard {
  width: 100%; max-width: 400px; min-height: 300px;
  position: relative; transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}
.flashcard.flipped { transform: rotateY(180deg); }
.card-front, .card-back {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backface-visibility: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px; box-shadow: var(--shadow);
}
.card-back { transform: rotateY(180deg); justify-content: flex-start; overflow-y: auto; }
.card-pos {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: var(--mint);
  background: rgba(128,203,196,0.15);
  border: 1px solid rgba(128,203,196,0.3);
  padding: 3px 10px; border-radius: 20px;
  margin-bottom: 16px;
}
.card-word {
  font-family: 'Playfair Display', serif;
  font-size: 36px; color: var(--white);
  text-align: center; line-height: 1.2;
  margin-bottom: 16px;
}
.card-hint { font-size: 12px; color: var(--text-soft); margin-top: 8px; }
.card-meaning {
  font-size: 22px; font-weight: 700; color: var(--gold);
  text-align: center; margin-bottom: 16px; line-height: 1.4;
}
.card-example {
  font-size: 13px; color: var(--mint); line-height: 1.6;
  margin-bottom: 8px; text-align: left; width: 100%;
}
.card-translation {
  font-size: 12px; color: var(--text-soft); line-height: 1.6;
  margin-bottom: 12px; text-align: left; width: 100%;
}
.card-etymology {
  font-size: 11px; color: rgba(255,255,255,0.45);
  border-top: 1px solid var(--glass-border);
  padding-top: 10px; width: 100%;
  line-height: 1.5;
}
.card-derivatives {
  font-size: 11px; color: var(--accent);
  margin-top: 8px; width: 100%;
}

.fc-actions {
  display: flex; gap: 12px; padding: 0 20px 12px;
}
.fc-btn {
  flex: 1; padding: 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; cursor: pointer; border: none;
  transition: transform 0.15s;
}
.fc-btn:active { transform: scale(0.97); }
.fc-skip { background: var(--glass); color: var(--text-soft); border: 1px solid var(--glass-border); }
.fc-knew { background: linear-gradient(135deg, #4caf50, #81c784); color: white; }

.fc-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 20px 16px;
}
.fc-btn-sm {
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-soft); padding: 8px 16px;
  border-radius: 20px; font-size: 13px; cursor: pointer;
}
.fc-btn-next {
  background: var(--accent); color: var(--ocean-deep);
  padding: 10px 24px; border-radius: 20px;
  font-size: 14px; font-weight: 700; cursor: pointer; border: none;
}
.fc-progress-info {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--text-soft);
}
.topic-badge {
  font-size: 11px; background: rgba(255,255,255,0.10);
  border: 1px solid var(--glass-border);
  padding: 3px 10px; border-radius: 20px; color: var(--mint);
  white-space: nowrap;
}

/* ===== QUIZ ===== */
.quiz-timer-wrap {
  margin: 12px 20px 0;
  position: relative;
}
.quiz-timer-bar {
  height: 6px; background: rgba(255,255,255,0.10);
  border-radius: 3px; overflow: hidden;
}
.quiz-timer-bar::after {
  content: ''; display: block; height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--gold));
  width: var(--timer-pct, 100%);
  transition: width 1s linear;
  border-radius: 3px;
}
.quiz-timer-text {
  position: absolute; right: 0; top: -18px;
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--text-soft);
}
.quiz-question-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 24px 20px;
}
.quiz-word {
  font-family: 'Playfair Display', serif;
  font-size: 38px; color: var(--white); text-align: center;
  line-height: 1.2; margin-bottom: 12px;
}
.quiz-listen-btn button {
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--mint); padding: 8px 20px;
  border-radius: 20px; font-size: 14px; cursor: pointer;
}
.quiz-choices {
  display: flex; flex-direction: column; gap: 10px;
  padding: 0 20px;
}
.choice-btn {
  background: var(--glass); border: 1.5px solid var(--glass-border);
  color: var(--white); border-radius: var(--radius);
  padding: 14px 18px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: all 0.15s; display: flex; align-items: center; gap: 10px;
}
.choice-btn:active { transform: scale(0.98); }
.choice-btn.correct {
  border-color: #4caf50; background: rgba(76,175,80,0.18); color: #a5d6a7;
  animation: correctPulse 0.4s ease;
}
.choice-btn.wrong {
  border-color: var(--coral); background: rgba(255,107,107,0.18); color: #ff8a80;
  animation: wrongShake 0.4s ease;
}
.choice-btn.disabled { cursor: default; }
.choice-num {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: var(--text-soft);
  background: rgba(255,255,255,0.10); padding: 2px 8px;
  border-radius: 10px; flex-shrink: 0;
}
@keyframes correctPulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}
@keyframes wrongShake {
  0%,100% { transform: translateX(0); }
  25%  { transform: translateX(-6px); }
  75%  { transform: translateX(6px); }
}

/* ===== QUIZ FEEDBACK ===== */
.quiz-feedback {
  margin: 16px 20px 0;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 16px;
  animation: feedbackSlide 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes feedbackSlide {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.feedback-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.feedback-icon { font-size: 32px; flex-shrink: 0; }
.feedback-msg  { font-size: 16px; font-weight: 700; color: var(--white); }
.feedback-correct { font-size: 14px; color: var(--gold); margin-bottom: 12px; font-weight: 600; }
.feedback-hint {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.hint-label {
  font-size: 10px; font-weight: 700; color: var(--mint);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.hint-etymology  { font-size: 12px; color: rgba(255,255,255,0.60); line-height: 1.6; margin-bottom: 8px; }
.hint-derivatives { font-size: 12px; color: var(--accent); margin-bottom: 8px; }
.hint-example    { font-size: 12px; color: var(--text-soft); line-height: 1.5; font-style: italic; }
.quiz-meta { display: flex; align-items: center; gap: 8px; }
#quiz-progress { font-family: 'Space Mono', monospace; font-size: 12px; color: var(--text-soft); }
.mode-badge {
  font-size: 11px; background: rgba(77,208,225,0.18);
  border: 1px solid rgba(77,208,225,0.38);
  padding: 3px 10px; border-radius: 20px; color: var(--accent);
}

/* ===== CORRECT BURST ===== */
.correct-burst {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.burst-content {
  font-size: 80px;
  animation: burstPop 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards;
  text-shadow: 0 0 30px rgba(255,213,79,0.8);
}
@keyframes burstPop {
  0%   { transform: scale(0); opacity: 0; }
  50%  { transform: scale(1.3); opacity: 1; }
  80%  { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ===== RESULTS SCREEN ===== */
.results-wrap {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 24px; text-align: center;
  position: relative; z-index: 10;
}
.results-shark { font-size: 56px; margin-bottom: 12px; animation: sharkSwim 3s ease-in-out infinite; }
.results-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px; color: var(--white); margin-bottom: 12px;
}
.results-score {
  font-family: 'Space Mono', monospace;
  font-size: 48px; color: var(--gold); font-weight: 700;
  margin-bottom: 12px;
}
.results-comment { font-size: 15px; color: var(--mint); margin-bottom: 24px; }
.results-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; width: 100%; max-width: 320px; margin-bottom: 28px;
}
.r-stat {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 12px;
}
.r-stat-num   { font-family: 'Space Mono', monospace; font-size: 22px; color: var(--gold); }
.r-stat-label { font-size: 11px; color: var(--text-soft); margin-top: 4px; }
.results-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; }

/* ===== CELEBRATION ===== */
.celebration {
  position: fixed; inset: 0; pointer-events: none; z-index: 200;
  overflow: hidden;
}
.spark {
  position: absolute; width: 8px; height: 8px;
  border-radius: 50%; animation: sparkFly 1s ease-out forwards;
}
@keyframes sparkFly {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}
.fish-confetti {
  position: absolute; font-size: 20px;
  animation: fishFly 1.4s ease-out forwards;
}
@keyframes fishFly {
  0%   { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--dr,360deg)) scale(0.3); opacity: 0; }
}

/* ===== SHARK OVERLAY ===== */
.shark-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.62); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.shark-msg-box {
  background: linear-gradient(135deg, var(--ocean-mid), var(--ocean-deep));
  border: 2px solid var(--gold); border-radius: var(--radius-lg);
  padding: 32px 28px; text-align: center;
  max-width: 300px; animation: fadeInUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.shark-big { font-size: 48px; display: block; margin-bottom: 16px; }
.shark-msg-box p { font-size: 16px; color: var(--white); margin-bottom: 20px; line-height: 1.6; }
.shark-msg-box button {
  background: linear-gradient(135deg, var(--accent), var(--mint));
  color: var(--ocean-deep); border: none; border-radius: 20px;
  padding: 10px 28px; font-size: 15px; font-weight: 700; cursor: pointer;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 2px; }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
