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

/* ===== CSS VARIABLES (GMACH = deep ocean + shark blue + coral accent) ===== */
:root {
  --ocean-deep:  #020e1e;
  --ocean-mid:   #041630;
  --ocean-light: #0a2a50;
  --ocean-surf:  #1e88e5;
  --coral:       #ff6b35;
  --gold:        #ffd54f;
  --mint:        #4dd0e1;
  --white:       #ffffff;
  --glass:       rgba(255,255,255,0.07);
  --glass-border:rgba(255,255,255,0.13);
  --text-soft:   rgba(255,255,255,0.65);
  --radius:      16px;
  --radius-lg:   24px;
  --shadow:      0 8px 32px rgba(0,0,0,0.4);
  --header-h:    56px;
  --bg1: #020e1e;
  --bg2: #041630;
  --accent: #1e88e5;
}

/* ==============================
   TOPIC-BASED THEMES
============================== */
body[data-topic="Technology & AI"]    { --bg1:#020b18; --bg2:#051a35; --accent:#42a5f5; }
body[data-topic="Health & Science"]   { --bg1:#021408; --bg2:#042810; --accent:#66bb6a; }
body[data-topic="Eco & Environment"]  { --bg1:#021206; --bg2:#073d18; --accent:#26a69a; }
body[data-topic="Economy & Business"] { --bg1:#180a02; --bg2:#301505; --accent:#ffa726; }
body[data-topic="Society & Policy"]   { --bg1:#100414; --bg2:#200830; --accent:#ab47bc; }
body[data-topic="Culture & Identity"] { --bg1:#14020e; --bg2:#2e0820; --accent:#ec407a; }
body[data-topic="Education & Gender"] { --bg1:#0e100a; --bg2:#202808; --accent:#d4e157; }
body[data-topic="Media & Arts"]       { --bg1:#160810; --bg2:#301020; --accent:#ef5350; }
body[data-topic="Science & Research"] { --bg1:#020c1e; --bg2:#082040; --accent:#29b6f6; }
body[data-topic="Mind & Behaviour"]   { --bg1:#0a0214; --bg2:#180428; --accent:#7e57c2; }
body[data-topic="Academic Core"]      { --bg1:#020e1e; --bg2:#041630; --accent:#1e88e5; }

/* ===== OCEAN BACKGROUND ===== */
#ocean-bg {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden;
}
.ocean-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(170deg, var(--bg1) 0%, var(--bg2) 55%, #061840 100%);
  transition: background 1.5s ease;
}
.ocean-gradient::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(30,136,229,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,136,229,0.04) 1px, transparent 1px);
  background-size: 55px 55px;
}

/* ===== CREATURE LAYER ===== */
.creatures-layer {
  position: absolute; inset: 0;
  pointer-events: none;
}
.creature {
  position: absolute;
  font-size: 28px;
  animation: creatureSwim linear infinite;
  opacity: 0.35;
  filter: drop-shadow(0 0 8px rgba(30,136,229,0.4));
  transition: opacity 1s;
}
.creature.large { font-size: 46px; opacity: 0.25; }
.creature.small { font-size: 18px; opacity: 0.45; }
@keyframes creatureSwim {
  0%   { transform: translateX(-120px) scaleX(1); }
  49%  { transform: translateX(calc(100vw + 120px)) scaleX(1); }
  50%  { transform: translateX(calc(100vw + 120px)) scaleX(-1); }
  100% { transform: translateX(-120px) scaleX(-1); }
}

/* ===== CORAL LAYER (bottom decorations) ===== */
.coral-layer {
  position: absolute; bottom: 0; left: 0; right: 0; height: 80px;
  pointer-events: none;
}
.coral {
  position: absolute; bottom: 6px;
  animation: coralSway ease-in-out infinite alternate;
  transform-origin: bottom center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
@keyframes coralSway {
  from { transform: rotate(-8deg) scale(1); }
  to   { transform: rotate(8deg) scale(1.05); }
}

/* ===== WAVE ===== */
.wave {
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(transparent, rgba(30,136,229,0.07));
  animation: waveMove linear infinite;
}
.wave1 { animation-duration: 16s; opacity: 0.5; }
.wave2 { animation-duration: 22s; opacity: 0.3; animation-delay: -8s; }
.wave3 { animation-duration: 30s; opacity: 0.2; animation-delay: -15s; }
@keyframes waveMove {
  0%   { transform: translateX(0) scaleY(1); }
  50%  { transform: translateX(-25px) scaleY(1.15); }
  100% { transform: translateX(0) scaleY(1); }
}

/* ===== BUBBLES ===== */
.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.6), rgba(30,136,229,0.1));
  border: 1px solid rgba(255,255,255,0.2);
  animation: bubbleRise linear infinite;
}
@keyframes bubbleRise {
  0%   { transform: translateY(0) scale(1); opacity: 0.6; }
  80%  { opacity: 0.4; }
  100% { transform: translateY(-110vh) scale(1.3); opacity: 0; }
}

/* ===== PARTICLES ===== */
.particles { position: absolute; inset: 0; pointer-events: none; }
.particle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  top: 110%;
  left: 50%;
  animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-115vh) translateX(calc(cos(var(--a,0))*80px)); opacity: 0; }
}

/* ===== HEADER ===== */
#app-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: rgba(2,14,30,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(30,136,229,0.2);
  z-index: 100;
}
.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(--accent);
  letter-spacing: 2px;
}
.header-stats {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--text-soft);
}
.stat-sep { opacity: 0.35; }

