/* hunger-arena.css — KSI Hunger Games v2 live arena page */

.hg-page { --hg-red: #ef4444; --hg-ember: #f97316; --hg-ok: #4ade80; --hg-warn: #facc15; --hg-hurt: #fb923c; }

/* ── Hero ───────────────────────────── */
.hg-hero { position: relative; overflow: hidden; }
.hg-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 220px at 15% 0%, rgba(249,115,22,0.16), transparent 70%);
}
.hg-hero.is-quell::after { background: radial-gradient(700px 260px at 15% 0%, rgba(185,28,28,0.35), transparent 70%); }
.hg-kicker { font-family: 'Cinzel', serif; letter-spacing: .25em; font-size: .75rem; color: var(--gold); }
.hg-clock { font-family: 'Cinzel', serif; font-size: 2rem; line-height: 1.1; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.hg-live-pill {
  display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .7rem; border-radius: 999px;
  border: 1px solid var(--line); font-size: .8rem; background: rgba(0,0,0,.25);
}
.hg-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #6b7280; }
.hg-live-pill.is-live .hg-dot { background: var(--hg-red); box-shadow: 0 0 0 0 rgba(239,68,68,.7); animation: hgPulse 1.6s infinite; }
.hg-live-pill.is-reg .hg-dot { background: var(--gold); }
.hg-live-pill.is-off .hg-dot { background: #6b7280; }
@keyframes hgPulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); } 70% { box-shadow: 0 0 0 10px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }

/* ── Theater ────────────────────────── */
.hg-screen {
  position: relative; min-height: 340px; border-radius: 10px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%, #1a1410 0%, #07070a 70%);
  border: 1px solid rgba(201,168,95,.25);
  display: flex; align-items: center; justify-content: center;
}
.hg-letterbox { position: absolute; left: 0; right: 0; height: 26px; background: #000; z-index: 2; }
.hg-letterbox.top { top: 0; } .hg-letterbox.bottom { bottom: 0; }
.hg-screen-caption {
  position: absolute; top: 34px; left: 0; right: 0; text-align: center; z-index: 3;
  font-family: 'Cinzel', serif; letter-spacing: .2em; font-size: .72rem; color: var(--gold);
}
.hg-screen-body { position: relative; z-index: 1; padding: 64px 32px 48px; max-width: 760px; text-align: center; }
.hg-screen-body.enter { animation: hgFadeUp .55s ease both; }
@keyframes hgFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hg-card-title { font-family: 'Cinzel', serif; font-size: clamp(1.4rem, 3vw, 2.2rem); color: var(--gold-2); text-shadow: 0 2px 18px rgba(201,168,95,.25); }
.hg-card-sub { color: var(--muted); margin-top: .6rem; }
.hg-beat { font-size: clamp(1.02rem, 1.6vw, 1.25rem); line-height: 1.65; color: #ece7dc; }
.hg-beat strong { color: #fff; }
.hg-beat.kind-death { color: #fecaca; }
.hg-beat.kind-betrayal { color: #e9d5ff; }
.hg-beat.kind-twist, .hg-beat.kind-feast { color: #fed7aa; }
.hg-beat.kind-alliance, .hg-beat.kind-bond { color: #bbf7d0; }
.hg-beat.kind-gift { color: #bae6fd; }
.hg-beat-tag { display: inline-block; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; padding: .15rem .55rem; border-radius: 999px; margin-bottom: .8rem; border: 1px solid currentColor; opacity: .8; }
.hg-lastwords { margin-top: .9rem; font-style: italic; color: #fca5a5; font-size: .95rem; }
.hg-cannon { font-family: 'Cinzel', serif; font-size: 2.4rem; color: var(--hg-red); letter-spacing: .1em; }
.hg-cannon-list { list-style: none; padding: 0; margin: .8rem 0 0; }
.hg-cannon-list li { padding: .2rem 0; color: #fecaca; }
.hg-flash { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background: radial-gradient(circle, rgba(239,68,68,.55), rgba(127,29,29,.0) 70%); }
.hg-flash.go { animation: hgFlash .9s ease-out; }
@keyframes hgFlash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.hg-screen.shake { animation: hgShake .45s; }
@keyframes hgShake { 0%,100% { transform: none; } 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, -1px); } }
.hg-progress { display: flex; gap: 3px; height: 6px; }
.hg-progress span { flex: 1; border-radius: 3px; background: rgba(255,255,255,.08); cursor: pointer; }
.hg-progress span.done { background: rgba(201,168,95,.55); }
.hg-progress span.now { background: var(--gold-2); }
.hg-progress span.death { box-shadow: inset 0 -2px 0 var(--hg-red); }
.hg-chapter-select { max-width: 240px; }
.hg-controls .btn { min-width: 40px; }

/* ── Map ────────────────────────────── */
.hg-map-wrap { position: relative; }
#hgMap { width: 100%; height: auto; display: block; }
#hgMap .zone { stroke: rgba(0,0,0,.55); stroke-width: 2; transition: filter .3s, opacity .3s; }
#hgMap .zone.hot { filter: brightness(1.55) saturate(1.2); }
#hgMap .zone-label { font-family: 'Cinzel', serif; font-size: 12px; fill: rgba(255,255,255,.82); text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: rgba(0,0,0,.6); stroke-width: 3px; }
#hgMap .zone-count { font-size: 11px; fill: rgba(255,255,255,.6); text-anchor: middle; pointer-events: none; }
#hgMap .sealed { fill: rgba(0,0,0,.68); pointer-events: none; }
#hgMap .sealed-label { font-size: 12px; fill: #fca5a5; text-anchor: middle; letter-spacing: .15em; pointer-events: none; font-family: 'Cinzel', serif; }
#hgMap .tok { transition: transform 1.4s cubic-bezier(.4,.1,.2,1), opacity .6s; cursor: pointer; }
#hgMap .tok .ring { fill: #111; stroke-width: 3; }
#hgMap .tok text { font-size: 9px; font-weight: 700; fill: #fff; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
#hgMap .tok.me .ring { stroke-dasharray: 3 2; }
#hgMap .tok.lit .ring { filter: drop-shadow(0 0 6px #fff); stroke-width: 4; }
#hgMap .tok.sel .ring { filter: drop-shadow(0 0 8px var(--gold-2)); stroke: var(--gold-2) !important; stroke-width: 4; }
#hgMap .tok.dying { animation: hgDie 1.1s forwards; }
@keyframes hgDie { 0% { opacity: 1; } 30% { opacity: 1; filter: drop-shadow(0 0 10px #ef4444); } 100% { opacity: 0; } }
#hgMap .skull { font-size: 13px; text-anchor: middle; dominant-baseline: central; opacity: .55; pointer-events: none; }
.hg-map-tip {
  position: absolute; z-index: 5; pointer-events: none; background: rgba(10,10,14,.92); border: 1px solid var(--line);
  border-radius: 8px; padding: .4rem .6rem; font-size: .8rem; max-width: 220px; transform: translate(-50%, -110%);
}
.hg-legend { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid var(--c); margin-right: .3rem; vertical-align: -1px; }

/* ── Next time / votes ──────────────── */
.hg-cliff { font-size: 1.05rem; line-height: 1.7; }
.hg-cliff p { margin-bottom: .6rem; }
.hg-teaser { padding-left: .9rem; border-left: 2px solid rgba(88,166,255,.5); margin-bottom: .55rem; }
.hg-vote { margin-bottom: .45rem; }
.hg-vote-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; }
.hg-vote-bar > div { height: 100%; background: linear-gradient(90deg, #f59e0b, #ef4444); transition: width .8s; }

/* ── Tribute cards ──────────────────── */
.hg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; }
.hg-card {
  background: rgba(10,12,16,.55); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: .85rem;
  transition: border-color .2s, transform .2s; cursor: pointer;
}
.hg-card:hover { border-color: var(--line); transform: translateY(-2px); }
.hg-card.sel { border-color: var(--gold-2); box-shadow: 0 0 0 1px var(--gold-2) inset; }
.hg-card.me { border-color: rgba(88,166,255,.6); }
.hg-card.dead { filter: grayscale(.85); opacity: .75; }
.hg-card.winner { border-color: var(--gold-2); box-shadow: 0 0 24px rgba(242,210,139,.25); }
.hg-avatar { width: 42px; height: 42px; border-radius: 50%; flex: none; object-fit: cover; background: #222; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; border: 2px solid var(--ring, #555); }
.hg-name { font-weight: 700; line-height: 1.2; }
.hg-meta { font-size: .75rem; color: var(--muted); }
.hg-bar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.hg-bar > div { height: 100%; transition: width .8s; }
.hg-mini { display: grid; grid-template-columns: auto 1fr; gap: .2rem .5rem; align-items: center; font-size: .72rem; color: var(--muted); }
.hg-mini .hg-bar { height: 5px; }
.hg-chip { display: inline-block; font-size: .7rem; padding: .05rem .45rem; border-radius: 999px; background: rgba(255,255,255,.07); margin: .1rem .15rem 0 0; }
.hg-chip.bad { background: rgba(239,68,68,.18); color: #fecaca; }
.hg-chip.gold { background: rgba(201,168,95,.2); color: var(--gold-2); }
.hg-odds { font-family: 'Cinzel', serif; color: var(--gold-2); font-size: 1rem; }

/* ── Alliances / fallen ─────────────── */
.hg-alliance { padding: .55rem .7rem; border: 1px solid rgba(74,222,128,.25); border-radius: 8px; margin-bottom: .5rem; }
.hg-alliance.broken { border-color: rgba(255,255,255,.08); opacity: .65; }
.hg-fallen-row { display: flex; gap: .7rem; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.hg-fallen-row:last-child { border-bottom: 0; }
.hg-place { font-family: 'Cinzel', serif; color: var(--muted); min-width: 2.2rem; }

/* ── Victor / me ────────────────────── */
.hg-victor { text-align: center; }
.hg-victor .hg-avatar { width: 96px; height: 96px; font-size: 2rem; margin: 0 auto .6rem; border-width: 3px; }
.hg-me { border: 1px solid rgba(88,166,255,.35); border-radius: 10px; padding: .8rem; background: rgba(88,166,255,.06); }

.hg-toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 1080; background: #111827; border: 1px solid var(--gold);
  color: var(--text); border-radius: 10px; padding: .8rem 1rem; box-shadow: 0 10px 30px rgba(0,0,0,.5); cursor: pointer;
  animation: hgFadeUp .4s ease both;
}

@media (prefers-reduced-motion: reduce) {
  #hgMap .tok, .hg-screen-body.enter, .hg-screen.shake, .hg-flash.go, .hg-live-pill.is-live .hg-dot { animation: none !important; transition: none !important; }
}
@media (max-width: 576px) {
  .hg-screen { min-height: 300px; }
  .hg-screen-body { padding: 60px 16px 44px; }
  .hg-clock { font-size: 1.5rem; }
}
