/* 82-0 NBA — basketball overrides layered on top of the shared 84-0 styles.css */

/* ---------- hardwood theme (scoped to body.nba so other games are untouched) ---------- */
body.nba {
  --bg-1: #2a211a;                       /* warm courtside glow up top */
  --bg-2: #161109;
  --bg-3: #0c0905;                       /* dark hardwood charcoal */
  --hardwood: #c0813f;                   /* parquet accent */
  --accent: #e8743b;                     /* basketball orange */
  --accent-press: #cf5f29;
  --on-accent: #1c0f06;
  --modal-bg: #211812;
  --inset: #211812;
  --reel-1: #2c2014;
  --reel-2: #1a130c;
  --panel: rgba(22, 17, 11, 0.55);
  --line-on-court: rgba(255, 255, 255, 0.10);
  background-image:
    radial-gradient(1200px 760px at 50% -12%, rgba(232, 116, 59, 0.16), rgba(12, 9, 5, 0) 62%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 3px, rgba(255,255,255,0) 3px 26px),
    linear-gradient(180deg, var(--bg-2), var(--bg-3));
}
:root[data-theme="light"] body.nba {
  --bg-1: #f0e4d2;
  --bg-2: #f6efe2;
  --bg-3: #ece0cd;
  --hardwood: #b9802f;
  --accent: #d65f23;
  --accent-press: #b54d18;
  --on-accent: #ffffff;
  --modal-bg: #ffffff;
  --inset: #f5ecdb;
  --reel-1: #f8f1e2;
  --reel-2: #ecdfc7;
  --line-on-court: rgba(120, 80, 30, 0.16);
  background-image:
    radial-gradient(1200px 760px at 50% -12%, rgba(214, 95, 35, 0.26), rgba(236, 224, 205, 0) 62%),
    repeating-linear-gradient(90deg, rgba(150,100,40,0.04) 0 3px, rgba(255,255,255,0) 3px 26px),
    linear-gradient(180deg, var(--bg-2), var(--bg-3));
}

