/* ============================================================================
   Infinia Academy — site styles
   Uses Tailwind CDN for utilities; this file holds tokens, fonts, and
   custom UI-mockup animations.
   ============================================================================ */

:root {
  /* Brand palette — synced with mobile/lib/core/theme_presets.dart (arcane) */
  --brand:       #7C3AED;
  --brand-soft:  #A78BFA;
  --brand-deep:  #2E1065;
  --accent:      #F59E0B;
  --accent-deep: #B45309;
  --ink:         #1E1B4B;
  --subtext:     #6B6494;
  --hairline:    #E6E1F2;
  --soft-tint:   #F3EEFE;
  --bg:          #FAF8FF;
  --success:     #16A34A;
  --danger:      #DC2626;
  --warning:     #F59E0B;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Sarabun", system-ui, -apple-system, "Segoe UI", Roboto,
    "Noto Sans Thai", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.lang-th body, html.lang-th { font-family: "Sarabun", "Inter", system-ui, sans-serif; }

/* gradient bg used in hero + CTA */
.brand-gradient {
  background-image: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
}
.brand-gradient-text {
  background-image: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.soft-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: 0 4px 18px -8px rgba(124, 58, 237, 0.12);
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--soft-tint);
  padding: 6px 12px;
  border-radius: 999px;
}

.subtle-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline), transparent);
}

/* ─── nav ──────────────────────────────────────────────────────────────── */
.nav-link {
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}
.nav-link:hover { background: var(--soft-tint); }

#lang-toggle {
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
  min-width: 50px;
}
#lang-toggle:hover { border-color: var(--brand); color: var(--brand); }

/* ============================================================================
   Feature showcase mock-ups
   Each card recreates a live in-app UI component, animated in a CSS loop.
   ============================================================================ */

.mock-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  box-shadow: 0 10px 30px -16px rgba(46, 16, 101, 0.25);
  overflow: hidden;
}
.mock-screen {
  position: relative;
  height: 220px;
  background: linear-gradient(180deg, #fff 0%, var(--soft-tint) 100%);
  padding: 14px;
  overflow: hidden;
}

/* ── 1. LIVE PROGRESS MAP ───────────────────────────────────────────────── */
.mock-pillgrid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.mock-pill {
  position: relative;
  aspect-ratio: 1.6 / 1;
  border-radius: 8px;
  background: #fff;
  border: 1.5px solid var(--hairline);
  font-size: 11px;
  font-weight: 700;
  color: var(--subtext);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
}
.mock-pill.correct { background: rgba(22, 163, 74, 0.12); border-color: rgba(22, 163, 74, 0.5); color: var(--success); }
.mock-pill.wrong   { background: rgba(220, 38, 38, 0.12); border-color: rgba(220, 38, 38, 0.5); color: var(--danger); }
.mock-pill.current { box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25); border-color: var(--brand); }

