:root{
  --bg:#0b1020;
  --card:#111a33;
  --text:#e7ecff;
  --muted:#a9b4d6;
  --accent:#6ea8ff;
  --danger:#ff6e6e;
  --ok:#5dffb1;
  --border:rgba(255,255,255,.10);
}

#createLeague option.minor-league {
  display: none;
}


*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 10% 10%, #182450 0%, var(--bg) 60%);
  color:var(--text);
}

a{ color:inherit; text-decoration:none; }
.container{ max-width:1100px; margin:0 auto; padding:20px; }

.nav{
  position:sticky; top:0; z-index:10;
  background: rgba(11,16,32,.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.nav-inner{
  max-width:1100px; margin:0 auto; padding:14px 20px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.brand{ font-weight:800; letter-spacing:.5px; }
.nav-links{ display:flex; gap:14px; flex-wrap:wrap; }
.badge{ padding:3px 10px; border:1px solid var(--border); border-radius:999px; color:var(--muted); font-size:12px; }

.grid{ display:grid; gap:16px; }
.grid-2{ grid-template-columns: 1fr 1fr; }
.grid-3{ grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 900px){
  .grid-2, .grid-3{ grid-template-columns: 1fr; }
}

.card{
  background: rgba(17,26,51,.92);
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.card h2, .card h3{ margin:0 0 10px 0; }
.muted{ color:var(--muted); }

.row{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.spread{ display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }

input, select, button{
  background: rgba(255,255,255,.06);
  border:1px solid var(--border);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  outline:none;
}
select{
  background: rgba(255,255,255,.10);
  color: var(--text);
}

select option{
  background: #0b1020;   /* solid dark background */
  color: #e7ecff;        /* bright text */
}

input::placeholder{ color:rgba(231,236,255,.5); }
button{
  cursor:pointer;
  background: linear-gradient(180deg, rgba(110,168,255,.22), rgba(110,168,255,.12));
  border:1px solid rgba(110,168,255,.35);
}
button:hover{ filter:brightness(1.06); }
button.secondary{
  background: rgba(255,255,255,.06);
  border:1px solid var(--border);
}
button.danger{
  background: rgba(255,110,110,.12);
  border:1px solid rgba(255,110,110,.35);
}

.kpi{
  display:flex; flex-direction:column; gap:6px;
}
.kpi .value{ font-size:26px; font-weight:800; }
.kpi .label{ font-size:12px; color:var(--muted); }

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:14px;
  border:1px solid var(--border);
}
.table th, .table td{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  text-align:left;
  font-size:14px;
}
.table th{ color:var(--muted); font-weight:700; background: rgba(255,255,255,.04); }
.table tr:last-child td{ border-bottom:none; }

.pill{ font-size:12px; padding:3px 10px; border-radius:999px; border:1px solid var(--border); color:var(--muted); }
.pill.ok{ border-color: rgba(93,255,177,.35); color: rgba(93,255,177,.95); }
.pill.danger{ border-color: rgba(255,110,110,.35); color: rgba(255,110,110,.95); }

.footer{ margin-top:26px; color:var(--muted); font-size:12px; }

/* ===== Draft finished modal ===== */

.modal{
  position:fixed;
  inset:0;
  z-index:1000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(920px, 100%);
  max-height: 90vh;       /* was 84vh */
  overflow: auto;
  background: rgba(17,26,51,.96);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  padding: 22px 22px 28px; /* more bottom padding */
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
  color: var(--text);
}

.modal-card h2{
  margin:0 0 6px 0;
  color: var(--text);
}

.modal-card .muted{
  color: rgba(231,236,255,.72);
}

/* Teams grid */
#resultsTeams{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}

@media (max-width: 820px){
  #resultsTeams{ grid-template-columns: 1fr; }
}

/* Team cards */
.modal-card .team-box{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  padding:14px 14px 10px 14px;
}

.modal-card .team-box h3{
  margin:0 0 10px 0;
  font-size:16px;
  font-weight:800;
  color: var(--text);
}

/* Player rows */
.modal-card .team-box .player{
  padding:8px 10px;
  border-radius:12px;
  background: rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.08);
  margin-bottom:8px;
}

.modal-card .team-box .player .pname{
  font-weight:800;
  color: var(--text);
  font-size:14px;
  line-height:1.2;
}

.modal-card .team-box .player .pmeta{
  margin-top:3px;
  font-size:12px;
  color: rgba(231,236,255,.70);
}

/* Modal buttons row */
.modal-card .row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:14px;
}

.modal-card a button,
.modal-card button{
  background: linear-gradient(180deg, rgba(110,168,255,.22), rgba(110,168,255,.12));
  border:1px solid rgba(110,168,255,.35);
  color: var(--text);
  border-radius:12px;
  padding:9px 14px;
}

.modal-card button.secondary{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
}

.modal-card button:hover{
  filter: brightness(1.06);
}

/* ===== Player list rows ===== */
.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  margin-bottom: 3px;
}
.player-row:hover { background: rgba(255,255,255,.05); border-color: var(--border); }
.player-row.selected { background: rgba(110,168,255,.10); border-color: rgba(110,168,255,.35); }
.player-row.picked { opacity: 0.42; cursor: default; }
.player-row .pname { font-weight: 700; font-size: 14px; line-height: 1.2; }
.player-row .pmeta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.player-row .pvalue { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* ===== Scout panel ===== */
.scout-name { font-size: 16px; font-weight: 800; line-height: 1.2; }
.scout-meta { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.scout-value { font-size: 22px; font-weight: 800; color: var(--accent); margin-top: 6px; }
.scout-no-data { color: var(--muted); font-size: 13px; }

.stat-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 11px; color: var(--muted); flex: 1.2; min-width: 0; line-height: 1.3; }
.stat-bar-wrap { flex: 2; height: 6px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.stat-bar { height: 100%; border-radius: 999px; }
.stat-vals { display: flex; gap: 6px; align-items: center; min-width: 32px; justify-content: flex-end; }
.stat-pct { font-size: 12px; font-weight: 800; min-width: 24px; text-align: right; }

/* ===== Team pick cards ===== */
.team-pick {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  margin-bottom: 5px;
}
.team-pick .tpname { font-weight: 700; font-size: 13px; line-height: 1.2; }
.team-pick .tpmeta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.team-pick .tpval { font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; flex-shrink: 0; }
