:root {
  color-scheme: dark;
  --bg: #071017;
  --panel: #0d1a22;
  --panel-strong: #13262e;
  --line: rgba(212, 246, 255, 0.16);
  --text: #edf7f8;
  --muted: #9fb5b9;
  --cyan: #26d9e6;
  --lime: #d8ff66;
  --coral: #ff6f61;
  --violet: #8f7bff;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  color: var(--text);
  background:
    linear-gradient(118deg, rgba(38, 217, 230, 0.12) 0 16%, transparent 16% 100%),
    linear-gradient(205deg, rgba(216, 255, 102, 0.08) 0 12%, transparent 12% 100%),
    linear-gradient(145deg, #071017 0%, #0a171f 44%, #101617 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.6rem 0.85rem;
  color: #071017;
  background: var(--lime);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: clamp(172px, 24vw, 240px);
  height: auto;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.nav-links a {
  position: relative;
  padding: 0.4rem 0;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 0.1rem;
  left: 0;
  height: 1px;
  content: "";
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero,
.system-section,
.arenas-section,
.ranking-section,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(36px, 6vw, 76px);
  align-items: center;
  min-height: min(760px, calc(100vh - 116px));
  padding: 34px 0 72px;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--lime);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
dl {
  margin-top: 0;
}

h1 {
  max-width: 8ch;
  margin-bottom: 22px;
  font-size: 9rem;
  line-height: 0.84;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 3.8rem;
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.04rem;
  letter-spacing: 0;
}

.hero-text {
  max-width: 32rem;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.22rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 800;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: #071017;
  background: var(--lime);
  border-color: var(--lime);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 480px;
  margin-bottom: 0;
}

.hero-stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.hero-stats dt {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
}

.hero-stats dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.battle-board {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(14px, 2vw, 20px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    var(--panel);
  box-shadow: var(--shadow);
}

.board-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.duel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.duel-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #09151b;
}

.duel-label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #071017;
  background: var(--text);
  font-weight: 900;
}

.generated-image {
  min-height: 330px;
  aspect-ratio: 0.82;
}

.generated-image-a {
  background:
    linear-gradient(130deg, transparent 0 46%, rgba(216, 255, 102, 0.9) 46% 49%, transparent 49%),
    radial-gradient(circle at 58% 34%, rgba(38, 217, 230, 0.92) 0 8%, transparent 9%),
    radial-gradient(circle at 36% 62%, rgba(255, 111, 97, 0.82) 0 10%, transparent 11%),
    conic-gradient(from 20deg at 48% 48%, #16252f, #26d9e6, #101a24, #d8ff66, #16252f);
}

.generated-image-b {
  background:
    linear-gradient(90deg, rgba(7, 16, 23, 0.55), transparent 42%, rgba(7, 16, 23, 0.4)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 14px),
    radial-gradient(circle at 64% 28%, rgba(143, 123, 255, 0.94), transparent 21%),
    radial-gradient(circle at 34% 72%, rgba(216, 255, 102, 0.74), transparent 24%),
    linear-gradient(150deg, #0b1e2a, #112832 48%, #ff6f61);
}

.score-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-height: 54px;
  padding: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.score-row strong {
  color: var(--text);
  font-size: 1.18rem;
}

.versus {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--lime);
  background: #071017;
  font-weight: 900;
}

.vote-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  align-items: end;
  height: 74px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.vote-strip span {
  display: block;
  height: var(--size);
  min-height: 16px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--lime), var(--cyan));
}

.system-section,
.arenas-section,
.ranking-section {
  padding: 82px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.45fr) minmax(0, 0.9fr);
  gap: clamp(18px, 5vw, 60px);
  align-items: end;
  margin-bottom: 28px;
}

.process-grid,
.arena-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.process-grid article,
.arena-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.process-grid span {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--cyan);
  font-weight: 900;
}

.process-grid p,
.arena-card p,
.site-footer p {
  margin-bottom: 0;
  color: var(--muted);
}

.arena-swatch {
  height: 116px;
  margin-bottom: 18px;
  border-radius: 6px;
  background-color: var(--panel-strong);
}

.swatch-motion {
  background:
    radial-gradient(circle at 68% 32%, rgba(216, 255, 102, 0.84), transparent 18%),
    linear-gradient(135deg, rgba(38, 217, 230, 0.9), rgba(8, 25, 32, 0.2)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255, 255, 255, 0.18) 12px 14px);
}

.swatch-product {
  background:
    linear-gradient(90deg, rgba(255, 111, 97, 0.72), transparent),
    conic-gradient(from 90deg, #f7fbf3, #26d9e6, #13262e, #f7fbf3);
}

.swatch-character {
  background:
    radial-gradient(circle at 50% 30%, #edf7f8 0 13%, transparent 14%),
    radial-gradient(circle at 50% 72%, #8f7bff 0 24%, transparent 25%),
    linear-gradient(145deg, #0b1e2a, #122b35);
}

.swatch-editorial {
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(216, 255, 102, 0.9) 18% 24%, transparent 24%),
    linear-gradient(160deg, #ff6f61 0 48%, #071017 49% 100%);
}

.ranking-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.ranking-row {
  display: grid;
  grid-template-columns: 0.45fr 1.1fr 1fr 0.5fr;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.ranking-row:first-child {
  border-top: 0;
}

.ranking-head {
  min-height: 48px;
  color: var(--lime);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 46px 0 38px;
  border-top: 1px solid var(--line);
}

.site-footer div {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 900;
}

@media (max-width: 900px) {
  .site-header,
  .hero,
  .section-heading,
  .site-footer {
    display: block;
  }

  .nav-links {
    margin-top: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: auto;
    padding-top: 26px;
  }

  h1 {
    font-size: 6.4rem;
  }

  h2 {
    font-size: 3rem;
  }

  .hero-text {
    font-size: 1.12rem;
  }

  .hero-stats dt {
    font-size: 2rem;
  }

  .battle-board {
    margin-top: 36px;
  }

  .process-grid,
  .arena-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading h2 {
    margin-top: 10px;
  }

  .site-footer p {
    margin-top: 14px;
  }
}

@media (max-width: 620px) {
  .site-header,
  .hero,
  .system-section,
  .arenas-section,
  .ranking-section,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: 5.35rem;
  }

  h2 {
    font-size: 2.28rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .hero-stats dt {
    font-size: 1.85rem;
  }

  .hero-stats,
  .process-grid,
  .arena-grid {
    grid-template-columns: 1fr;
  }

  .duel-grid {
    grid-template-columns: 1fr;
  }

  .versus {
    margin: -4px auto;
    transform: rotate(90deg);
  }

  .generated-image {
    min-height: 220px;
    aspect-ratio: 1.45;
  }

  .board-topline,
  .score-row {
    display: block;
  }

  .board-topline span,
  .score-row span {
    display: block;
  }

  .ranking-table {
    overflow-x: auto;
  }

  .ranking-row {
    min-width: 600px;
  }
}
