:root {
  color-scheme: dark;
  --ink: #1a0c10;
  --cream: #fff4df;
  --gold: #ffc44d;
  --red: #ff3b3b;
  --blue: #7fd7ff;
  --panel: rgba(22, 10, 14, 0.88);
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(12, 6, 8, 0.55), rgba(12, 6, 8, 0.82)),
    url("../assets/arena-bg.jpg") center / cover no-repeat fixed;
}

button, input { font: inherit; }

.top, #setup, .go, .howto, #ring {
  width: min(1080px, calc(100% - 28px));
  margin-inline: auto;
}

.top { padding: 28px 0 8px; }

.brand, h1, h2, button, .shots li, .bar span, .step {
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 0.04em;
  font-weight: 900;
}

.brand {
  margin: 0;
  font-size: clamp(48px, 8vw, 84px);
  line-height: 0.85;
  text-transform: uppercase;
}

.tag { margin: 8px 0 0; color: var(--gold); }

#setup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.card, .howto, .go {
  background: var(--panel);
  border: 3px solid #000;
  box-shadow: 6px 6px 0 #000;
  padding: 16px;
}

.step {
  margin: 0;
  color: var(--gold);
}

h2 { margin: 0 0 10px; text-transform: uppercase; }

.stage, .drop {
  position: relative;
  display: grid;
  place-items: center;
  height: 240px;
  background: #0c0709;
  border: 2px solid #000;
  overflow: hidden;
}

#you-stage #cam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  background: #12080c;
}

#you-face, #rival-face {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: #241418;
}

#you-stage #you-face {
  position: absolute;
  width: 76px;
  height: 76px;
  right: 8px;
  bottom: 8px;
  border: 3px solid var(--gold);
  visibility: hidden;
}

#you-stage.seen #you-face { visibility: visible; }

#you-stage.locked #cam { visibility: hidden; }

#you-stage.locked #you-face {
  width: 180px;
  height: 180px;
  inset: 0;
  margin: auto;
  visibility: visible;
}

.pip video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform: scaleX(-1);
  background: #12080c;
}

.drop { cursor: pointer; text-align: center; }
.drop input { display: none; }
#drop-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  font-size: 14px;
}

#bag-name, button {
  margin-top: 10px;
}

#bag-name {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #000;
  background: var(--cream);
  color: var(--ink);
}

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

button {
  border: 3px solid #000;
  background: var(--gold);
  color: var(--ink);
  padding: 10px 14px;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
}

button:hover { transform: translate(-1px, -1px); }
button:active { transform: translate(2px, 2px); box-shadow: none; }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
button.ghost { background: transparent; color: var(--cream); }

.hint, #boot, #coach, .howto p { color: #f0d7bf; }

.go { margin-top: 16px; }
#fight-btn { font-size: 22px; }

.howto { margin: 16px auto 40px; }
.howto ul { margin: 8px 0 0; padding-left: 18px; }
.howto li { margin: 4px 0; }

#ring { margin: 18px auto 40px; }

.bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.bar span { display: block; margin-bottom: 4px; text-transform: uppercase; }
.bar.them { text-align: right; }
.track {
  height: 18px;
  background: #2a1418;
  border: 2px solid #000;
  overflow: hidden;
}
.bar.them .track { direction: rtl; }
#hp-you, #hp-them {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ffb703, #ff3b3b);
}

.world {
  position: relative;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 #000;
  background: #000;
}

#game {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #12080c;
}

.pip.off { display: none; }

.pip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: min(220px, 34%);
  aspect-ratio: 4 / 3;
  border: 3px solid #000;
  background: #12080c;
  overflow: hidden;
}

#stick {
  width: 100%;
  height: 100%;
  display: block;
  transform: scaleX(-1);
}

#track-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #666;
  border: 2px solid #000;
}
#track-dot.on { background: #b6ff7a; }

.shots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 12px 0;
  list-style: none;
}
.shots li {
  padding: 6px 10px;
  border: 2px solid #000;
  background: #2a1418;
  text-transform: uppercase;
}
.shots li.on { background: var(--gold); color: var(--ink); }

#result {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  background: rgba(10, 4, 6, 0.72);
  padding: 20px;
}
#result h2 {
  font-size: clamp(42px, 8vw, 84px);
  margin: 0;
  color: var(--gold);
}
#result[hidden] { display: none; }

@media (max-width: 760px) {
  #setup { grid-template-columns: 1fr; }
  .pip { width: 38%; }
}
