:root {
  color-scheme: dark;
  --bg: #030303;
  --surface: rgba(11, 11, 12, 0.86);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f5f5f0;
  --muted: #a7a7a0;
  --dim: #707069;
  --signal: #e9ff70;
  --good: #62f28b;
  --warn: #ffca57;
  --bad: #ff5c86;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 12%, rgba(233, 255, 112, 0.13), transparent 24rem),
    radial-gradient(circle at 86% 28%, rgba(255, 255, 255, 0.08), transparent 28rem),
    linear-gradient(135deg, rgba(233, 255, 112, 0.06), transparent 36rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

button, textarea { font: inherit; }

.page {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(30px, 5vw, 56px) 0 72px;
}

.intro {
  display: grid;
  justify-items: center;
  padding: 24px 0 42px;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 42px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 780;
}

.brand-mark {
  width: 17px;
  height: 17px;
  border: 2px solid var(--text);
  border-radius: 50%;
  box-shadow: inset 6px 0 0 var(--signal);
}

.kicker {
  margin: 0;
  color: var(--signal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  font-size: clamp(58px, 10vw, 132px);
  line-height: 0.86;
}

h2 {
  font-size: clamp(44px, 8vw, 96px);
  line-height: 0.9;
}

h3 {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 0.92;
}

.lede {
  max-width: 720px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.22;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 72%),
    var(--surface);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
}

.input-panel {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 30px);
}

.hint {
  max-width: 700px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.hint strong { color: var(--text); }

textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 18px;
  font-size: 17px;
  line-height: 1.45;
}

textarea:focus {
  border-color: rgba(233, 255, 112, 0.55);
  box-shadow: 0 0 0 4px rgba(233, 255, 112, 0.08);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 850;
  transition: transform 140ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(233, 255, 112, 0.45);
}

.button-light {
  border-color: #eff2d6;
  background: #f5f7e9;
  color: #11120e;
}

.results {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.reveal-panel {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-top: 20px;
  border: 1px solid rgba(233, 255, 112, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(233, 255, 112, 0.14), transparent 24rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 68%),
    rgba(9, 9, 10, 0.92);
  box-shadow: 0 0 80px rgba(233, 255, 112, 0.08);
}

.reveal-orbit {
  position: absolute;
  inset: -28%;
  border: 1px solid rgba(233, 255, 112, 0.12);
  border-radius: 50%;
  animation: orbit 9s linear infinite;
}

.reveal-orbit::before,
.reveal-orbit::after {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 28px rgba(233, 255, 112, 0.75);
  content: "";
}

.reveal-orbit::before {
  top: 18%;
  left: 28%;
}

.reveal-orbit::after {
  right: 18%;
  bottom: 24%;
}

.reveal-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(920px, calc(100% - 36px));
  text-align: center;
}

.reveal-round {
  margin: 18px 0;
  border: 1px solid rgba(233, 255, 112, 0.38);
  border-radius: 999px;
  color: var(--signal);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.reveal-content h2 {
  max-width: 920px;
  font-size: clamp(48px, 9vw, 112px);
  overflow-wrap: anywhere;
}

.reveal-content p:not(.kicker) {
  max-width: 780px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 760;
  line-height: 1.2;
}

.reveal-fighter {
  min-height: 30px;
  margin-top: 18px;
  color: var(--text);
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 900;
}

.reveal-content .button {
  margin-top: 28px;
}

.reveal-pop {
  animation: revealPop 520ms cubic-bezier(.2,.8,.2,1) both;
}

.verdict-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: clamp(22px, 4vw, 38px);
}

.verdict-panel p:not(.kicker) {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.4;
}

.verdict-score {
  color: var(--signal);
  font-size: clamp(62px, 10vw, 128px);
  font-weight: 950;
  line-height: 0.86;
  text-shadow: 0 0 32px rgba(233, 255, 112, 0.18);
}

.score-bars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.score-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  padding: 16px;
}

.judge-card {
  display: grid;
  gap: 14px;
}

.judge-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.35;
}

.score-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.score-top strong {
  font-size: 22px;
  line-height: 1;
}

