:root {
  color-scheme: dark;
  --bg: #101418;
  --panel: #182128;
  --panel-2: #22252b;
  --ink: #f5f7f8;
  --muted: #a9b5bb;
  --line: #33414a;
  --red: #f15b5b;
  --amber: #ffc857;
  --green: #39d98a;
  --teal: #3dc8d8;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  padding: 0 14px 28px;
}

a {
  color: inherit;
}

.pr-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 7px 12px;
  background: #211619;
  border-bottom: 1px solid #503239;
  color: #e3c7c9;
  font-size: 0.75rem;
  text-align: center;
}

.app {
  width: min(100%, 820px);
  padding-top: 44px;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 0 14px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 34rem;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.hub-link,
button,
.support-strip a {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.hub-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 0 16px;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px 0 10px;
}

.scoreboard div {
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.scoreboard span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
}

.scoreboard strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1;
}

.stage {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(61, 200, 216, 0.12), transparent 45%),
    var(--panel-2);
  box-shadow: 0 18px 40px var(--shadow);
}

.coach {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.coach span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.coach strong {
  min-width: 108px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #11181d;
  color: var(--amber);
  text-align: center;
}

.silhouette {
  position: relative;
  width: min(52vw, 260px);
  height: 238px;
  margin: 26px auto 12px;
}

.silhouette > div {
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--amber));
  box-shadow: 0 0 24px rgba(241, 91, 91, 0.28);
  transition: transform 140ms ease;
}

.head {
  left: 50%;
  top: 5px;
  width: 48px;
  height: 48px;
  transform: translateX(-50%);
}

.torso {
  left: 50%;
  top: 58px;
  width: 78px;
  height: 106px;
  transform: translateX(-50%);
}

.arm {
  top: 74px;
  width: 44px;
  height: 118px;
}

.arm.left {
  left: calc(50% - 94px);
  transform: rotate(22deg);
}

.arm.right {
  right: calc(50% - 94px);
  transform: rotate(-22deg);
}

.leg {
  top: 150px;
  width: 44px;
  height: 92px;
}

.leg.left {
  left: calc(50% - 54px);
  transform: rotate(13deg);
}

.leg.right {
  right: calc(50% - 54px);
  transform: rotate(-13deg);
}

.stage.hit-flash .silhouette > div {
  transform: translateY(-8px) scale(1.03);
}

.meter {
  position: relative;
  width: 100%;
  height: 56px;
  margin: 20px 0 12px;
  border: 1px solid #4b5c66;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0 9.5%, rgba(255,255,255,0.05) 9.5% 10%),
    #11181d;
}

.zone,
.sweet,
.needle {
  position: absolute;
  top: 0;
  height: 100%;
}

.zone {
  border-left: 2px solid rgba(57, 217, 138, 0.95);
  border-right: 2px solid rgba(57, 217, 138, 0.95);
  background: rgba(57, 217, 138, 0.22);
}

.sweet {
  top: 9px;
  height: calc(100% - 18px);
  border-radius: 6px;
  background: rgba(255, 200, 87, 0.34);
}

.needle {
  width: 6px;
  border-radius: 4px;
  background: var(--ink);
  box-shadow: 0 0 16px rgba(255,255,255,0.55);
}

.cue {
  min-height: 48px;
  margin: 0;
  color: #dce6ea;
  font-size: 1rem;
  line-height: 1.6;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

button {
  padding: 0 14px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary {
  border-color: #d93f3f;
  background: var(--red);
  color: white;
}

.hit {
  border-color: #2fbd76;
  background: var(--green);
  color: #07140d;
  font-size: 1.05rem;
}

.support-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.support-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #f3f8fa;
}

.result {
  position: fixed;
  inset: auto 14px 18px;
  z-index: 6;
  max-width: 520px;
  margin: auto;
  padding: 18px;
  border: 1px solid #52646e;
  border-radius: 8px;
  background: #10171d;
  box-shadow: 0 22px 60px rgba(0,0,0,0.5);
  text-align: center;
}

.result-label {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 800;
}

.result strong {
  display: block;
  font-size: 3rem;
}

.result p:last-of-type {
  margin: 8px 0 16px;
  color: var(--muted);
}

.result button {
  min-width: 120px;
  margin: 4px;
}

@media (max-width: 720px) {
  body {
    padding-inline: 10px;
  }

  .hero {
    align-items: start;
  }

  .scoreboard {
    grid-template-columns: repeat(2, 1fr);
  }

  .stage {
    min-height: 390px;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .app {
    padding-top: 56px;
  }

  h1 {
    font-size: 2.25rem;
  }

  .hero {
    display: block;
  }

  .hub-link {
    margin-top: 10px;
  }

  .silhouette {
    width: 220px;
    height: 214px;
    margin-top: 18px;
  }

  .controls,
  .support-strip {
    grid-template-columns: 1fr;
  }
}
