:root {
  --bg: #f2efe7;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --ink: #141414;
  --muted: #5d584f;
  --line: rgba(20, 20, 20, 0.1);
  --accent: #b73a2b;
  --accent-deep: #8e2318;
  --winner: #111111;
  --red-corner: #c63d32;
  --red-corner-deep: #8f221b;
  --blue-corner: #2e63d6;
  --blue-corner-deep: #1c3f93;
  --shadow: 0 24px 60px rgba(41, 26, 16, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(183, 58, 43, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(20, 20, 20, 0.08), transparent 25%),
    linear-gradient(180deg, #f7f3ea 0%, var(--bg) 100%);
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.eyebrow,
.meta-label,
.section-tag,
.method-label,
.corner-label {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
}

h1,
.section-title,
.fighter-name {
  font-family: "Barlow Condensed", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.25rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.lede {
  max-width: 52rem;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

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

button {
  appearance: none;
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-button,
.ghost-button,
.pick-button,
.method-button {
  border-radius: 999px;
  padding: 14px 18px;
  font: inherit;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: white;
  box-shadow: var(--shadow);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 1px solid var(--line);
}

.card-meta,
.status-card,
.section {
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

.card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  border-radius: 28px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.meta-value {
  margin: 0;
  font-weight: 600;
}

.status-card {
  padding: 18px 20px;
  border-radius: 20px;
  color: var(--muted);
}

.status-card.error {
  color: var(--accent-deep);
}

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

.section {
  border-radius: 32px;
  padding: 24px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  text-transform: uppercase;
  line-height: 0.95;
}

.section-count {
  margin: 0;
  color: var(--muted);
}

.fight-list {
  display: grid;
  gap: 14px;
}

.fight-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
}

.fight-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.division {
  margin: 0;
  font-weight: 600;
}

.fight-id {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.fighter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pick-button {
  width: 100%;
  text-align: left;
  background: #f6f2ea;
  border: 1px solid rgba(20, 20, 20, 0.06);
  padding: 16px;
}

.pick-button.red-corner.active {
  background: linear-gradient(135deg, var(--red-corner) 0%, var(--red-corner-deep) 100%);
  color: white;
}

.pick-button.blue-corner.active {
  background: linear-gradient(135deg, var(--blue-corner) 0%, var(--blue-corner-deep) 100%);
  color: white;
}

.pick-button.active .fighter-record,
.pick-button.active .corner-label {
  color: rgba(255, 255, 255, 0.72);
}

.pick-button:focus-visible,
.method-button:focus-visible,
.ghost-button:focus-visible,
.primary-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.fighter-name {
  margin: 0 0 6px;
  font-size: 1.6rem;
  line-height: 0.92;
  text-transform: uppercase;
}

.fighter-record {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.method-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.method-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 10px 14px;
}

.method-button.active {
  background: rgba(183, 58, 43, 0.1);
  border-color: rgba(183, 58, 43, 0.35);
  color: var(--accent-deep);
}

.method-controls {
  margin-top: 14px;
}

.method-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.method-chip,
.method-edit {
  border-radius: 999px;
  font: inherit;
  padding: 10px 14px;
}

.method-chip {
  background: rgba(183, 58, 43, 0.1);
  border: 1px solid rgba(183, 58, 43, 0.28);
  color: var(--accent-deep);
}

.method-edit {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.export-banner {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 820px) {
  .hero,
  .section-header,
  .fight-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-meta,
  .fighter-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100vw - 20px, 1120px);
    padding-top: 20px;
  }

  .section,
  .card-meta {
    border-radius: 24px;
  }
}