@keyframes pillReveal {
  0%   { background: #fff; border-color: var(--hairline); color: var(--subtext); box-shadow: none; }
  100% { /* set by .correct / .wrong */ }
}
.mock-pill.anim-correct {
  animation: pillCorrect 7s infinite;
}
.mock-pill.anim-wrong {
  animation: pillWrong 7s infinite;
}
@keyframes pillCorrect {
  0%, 9%   { background: #fff; border-color: var(--hairline); color: var(--subtext); }
  10%, 95% { background: rgba(22, 163, 74, 0.12); border-color: rgba(22, 163, 74, 0.5); color: var(--success); }
  100%     { background: #fff; border-color: var(--hairline); color: var(--subtext); }
}
@keyframes pillWrong {
  0%, 9%   { background: #fff; border-color: var(--hairline); color: var(--subtext); }
  10%, 95% { background: rgba(220, 38, 38, 0.12); border-color: rgba(220, 38, 38, 0.5); color: var(--danger); }
  100%     { background: #fff; border-color: var(--hairline); color: var(--subtext); }
}
/* staggered delays for 12 pills */
.mock-pill:nth-child(1)  { animation-delay: 0.0s; }
.mock-pill:nth-child(2)  { animation-delay: 0.4s; }
.mock-pill:nth-child(3)  { animation-delay: 0.8s; }
.mock-pill:nth-child(4)  { animation-delay: 1.2s; }
.mock-pill:nth-child(5)  { animation-delay: 1.6s; }
.mock-pill:nth-child(6)  { animation-delay: 2.0s; }
.mock-pill:nth-child(7)  { animation-delay: 2.4s; }
.mock-pill:nth-child(8)  { animation-delay: 2.8s; }
.mock-pill:nth-child(9)  { animation-delay: 3.2s; }
.mock-pill:nth-child(10) { animation-delay: 3.6s; }
.mock-pill:nth-child(11) { animation-delay: 4.0s; }
.mock-pill:nth-child(12) { animation-delay: 4.4s; }

.mock-statbar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.mock-statbar .chip {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 6px;
  border-radius: 8px;
  background: var(--soft-tint);
}
.mock-statbar .chip.green { background: rgba(22, 163, 74, 0.1); color: var(--success); }
.mock-statbar .chip.red   { background: rgba(220, 38, 38, 0.1); color: var(--danger); }
.mock-statbar .chip.gray  { background: var(--soft-tint); color: var(--subtext); }

/* ── 2. TIERED HINTS ────────────────────────────────────────────────────── */
.mock-question {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.mock-hint {
  font-size: 12px;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.04));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
  color: var(--accent-deep);
  overflow: hidden;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  animation: hintReveal 8s infinite;
}
.mock-hint::before {
  content: "💡 ";
}
.mock-hint:nth-child(2) { animation-delay: 1.5s; }
.mock-hint:nth-child(3) { animation-delay: 3.5s; }
.mock-hint:nth-child(4) { animation-delay: 5.5s; }
@keyframes hintReveal {
  0%, 15%  { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
  20%, 90% { max-height: 60px; padding-top: 8px; padding-bottom: 8px; opacity: 1; }
  100%     { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
}

/* ── 3. EYES ON ME ──────────────────────────────────────────────────────── */
.mock-phone {
  position: relative;
  width: 130px;
  margin: 0 auto;
  height: 200px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 22px;
  padding: 10px 8px;
  overflow: hidden;
}
.mock-phone-content {
  font-size: 10px;
  color: var(--subtext);
}
.mock-phone-content .line {
  height: 6px;
  background: var(--soft-tint);
  border-radius: 4px;
  margin-bottom: 6px;
}
.mock-phone-content .line.w70 { width: 70%; }
.mock-phone-content .line.w90 { width: 90%; }
.mock-phone-content .line.w50 { width: 50%; }

.mock-eyeon {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.96), rgba(46, 16, 101, 0.96));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  gap: 6px;
  opacity: 0;
  animation: eyeon 6s infinite;
}
.mock-eyeon .eye {
  font-size: 28px;
  animation: eyePulse 1.4s infinite ease-in-out;
}
@keyframes eyon-noop { 0%{} 100%{} } /* placeholder */
@keyframes eyeon {
  0%, 30%  { opacity: 0; }
  40%, 80% { opacity: 1; }
  90%, 100% { opacity: 0; }
}
@keyframes eyePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

/* ── 4. WAGER ────────────────────────────────────────────────────────────── */
.mock-wager-track {
  position: relative;
  height: 36px;
  background: var(--soft-tint);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0;
}
.mock-wager-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background-image: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 999px;
  width: 0%;
  animation: wagerFill 4s infinite ease-in-out;
}
@keyframes wagerFill {
  0%   { width: 10%; }
  40%  { width: 78%; }
  60%  { width: 78%; }
  100% { width: 10%; }
}
.mock-wager-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--subtext);
  display: flex;
  justify-content: space-between;
}
.mock-wager-value {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--brand);
  animation: wagerNum 4s infinite ease-in-out;
}
@keyframes wagerNum {
  0%, 100% { color: var(--subtext); }
  40%, 60% { color: var(--brand); }
}

