:root {
  --bg: #100a08;
  --panel: #1b100b;
  --panel-2: #241610;
  --border: #3c2317;
  --fg: #f7ece1;
  --dim: #ad9483;
  --accent: #ff6b35;
  --accent-2: #ffd23f;
  --cold: #6fb7ff;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 60px;
}

body.shake { animation: bodyshake 0.28s ease; }
@keyframes bodyshake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, 1px); }
  80% { transform: translate(2px, -1px); }
}

main {
  width: 100%;
  max-width: 640px;
}

header {
  text-align: center;
  margin-bottom: 18px;
}

h1 {
  font-size: 2rem;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

header p {
  color: var(--dim);
  margin: 0 auto;
  max-width: 540px;
  line-height: 1.55;
}

.origin {
  font-size: 0.8rem;
  margin-top: 10px;
  color: #7a6152;
}

.origin a, header p a { color: var(--accent); }

.stats-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 18px 0;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 18px;
  text-align: center;
  min-width: 88px;
}

.stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  font-size: 0.68rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  margin: 10px 0 6px;
}

.stove {
  --heat: 0;
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 10px solid #241410;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 40%,
      color-mix(in srgb, #3a1c10 calc(100% - (var(--heat) * 1%)), #fff8e0 calc(var(--heat) * 1%)) 0%,
      color-mix(in srgb, #a8330f calc(100% - (var(--heat) * 1%)), #ffd23f calc(var(--heat) * 1%)) 55%,
      #241410 100%);
  box-shadow:
    0 0 calc(10px + var(--heat) * 0.7px) calc(2px + var(--heat) * 0.5px) rgba(255, 107, 53, calc(0.25 + var(--heat) / 200)),
    inset 0 0 24px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.stove:active { transform: scale(0.97); }

.stove .coil {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 6px solid #6b2412;
  border-top-color: #ffb066;
  opacity: 0.55;
  animation: spin 6s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.stove .label {
  position: relative;
  z-index: 1;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #fff3e6;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  pointer-events: none;
}

.flavor {
  min-height: 1.4em;
  margin-top: 14px;
  font-weight: 700;
  color: var(--accent-2);
  opacity: 0;
}
.flavor.show { animation: flavorpop 0.8s ease; }
@keyframes flavorpop {
  0% { opacity: 0; transform: translateY(6px) scale(0.9); }
  15% { opacity: 1; transform: translateY(0) scale(1.05); }
  30% { transform: scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

.floater {
  position: fixed;
  z-index: 60;
  font-weight: 800;
  color: var(--accent-2);
  pointer-events: none;
  animation: floatup 0.9s ease-out forwards;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
@keyframes floatup {
  0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -70px) scale(1.2); }
}

.bonus-stove {
  position: fixed;
  z-index: 55;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid #6b2412;
  background: radial-gradient(circle at 40% 35%, #ffe27a, var(--accent) 60%, #7a2c10 100%);
  box-shadow: 0 0 18px 4px rgba(255, 178, 60, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  touch-action: manipulation;
  animation: bonusin 0.25s ease, bonuspulse 0.5s ease-in-out infinite alternate;
}
.bonus-stove.jackpot {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 40% 35%, #eaf6ff, var(--cold) 55%, #123a5c 100%);
  box-shadow: 0 0 26px 8px rgba(111, 183, 255, 0.75);
  border-color: #123a5c;
}
.bonus-stove.fizzle { animation: bonusout 0.35s ease forwards; pointer-events: none; }
@keyframes bonusin {
  from { transform: scale(0.2); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes bonuspulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.25); }
}
@keyframes bonusout {
  to { transform: scale(0.2); opacity: 0; }
}

.title-banner {
  margin: 14px auto 0;
  max-width: 420px;
  text-align: center;
  background: var(--panel-2);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  color: var(--accent-2);
}
.title-banner[hidden] { display: none; }
.title-banner.pop { animation: bannerpop 0.4s ease; }
@keyframes bannerpop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin: 18px 0 16px;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.ach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ach {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  background: var(--panel-2);
}
.ach.earned { border-color: var(--accent); color: var(--accent-2); }
.ach.locked { color: #6a584c; }

.share-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.file-btn, .ghost-btn {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 16px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  border: none;
}
.file-btn { background: var(--accent); color: #201008; }
.ghost-btn { background: transparent; color: var(--dim); border: 1px solid var(--border); }

details.explainer {
  color: var(--dim);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
details.explainer summary { cursor: pointer; color: var(--accent-2); font-weight: 700; }
details.explainer p { margin: 10px 0 0; }

footer {
  text-align: center;
  color: #7a6152;
  font-size: 0.78rem;
  line-height: 1.7;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }
