/* ===== 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: #020c1a;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ===== CSS VARIABLES ===== */
:root {
  --bg1: #020c18;
  --bg2: #051426;
  --accent: #38e8c6;
  --ocean-deep: #020c18;
  --ocean-mid: #051426;
  --ocean-light: #0a2a44;
  --ocean-surf: #38e8c6;
  --coral: #ff6b6b;
  --gold: #ffd60a;
  --mint: #48cae4;
  --cyan: #38e8c6;
  --white: #ffffff;
  --glass: rgba(56,232,198,0.06);
  --glass-border: rgba(56,232,198,0.18);
  --text-soft: rgba(255,255,255,0.6);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --header-h: 56px;
}

/* ==============================
   TOPIC-BASED THEMES（国公立医学部版）
============================== */
body[data-topic="Clinical Ward"]    { --bg1:#020c1a; --bg2:#051428; --accent:#60a5fa; --glass:rgba(96,165,250,0.07); --glass-border:rgba(96,165,250,0.22); }
body[data-topic="Infection Bay"]    { --bg1:#021408; --bg2:#052814; --accent:#4ade80; --glass:rgba(74,222,128,0.07); --glass-border:rgba(74,222,128,0.22); }
body[data-topic="Neural Shore"]     { --bg1:#140c04; --bg2:#241808; --accent:#fbbf24; --glass:rgba(251,191,36,0.07); --glass-border:rgba(251,191,36,0.22); }
body[data-topic="Evolution Abyss"]  { --bg1:#020c18; --bg2:#051226; --accent:#38e8c6; --glass:rgba(56,232,198,0.07); --glass-border:rgba(56,232,198,0.22); }
body[data-topic="Mental Coast"]     { --bg1:#140a04; --bg2:#281408; --accent:#fb923c; --glass:rgba(251,146,60,0.07); --glass-border:rgba(251,146,60,0.22); }
body[data-topic="Eco Current"]      { --bg1:#021410; --bg2:#042a1a; --accent:#34d399; --glass:rgba(52,211,153,0.07); --glass-border:rgba(52,211,153,0.22); }
body[data-topic="Ethics Tide"]      { --bg1:#0e0818; --bg2:#1a1030; --accent:#c084fc; --glass:rgba(192,132,252,0.07); --glass-border:rgba(192,132,252,0.22); }

/* ===== 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) 60%, #000 100%);
  transition: background 1.5s ease;
}
.grid-layer {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(56,232,198,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,232,198,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.55;
  transition: opacity 1s;
}
.grid-layer::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(56,232,198,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ===== CREATURE LAYER ===== */
.creatures-layer { position: absolute; inset: 0; pointer-events: none; }
.creature {
  position: absolute; font-size: 26px;
  animation: creatureFloat linear infinite;
  opacity: 0.40;
  filter: drop-shadow(0 0 10px var(--accent));
}
.creature.large { font-size: 38px; opacity: 0.28; }
.creature.small { font-size: 16px; opacity: 0.48; }
@keyframes creatureFloat {
  0%   { transform: translateX(-120px) translateY(0); }
  25%  { transform: translateX(calc(25vw)) translateY(-14px); }
  50%  { transform: translateX(calc(50vw)) translateY(0); }
  75%  { transform: translateX(calc(75vw)) translateY(12px); }
  99%  { transform: translateX(calc(100vw + 120px)) translateY(0); opacity: 0.40; }
  100% { transform: translateX(-120px) translateY(0); opacity: 0; }
}

/* ===== CORAL / ELEMENT LAYER ===== */
.coral-layer { position: absolute; bottom: 0; left: 0; right: 0; height: 120px; pointer-events: none; }
.coral {
  position: absolute; bottom: 0;
  animation: coralSway ease-in-out infinite;
  transform-origin: bottom center;
  filter: drop-shadow(0 4px 10px var(--accent));
  opacity: 0.45;
}
@keyframes coralSway {
  0%,100% { transform: rotate(-3deg) scale(1); }
  50%      { transform: rotate(3deg) scale(1.05); }
}

/* ===== PARTICLES ===== */
.particles { position: absolute; inset: 0; pointer-events: none; }
.particle {
  position: absolute; font-size: 10px;
  animation: particleDrift linear infinite;
  color: var(--accent);
}
@keyframes particleDrift {
  0%   { transform: translate(0, 100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.2; }
  100% { transform: translate(20px, -20px) rotate(360deg); opacity: 0; }
}

/* ===== WAVES ===== */
.wave {
  position: absolute; bottom: -10px; left: 0; right: 0;
  height: 60px; border-radius: 50% 50% 0 0;
  opacity: 0.06; animation: waveMove linear infinite;
}
.wave1 { background: var(--accent); animation-duration: 9s; }
.wave2 { background: var(--mint); animation-duration: 13s; animation-delay: -5s; bottom: 0; }
.wave3 { background: var(--ocean-light); animation-duration: 17s; animation-delay: -8s; bottom: 5px; }
@keyframes waveMove {
  0%   { transform: translateX(-50%) scaleY(1); }
  50%  { transform: translateX(0%) scaleY(1.4); }
  100% { transform: translateX(-50%) scaleY(1); }
}

/* ===== BUBBLES ===== */
.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubble {
  position: absolute; border-radius: 50%;
  background: rgba(56,232,198,0.04);
  border: 1px solid rgba(56,232,198,0.12);
  animation: bubbleRise linear infinite;
}
@keyframes bubbleRise {
  0%   { transform: translateY(100vh) scale(0.5); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.2; }
  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 16px;
  background: rgba(2,12,24,0.93);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(56,232,198,0.15);
}
.header-left { display: flex; align-items: center; gap: 8px; }
.logo-shark { font-size: 20px; animation: dnaRotate 10s linear infinite; }
@keyframes dnaRotate {
  0%   { transform: rotate(0deg) scale(1); filter: hue-rotate(0deg); }
  50%  { transform: rotate(180deg) scale(1.1); filter: hue-rotate(90deg); }
  100% { transform: rotate(360deg) scale(1); filter: hue-rotate(0deg); }
}
.logo-text {
  font-family: 'Orbitron', monospace;
  font-weight: 900; font-size: 14px;
  color: var(--cyan);
  letter-spacing: 3px;
  text-shadow: 0 0 12px var(--cyan);
}
.header-center {
  font-size: 11px; color: rgba(56,232,198,0.65);
  font-family: 'Space Mono', monospace;
  letter-spacing: 1px;
}
.header-univ { white-space: nowrap; }
.header-stats {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: var(--text-soft);
  display: flex; align-items: center; gap: 5px;
}
.header-stats span { white-space: nowrap; }
.stat-sep { opacity: 0.3; }
#stat-explored { color: var(--cyan); font-weight: 700; text-shadow: 0 0 8px var(--cyan); }
#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: 'Orbitron', monospace;
  font-size: 18px; color: var(--white); flex: 1;
  text-shadow: 0 0 16px var(--accent);
}
.back-btn {
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-soft); padding: 7px 14px;
  border-radius: 20px; font-size: 13px; cursor: pointer;
  transition: all 0.2s;
}
.back-btn:active { transform: scale(0.96); }

/* ===== HOME SCREEN ===== */
.home-hero {
  padding: 24px 20px 16px;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.shark-teacher {
  position: relative; margin-bottom: 10px;
  display: flex; flex-direction: column; align-items: center;
}
.shark-body { font-size: 52px; animation: sharkFloat 4s ease-in-out infinite; }
@keyframes sharkFloat {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-10px) rotate(2deg); }
}
.shark-bubble {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 18px; padding: 8px 16px;
  font-size: 12px; color: var(--cyan); max-width: 220px;
  text-align: center; line-height: 1.4; margin-top: 8px;
  animation: fadeInUp 0.5s ease;
  box-shadow: 0 0 20px rgba(56,232,198,0.1);
}
.app-title {
  font-family: 'Orbitron', monospace;
  font-size: 26px; font-weight: 900;
  color: var(--white); text-align: center; line-height: 1.2;
  text-shadow: 0 0 30px var(--cyan);
  margin-top: 12px; letter-spacing: 2px;
}
.app-sub {
  font-size: 12px; color: var(--text-soft);
  text-align: center; margin-top: 8px; line-height: 1.5;
}

/* ===== DAY PROGRESS ===== */
.day-progress-strip { padding: 12px 0 4px; overflow-x: auto; }
.day-scroll { display: flex; gap: 8px; padding: 0 20px; }
.day-pill {
  flex-shrink: 0;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 8px 12px; min-width: 60px;
  text-align: center; cursor: pointer;
  transition: all 0.2s;
}
.day-pill:active { transform: scale(0.95); }
.day-pill.today { border-color: var(--cyan); background: rgba(56,232,198,0.12); box-shadow: 0 0 12px rgba(56,232,198,0.2); }
.day-pill.clear { border-color: rgba(74,222,128,0.4); background: rgba(74,222,128,0.08); }
.day-pill.partial { border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.06); }
.day-num { font-family: 'Space Mono', monospace; font-size: 10px; color: var(--text-soft); display: block; }
.day-status { font-size: 14px; display: block; margin-top: 2px; }

/* ===== HOME ACTIONS ===== */
.home-actions { display: flex; flex-direction: column; gap: 10px; padding: 12px 20px; }
.btn-primary {
  background: linear-gradient(135deg, #0e7490, #38e8c6);
  color: #001a1a; border: none; border-radius: var(--radius);
  padding: 16px 20px; font-size: 16px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 4px 20px rgba(56,232,198,0.3);
  transition: all 0.2s;
}
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  background: var(--glass); border: 1.5px solid var(--glass-border);
  color: var(--white); border-radius: var(--radius);
  padding: 14px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 12px;
  transition: all 0.2s;
}
.btn-secondary:active { transform: scale(0.98); }
.btn-ghost {
  background: transparent; border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-soft); border-radius: var(--radius);
  padding: 12px 20px; font-size: 14px;
  cursor: pointer; display: flex; align-items: center; gap: 12px;
  transition: all 0.2s;
}
.btn-ghost:active { transform: scale(0.98); }
.btn-icon { font-size: 20px; }
.btn-text { flex: 1; text-align: left; }

/* ===== OVERALL PROGRESS ===== */
.overall-progress { padding: 12px 20px 0; }
.prog-label { font-size: 11px; color: var(--text-soft); margin-bottom: 6px; font-family: 'Space Mono', monospace; }
.prog-bar-wrap {
  background: rgba(255,255,255,0.08); border-radius: 4px;
  height: 6px; overflow: hidden; margin-bottom: 4px;
}
.prog-bar {
  height: 100%;
  background: linear-gradient(90deg, #0e7490, #38e8c6);
  border-radius: 4px; transition: width 1s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 8px rgba(56,232,198,0.5);
  width: 0%;
}
.prog-pct { font-family: 'Space Mono', monospace; font-size: 11px; color: var(--cyan); text-align: right; }

/* ===== TOPICS SCREEN ===== */
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 16px; }
.topic-card {
  background: var(--glass); border: 1.5px solid var(--glass-border);
  border-radius: var(--radius); padding: 16px 14px;
  cursor: pointer; transition: all 0.2s;
  background-color: var(--card-accent, rgba(56,232,198,0.04));
}
.topic-card:active { transform: scale(0.97); }
.topic-emoji { font-size: 32px; margin-bottom: 8px; }
.topic-name { font-family: 'Orbitron', monospace; font-size: 11px; color: var(--white); font-weight: 700; margin-bottom: 3px; line-height: 1.3; }
.topic-name-jp { font-size: 11px; color: var(--text-soft); margin-bottom: 8px; }
.topic-count { font-family: 'Space Mono', monospace; font-size: 10px; color: var(--text-soft); margin-bottom: 6px; }
.topic-mini-bar { background: rgba(255,255,255,0.08); border-radius: 3px; height: 4px; overflow: hidden; }
.topic-mini-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease; min-width: 0; }

/* ===== TOPIC MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: linear-gradient(135deg, #051426, #020c18);
  border: 2px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 28px 24px; max-width: 320px; width: 90%;
  animation: fadeInUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(56,232,198,0.1);
}
.modal-topic-badge {
  font-family: 'Orbitron', monospace; font-size: 11px;
  color: var(--cyan); border: 1px solid var(--glass-border);
  background: var(--glass); border-radius: 20px; padding: 4px 14px;
  display: inline-block; margin-bottom: 12px;
}
.modal-topic-creature { font-size: 48px; text-align: center; margin-bottom: 12px; }
.modal-title { font-size: 16px; color: var(--white); text-align: center; margin-bottom: 18px; }
.modal-btn {
  width: 100%; background: var(--glass); border: 1.5px solid var(--glass-border);
  color: var(--white); border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 10px; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  transition: all 0.2s; text-align: left;
}
.modal-btn:active { transform: scale(0.98); }
.mode-full { border-color: rgba(56,232,198,0.35); }
.mode-step { border-color: rgba(251,191,36,0.35); }
.modal-btn-icon { font-size: 24px; }
.modal-btn-content { flex: 1; }
.modal-btn-title { font-weight: 700; font-size: 14px; }
.modal-btn-sub { font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.modal-btn-count { font-family: 'Space Mono', monospace; font-size: 12px; color: var(--cyan); }
.modal-cancel {
  width: 100%; background: transparent; border: none;
  color: var(--text-soft); padding: 10px; cursor: pointer;
  font-size: 14px; margin-top: 4px;
}

/* ===== REVIEW SCREEN ===== */
.review-options { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.review-btn {
  background: var(--glass); border: 1.5px solid var(--glass-border);
  color: var(--white); border-radius: var(--radius);
  padding: 16px 18px; font-size: 15px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 14px;
  transition: all 0.2s;
}
.review-btn:active { transform: scale(0.98); }
.r-icon { font-size: 22px; }
.r-label { flex: 1; text-align: left; font-size: 14px; }
.r-count { font-family: 'Space Mono', monospace; font-size: 11px; color: var(--text-soft); }
.topic-review-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

/* ===== FLASHCARD SCREEN ===== */
.flashcard-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 16px 20px;
  perspective: 1200px;
}
.flashcard {
  width: 100%; max-width: 400px; min-height: 340px;
  position: relative; cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.flashcard.flipped { transform: rotateY(180deg); }
.card-front, .card-back {
  position: absolute; inset: 0;
  background: linear-gradient(145deg, rgba(56,232,198,0.07), rgba(2,12,24,0.9));
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  backface-visibility: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow), 0 0 30px rgba(56,232,198,0.06);
}
.card-back { transform: rotateY(180deg); overflow-y: auto; }
.card-pos {
  font-family: 'Space Mono', monospace; font-size: 12px;
  color: var(--cyan); background: rgba(56,232,198,0.1);
  border: 1px solid rgba(56,232,198,0.2);
  padding: 3px 12px; border-radius: 20px; display: inline-block;
  margin-bottom: 20px; align-self: flex-start;
}
.card-word {
  font-family: 'Orbitron', monospace;
  font-size: 34px; font-weight: 900; color: var(--white);
  text-shadow: 0 0 24px var(--cyan);
  flex: 1; display: flex; align-items: center;
  letter-spacing: 1px; line-height: 1.2;
}
.card-hint { font-size: 12px; color: var(--text-soft); text-align: center; margin-top: 12px; }
.card-meaning {
  font-size: 22px; font-weight: 700; color: var(--white);
  margin-bottom: 16px; line-height: 1.4;
}
.card-example {
  font-size: 13px; color: var(--text-soft); line-height: 1.7;
  margin-bottom: 8px; font-style: italic;
}
.card-translation { font-size: 12px; color: rgba(255,255,255,0.45); line-height: 1.6; margin-bottom: 10px; }
.card-etymology { font-size: 11px; color: var(--cyan); margin-bottom: 8px; line-height: 1.5; }
.card-derivatives { font-size: 11px; color: var(--mint); line-height: 1.5; }
.fc-actions { display: flex; gap: 10px; padding: 0 20px 10px; }
.fc-btn {
  flex: 1; padding: 13px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--glass-border);
  transition: all 0.2s;
}
.fc-btn:active { transform: scale(0.97); }
.fc-skip {
  background: var(--glass); color: var(--text-soft);
}
.fc-knew {
  background: linear-gradient(135deg, #0e7490, #38e8c6);
  color: #001a1a; border-color: transparent;
  box-shadow: 0 4px 16px rgba(56,232,198,0.3);
}
.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(--cyan); color: #001a1a;
  padding: 10px 24px; border-radius: 20px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; border: none;
  box-shadow: 0 4px 16px rgba(56,232,198,0.4);
}
.fc-progress-info {
  font-family: 'Space Mono', monospace; font-size: 12px; color: var(--text-soft);
}
.topic-badge {
  font-size: 10px;
  background: rgba(56,232,198,0.1);
  border: 1px solid rgba(56,232,198,0.25);
  padding: 3px 10px; border-radius: 20px;
  color: var(--cyan);
  font-family: 'Orbitron', monospace;
  white-space: nowrap;
}

/* ===== QUIZ ===== */
.quiz-timer-wrap { margin: 12px 20px 0; position: relative; }
.quiz-timer-bar { height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.quiz-timer-bar::after {
  content: ''; display: block; height: 100%;
  background: linear-gradient(90deg, #0e7490, #38e8c6);
  width: var(--timer-pct, 100%);
  transition: width 1s linear; border-radius: 3px;
  box-shadow: 0 0 8px var(--cyan);
}
.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: 26px 24px 18px; }
.quiz-word {
  font-family: 'Orbitron', monospace;
  font-size: 30px; color: var(--white);
  text-align: center; line-height: 1.25; margin-bottom: 10px;
  text-shadow: 0 0 20px var(--accent);
}
.quiz-listen-btn button {
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--cyan); 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: var(--cyan); background: rgba(56,232,198,0.15); color: #b2f5ea;
  animation: correctPulse 0.4s ease;
  box-shadow: 0 0 16px rgba(56,232,198,0.3);
}
.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.08);
  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: 14px 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: 30px; flex-shrink: 0; }
