/* ===== Brand tokens (from brand-guideline.webp) ============================
   cream  #F5F0F0   lime  #E6FA50   teal  #50C8C8   dark  #003C3C
   ========================================================================== */

:root {
  --cream: #F5F0F0;
  --lime: #E6FA50;
  --teal: #50C8C8;
  --dark: #003C3C;
  --dark-2: #002626;
  --ink: #0d1b1b;
  --muted: #6b7878;
  --line: #e2e6e6;
  --shadow: 0 30px 80px -30px rgba(0, 60, 60, 0.45), 0 8px 24px -8px rgba(0, 60, 60, 0.2);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar { display: none; }
body::-webkit-scrollbar { display: none; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== Stage / card ====================================================== */

.stage {
  min-height: 100vh;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.card {
  width: 100%;
  min-height: 100vh;
  background: #fff;
  display: grid;
  grid-template-columns: 240px 1fr 1.05fr;
  position: relative;
}

.col { position: relative; padding: 32px 28px; }
.col-left {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
}
.col-mid {
  border-left: 1px dashed #d8dcdc;
  border-right: 1px dashed #d8dcdc;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 40px 36px;
}
.col-right {
  padding: 0;
  margin: 20px;
  background: #0a1414;
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  position: sticky;
  top: 20px;
  align-self: start;
  height: calc(100vh - 40px);
}

/* ===== Left column ======================================================= */

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-text { line-height: 1.05; }
.brand-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 0.02em;
  color: var(--dark);
}
.brand-sub {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.me-left[hidden] { display: none; }
.me-left {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 8px 14px 8px 8px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 100%;
  min-width: 0;
}
.me-left .me-photo {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--lime);
  background: #ddd center/cover no-repeat;
  object-fit: cover;
  flex: none;
}
.me-left .me-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; flex: 1; }
.me-left .me-name {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.me-left .me-balance {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--dark);
  margin-top: 2px;
}
.me-left .me-balance-suffix {
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 3px;
}

.menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
}
.menu-link {
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
  width: max-content;
  padding-bottom: 4px;
  border-bottom: 1.5px solid transparent;
}
.menu-link.is-active {
  border-bottom-color: var(--dark);
  font-weight: 600;
}
.menu-link:hover { color: var(--dark); }

.col-left-foot {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
.pager b, .pager span { color: var(--muted); }
.pager { letter-spacing: 0.04em; }

/* ===== Middle column ===================================================== */

.mid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dates {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--muted);
}
.badge {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge-lime { background: var(--lime); color: var(--dark); }
.badge-dark { background: var(--dark); color: #fff; }
.badge-teal { background: var(--teal); color: var(--dark); }

.hero-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 46px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 16px 0 0;
}
.hero-title em {
  font-style: normal;
  color: #4d6b0a;
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 6px;
  text-underline-offset: 2px;
}
.hero-lede {
  color: #3d4a4a;
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
  max-width: 56ch;
}

.section-head {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 8px;
  margin-bottom: 18px;
  padding-top: 18px;
}
.section-head::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-top: 1.5px dashed #b8c0c0;
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 0;
}
.section-head-rank h2 { font-size: 22px; }
.muted { color: var(--muted); font-size: 12px; }
.link-btn {
  background: none; border: none; color: var(--dark);
  font-weight: 600; font-size: 13px; cursor: pointer; padding: 0;
}
.link-btn:hover { color: #4d6b0a; }

.match-list { display: flex; flex-direction: column; gap: 14px; }
.history-section { padding-bottom: 18px; }

.show-all-btn {
  margin-top: 14px;
  background: transparent;
  color: var(--dark);
  border: 1.5px dashed #cdd5d5;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.show-all-btn:hover {
  background: var(--cream);
  border-color: var(--dark);
}
.show-all-btn[hidden] { display: none; }

/* ===== Versus banner (mini, in middle column) ============================ */

.vs-card {
  position: relative;
  background: var(--dark);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 12px 18px 18px;
  min-height: 92px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 1px solid rgba(255,255,255,0.06);
}
.vs-card:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -18px rgba(0,0,0,0.5); }
.vs-card .vs-photo { transition: opacity 0.15s ease; }
.vs-card.is-selected { outline: 2px solid var(--lime); outline-offset: 1px; }
.vs-card.is-completed { opacity: 0.7; }