.mock-choices { display: flex; flex-direction: column; gap: 6px; }
.mock-choice {
  background: #fff;
  border: 1.5px solid var(--hairline);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

/* ── 5. BOSS FIGHT ───────────────────────────────────────────────────────── */
.mock-boss {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 4px;
}
.mock-boss-arena {
  width: 100%;
  height: 130px;
  background: radial-gradient(ellipse at center, #1E1B4B 0%, #0a0723 100%);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mock-boss-lottie {
  width: 90%;
  height: 90%;
}
.mock-hp-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
}
.mock-hp-track {
  flex: 1;
  height: 10px;
  background: var(--soft-tint);
  border-radius: 999px;
  overflow: hidden;
}
.mock-hp-fill {
  height: 100%;
  background-image: linear-gradient(90deg, var(--success), #34D399);
  width: 100%;
  animation: hpDrain 5s infinite ease-out;
}
@keyframes hpDrain {
  0%   { width: 100%; }
  90%  { width: 12%; }
  93%  { width: 100%; }
  100% { width: 100%; }
}
.mock-hp-label { color: var(--ink); }

/* ── 6. ADAPTIVE HOMEWORK ────────────────────────────────────────────────── */
.mock-hwlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mock-hwitem {
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  opacity: 0;
  transform: translateY(8px);
  animation: hwSlide 6s infinite;
}
.mock-hwitem:nth-child(1) { animation-delay: 0.0s; }
.mock-hwitem:nth-child(2) { animation-delay: 0.6s; }
.mock-hwitem:nth-child(3) { animation-delay: 1.2s; }
@keyframes hwSlide {
  0%, 5%   { opacity: 0; transform: translateY(8px); }
  10%, 90% { opacity: 1; transform: translateY(0); }
  100%     { opacity: 0; transform: translateY(8px); }
}
.mock-hwitem .tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.mock-hwitem .tag.easy { background: rgba(22, 163, 74, 0.12); color: var(--success); }
.mock-hwitem .tag.hard { background: rgba(124, 58, 237, 0.12); color: var(--brand); }
.mock-hwitem .tag.mid  { background: rgba(245, 158, 11, 0.12); color: var(--accent-deep); }
.mock-hwitem .label { font-size: 12px; font-weight: 600; color: var(--ink); flex: 1; }

/* ============================================================================
   Misc
   ============================================================================ */

.dot-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}
.dot-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-image: linear-gradient(135deg, var(--brand), var(--accent));
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-image: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 10px 24px -10px rgba(124, 58, 237, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(124, 58, 237, 0.65); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--hairline);
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--hairline);
  color: var(--subtext);
}
.badge.live   { background: rgba(22, 163, 74, 0.1); color: var(--success); border-color: rgba(22, 163, 74, 0.25); }
.badge.live::before  { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: liveBlink 1.4s infinite; }
.badge.soon   { background: var(--soft-tint); color: var(--brand); border-color: rgba(124, 58, 237, 0.2); }
@keyframes liveBlink { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ============================================================================
   Hero Feature Grid
   ============================================================================ */

.hero-feat-grid {
  /* Always min 2 cols — never stack to 1 */
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 480px) {
  .hero-feat-grid { grid-template-columns: repeat(3, 1fr); }
}

.hero-feat-cell {
  background: var(--soft-tint);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  transition: box-shadow 0.15s, transform 0.15s;
}
.hero-feat-cell:hover {
  box-shadow: 0 6px 18px -8px rgba(124, 58, 237, 0.25);
  transform: translateY(-2px);
}
.hero-feat-lottie {
  width: 72px;
  height: 72px;
  margin: 0 auto;
}
.hero-feat-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  margin-top: 6px;
  line-height: 1.3;
}
.hero-feat-desc {
  font-size: 10px;
  color: var(--subtext);
  margin-top: 3px;
  line-height: 1.4;
}

/* ============================================================================
   God Mode — Seat Map
   ============================================================================ */

.god-screen {
  height: auto !important;
  min-height: 220px;
  padding: 10px 10px 12px;
  background: linear-gradient(180deg, #F5F0FF 0%, #EDE9FE 100%) !important;
}
.god-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.god-class-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.04em;
}
.god-chip {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}
.god-chip.green { background: rgba(22, 163, 74, 0.12); color: var(--success); }
.god-chip.red   { background: rgba(220, 38, 38, 0.1); color: var(--danger); }
.god-chip.amber { background: rgba(245, 158, 11, 0.12); color: var(--accent-deep); }

.god-seatmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.god-seat {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--hairline);
  border-radius: 10px;
  padding: 5px 4px 4px;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.god-seat.s-done     { border-color: rgba(22, 163, 74, 0.45); background: rgba(22, 163, 74, 0.06); }
.god-seat.s-wrong    { border-color: rgba(220, 38, 38, 0.45); background: rgba(220, 38, 38, 0.06); }
.god-seat.s-progress { border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.06); }
.god-seat.s-active   { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2); }

.god-seat-icon { font-size: 14px; line-height: 1; }
.god-seat-name { font-size: 9px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.god-seat-score {
  font-size: 8px;
  font-weight: 600;
  color: var(--subtext);
  margin-top: 1px;
}
.god-seat.s-done .god-seat-score { color: var(--success); }
.god-seat.s-wrong .god-seat-score { color: var(--danger); }

/* Popup card */
.god-popup {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 7px 10px;
  min-width: 100px;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
  transition: none;
  font-size: 9px;
  white-space: nowrap;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.5);
}
.god-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--ink);
}
.god-popup-name { font-weight: 800; font-size: 10px; margin-bottom: 4px; color: var(--brand-soft); }
.god-popup-row  { font-size: 9px; margin-bottom: 2px; opacity: 0.85; }

/* Three popups cycle: each 9s, offset by 3s */
.god-popup-a { animation: godPopup 9s infinite 0s; }
.god-popup-b { animation: godPopup 9s infinite 3s; }
.god-popup-c { animation: godPopup 9s infinite 6s; }

@keyframes godPopup {
  0%, 10%  { opacity: 0; transform: translateX(-50%) translateY(4px); }
  15%, 85% { opacity: 1; transform: translateX(-50%) translateY(0); }
  90%, 100%{ opacity: 0; transform: translateX(-50%) translateY(4px); }
}

/* ============================================================================
   Boss Fight — Quiz + Attack Demo
   ============================================================================ */

.boss-demo-screen {
  height: 200px !important;
  display: flex;
  gap: 0;
  padding: 0 !important;
  background: linear-gradient(135deg, #0f0a1f 0%, #1E1B4B 100%) !important;
  overflow: visible !important;
}

/* Left quiz panel */
.boss-quiz-panel {
  flex: 1 1 45%;
  padding: 12px 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  position: relative;
}
.boss-quiz-q {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  line-height: 1.45;
  margin-bottom: 4px;
}
.boss-quiz-choices { display: flex; flex-direction: column; gap: 4px; }
.boss-choice-btn {
  font-size: 10px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.75);
  transition: none;
}
.boss-choice-correct {
  animation: bossChoiceLight 10s infinite;
}
@keyframes bossChoiceLight {
  0%, 19%  { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.75); }
  25%, 65% { background: rgba(22,163,74,0.35); border-color: var(--success); color: #fff; }
  75%, 100%{ background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.75); }
}

/* CORRECT! badge */
.boss-correct-badge {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--success), #34D399);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  padding: 4px 6px;
  border-radius: 8px;
  opacity: 0;
  animation: bossCorrectBadge 10s infinite;
}
@keyframes bossCorrectBadge {
  0%, 28%  { opacity: 0; transform: translateY(4px); }
  35%, 60% { opacity: 1; transform: translateY(0); }
  70%, 100%{ opacity: 0; transform: translateY(4px); }
}

/* Center attack lane */
.boss-attack-lane {
  flex: 0 0 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.boss-projectile {
  position: absolute;
  font-size: 16px;
  left: -20px;
  opacity: 0;
  animation: bossProjectile 10s infinite;
  filter: drop-shadow(0 0 8px #7C3AED);
}
@keyframes bossProjectile {
  0%, 34%  { opacity: 0; left: -30px; }
  38%      { opacity: 1; left: -30px; }
  50%      { opacity: 1; left: 40px; }
  55%, 100%{ opacity: 0; left: 50px; }
}

/* Right boss arena */
.boss-arena-panel {
  flex: 1 1 45%;
  padding: 10px 12px 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.boss-arena-bg {
  width: 100%;
  flex: 1;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #2E1065 0%, #0a0723 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.boss-arena-lottie {
  position: absolute;
  inset: 0;
}
.boss-lottie-attack {
  opacity: 0;
  animation: bossAttackLottie 10s infinite;
}
@keyframes bossAttackLottie {
  0%, 47%  { opacity: 0; }
  52%, 72% { opacity: 1; }
  78%, 100%{ opacity: 0; }
}

/* Hit flash overlay */
.boss-hit-flash {
  position: absolute;
  inset: 0;
  background: rgba(255, 80, 80, 0.55);
  border-radius: 10px;
  opacity: 0;
  animation: bossHitFlash 10s infinite;
}
@keyframes bossHitFlash {
  0%, 49%  { opacity: 0; }
  52%      { opacity: 1; }
  60%, 100%{ opacity: 0; }
}

/* HP bar */
.boss-arena-hp {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
}
.boss-hp-label {
  font-size: 8px;
  font-weight: 800;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}
.boss-hp-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
}
.boss-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f97316);
  border-radius: 999px;
  animation: bossHpDrain 10s infinite;
}
@keyframes bossHpDrain {
  0%, 49%  { width: 60%; }
  58%      { width: 43%; }
  90%, 100%{ width: 43%; }
  99%      { width: 60%; }
}
.boss-hp-text {
  font-size: 8px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}
.boss-arena-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(124, 58, 237, 0.9);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.08em;
}

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

/* ─── Academy subject badges ────────────────────────────────────────────── */
.subj-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft-tint);
  color: var(--brand);
  border: 1px solid var(--hairline);
}

/* ─── Academy photo carousel ────────────────────────────────────────────── */
.academy-carousel {
  position: relative;
  background: #111;
}
.academy-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
.academy-slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
}
.academy-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.academy-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 16px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.65) 0%, transparent 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.academy-dots {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.academy-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
  padding: 0;
}
.academy-dot.active {
  background: #fff;
  width: 20px;
}