/* ---------- 82-0 palette: basketball orange, no hockey blue ---------- */
body.nba .brand-sub { color: var(--accent); border-color: var(--accent); }
body.nba .brand-dash { color: var(--accent); }
body.nba .accent { color: var(--accent); }
body.nba .r-pos { color: var(--accent); }
body.nba .primary-btn {
  background: linear-gradient(135deg, #f4884f, #cf5f29);
  color: #1c0f06;
  box-shadow: 0 10px 26px rgba(207, 95, 41, 0.4);
}
body.nba .primary-btn:hover { box-shadow: 0 14px 32px rgba(207, 95, 41, 0.5); }
body.nba .mode-card:hover { border-color: var(--accent); box-shadow: 0 10px 26px rgba(207, 95, 41, 0.22); }
body.nba .ghost-btn:hover { border-color: var(--accent); color: var(--accent); }

body.nba .cand-stats { color: var(--accent); }
body.nba .cand-pos {
  background: rgba(46, 32, 20, 0.66);
  border-color: rgba(232, 165, 110, 0.28);
  color: #efe2d6;
}
body.nba .cand-pos.pos-filled { color: #a3927f; }
body.nba .reel { background: linear-gradient(180deg, #2c2014, #1a130c); border-color: rgba(232, 165, 110, 0.18); }
body.nba .reel span { color: #f3ece5; }
:root[data-theme="light"] body.nba .reel { background: linear-gradient(180deg, #f8f1e2, #ecdfc7); border-color: rgba(150, 100, 40, 0.24); }
:root[data-theme="light"] body.nba .reel span { color: #4d340e; }
body.nba .rate-fill.def { background: linear-gradient(90deg, #cf5f29, #f3c08a); }

/* ---------- results: spacing around the court ---------- */
body.nba .results-actions { margin-top: 22px; }
body.nba .results-card { padding-bottom: 30px; }

/* ---------- full-page court markings (faint) ---------- */
.court-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.court-bg .yl { position: absolute; left: 0; right: 0; height: 2px; background: var(--line-on-court); }
.court-bg .yl:nth-child(1) { top: 26%; }
.court-bg .yl:nth-child(2) { top: 52%; }
.court-bg .yl:nth-child(3) { top: 78%; }

/* ---------- title emblem ---------- */
img.nba-emblem {
  display: block;
  width: clamp(170px, 40vw, 248px);
  height: auto;
  margin: 0 auto clamp(8px, 2vh, 16px);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* ---------- results court (starting five on a half-court, hoop at the top) ---------- */
.field {
  position: relative; width: 100%; max-width: 440px; margin: 20px auto 0;
  aspect-ratio: 3 / 4.1; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    /* hardwood planks */
    repeating-linear-gradient(90deg, rgba(0,0,0,0.05) 0 1px, rgba(255,255,255,0) 1px 22px),
    linear-gradient(170deg, #c89150 0%, #b87f3c 55%, #a66f30 100%);
}
/* the painted key (free-throw lane), from the baseline down to the FT line */
.field::before {
  content: ""; position: absolute; left: 50%; top: 0;
  width: 33%; height: 39%; transform: translateX(-50%);
  background: rgba(199, 88, 34, 0.36);
  border: 2px solid rgba(255,255,255,0.9); border-top: none;
  box-sizing: border-box;
}
/* free-throw circle + restricted-area arc + center-court circle */
.field::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    /* free-throw circle, centered on the FT line */
    radial-gradient(circle at 50% 39%, transparent 0 11.5%, rgba(255,255,255,0.88) 11.5% 12.5%, transparent 12.9%),
    /* restricted-area arc just under the rim */
    radial-gradient(circle at 50% 6.5%, transparent 0 6.5%, rgba(255,255,255,0.6) 6.5% 7.4%, transparent 7.8%),
    /* center half-circle at half court (bottom edge) */
    radial-gradient(circle at 50% 100%, transparent 0 13%, rgba(255,255,255,0.72) 13% 13.7%, transparent 14%);
}
/* the big 3-point arc — a large circle clipped by the court, bulging from the rim */
.court-arc {
  position: absolute; left: 50%; top: -40%;
  width: 126%; aspect-ratio: 1; transform: translateX(-50%);
  border: 2.5px solid rgba(255,255,255,0.82); border-radius: 50%;
  pointer-events: none;
}
/* backboard + rim at the top of the key */
.court-rim {
  position: absolute; left: 50%; top: 3.4%; transform: translateX(-50%);
  width: 15%; border-top: 3px solid rgba(255,255,255,0.92);  /* backboard */
  pointer-events: none;
}
.court-rim::after {
  content: ""; position: absolute; left: 50%; top: 4px; transform: translateX(-50%);
  width: 10px; height: 10px; border: 2px solid #f0843e; border-radius: 50%;
  background: rgba(240,132,62,0.30);  /* the rim */
}
.field-player {
  position: absolute; transform: translate(-50%, -50%);
  width: 86px; text-align: center; z-index: 1;
}
.fp-dot {
  width: 36px; height: 36px; margin: 0 auto 4px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,0.9); box-shadow: 0 3px 10px rgba(0,0,0,0.45);
}
.fp-dot span { font-family: "Oswald", sans-serif; font-weight: 700; font-size: 10px; color: #fff; letter-spacing: 0.3px; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.fp-name { font-family: "Inter", sans-serif; font-weight: 700; font-size: 11.5px; color: #fff; line-height: 1.05; text-shadow: 0 1px 3px rgba(0,0,0,0.85); }
.fp-meta { font-size: 9.5px; color: rgba(255,255,255,0.9); margin-top: 1px; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
@media (max-width: 460px) {
  .field-player { width: 70px; }
  .fp-name { font-size: 10.5px; }
  .fp-dot { width: 32px; height: 32px; }
}

/* ---------- 5-slot draft tracker (room for names) ---------- */
body.nba .slot-chip { flex: 0 1 84px; min-width: 64px; }

/* ---------- leaderboard: orange instead of hockey blue ---------- */
body.nba .board-tab.active { background: rgba(232, 116, 59, 0.16); border-color: var(--accent); color: var(--text); }
body.nba .board-name-link:hover { color: var(--accent); }

/* ---------- shared account dropdown menu ---------- */
.account-menu {
  position: absolute; top: 56px; right: 14px; z-index: 60;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.45); padding: 8px; min-width: 190px; text-align: left;
  backdrop-filter: blur(8px);
}
.account-menu[hidden] { display: none; }
.account-menu .am-name { padding: 8px 12px 10px; font-weight: 700; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.account-menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit;
  font: inherit; padding: 9px 12px; border-radius: 9px; cursor: pointer;
}
.account-menu button:hover { background: var(--line); }

/* ---------- signup CTA: orange for 82-0 ---------- */
body.nba .signup-cta { border-color: var(--accent); background: rgba(232, 116, 59, 0.07); }
body.nba .signup-cta:hover { background: rgba(232, 116, 59, 0.14); }
