:root {
  --navy: #101c33;
  --navy-2: #182440;
  --ink: #1e2d4b;
  --muted: #8b97ab;
  --orange: #ff7a00;
  --orange-soft: #ffb066;
  --blue: #7fb3e8;
  --line: rgba(255, 255, 255, .12);
  --card: rgba(255, 255, 255, .05);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  color: #fff;
  background: radial-gradient(1200px 600px at 50% -10%, #22345c 0%, var(--navy-2) 45%, var(--navy) 100%);
  line-height: 1.55;
  min-height: 100vh;
}
.ring-glow {
  position: fixed; inset: auto 0 -220px 0; height: 460px;
  background: radial-gradient(ellipse at center, rgba(255,122,0,.22), transparent 65%);
  pointer-events: none;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 1.4rem 1.25rem 3rem; position: relative; }
.top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; }
.brand { font-weight: 700; letter-spacing: .02em; font-size: 1.05rem; }
.brand em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; color: var(--orange); font-size: 1.15em; }
.judges { font-size: .78rem; color: var(--muted); display: inline-flex; align-items: center; gap: .45rem; }
.judges .dot { width: 7px; height: 7px; border-radius: 999px; background: #4ade80; box-shadow: 0 0 8px #4ade80; }

.hero { text-align: center; padding: 3.2rem 0 1rem; position: relative; }
.hero h1 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: clamp(2.6rem, 6.5vw, 4.6rem); line-height: 1.02; margin: 3.2rem 0 .8rem; }
.hero .accent { color: var(--orange); }
.lede { color: var(--muted); max-width: 36rem; margin: 0 auto 2.4rem; font-size: 1.05rem; }
.lede strong { color: #fff; font-weight: 600; }

.fan { position: absolute; top: 1.5rem; width: 150px; display: grid; justify-items: center; gap: .4rem; }
.fan-left { left: -2%; }
.fan-right { right: -2%; }
@media (max-width: 860px) { .fan { display: none; } }
.bot { width: 112px; height: 112px; border-radius: 22px; object-fit: cover; object-position: top; border: 2px solid var(--line); box-shadow: 0 14px 30px rgba(0,0,0,.45); }
.bot-a { border-color: rgba(127,179,232,.5); animation: bounce-a 3.2s ease-in-out infinite; }
.bot-b { border-color: rgba(255,176,102,.5); animation: bounce-b 3.6s ease-in-out infinite; }

.bubble {
  position: relative; background: #fff; color: var(--navy);
  font-size: .74rem; font-weight: 700; letter-spacing: .03em;
  padding: .4rem .65rem; border-radius: 10px; white-space: nowrap;
  animation: bubble-pop 3.2s ease-in-out infinite;
}
#bubbleA { animation-delay: 0s; }
#bubbleB { animation-delay: 1.4s; }
.bubble::after { content: ""; position: absolute; bottom: -6px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; }
@keyframes bubble-pop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.fan-tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: .25rem .6rem; border-radius: 999px; }
.tag-a { background: rgba(127,179,232,.15); color: var(--blue); border: 1px solid rgba(127,179,232,.4); }
.tag-b { background: rgba(255,176,102,.15); color: var(--orange-soft); border: 1px solid rgba(255,176,102,.4); }

.battle-form { margin: 0 auto; max-width: 640px; display: grid; grid-template-columns: 1fr auto 1fr; gap: .7rem; align-items: end; text-align: left; }
@media (max-width: 640px) { .battle-form { grid-template-columns: 1fr; } .battle-form .vs-flame { margin: 0 auto; } }
.battle-form label { display: grid; gap: .35rem; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.battle-form input {
  width: 100%; padding: .95rem 1.05rem; font-size: 1rem; color: #fff;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 12px;
}
.corner-a input { border-top: 3px solid var(--blue); }
.corner-b input { border-top: 3px solid var(--orange); }
.battle-form input::placeholder { color: rgba(255,255,255,.35); }
.battle-form input:focus { outline: 2px solid rgba(255,122,0,.45); border-color: var(--orange); background: rgba(255,255,255,.09); }
.vs-flame {
  font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400;
  width: 58px; height: 58px; border-radius: 999px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--orange), #d95f00);
  color: #fff; font-size: 1.35rem; margin-bottom: .35rem;
  box-shadow: 0 0 0 6px rgba(255,122,0,.15), 0 10px 30px rgba(255,122,0,.35);
  animation: vs-pulse 2.4s ease-in-out infinite;
}
@keyframes vs-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.battle-form button {
  grid-column: 1 / -1; padding: 1.05rem 1.25rem; font-weight: 700; font-size: 1.05rem;
  background: linear-gradient(145deg, var(--orange), #e56b00); color: #fff; border: 0; border-radius: 14px; cursor: pointer;
  box-shadow: 0 12px 34px rgba(255,122,0,.35); transition: transform .15s ease;
}
.battle-form button:hover { transform: translateY(-2px); }
.battle-form button:disabled { opacity: .6; cursor: wait; transform: none; }
.err { color: #ff9d9d; font-size: .9rem; margin: .5rem 0 0; text-align: center; }

.recent { margin-top: 4rem; text-align: left; }
.recent h2 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 1.8rem; margin-bottom: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .8rem; }
.card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 1.1rem; text-decoration: none; color: #fff; transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--orange); }
.card .names { font-weight: 700; }
.card .names .vs { font-family: "Instrument Serif", Georgia, serif; font-style: italic; color: var(--orange); font-weight: 400; }
.card .meta { font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.card .win { color: var(--orange-soft); font-weight: 700; }
.empty { color: var(--muted); font-size: .9rem; }

footer { text-align: center; padding: 2rem 0 3rem; color: var(--muted); font-size: .8rem; position: relative; }
footer a { color: inherit; }

.compare { text-align: center; padding-top: 5rem; }
.compare h1 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 2.4rem; }
.progress-track { max-width: 460px; margin: 1.6rem auto .5rem; height: 12px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--orange), var(--orange-soft)); transition: width .6s ease; }
.pct { font-weight: 700; }
.fine { color: var(--muted); font-size: .82rem; }