.feedback-msg { font-size: 15px; font-weight: 700; color: var(--white); }
.feedback-correct { font-size: 14px; color: var(--gold); margin-bottom: 10px; font-weight: 600; }
.feedback-hint {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
}
.hint-etymology { font-size: 12px; color: rgba(255,255,255,0.6); line-height: 1.6; margin-bottom: 7px; }
.hint-derivatives { font-size: 12px; color: var(--mint); margin-bottom: 7px; }
.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: 10px; background: rgba(56,232,198,0.12);
  border: 1px solid rgba(56,232,198,0.25);
  padding: 3px 10px; border-radius: 20px; color: var(--cyan);
  font-family: 'Orbitron', monospace;
}

/* ===== 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;
  filter: drop-shadow(0 0 30px var(--cyan));
}
@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: sharkFloat 3s ease-in-out infinite; }
.results-title {
  font-family: 'Orbitron', monospace;
  font-size: 24px; color: var(--white); margin-bottom: 12px;
  text-shadow: 0 0 20px var(--accent);
}
.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(--cyan); margin-bottom: 24px; text-shadow: 0 0 8px var(--cyan); }
.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; 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; }
}

/* ===== MASCOT OVERLAY ===== */
.shark-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.shark-msg-box {
  background: linear-gradient(135deg, #051426, #020c18);
  border: 2px solid var(--cyan); 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.6), 0 0 40px rgba(56,232,198,0.15);
}
.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, #0e7490, #38e8c6);
  color: #001a1a; border: none; border-radius: 20px;
  padding: 10px 28px; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 16px rgba(56,232,198,0.35);
}

/* ===== 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(56,232,198,0.25); border-radius: 2px; }