.vs-card.is-past {
  background: #3a3f47;
  padding: 10px 16px 14px;
  cursor: default;
  border: 1px solid rgba(255,255,255,0.04);
}
.vs-card.is-past:hover { transform: none; box-shadow: none; }
.vs-card.is-past::before, .vs-card.is-past::after {
  background:
    repeating-linear-gradient(135deg, rgba(180,190,210,0.05) 0 8px, transparent 8px 18px);
}
.vs-card.is-past .vs-main { min-height: 60px; gap: 10px; }
.vs-card.is-past .vs-main::before {
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23999999' stroke-width='2.5'%3E%3Ccircle cx='32' cy='32' r='29'/%3E%3Cpath d='M3 18Q32 36 61 18'/%3E%3Cpath d='M3 46Q32 28 61 46'/%3E%3C/svg%3E");
}
.vs-card.is-past .vs-photo { max-width: 48px; }
.vs-card.is-past .vs-odds, .vs-card.is-past .vs-score { font-size: 22px; }
.vs-card.is-past .vs-top-bar { padding-bottom: 6px; border-bottom-color: rgba(255,255,255,0.05); }
.vs-winner-badge {
  margin-top: 2px;
  background: rgba(180,210,255,0.14);
  color: rgba(180,210,255,0.85);
  font-size: 9.5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vs-card::before, .vs-card::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 32%;
  pointer-events: none;
  background:
    repeating-linear-gradient(135deg, rgba(230,250,80,0.05) 0 8px, transparent 8px 18px);
}
.vs-card::before { left: 0; clip-path: polygon(0 0, 90% 0, 60% 100%, 0 100%); }
.vs-card::after { right: 0; clip-path: polygon(40% 0, 100% 0, 100% 100%, 10% 100%); }

.vs-top-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.vs-top-bar .team-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.vs-top-bar .team-label.right { flex-direction: row-reverse; text-align: right; }
.vs-top-bar .team-label .name {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-top-bar .team-label .rec {
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

.vs-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 80px;
}
.vs-main::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23e6fa50' stroke-width='2.5'%3E%3Ccircle cx='32' cy='32' r='29'/%3E%3Cpath d='M3 18Q32 36 61 18'/%3E%3Cpath d='M3 46Q32 28 61 46'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.vs-side {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  min-width: 0;
}
.vs-side.right { justify-content: flex-end; }
.vs-side .stack { display: flex; gap: 4px; align-items: stretch; flex: 1; }
.vs-side.right .stack { flex-direction: row-reverse; }
.vs-photo {
  flex: 1;
  min-width: 0;
  max-width: 64px;
  border-radius: 6px;
  background: transparent center 20%/cover no-repeat;
}
.vs-side.right .vs-photo { transform: scaleX(-1); }

.vs-side { position: relative; }
.vs-player-names {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 1px;
  padding: 4px 6px 4px;
  border-radius: 6px 6px 0 0;
  z-index: 2;
}
.vs-player-name {
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}
.vs-side.right .vs-player-names { text-align: right; }

@media (min-width: 721px) {
  .vs-card:hover .vs-player-names {
    display: flex;
  }
  .vs-card:hover {
    background: #152020;
  }
  .vs-card:hover .vs-photo {
    opacity: 0.55;
  }
  .vs-card.is-past:hover {
    background: #2a2e34;
  }
  .vs-card.is-past:hover .vs-photo {
    opacity: 0.55;
  }
}

.vs-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
}
.vs-when {
  font-size: 10.5px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.vs-odds {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0.04em;
  line-height: 1;
}
.vs-odds .sep {
  color: var(--lime);
  font-family: var(--font);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
}
.vs-locked {
  margin-top: 2px;
  background: rgba(230,250,80,0.16);
  color: var(--lime);
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.vs-score {
  font-family: var(--display);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 0.04em;
}

/* ===== Ranking table ===================================================== */

.ranking-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Top 4 = playoff/qualifying zone */
.ranking tbody tr.is-qualifying {
  position: relative;
  background: linear-gradient(90deg, rgba(230,250,80,0.22) 0%, rgba(230,250,80,0.04) 70%, transparent 100%);
}
.ranking tbody tr.is-qualifying td:first-child {
  box-shadow: inset 3px 0 0 var(--lime);
  color: var(--dark);
  font-weight: 700;
}
.ranking tbody tr.is-qualifying:last-of-type {
  border-bottom: 1px dashed #b8c0c0;
}
.ranking {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.ranking th, .ranking td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.ranking tbody tr:last-child td { border-bottom: none; }
.ranking thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  background: #fafbfb;
}
.ranking td.col-rank, .ranking td.col-record { text-align: center; width: 1%; white-space: nowrap; }
.ranking th.col-pts, .ranking td.col-pts {
  text-align: center;
  width: 1%;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
}
.ranking th.col-team, .ranking td.col-team { min-width: 200px; }
.ranking th.col-form, .ranking td.col-form { width: 110px; text-align: center; }
.ranking th.col-bets, .ranking td.col-bets,
.ranking th.col-profit, .ranking td.col-profit {
  text-align: center;
  width: 1%;
  white-space: nowrap;
}
.ranking td.col-bets {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
}
.ranking td.col-profit {
  font-weight: 700;
  font-size: 13px;
}
.ranking .team-cell { display: flex; align-items: flex-start; gap: 10px; }
.ranking .team-name { font-weight: 600; }
.ranking .team-sub {
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ranking .team-member {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ranking .team-member::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.ranking .form {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.ranking .form .form-row {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.form .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  border: 1.5px solid currentColor;
  color: var(--muted);
  background: transparent;
}
.form .pill.w { color: #2f7d32; background: #e4f4e5; border-color: #b6dfb7; }
.form .pill.l { color: #b3261e; background: #fbe5e3; border-color: #f1b9b4; }
.form .pill.empty { color: #c8d0d0; border-color: #dde2e2; }
.form .pill.empty::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.steps {
  margin: 14px 0 4px;
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.steps b { color: var(--ink); margin-right: 4px; font-weight: 600; }

/* ===== Right column / versus pane ======================================= */

.col-right .court-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,40,40,0.35) 0%, rgba(0,30,30,0.7) 60%, rgba(0,20,20,0.95) 100%),
    url("/assets/court.svg") center/cover no-repeat;
  filter: saturate(0.7);
  z-index: 0;
}
.col-right .court-dim {
  position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 50% 40%, transparent 0%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}

.versus-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
}
.court-pill {
  background: rgba(255,255,255,0.96);
  color: var(--ink);
  font-family: var(--font);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px -10px rgba(0,0,0,0.6);
}
.bell {
  background: rgba(255,255,255,0.96);
  color: var(--ink);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 18px -10px rgba(0,0,0,0.6);
}

.versus-body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 28px 28px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.versus-body::-webkit-scrollbar { display: none; }
.versus-empty {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  text-align: center;
  margin: auto;
}

.versus-meta-top {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.versus-meta-top .pill {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 4px 10px;
}

.duel {
  position: relative;
  margin: 28px 0 18px;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.duel-photos {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 46%;
  z-index: 0;
  pointer-events: none;
}
.duel-photos.left { left: 0; }
.duel-photos.right { right: 0; }
.duel-photos .player-photo {
  position: absolute;
  width: 55%;
  border-radius: 0;
  background-color: transparent;
  background-position: center top;
  background-size: 100%;
  background-repeat: no-repeat;
  filter: grayscale(1) contrast(1.1);
  border: none;
  box-shadow: none;
}
.duel-photos.left .player-photo {
  -webkit-mask-image:
    linear-gradient(to right, transparent, black 25%),
    linear-gradient(to top, transparent, black 15%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, black 25%),
    linear-gradient(to top, transparent, black 15%);
  mask-composite: intersect;
}
.duel-photos.left .player-photo:nth-child(1) {
  top: 0;
  bottom: 35%;
  left: 0;
  z-index: 1;
}
.duel-photos.left .player-photo:nth-child(2) {
  top: 35%;
  bottom: 0;
  left: 40%;
  z-index: 2;
}
.duel-photos.right .player-photo {
  transform: scaleX(-1);
  -webkit-mask-image:
    linear-gradient(to right, transparent, black 25%),
    linear-gradient(to top, transparent, black 15%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, black 25%),
    linear-gradient(to top, transparent, black 15%);
  mask-composite: intersect;
}
.duel-photos.right .player-photo:nth-child(1) {
  top: 0;
  bottom: 35%;
  right: 0;
  z-index: 1;
}
.duel-photos.right .player-photo:nth-child(2) {
  top: 35%;
  bottom: 0;
  right: 40%;
  z-index: 2;
}

.duel-center {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -28px;
  right: -28px;
  z-index: 1;
  pointer-events: none;
}
.duel-center .team-info {
  position: absolute;
  top: 28%;
  text-align: center;
  transform: translateX(-50%);
}
.duel-center .team-info:first-child { left: 25%; }
.duel-center .team-info:last-child { left: 75%; }
.duel-center .team-info .team-tag {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.05;
}
.duel-center .team-info .team-rec {
  color: rgba(255,255,255,0.6);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  margin-top: 6px;
  text-transform: uppercase;
}

.duel-center .vs-mark {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 130px;
}
.duel-center .vs-mark::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--lime), transparent);
  transform: rotate(20deg);
  transform-origin: center;
}
.duel-center .vs-mark .v,
.duel-center .vs-mark .s {
  position: absolute;
  font-family: var(--display);
  font-weight: 500;
  font-size: 84px;
  line-height: 0.85;
  color: #fff;
  text-shadow: 0 6px 24px rgba(0,0,0,0.6);
  letter-spacing: 0;
  background: linear-gradient(180deg, #fff 0%, #d4f06b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.duel-center .vs-mark .v { top: 0; left: 4px; }
.duel-center .vs-mark .s { bottom: 0; right: 4px; }

.odds-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.odds-row .odd {
  text-align: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 8px 10px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  color: #fff;
}
.odds-row .odd small {
  display: block;
  font-family: var(--font);
  font-weight: 600;
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.odds-row .odd.is-selected {
  background: var(--lime);
  color: var(--dark);
  border-color: var(--lime);
}
.odds-row .odd.is-selected small { color: rgba(0,60,60,0.7); }
.odds-row .odd:hover { border-color: rgba(230,250,80,0.6); }
.odds-row .vs-sep { color: rgba(255,255,255,0.4); font-size: 12px; }

.bet-form {
  margin-top: 14px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 14px;
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bet-quick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.bet-quick-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: rgba(255,255,255,0.85);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.bet-quick-btn:hover {
  background: rgba(230,250,80,0.15);
  border-color: var(--lime);
  color: #fff;
}
.bet-row { display: flex; align-items: center; gap: 10px; }
.bet-row label { font-size: 11.5px; color: rgba(255,255,255,0.7); letter-spacing: 0.04em; }
.bet-amount {
  flex: 1;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 6px 10px;
}
.bet-amount input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; font-size: 15px; font-weight: 600; min-width: 0;
}
.bet-amount .suffix { color: rgba(255,255,255,0.5); font-size: 12px; letter-spacing: 0.06em; }
.bet-btn {
  background: var(--lime);
  color: var(--dark);
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.bet-btn:disabled { background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.4); cursor: not-allowed; }
.bet-summary {
  display: flex; gap: 6px 14px; align-items: center; flex-wrap: wrap;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
}
.bet-summary b { color: #fff; font-weight: 700; }
.bet-summary .bs-item:not(:last-child)::after {
  content: "·";
  margin-left: 14px;
  color: rgba(255,255,255,0.4);
}
.bet-existing {
  border-top: 1px dashed rgba(255,255,255,0.16);
  padding-top: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
}
.bet-existing .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bet-tag {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10.5px;
  font-weight: 700;
}
.bet-tag.won { color: #aef0a4; }
.bet-tag.lost { color: #f0a4a4; }
.bet-tag.pending { color: rgba(255,255,255,0.7); }

.versus-foot {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 12px;
}
.chip {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

/* ===== Account view ====================================================== */

.account-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.account-view .panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.account-view h3 {
  font-family: var(--display); font-size: 18px; margin: 0 0 10px;
}
.team-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.team-name-input {
  flex: 1;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
}
.team-name-input:focus {
  border-color: var(--dark);
}
.bet-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bet-table th, .bet-table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.bet-table thead th {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.bet-table tbody tr:last-child td { border-bottom: none; }
.bet-status { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.bet-status.pending { background: #eef3f3; color: var(--muted); }
.bet-status.won { background: #e4f4e5; color: #2f7d32; }
.bet-status.lost { background: #fbe5e3; color: #b3261e; }

/* ===== Toast ============================================================= */

.toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,0.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #b3261e; }
.toast.ok { background: #2f7d32; }

/* ===== Responsive ======================================================== */

@media (max-width: 1440px) {
  .card { grid-template-columns: 240px minmax(0, 1fr) minmax(0, 1fr); }
  .duel { min-height: 420px; }
  .duel-photos { width: 52%; }
  .duel-photos .player-photo { width: 82%; }
  .duel-photos.left .player-photo:nth-child(1) { left: -18%; }
  .duel-photos.left .player-photo:nth-child(2) { left: 24%; }
  .duel-photos.right .player-photo:nth-child(1) { right: -18%; }
  .duel-photos.right .player-photo:nth-child(2) { right: 24%; }
  .duel-photos.left .player-photo,
  .duel-photos.right .player-photo {
    -webkit-mask-image:
      linear-gradient(to right, transparent, black 25%),
      linear-gradient(to top, transparent, black 35%);
    mask-image:
      linear-gradient(to right, transparent, black 25%),
      linear-gradient(to top, transparent, black 35%);
  }
  .duel-center .vs-mark { width: 60px; height: 80px; }
  .duel-center .vs-mark .v, .duel-center .vs-mark .s { font-size: 50px; }
  .duel-center .team-info { top: 4%; }
  .duel-center .team-info:first-child { left: 38%; }
  .duel-center .team-info:last-child { left: 62%; }
  .duel-center .team-info .team-tag { font-size: 16px; }
  .duel-center .team-info .team-rec { font-size: 10px; }
}

@media (max-width: 1180px) {
  .card { grid-template-columns: 220px 1fr; grid-template-rows: auto auto; }
  .col-right {
    grid-column: 1 / -1;
    min-height: 540px;
    margin: 0 20px 20px;
    position: static;
    height: auto;
  }
  .col-left { position: static; height: auto; }
}
.versus-close { display: none; }

@media (max-width: 720px), (max-width: 1024px) and (orientation: portrait) {
  .stage { padding: 0; }
  .card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  /* Left column collapses to a slim top header (brand + me chip) */
  .col-left {
    position: static;
    height: auto;
    padding: 14px 18px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
  }
  .col-left .menu { display: none; }
  .col-left .col-left-foot { display: none; }
  .brand { cursor: pointer; gap: 10px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 20px; }
  .brand-sub { display: none; }
  .me-left {
    margin-top: 0;
    width: auto;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
  }
  .me-left .me-photo { width: 30px; height: 30px; }
  .me-left .me-name { font-size: 12px; }
  .me-left .me-balance { font-size: 15px; }

  /* Middle column = main view; pill row removed */
  .col-mid {
    border-left: none;
    border-right: none;
    padding: 20px 18px 28px;
    gap: 20px;
    min-width: 0;
  }
  .mid-header { display: none; }
  .hero-title { font-size: 30px; margin-top: 4px; }
  .hero-lede { font-size: 13.5px; }
  .ranking-wrap { overflow-x: auto; }

  /* Right column = hidden full-screen overlay; revealed when a match is open */
  .col-right {
    grid-column: 1 / -1;
    position: fixed;
    inset: 0;
    margin: 0;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    border-radius: 0;
    z-index: 100;
    display: flex;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity 0.22s ease-out, transform 0.22s ease-out;
  }
  body.is-versus-open { overflow: hidden; }
  body.is-versus-open .col-right {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* Close X — pseudo-element strokes for guaranteed symmetric centering */
  .versus-close {
    display: block;
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    border: none;
    font-size: 0;
    cursor: pointer;
    box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.6);
  }
  .versus-close::before,
  .versus-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
  }
  .versus-close::before { transform: translate(-50%, -50%) rotate(45deg); }
  .versus-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
  .versus-body { padding: 24px 24px 28px; }
  .versus-meta-top { padding-right: 60px; }
  .versus-meta-top .pill { display: none; }
  .bet-summary { flex-direction: column; align-items: flex-start; gap: 4px; }
  .bet-summary .bs-item:not(:last-child)::after { display: none; }

  /* Mobile-specific duel sizing inside the overlay */
  .duel-photos { width: 54%; }
  .duel-photos .player-photo { width: 88%; }
  .duel-photos.left .player-photo:nth-child(1) { left: -16%; bottom: 50%; }
  .duel-photos.left .player-photo:nth-child(2) { left: 14%; top: 48%; }
  .duel-photos.right .player-photo:nth-child(1) { right: -16%; bottom: 50%; }
  .duel-photos.right .player-photo:nth-child(2) { right: 14%; top: 48%; }
  .duel-center .vs-mark { width: 80px; height: 90px; }
  .duel-center .vs-mark .v, .duel-center .vs-mark .s { font-size: 56px; }
  .duel-center .team-info {
    top: 0;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
  }
  .duel-center .team-info:first-child { left: 30%; }
  .duel-center .team-info:last-child { left: 70%; }
  .duel-center .team-info .team-tag { font-size: 18px; }
  .duel-center .team-info .team-rec { font-size: 10px; }
}
