/* Break the Targets — Melee Bounties */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg: #07090e;
  --bg-elevated: #0f131c;
  --bg-card: #141925;
  --bg-row-hover: #1c2230;

  --border: #232a3a;
  --border-bright: #38415a;
  --divider: #1a1f2c;

  --ink: #f5f6f8;
  --ink-dim: #b6bac4;
  --ink-muted: #6c7080;
  --ink-faint: #43475a;

  --target-red: #e63946;
  --target-red-deep: #b81e2c;
  --target-white: #f1faee;
  --stage-blue: #2a4a7a;

  --money: #4be58e;
  --money-dim: oklch(0.55 0.15 145);
  --money-faint: oklch(0.32 0.08 145 / 0.18);
  --gold: #ffd23f;

  --accent: var(--target-red);
  --accent-faint: oklch(0.4 0.18 25 / 0.22);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --container: 1400px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-image:
    radial-gradient(ellipse at 20% -10%, oklch(0.4 0.2 25 / 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 0%, oklch(0.35 0.12 250 / 0.14) 0%, transparent 55%),
    linear-gradient(var(--bg), var(--bg));
  min-height: 100vh;
}

::selection { background: var(--accent); color: #fff; }

a {
  color: var(--target-red);
  text-decoration-color: oklch(0.55 0.18 25 / 0.45);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 120ms, text-decoration-color 120ms;
}
a:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 32px 40px;
}
.hero-title {
  font-size: clamp(48px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}
.hero-title em {
  font-style: normal;
  color: var(--target-red);
  position: relative;
  display: inline-block;
}
.hero-title em::before {
  content: "";
  position: absolute;
  right: -56px; top: 50%;
  width: 88px; height: 88px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle,
      var(--target-red) 0 14%,
      transparent 14% 28%,
      var(--target-red) 28% 44%,
      transparent 44% 60%,
      var(--target-red) 60% 78%,
      transparent 78% 100%);
  opacity: 0.18;
  pointer-events: none;
  z-index: -1;
}
.hero-sub {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-dim);
  margin: 24px 0 0;
}
.hero-sub b { color: var(--ink); font-weight: 500; }

/* ---------- Bounty Table ---------- */
.bounty-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px 96px;
}
.bounty-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-mono);
  table-layout: fixed;
}
.bounty-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 14px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky; top: 0; z-index: 10;
}
.bounty-table thead th.col-char {
  text-align: left;
  padding-left: 16px;
  width: 260px;
}
.bounty-table thead th.col-bounty { width: auto; }
.bounty-table thead th.col-1st { color: var(--gold); }
.bounty-table thead th.col-total {
  text-align: right;
  padding-right: 20px;
  width: 110px;
  color: var(--ink-dim);
}

/* Tier divider row */
tr.tier-row td {
  background: transparent;
  padding: 28px 0 8px;
  border: 0;
}
.tier-divider {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: left;
}
.tier-divider .tier-desc {
  color: var(--target-red);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.tier-divider .tier-mult {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-transform: none;
}
.tier-divider .tier-line {
  height: 1px;
  background: linear-gradient(90deg, var(--accent-faint), transparent);
}

/* Body rows */
.bounty-table tbody tr.char-row {
  transition: background 120ms;
}
.bounty-table tbody tr.char-row:hover {
  background: var(--bg-row-hover);
}
.bounty-table tbody td {
  padding: 0 8px;
  height: 64px;
  text-align: right;
  border-bottom: 1px solid var(--divider);
  font-size: 14px;
  font-weight: 500;
  vertical-align: middle;
  color: var(--ink);
}

/* Character cell */
.bounty-table tbody td.cell-char {
  text-align: left;
  padding: 0 16px;
  font-family: var(--font-display);
  position: relative;
}
.char-inner {
  display: flex; align-items: center; gap: 14px;
}
.char-portrait {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--border-bright);
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
}
.char-portrait img {
  width: 100%; height: 100%; display: block;
  position: relative;
  z-index: 1;
  object-fit: cover;
  object-position: center 18%;
}
.char-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.char-accent {
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--accent, transparent);
}

/* Bounty cells */
.bounty-table tbody td.cell-bounty {
  font-family: var(--font-mono);
  position: relative;
  text-align: center;
}
td.cell-bounty:not(.empty):not(.claimed)::before {
  content: "";
  position: absolute;
  inset: 6px;
  background: url('img/target.png') center / contain no-repeat;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}
