/* Gridiron Vault — dark, playful theme */

* { box-sizing: border-box; }

:root {
  --bg: #0e1016;
  --bg-alt: #14171f;
  --panel: #1a1e29;
  --panel-2: #20242f;
  --ink: #f2f3f7;
  --muted: #8d93a6;
  --line: #2a2f3d;
  --line-bright: #3a4055;
  --accent: #4fd6c8;
  --accent-2: #ff9f43;
  --up: #4ade80;
  --down: #f87171;

  --bronze: #cd7f32;
  --silver: #c8ccd6;
  --gold: #ffd54a;
  --platinum: #8fe3ff;
  --diamond: #d78bff;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

.mono, .money, .ticker-balance, table td.num, table th.num {
  font-family: "SFMono-Regular", "Courier New", Courier, monospace;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-wide { max-width: 1520px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.wordmark {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--ink);
}
.wordmark span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wordmark:hover { text-decoration: none; }

.main-nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
}
.main-nav a:hover { opacity: 1; color: var(--accent); text-decoration: none; }
.main-nav a.nav-cta {
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 6px 14px;
  color: var(--accent);
  opacity: 1;
}
.main-nav a.nav-cta:hover { background: var(--accent); color: #06110f; text-decoration: none; }

.header-right { display: flex; align-items: center; gap: 14px; }
.ticker-balance {
  font-weight: 700;
  font-size: 15px;
  border-radius: 8px;
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid var(--line-bright);
  color: var(--up);
}
.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { color: var(--ink); }
.inline-form { display: inline; }

/* Layout blocks */
.page { padding: 32px 0 60px; }
.page-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 6px;
}
.page-subtitle { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.panel h2, .panel h3 { margin-top: 0; }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
@media (max-width: 800px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
table th {
  text-align: left;
  border-bottom: 1px solid var(--line-bright);
  padding: 8px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}
table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
}
table tr:hover td { background: var(--panel-2); }
td.num, th.num { text-align: right; }
.up { color: var(--up); }
.down { color: var(--down); }

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  background: linear-gradient(135deg, var(--accent), #35a89c);
  color: #06110f;
  border-radius: 9px;
  padding: 10px 20px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-bright);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; margin-bottom: 5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-bright);
  font-family: inherit;
  font-size: 14px;
  background: var(--bg-alt);
  color: var(--ink);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.form-narrow { max-width: 400px; }

/* Flash messages */
.flash { padding: 11px 16px; margin: 16px 0; border-radius: 10px; font-size: 14px; border: 1px solid; }
.flash-error { border-color: var(--down); background: rgba(248, 113, 113, 0.12); color: var(--down); }
.flash-success { border-color: var(--up); background: rgba(74, 222, 128, 0.12); color: var(--up); }

/* Rarity badges */
.badge {
  display: inline-block;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 999px;
  border: 1px solid;
  font-family: "SFMono-Regular", "Courier New", monospace;
}
.badge-bronze { color: var(--bronze); border-color: var(--bronze); background: rgba(205, 127, 50, 0.12); }
.badge-silver { color: var(--silver); border-color: var(--silver); background: rgba(200, 204, 214, 0.1); }
.badge-gold { color: var(--gold); border-color: var(--gold); background: rgba(255, 213, 74, 0.12); }
.badge-platinum { color: var(--platinum); border-color: var(--platinum); background: rgba(143, 227, 255, 0.12); }
.badge-diamond { color: var(--diamond); border-color: var(--diamond); background: rgba(215, 139, 255, 0.14); }

/* Card tiles */
.card-tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  transition: transform 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
}
.rookie-tag {
  position: absolute;
  top: 10px;
  right: -28px;
  transform: rotate(40deg);
  background: linear-gradient(135deg, var(--accent-2), #e8871f);
  color: #1a1000;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 34px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.pool-card { position: relative; overflow: hidden; }
.pool-card .rookie-tag { top: 6px; right: -22px; font-size: 8px; padding: 2px 26px; }
.card-tile:hover { transform: translateY(-2px); }
.card-tile.tier-bronze { border: 4px solid var(--bronze); box-shadow: 0 0 16px -4px var(--bronze); }
.card-tile.tier-silver { border: 4px solid var(--silver); box-shadow: 0 0 16px -4px var(--silver); }
.card-tile.tier-gold { border: 4px solid var(--gold); box-shadow: 0 0 18px -3px var(--gold); }
.card-tile.tier-platinum { border: 4px solid var(--platinum); box-shadow: 0 0 20px -2px var(--platinum); }
.card-tile.tier-diamond { border: 4px solid var(--diamond); box-shadow: 0 0 24px -1px var(--diamond); }
.pool-card.tier-bronze { border: 1.5px solid var(--bronze); box-shadow: 0 0 14px -4px var(--bronze); }
.pool-card.tier-silver { border: 1.5px solid var(--silver); box-shadow: 0 0 14px -4px var(--silver); }
.pool-card.tier-gold { border: 1.5px solid var(--gold); box-shadow: 0 0 16px -3px var(--gold); }
.pool-card.tier-platinum { border: 1.5px solid var(--platinum); box-shadow: 0 0 18px -2px var(--platinum); }
.pool-card.tier-diamond { border: 1.5px solid var(--diamond); box-shadow: 0 0 22px -1px var(--diamond); }
.card-tile:hover.tier-bronze { box-shadow: 0 0 22px -2px var(--bronze); }
.card-tile:hover.tier-silver { box-shadow: 0 0 22px -2px var(--silver); }
.card-tile:hover.tier-gold { box-shadow: 0 0 24px -1px var(--gold); }
.card-tile:hover.tier-platinum { box-shadow: 0 0 26px 0 var(--platinum); }
.card-tile:hover.tier-diamond { box-shadow: 0 0 30px 2px var(--diamond); }
.card-tile > .badge { font-size: 13px; padding: 5px 12px; }
.card-avatar { width: 108px; margin: 10px auto 6px; }
.card-avatar .player-avatar { width: 100%; height: auto; display: block; }
.card-tile .name { font-weight: 800; font-size: 20px; margin-top: 10px; text-align: center; line-height: 1.2; }
.card-tile .meta { font-size: 14px; color: var(--muted); margin: 6px 0 12px; text-align: center; }
.pos-tag {
  display: inline-block;
  font-weight: 800;
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 0.5px;
}
.card-tile .stat-row { display: flex; justify-content: space-between; font-size: 13px; margin-top: 6px; color: var(--muted); }
.card-tile .stat-row strong { color: var(--ink); }

/* Foil pack tiles — the unopened pack itself, styled as a sealed foil pack
   (tier-gradient, diagonal shine) but sized and shaped exactly like the
   real player cards elsewhere in the app (same landscape footprint,
   min-height, and corner radius as .card-tile.has-photo) so packs and
   cards read as the same "physical object" in the grid. No price or card
   count printed on the face itself -- those live in the caption below,
   near the Buy button. The set name is the dominant large text; the tier
   is a smaller pill underneath it. */
.pack-item { display: flex; flex-direction: column; }
.pack-foil {
  position: relative;
  width: 100%;
  min-height: 184px;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
.pack-foil:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pack-foil.tier-bronze { background: linear-gradient(150deg, #a5672a, #2c1b0c 68%, #cd7f32); }
.pack-foil.tier-silver { background: linear-gradient(150deg, #9199a6, #24262c 68%, #c8ccd6); }
.pack-foil.tier-gold { background: linear-gradient(150deg, #caa421, #332804 68%, #ffd54a); }
.pack-foil.tier-platinum { background: linear-gradient(150deg, #4fa9cf, #0d222b 68%, #8fe3ff); }
.pack-foil.tier-diamond { background: linear-gradient(150deg, #a568d9, #211036 68%, #d78bff); }
.pack-foil-shine {
  position: absolute;
  top: -60%;
  left: -30%;
  width: 55%;
  height: 220%;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 48%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(18deg);
  pointer-events: none;
}
.pack-foil-mid { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pack-foil-set {
  display: block;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.3px;
  line-height: 1.15;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.pack-foil-tier {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 11px;
  border-radius: 999px;
}
.pack-foil-hint {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.pack-info {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-bright);
  background: var(--panel-2);
  font-size: 12.5px;
  color: var(--muted);
}
.pack-caption { font-size: 12px; color: var(--muted); text-align: center; margin: 8px 0 0; }

/* Player-photo cards: landscape layout — name/position upper-left, tier/set
   pills lower-left, photo bled to the right edge (Reignmakers-style). Only
   applies to card tiles that actually show a player photo (`.has-photo`);
   photo-less tiles (packs) keep the original centered vertical layout. */
.card-tile.has-photo {
  display: flex;
  align-items: stretch;
  padding: 0;
  min-height: 184px;
}
.card-tile-info {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px 10px 12px 14px;
}
.card-tile-info .name {
  text-align: left;
  margin-top: 0;
  font-size: 16px;
  line-height: 1.18;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  /* Always reserve exactly 2 lines of height, whether the name needs one
     line or two, so cards with short and long names stay the same height
     in the grid. Anything beyond 2 lines is clipped. */
  height: 2.36em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-tile-info .meta {
  text-align: left;
  margin: 4px 0 0;
  font-size: 12px;
}
.card-tile-stats { margin: 8px 0; }
.card-tile-stats .stat-row { font-size: 11.5px; margin-top: 4px; }
.card-tile-footer { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.card-tile-footer .badge { font-size: 13px; padding: 5px 11px; }
.set-pill {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 999px;
  border: 1px solid var(--line-bright);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
.card-tile-photo {
  flex: 0 0 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(200deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.18));
  border-left: 1px solid var(--line);
  overflow: hidden;
}
.card-tile-photo .card-avatar { width: 118%; margin: 0 -9% 0 0; }
.card-tile-photo .card-avatar .player-avatar { width: 100%; height: auto; display: block; }
.card-tile.has-photo .rookie-tag { top: 8px; right: -30px; }
.card-tile-link { display: block; color: inherit; text-decoration: none; }
.card-tile-link:hover { text-decoration: none; }
.card-tile-link .card-tile:hover { transform: translateY(-2px); }
.market-item-info { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 10px; }
.market-item-info strong { color: var(--ink); }

/* Marketplace "view all listings" page — one big card face (whichever
   listing is currently selected) offset in from the panel edge, an action
   panel to its right, and a clickable serial picker below that swaps both. */
.mp-group-layout { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; margin-left: 14px; }
.mp-group-card { width: 300px; flex-shrink: 0; }
.mp-action-panel { flex: 1 1 280px; min-width: 260px; padding-top: 4px; }
.mp-action-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.mp-action-row strong { color: var(--ink); }
.mp-confirm { display: none; border: 1px solid var(--accent); border-radius: 12px; padding: 16px; margin-top: 16px; background: rgba(79, 214, 200, 0.08); }
.mp-confirm.visible { display: block; }
.mp-serial-list { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; }
.mp-serial-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.mp-serial-row:hover { border-color: var(--line-bright); }
.mp-serial-row.selected { border-color: var(--accent); background: rgba(79, 214, 200, 0.08); }
.mp-serial-row.own { cursor: default; opacity: 0.55; }
.mp-serial-row.own:hover { border-color: var(--line); }
.mp-serial-row.own span:nth-child(2) { color: var(--accent-2); font-weight: 600; }
@media (max-width: 640px) {
  .mp-group-layout { margin-left: 0; }
  .mp-serial-row { grid-template-columns: 1fr 1fr; }
}

/* Collapsible sections (e.g. Game Log) — closed by default via <details>,
   no JS required. Custom marker replaces the default triangle so it matches
   the app's iconography, rotating open via the [open] attribute selector. */
.collapsible-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.collapsible-summary::-webkit-details-marker { display: none; }
.collapsible-summary h2 { margin: 0; }
.collapsible-summary::before {
  content: "▸";
  color: var(--accent);
  font-size: 16px;
  transition: transform 0.15s ease;
}
details[open] > .collapsible-summary::before { transform: rotate(90deg); }
.collapsible-hint { font-size: 12px; color: var(--muted); font-weight: 500; }
.collapsible-body { margin-top: 14px; }

/* Card detail page — the card itself stays exactly the same size it is
   everywhere else (Vault grid, Marketplace, pack reveal); it does not get
   blown up just because it's the only card on the page. */
.card-detail-layout { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.card-detail-hero { flex: 0 0 310px; max-width: 310px; }
.card-detail-sell { flex: 0 0 260px; max-width: 260px; margin-bottom: 0; }

/* Pack reveal page — cards start face-down, tier auto-reveals one by one,
   then the player taps each card (or hits Skip) to reveal full identity. */
.reveal-grid { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin: 28px 0; }
.reveal-slot { position: relative; width: 310px; max-width: 100%; min-height: 184px; }
.reveal-face, .reveal-tier-face, .reveal-identity { display: none; }
.reveal-slot[data-stage="hidden"] .reveal-face { display: flex; }
.reveal-slot[data-stage="tier"] .reveal-tier-face { display: flex; }
.reveal-slot[data-stage="identity"] .reveal-identity { display: block; }

.reveal-face {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  min-height: 184px;
  border-radius: 16px;
  border: 1px solid var(--line-bright);
  background: linear-gradient(150deg, #23262f, #101116 70%, #2c303b);
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  animation: revealPulse 1.8s ease-in-out infinite;
}
.reveal-face .reveal-mark { font-size: 34px; font-weight: 900; color: var(--accent); opacity: 0.65; letter-spacing: 1px; }
.reveal-face .reveal-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
@keyframes revealPulse {
  0%, 100% { box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.6); }
  50% { box-shadow: 0 10px 34px -6px rgba(255, 255, 255, 0.1); }
}

.reveal-tier-face {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  min-height: 184px;
  border-radius: 16px;
  border: 4px solid var(--line);
  cursor: pointer;
  animation: cardFlipIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal-tier-face.tier-bronze { border-color: var(--bronze); background: linear-gradient(150deg, rgba(205, 127, 50, 0.18), var(--panel)); box-shadow: 0 0 18px -4px var(--bronze); }
.reveal-tier-face.tier-silver { border-color: var(--silver); background: linear-gradient(150deg, rgba(200, 204, 214, 0.16), var(--panel)); box-shadow: 0 0 18px -4px var(--silver); }
.reveal-tier-face.tier-gold { border-color: var(--gold); background: linear-gradient(150deg, rgba(255, 213, 74, 0.18), var(--panel)); box-shadow: 0 0 20px -3px var(--gold); }
.reveal-tier-face.tier-platinum { border-color: var(--platinum); background: linear-gradient(150deg, rgba(143, 227, 255, 0.18), var(--panel)); box-shadow: 0 0 22px -2px var(--platinum); }
.reveal-tier-face.tier-diamond { border-color: var(--diamond); background: linear-gradient(150deg, rgba(215, 139, 255, 0.2), var(--panel)); box-shadow: 0 0 26px -1px var(--diamond); }
.reveal-tier-face.tier-diamond, .reveal-tier-face.tier-platinum {
  animation: cardFlipIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), glowPulse 1.6s ease-in-out 0.5s 2;
}
.reveal-tier-face .reveal-tier-label { font-size: 22px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.reveal-tier-face .reveal-tap { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

.reveal-identity { animation: cardFlipIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.reveal-identity .card-tile { cursor: default; }
.reveal-identity .card-tile:hover { transform: none; }

@keyframes cardFlipIn {
  0% { opacity: 0; transform: scale(0.75) rotateY(90deg); }
  60% { opacity: 1; transform: scale(1.04) rotateY(0deg); }
  100% { opacity: 1; transform: scale(1) rotateY(0deg); }
}
@keyframes glowPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

.reveal-actions { display: flex; justify-content: center; gap: 12px; margin: 10px 0 30px; }

/* Contest list */
.contest-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
  background: var(--panel);
}
.contest-row:hover { border-color: var(--line-bright); }
.contest-name { font-weight: 700; font-size: 16px; }
.contest-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.status-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 1px solid; }
.status-open { color: var(--up); border-color: var(--up); background: rgba(74, 222, 128, 0.1); }
.status-completed { color: var(--muted); border-color: var(--line-bright); }

/* Slate cards — a whole slate (Classic week or one Showdown game) grouped
   into a single card: header with title + game list + live countdown, body
   with one compact contest-row per tier available on that slate. */
.slate-card {
  border: 1px solid var(--line-bright);
  border-radius: 16px;
  background: var(--panel-2);
  margin-bottom: 24px;
  overflow: hidden;
}
.slate-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(79, 214, 200, 0.08), transparent 60%);
  flex-wrap: wrap;
}
.slate-card-title {
  font-size: 18px;
  font-weight: 800;
}
.slate-card-subtitle {
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  margin-left: 8px;
}
.slate-card-games {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.game-chip {
  font-size: 11.5px;
  font-family: "SFMono-Regular", "Courier New", monospace;
  color: var(--muted);
  border: 1px solid var(--line-bright);
  background: var(--bg-alt);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.slate-countdown {
  flex-shrink: 0;
  font-family: "SFMono-Regular", "Courier New", monospace;
  font-weight: 800;
  font-size: 13px;
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
  background: rgba(255, 159, 67, 0.1);
  border-radius: 10px;
  padding: 8px 14px;
  text-align: center;
  white-space: nowrap;
}
.slate-countdown.locked { color: var(--muted); border-color: var(--line-bright); background: transparent; }
.slate-card-body { padding: 16px 20px 20px; }
.slate-card-body .contest-row { background: var(--panel); }
.slate-card-body .contest-row:last-child { margin-bottom: 0; }

/* Lineup builder */
.slot-row { display: grid; grid-template-columns: 90px 1fr 120px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.slot-label { font-weight: 700; font-family: "SFMono-Regular", monospace; color: var(--accent); }
.salary-tracker { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 14px; padding: 14px 0 0; border-top: 1px solid var(--line-bright); margin-top: 10px; }
.salary-tracker.over .cap-used { color: var(--down); font-weight: bold; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 20px 0 30px;
  color: var(--muted);
  font-size: 12px;
}

.rank-1 { font-weight: 800; color: var(--gold); }
.rank-cell { font-family: "SFMono-Regular", monospace; }
.you-row td { background: rgba(79, 214, 200, 0.06); }

.hero {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  background: radial-gradient(circle at top, var(--panel-2), var(--bg-alt));
  margin-bottom: 24px;
}
.hero h1 { font-size: 30px; font-weight: 800; margin: 0 0 10px; }
.hero p { color: var(--muted); max-width: 520px; margin: 0 auto 20px; }
.hero .btn, .hero .btn-outline { margin: 4px; }

/* Position-list-left, card-picker-right lineup builder */
.builder-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 1000px) {
  .builder-layout { grid-template-columns: 1fr; }
}

.builder-slots { display: flex; flex-direction: column; gap: 14px; }

/* Each slot is sized/shaped exactly like a real card-tile (has-photo,
   min-height 184px) whether it's empty or filled. When filled, the
   .card-tile.has-photo.tier-X classes (see "Card tiles" above) take over
   border/glow/layout entirely — .slot-card itself only adds the dashed
   empty-state look and interaction affordances (hover, active, locked). */
.slot-card {
  position: relative;
  cursor: pointer;
  min-height: 184px;
  border-radius: 16px;
  user-select: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.slot-card:not(.filled) {
  border: 2px dashed var(--line-bright);
  background: var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.slot-card:not(.filled):hover { border-color: var(--accent); }
.slot-card.active { box-shadow: 0 0 0 3px rgba(79, 214, 200, 0.3); }
.slot-card.locked:not(.filled) { cursor: default; opacity: 0.75; border-style: solid; border-color: var(--line-bright); background: var(--bg-alt); }
.slot-card.locked:not(.filled):hover { border-color: var(--line-bright); }
.slot-card.locked.filled { cursor: default; opacity: 0.85; }
.slot-card.filled:hover { transform: none; }

.slot-position-flag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(14, 16, 22, 0.75);
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  padding: 3px 9px;
}
/* Once a slot is filled, the card's own name/meta already says what
   position it plays — the corner flag is only useful on the empty
   placeholder, and otherwise just sits on top of the player's name. */
.slot-card.filled .slot-position-flag { display: none; }
.slot-dynamic { width: 100%; display: flex; }
.slot-card:not(.filled) .slot-dynamic { justify-content: center; }
.slot-placeholder { color: var(--muted); font-size: 13px; text-align: center; }
.slot-status { position: absolute; bottom: 10px; left: 10px; font-size: 11px; color: var(--muted); background: rgba(14, 16, 22, 0.75); padding: 3px 9px; border-radius: 999px; }
.slot-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--line-bright);
  background: rgba(14, 16, 22, 0.75);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slot-clear:hover { color: var(--down); border-color: var(--down); }
.slot-card.shake { animation: shakeSlot 0.3s ease; }
@keyframes shakeSlot {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Right-hand card picker — a scrollable field of real, full-size card tiles
   (not a text list), filtered down to whichever position is selected on the
   left. Reuses .card-tile.has-photo.tier-X entirely for how each card looks;
   .picker-card only adds the grid placement + click/selected affordances. */
.builder-picker {
  border: 1px solid var(--line-bright);
  border-radius: 14px;
  background: var(--panel-2);
  padding: 16px;
  max-height: 760px;
  display: flex;
  flex-direction: column;
}
.builder-picker-header { display: flex; flex-direction: column; gap: 10px; }
.builder-picker-header h3 { margin: 0; font-size: 16px; }
.builder-picker-header input[type="search"] {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-bright);
  font-family: inherit;
  font-size: 13px;
  background: var(--bg-alt);
  color: var(--ink);
}
.builder-picker-header input[type="search"]:focus { outline: none; border-color: var(--accent); }
.builder-picker-count { font-size: 11.5px; color: var(--muted); margin: 10px 0 8px; text-transform: uppercase; letter-spacing: 0.4px; }
.builder-picker-list {
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding-right: 4px;
  align-content: start;
}

.picker-card { cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.picker-card:hover { transform: translateY(-2px); }
.picker-card.selected { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Score Center */
.score-center-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .score-center-layout { grid-template-columns: 1fr; }
}
.sc-lineup-switcher { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sc-lineup-switcher a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-bright);
  color: var(--ink);
  font-size: 13px;
}
.sc-lineup-switcher a.active { border-color: var(--accent); color: var(--accent); background: rgba(79, 214, 200, 0.08); }
.sc-lineup-switcher a:hover { text-decoration: none; border-color: var(--accent); }
.sc-leaderboard-panel { position: sticky; top: 16px; }
.sc-leaderboard-panel table { font-size: 13px; }
.sc-lb-row { cursor: pointer; }
.sc-lb-row.selected td { background: rgba(79, 214, 200, 0.1); }
.sc-lb-row a { color: var(--ink); }
.sc-lb-row a:hover { color: var(--accent); text-decoration: none; }
.sc-you-tag { font-size: 10px; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }

/* Score Center header bar — bold name/rank/prize/score strip, DFS-site style */
.sc-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: linear-gradient(160deg, var(--panel-2), var(--bg-alt));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 14px;
}
.sc-header-name { font-size: 22px; font-weight: 800; }
.sc-entry-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  padding: 2px 10px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
}
.sc-header-stats { display: flex; gap: 30px; }
.sc-stat { text-align: left; }
.sc-stat span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.sc-stat strong { font-family: "SFMono-Regular", monospace; font-size: 19px; }
.sc-stat strong.up { color: var(--up); }
.sc-stat-of { font-size: 12px; color: var(--muted); font-weight: normal; }
.sc-stat-tiebreak { cursor: help; }
.sc-stat-tiebreak strong { font-size: 15px; color: var(--muted); }

/* Score Center player rows — full card art on the left, DFS-style
   Game/Scoring/FPTS breakdown filling the rest of the row. */
.sc-rows-panel { padding: 8px 22px; }
.sc-player-row { display: flex; align-items: stretch; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sc-player-row:last-child { border-bottom: none; }
.sc-row-cardtile { flex: 0 0 300px; cursor: default; }
.sc-row-detail { flex: 1 1 320px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.sc-row-col { display: flex; flex-direction: column; gap: 4px; }
.sc-row-draft { flex: 0 0 70px; }
.sc-row-game { flex: 0 0 170px; }
.sc-row-scoring { flex: 1 1 220px; }
.sc-row-scoring strong { font-size: 13px; font-weight: 600; line-height: 1.4; }
.sc-row-fpts { flex: 0 0 90px; align-items: flex-end; text-align: right; }
.sc-row-fpts strong { font-size: 26px; font-weight: 800; color: var(--accent-2); font-family: "SFMono-Regular", monospace; }
.sc-row-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.sc-row-sub { font-size: 12px; color: var(--muted); }

/* My Contests payout bar — one bar per contest, one dot per entry. 1st
   place sits on the RIGHT (matches the paid/neon-green zone, which also
   anchors right); the unpaid zone is bright white so the paid/unpaid split
   reads at a glance regardless of dot color. */
.payout-bar-row td { padding-top: 0; border-bottom: 1px solid var(--line); }
.payout-bar-wrap { display: flex; align-items: center; gap: 12px; padding: 0 0 14px; }
.payout-bar {
  position: relative;
  flex: 1;
  height: 12px;
  border-radius: 999px;
  background: #eef0f6;
}
.payout-bar .paid-zone {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  border-radius: 999px;
  background: #34ff6e;
  box-shadow: 0 0 10px rgba(52, 255, 110, 0.65), inset 0 0 4px rgba(0, 0, 0, 0.15);
}
.payout-bar .marker {
  position: absolute;
  top: 50%;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--bg);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
}
.payout-bar-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