.score-top span {
  color: var(--signal);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-fill {
  height: 100%;
  width: var(--score-width, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--signal), var(--good));
  box-shadow: 0 0 18px rgba(233, 255, 112, 0.22);
  animation: grow 760ms cubic-bezier(.2,.8,.2,1) both;
}

.round-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.round-grid div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
}

.round-grid small {
  display: block;
  color: var(--signal);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.round-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.judge-total {
  border-top: 1px solid var(--line);
  color: var(--text);
  padding-top: 12px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.insight-grid, .stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.insight-card, .stat-card {
  min-height: 180px;
  padding: 20px;
}

blockquote {
  margin: 16px 0 12px;
  padding-left: 14px;
  border-left: 4px solid var(--signal);
  color: var(--text);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.insight-card span, .section-head span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 780;
}

.insight-card p:not(.kicker) {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.42;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.95;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 780;
}

.transcript-panel {
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.transcript {
  display: grid;
  gap: 10px;
  max-height: 480px;
  overflow: auto;
  padding-right: 6px;
}

.line-card {
  display: grid;
  grid-template-columns: minmax(110px, 0.2fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  padding: 14px;
}

.line-card.submission-line {
  border-color: rgba(255, 92, 134, 0.78);
  background:
    radial-gradient(circle at 92% 40%, rgba(255, 92, 134, 0.18), transparent 18rem),
    rgba(255, 92, 134, 0.06);
  box-shadow:
    0 0 0 1px rgba(255, 92, 134, 0.18),
    0 0 34px rgba(255, 92, 134, 0.22);
}

.line-card.knockdown-line {
  border-color: rgba(255, 190, 77, 0.82);
  background:
    radial-gradient(circle at 92% 40%, rgba(255, 190, 77, 0.16), transparent 18rem),
    rgba(255, 190, 77, 0.055);
  box-shadow:
    0 0 0 1px rgba(255, 190, 77, 0.18),
    0 0 34px rgba(255, 190, 77, 0.2);
}

.line-card.quit-submission-line {
  border-color: rgba(76, 161, 255, 0.86);
  background:
    radial-gradient(circle at 92% 40%, rgba(76, 161, 255, 0.18), transparent 18rem),
    rgba(76, 161, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(76, 161, 255, 0.2),
    0 0 34px rgba(76, 161, 255, 0.22);
}

.line-card.knockdown-comeback-line {
  border-color: rgba(98, 242, 139, 0.82);
  background:
    radial-gradient(circle at 92% 40%, rgba(98, 242, 139, 0.16), transparent 18rem),
    rgba(98, 242, 139, 0.055);
  box-shadow:
    0 0 0 1px rgba(98, 242, 139, 0.18),
    0 0 34px rgba(98, 242, 139, 0.2);
}

.line-card strong {
  color: var(--signal);
  font-size: 13px;
  text-transform: uppercase;
}

.line-card p {
  margin: 0;
  color: var(--text);
  font-weight: 760;
  line-height: 1.3;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.line-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.35;
}

.line-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.line-card.submission-line em {
  color: var(--bad);
  text-shadow: 0 0 18px rgba(255, 92, 134, 0.35);
}

.line-card.knockdown-line em {
  color: var(--warn);
  text-shadow: 0 0 18px rgba(255, 190, 77, 0.35);
}

.line-card.quit-submission-line em {
  color: #4ca1ff;
  text-shadow: 0 0 18px rgba(76, 161, 255, 0.38);
}

.line-card.knockdown-comeback-line em {
  color: var(--good);
  text-shadow: 0 0 18px rgba(98, 242, 139, 0.35);
}

.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 20;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  border: 1px solid rgba(233, 255, 112, 0.35);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.94);
  box-shadow: 0 0 30px rgba(233, 255, 112, 0.12);
  color: var(--text);
  padding: 12px 18px;
  font-weight: 840;
}

@keyframes grow {
  from { width: 0; }
  to { width: var(--score-width, 0%); }
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

@keyframes revealPop {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 820px) {
  .page { width: min(100% - 24px, 1180px); }

  .verdict-panel, .insight-grid, .stat-grid {
    grid-template-columns: 1fr;
  }

  .score-bars {
    grid-template-columns: 1fr;
  }

  .verdict-score {
    justify-self: start;
  }

  .line-card {
    grid-template-columns: 1fr;
  }
}