/* ===== SCREENS ===== */
.screen {
  display: none;
  min-height: 100vh;
  padding-top: var(--header-h);
  padding-bottom: 24px;
  position: relative; z-index: 1;
}
.screen.active { display: block; }

/* ===== SCREEN HEADER ===== */
.screen-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(2,14,30,0.6);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(30,136,229,0.15);
}
.screen-header h2 {
  font-size: 17px; font-weight: 700;
  color: #fff;
}
.back-btn {
  background: none; border: none; color: var(--accent);
  font-size: 14px; cursor: pointer; padding: 4px 8px;
  border-radius: 8px;
  transition: background .15s;
}
.back-btn:hover { background: rgba(30,136,229,0.12); }

/* ===== HOME HERO ===== */
.home-hero {
  padding: 24px 20px 16px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 12px;
}
.shark-teacher { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.shark-body { font-size: 52px; animation: sharkBob 3s ease-in-out infinite; }
@keyframes sharkBob {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-8px) rotate(3deg); }
}
.shark-bubble {
  background: rgba(30,136,229,0.18);
  border: 1px solid rgba(30,136,229,0.35);
  border-radius: 12px;
  padding: 7px 14px;
  font-size: 12px; color: var(--mint);
  max-width: 220px; text-align: center;
}
.app-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px; font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.app-sub {
  font-size: 12px; color: var(--text-soft);
  letter-spacing: 0.3px;
}

/* ===== DAY PROGRESS STRIP ===== */
.day-progress-strip {
  padding: 8px 0;
  overflow: hidden;
}
.day-scroll {
  display: flex; gap: 8px;
  overflow-x: auto; padding: 4px 16px;
  scrollbar-width: none;
}
.day-scroll::-webkit-scrollbar { display: none; }
.day-pill {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all .2s;
  min-width: 60px;
}
.day-pill:hover { background: rgba(30,136,229,0.15); }
.day-pill.today {
  background: rgba(30,136,229,0.25);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(30,136,229,0.3);
}
.day-pill.clear {
  background: rgba(102,187,106,0.15);
  border-color: #66bb6a;
}
.day-pill.partial {
  background: rgba(255,167,38,0.12);
  border-color: #ffa726;
}
.day-num  { font-size: 10px; color: var(--text-soft); }
.day-status { font-size: 14px; }

/* ===== HOME ACTIONS ===== */
.home-actions {
  display: flex; flex-direction: column; gap: 10px;
  padding: 8px 20px;
}
.btn-primary {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 14px 20px;
  background: linear-gradient(135deg, var(--accent), #1565c0);
  border: none; border-radius: var(--radius);
  color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: 'Noto Sans JP', sans-serif;
  box-shadow: 0 4px 20px rgba(30,136,229,0.35);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:active { transform: scale(0.97); }
.btn-secondary {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 13px 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: 'Noto Sans JP', sans-serif;
  transition: background .15s;
}
.btn-secondary:active { background: rgba(30,136,229,0.15); }
.btn-ghost {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 20px;
  background: none; border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--text-soft); font-size: 14px;
  cursor: pointer; font-family: 'Noto Sans JP', sans-serif;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--accent); color: #fff; }
.btn-icon { font-size: 20px; }
.btn-text { flex: 1; text-align: left; }

/* ===== OVERALL PROGRESS ===== */
.overall-progress {
  margin: 12px 20px;
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}
.prog-label { font-size: 10px; color: var(--text-soft); margin-bottom: 6px; letter-spacing: 1px; }
.prog-bar-wrap {
  height: 6px; background: rgba(255,255,255,0.1);
  border-radius: 3px; overflow: hidden; margin-bottom: 4px;
}
.prog-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--mint));
  border-radius: 3px;
  transition: width 1s ease;
}
.prog-pct { font-size: 12px; color: var(--accent); text-align: right; }