td.cell-bounty .amt {
  position: relative;
  z-index: 2;
  display: inline-block;
  padding: 0 6px;
}
td.cell-bounty.empty {
  color: var(--ink-faint);
}
td.cell-bounty.empty .amt::before {
  content: "—";
  color: var(--ink-faint);
}
td.cell-bounty.is-1st .amt { color: var(--gold); font-weight: 600; }

/* Claimed cell */
td.cell-bounty.claimed {
  background:
    repeating-linear-gradient(-45deg,
      transparent 0 6px,
      oklch(0.4 0.18 25 / 0.07) 6px 12px),
    var(--bg-elevated);
}
td.cell-bounty.claimed::after {
  content: "✕";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 36px;
  color: var(--target-red);
  opacity: 0.18;
  font-weight: 700;
  pointer-events: none;
  z-index: 0;
}
td.cell-bounty.claimed .claim-stack {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 4px 6px 4px 0;
  line-height: 1.15;
}
td.cell-bounty.claimed .amt.struck {
  text-decoration: line-through;
  text-decoration-color: var(--target-red);
  text-decoration-thickness: 2px;
  color: var(--ink-muted);
  font-size: 12px;
}
td.cell-bounty.claimed .claim-player {
  color: var(--target-red);
  font-weight: 600;
  font-size: 13px;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}
td.cell-bounty.claimed .claim-tourney {
  color: var(--ink-muted);
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Total cell */
td.cell-total {
  font-weight: 600;
  font-size: 15px;
  color: var(--money);
  padding-right: 20px;
  border-left: 1px solid var(--divider);
  font-family: var(--font-mono);
}

/* ---------- Tournaments section ---------- */
.tourneys-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px 96px;
}
.tourneys-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.tourneys-section h2 {
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-weight: 700;
}
.tourneys-sub {
  font-size: 15px;
  color: var(--ink-dim);
  margin: 0 0 32px;
  max-width: 560px;
}
.tourney-carousel {
  position: relative;
}
.tourney-grid {
  display: flex;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.tourney-grid::-webkit-scrollbar { display: none; }
.tourney-card {
  flex: 0 0 320px;
  background: var(--bg-elevated);
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  transition: background 140ms;
  min-height: 200px;
}

/* Carousel arrow buttons */
.tourney-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-bright);
  background: rgba(7, 9, 14, 0.9);
  color: var(--ink-dim);
  font-size: 24px;
  font-family: var(--font-display);
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 120ms, border-color 120ms, background 120ms, opacity 120ms;
}
.tourney-nav:hover:not(:disabled) {
  color: var(--target-red);
  border-color: var(--target-red);
}
.tourney-nav:disabled {
  opacity: 0.25;
  cursor: default;
}
.tourney-nav.prev { left: -22px; }
.tourney-nav.next { right: -22px; }
.tourney-card:hover { background: var(--bg-row-hover); }
.tourney-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.tourney-date-block {
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tourney-month {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
}
.tourney-day {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 0.85;
  font-family: var(--font-display);
}
.tourney-year {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  margin-top: 2px;
}
.tourney-tier-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.tourney-tier {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 600;
  padding: 4px 8px;
  border: 1px solid var(--border-bright);
  color: var(--ink-muted);
  white-space: nowrap;
}
.tourney-tier.tier-s { color: var(--target-red); border-color: var(--target-red); }
.tourney-tier.tier-a { color: var(--gold); border-color: var(--gold); }
.tourney-tier.tier-b { color: var(--ink-dim); }
.tourney-tier.tier-c { color: var(--ink-muted); }
.tourney-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  font-weight: 600;
  padding: 4px 8px;
  background: var(--accent-faint);
  color: var(--target-red);
  white-space: nowrap;
}
.tourney-badge.tba {
  background: transparent;
  color: var(--ink-muted);
  border: 1px dashed var(--border-bright);
}
.tourney-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
.tourney-card-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
}
.tourney-foot-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.tourney-loc {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.tourney-attend-num {
  font-size: 12px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
}
.tourney-attend-num b { color: var(--ink); font-weight: 500; }
.tourney-countdown {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.tourney-countdown.live {
  color: #fff;
  background: var(--accent);
  padding: 4px 8px;
}

/* ---------- Rules section ---------- */
.rules-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px 96px;
}
.rules-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.rules-section h2 {
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  font-weight: 700;
}
.rules-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.rule {
  padding: 28px 28px 28px 0;
  border-right: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rule:not(:first-child) { padding-left: 28px; }
.rule:last-child { border-right: 0; }
.rule-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
}
.rule-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.rule-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-dim);
  margin: 0;
}
.rule-body b { color: var(--ink); font-weight: 500; }
.rule-body em {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}