/* ===== TOPIC GRID ===== */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}
.topic-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 12px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  text-align: center;
}
.topic-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.topic-emoji { font-size: 30px; margin-bottom: 6px; }
.topic-name  { font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.topic-name-jp { font-size: 10px; color: var(--text-soft); margin-bottom: 6px; }
.topic-count { font-size: 10px; color: var(--text-soft); margin-bottom: 6px; }
.topic-mini-bar {
  height: 3px; background: rgba(255,255,255,0.1);
  border-radius: 2px; overflow: hidden;
}
.topic-mini-fill { height: 100%; border-radius: 2px; transition: width .8s ease; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-box {
  background: linear-gradient(160deg, #041630 0%, #082040 100%);
  border: 1px solid rgba(30,136,229,0.3);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  width: 100%; max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.modal-topic-badge {
  display: inline-block;
  background: rgba(30,136,229,0.2);
  border: 1px solid rgba(30,136,229,0.4);
  border-radius: 20px; padding: 4px 14px;
  font-size: 12px; color: var(--accent);
  margin-bottom: 12px;
}
.modal-topic-creature { font-size: 40px; margin-bottom: 10px; }
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.modal-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: #fff; cursor: pointer;
  margin-bottom: 10px;
  transition: background .15s;
  font-family: 'Noto Sans JP', sans-serif;
}
.modal-btn:hover { background: rgba(30,136,229,0.15); }
.modal-btn-icon { font-size: 22px; }
.modal-btn-content { flex: 1; text-align: left; }
.modal-btn-title { font-size: 14px; font-weight: 700; }
.modal-btn-sub   { font-size: 11px; color: var(--text-soft); }
.modal-btn-count { font-size: 12px; color: var(--accent); font-weight: 700; }
.modal-cancel {
  background: none; border: none; color: var(--text-soft);
  font-size: 13px; cursor: pointer; padding: 8px;
  font-family: 'Noto Sans JP', sans-serif;
}

/* ===== REVIEW OPTIONS ===== */
.review-options { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.review-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: #fff; cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  transition: background .15s;
}
.review-btn:hover { background: rgba(30,136,229,0.12); }
.r-icon  { font-size: 22px; }
.r-label { flex: 1; text-align: left; font-size: 14px; font-weight: 600; }
.r-count { font-size: 12px; color: var(--accent); }
.topic-review-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

/* ===== FLASHCARD ===== */
.flashcard-wrap {
  padding: 16px 20px;
  perspective: 1000px;
}
.flashcard {
  width: 100%;
  min-height: 320px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}
.flashcard.flipped { transform: rotateY(180deg); }
.card-front, .card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center;
}
.card-front {
  background: linear-gradient(145deg,
    rgba(4,22,48,0.95) 0%, rgba(8,32,64,0.95) 100%);
  border: 1.5px solid rgba(30,136,229,0.35);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4),
              inset 0 1px 0 rgba(255,255,255,0.07);
}
.card-back {
  background: linear-gradient(145deg,
    rgba(8,32,64,0.95) 0%, rgba(4,22,48,0.95) 100%);
  border: 1.5px solid rgba(77,208,225,0.35);
  transform: rotateY(180deg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  overflow-y: auto;
  max-height: 60vh;
}
.card-pos {
  font-size: 11px; color: var(--accent);
  font-family: 'Space Mono', monospace;
  letter-spacing: 1px; margin-bottom: 8px;
}
.card-word {
  font-family: 'Playfair Display', serif;
  font-size: 38px; font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.card-hint { font-size: 12px; color: var(--text-soft); }
.card-meaning {
  font-size: 20px; font-weight: 700;
  color: var(--mint); margin-bottom: 12px;
  width: 100%;
}
.card-example {
  font-size: 13px; color: rgba(255,255,255,0.85);
  line-height: 1.6; margin-bottom: 6px;
  font-style: italic;
}
.card-translation {
  font-size: 12px; color: var(--text-soft);
  line-height: 1.5; margin-bottom: 10px;
}
.card-etymology {
  font-size: 11px; color: var(--accent);
  margin-bottom: 6px;
  padding: 6px 10px;
  background: rgba(30,136,229,0.1);
  border-radius: 8px; width: 100%;
}
.card-derivatives {
  font-size: 11px; color: var(--text-soft);
  line-height: 1.5;
}

/* ===== FC ACTIONS ===== */
.fc-progress-info { font-size: 13px; color: var(--text-soft); flex: 1; text-align: center; }
.fc-actions {
  display: flex; gap: 12px;
  padding: 0 20px 10px;
}
.fc-btn {
  flex: 1; padding: 13px;
  border: none; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  transition: transform .12s;
}
.fc-btn:active { transform: scale(0.96); }
.fc-skip { background: rgba(255,255,255,0.08); color: var(--text-soft); }
.fc-knew { background: linear-gradient(135deg, #1e88e5, #0d47a1); color: #fff; }
.fc-nav  {
  display: flex; gap: 12px; padding: 0 20px;
}
.fc-btn-sm {
  flex: 1; padding: 10px;
  background: none; border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); color: var(--text-soft);
  font-size: 14px; cursor: pointer;
  transition: border-color .15s;
}
.fc-btn-sm:hover { border-color: var(--accent); }
.fc-btn-next {
  flex: 2; padding: 10px;
  background: rgba(30,136,229,0.2);
  border: 1px solid rgba(30,136,229,0.35);
  border-radius: var(--radius); color: var(--accent);
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .15s;
}
.fc-btn-next:hover { background: rgba(30,136,229,0.3); }
.topic-badge {
  font-size: 10px; color: var(--accent);
  background: rgba(30,136,229,0.15);
  border: 1px solid rgba(30,136,229,0.3);
  border-radius: 20px; padding: 3px 10px;
}

/* ===== QUIZ ===== */
.quiz-meta { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: flex-end; }
.mode-badge {
  font-size: 10px; color: #fff;
  background: var(--accent);
  border-radius: 20px; padding: 2px 10px;
  font-family: 'Space Mono', monospace;
}
.quiz-timer-wrap {
  position: relative; height: 6px;
  background: rgba(255,255,255,0.08);
}
.quiz-timer-bar {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--mint));
  transition: width .1s linear, background .3s;
}
.quiz-timer-text {
  position: absolute; right: 10px; top: 8px;
  font-size: 11px; color: var(--text-soft);
  font-family: 'Space Mono', monospace;
}
.quiz-question-wrap {
  padding: 28px 20px 16px;
  text-align: center;
}
.quiz-word {
  font-family: 'Playfair Display', serif;
  font-size: 36px; font-weight: 700; color: #fff;
  line-height: 1.15; margin-bottom: 8px;
}
.quiz-choices {
  display: flex; flex-direction: column; gap: 10px;
  padding: 0 20px 16px;
}
.choice-btn {
  width: 100%; padding: 14px 16px;
  background: var(--glass);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius);
  color: #fff; font-size: 14px;
  cursor: pointer; text-align: left;
  font-family: 'Noto Sans JP', sans-serif;
  transition: all .15s;
}
.choice-btn:hover:not(:disabled) { background: rgba(30,136,229,0.15); border-color: var(--accent); }
.choice-btn.correct { background: rgba(102,187,106,0.25); border-color: #66bb6a; color: #a5d6a7; }
.choice-btn.wrong   { background: rgba(239,83,80,0.2);    border-color: #ef5350; color: #ef9a9a; }
.choice-btn:disabled { cursor: default; }

/* QUIZ FEEDBACK */
.quiz-feedback {
  margin: 8px 20px;
  padding: 14px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}
.feedback-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.feedback-icon   { font-size: 22px; }
.feedback-msg    { font-size: 15px; font-weight: 700; }
.feedback-correct{ font-size: 16px; color: var(--mint); font-weight: 700; margin-bottom: 8px; }
.feedback-hint   { display: flex; flex-direction: column; gap: 4px; }
.hint-etymology, .hint-derivatives {
  font-size: 11px; color: var(--text-soft); line-height: 1.5;
}
.hint-example {
  font-size: 12px; color: rgba(255,255,255,0.7);
  font-style: italic; margin-top: 4px; line-height: 1.5;
}

/* ===== RESULTS ===== */
.results-wrap {
  padding: 40px 24px 32px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.results-shark { font-size: 56px; animation: sharkBob 2s ease-in-out infinite; }
.results-title { font-size: 22px; font-weight: 700; }
.results-score {
  font-family: 'Space Mono', monospace;
  font-size: 42px; font-weight: 700;
  color: var(--accent);
}
.results-comment { font-size: 14px; color: var(--text-soft); }
.results-stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; width: 100%; max-width: 340px;
}
.stat-box {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 12px 8px; text-align: center;
}
.stat-box-val   { font-size: 20px; font-weight: 700; color: var(--accent); }
.stat-box-label { font-size: 10px; color: var(--text-soft); margin-top: 2px; }
.results-actions { display: flex; gap: 10px; width: 100%; max-width: 340px; }
.results-actions .btn-primary  { flex: 1; }
.results-actions .btn-secondary{ flex: 1; }

/* ===== CELEBRATION ===== */
.celebration {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
}
.confetti-piece {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ===== CORRECT BURST ===== */
.correct-burst {
  position: fixed; inset: 0; z-index: 150;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.burst-content {
  font-size: 18px; font-weight: 700;
  color: #fff; background: rgba(30,136,229,0.85);
  padding: 14px 24px; border-radius: var(--radius);
  text-align: center;
  animation: burstAnim .7s ease forwards;
}
@keyframes burstAnim {
  0%   { transform: scale(0.6); opacity: 0; }
  40%  { transform: scale(1.1); opacity: 1; }
  70%  { transform: scale(1.0); opacity: 1; }
  100% { transform: scale(1.2); opacity: 0; }
}

/* ===== SHARK OVERLAY ===== */
.shark-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.shark-msg-box {
  background: linear-gradient(145deg, #041630, #082040);
  border: 1px solid rgba(30,136,229,0.35);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  max-width: 320px; width: 100%;
}
.shark-big { font-size: 48px; display: block; margin-bottom: 12px; }
.shark-msg-box p { font-size: 15px; margin-bottom: 18px; line-height: 1.6; }
.shark-msg-box button {
  background: var(--accent); border: none;
  border-radius: var(--radius); padding: 11px 28px;
  color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: 'Noto Sans JP', sans-serif;
}

/* ===== SPARK / FISH CONFETTI（正解エフェクト） ===== */
.spark {
  position: absolute;
  pointer-events: none;
  animation: sparkFly ease-out forwards;
}
@keyframes sparkFly {
  0%   { transform: translate(0,0) scale(1); opacity:1; }
  100% { transform: translate(var(--dx),var(--dy)) scale(0.2); opacity:0; }
}
.fish-confetti {
  position: absolute;
  pointer-events: none;
  animation: fishFly 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)) scale(0.3); opacity:0; }
}

/* ===== CHOICE-NUM（選択肢番号） ===== */
.choice-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: rgba(30,136,229,0.25);
  border-radius: 50%;
  font-size: 12px; font-weight: 700;
  color: var(--accent);
  margin-right: 10px;
  flex-shrink: 0;
}
.choice-btn { display: flex; align-items: center; }
.choice-btn.correct .choice-num { background: rgba(102,187,106,0.35); color: #a5d6a7; }
.choice-btn.wrong   .choice-num { background: rgba(239,83,80,0.3);   color: #ef9a9a; }
