
:root{
  --bg:#0b1020;
  --surface:#111b3a;
  --surface2:#0e1733;
  --line:rgba(255,255,255,.08);
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.62);
  --accent:#22d3ee;
  --gold:#d4af37;
  --btn:#131d3c;
  --btnHover:#17224a;
  --radius:16px;
  --shadow:0 12px 30px rgba(0,0,0,.35);

  /* condensed layout widths */
  --leftW: 410px;
  --rightW: 440px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Helvetica Neue",Arial,sans-serif;
  background:
    radial-gradient(1200px 700px at 70% 10%, rgba(34,211,238,.12), transparent 60%),
    radial-gradient(900px 600px at 25% 25%, rgba(212,175,55,.10), transparent 55%),
    var(--bg);
  overflow:hidden;
}

.shell{
  height:100vh;
  display:flex;
  flex-direction:column;
  padding:14px;
  gap:12px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.01));
  box-shadow:var(--shadow);
}

.brand{display:flex;align-items:center;gap:10px}
.dot{width:10px;height:10px;border-radius:999px;background:var(--accent);box-shadow:0 0 0 4px rgba(34,211,238,.14)}
.brandTitle{font-weight:950;letter-spacing:-.02em}
.brandSub{font-size:12px;color:var(--muted);margin-top:2px}
.topActions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

.layout{
  flex:1;
  min-height:0;
  display:grid;
  grid-template-columns: var(--leftW) minmax(560px, 1fr) var(--rightW);
  gap:12px;
}

.left,.center,.right{min-height:0}

.card{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:linear-gradient(180deg,rgba(255,255,255,.03),transparent 55%),var(--surface);
  box-shadow:var(--shadow);
  padding:12px;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.panelCard{
  height:100%;
  overflow:auto;
  padding-right:10px;
}

.stageCard{height:100%}
.cardHead{display:flex;align-items:center;justify-content:space-between;gap:10px}
h2{
  margin:0;
  font-size:12px;
  letter-spacing:.10em;
  text-transform:uppercase;
  color:rgba(234,240,255,.88)
}
h3{
  margin:0;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(234,240,255,.80)
}
.muted{font-size:12px;color:var(--muted)}
.row{display:flex;gap:10px;align-items:center}
.between{justify-content:space-between}

.pill{
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
  display:flex;
  gap:8px;
  align-items:center;
  background:rgba(255,255,255,.03);
}
.pill.toggle{cursor:pointer;user-select:none}
.pill.toggle input{margin:0;accent-color:var(--accent)}
.pill.soft{background:rgba(255,255,255,.02)}

.btn{
  background:linear-gradient(180deg,rgba(255,255,255,.06),transparent 60%),var(--btn);
  color:var(--text);
  border:1px solid var(--line);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-size:13px;
  font-weight:800;
  letter-spacing:.01em;
  transition:transform .08s ease, background .15s ease, border .15s ease;
  white-space:nowrap;
}
.btn:hover{background:linear-gradient(180deg,rgba(255,255,255,.08),transparent 60%),var(--btnHover)}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btnPrimary{border-color:rgba(34,211,238,.35);box-shadow:0 0 0 1px rgba(34,211,238,.10) inset}
.btnPrimary:hover{border-color:rgba(34,211,238,.55)}

input[type="text"],input[type="number"]{
  padding:10px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--surface2);
  color:var(--text);
  outline:none;
}
input[type="text"]{flex:1}
input:focus{
  border-color:rgba(34,211,238,.55);
  box-shadow:0 0 0 3px rgba(34,211,238,.12)
}

.divider{height:1px;background:rgba(255,255,255,.08);margin:6px 0}
.note{margin:0;color:var(--muted);font-size:12px}
.note.small{font-size:11.5px;line-height:1.35}

.sectionHead{display:flex;align-items:baseline;justify-content:space-between;gap:10px}

/* Slot buttons + managers */
.slotButtons{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:8px;
}
.slotButtons button{
  all:unset;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
}
.slotButtons button:hover{border-color:rgba(34,211,238,.25);background:rgba(34,211,238,.05)}
.slotButtons button.active{border-color:rgba(34,211,238,.55);box-shadow:0 0 0 3px rgba(34,211,238,.12)}
.slotButtons .slotLbl{font-weight:950;font-size:12px}
.slotButtons .slotTeam{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px}

.managerList{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:260px;
  overflow:auto;
  padding-right:6px;
}
.managerList .mgr{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.02);
  cursor:pointer;
}
.managerList .mgr:hover{border-color:rgba(34,211,238,.25);background:rgba(34,211,238,.05)}
.managerList img{width:26px;height:26px;border-radius:10px;display:block}

/* Team inputs */
.inputs{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:320px;
  overflow:auto;
  padding-right:6px;
}
.inputs .teamRow{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.02);
}
.inputs .seed{width:84px;font-weight:950;font-size:12px;color:rgba(234,240,255,.82)}
.inputs .teamInput{width:100%}

/* Odds / Draft tables */
.tableWrap{
  border:1px solid var(--line);
  border-radius:14px;
  overflow:auto;
  background:rgba(255,255,255,.02);
  min-height:0;
}
table{width:100%;border-collapse:collapse}
th,td{padding:10px 10px;border-bottom:1px solid rgba(255,255,255,.06);font-size:12px}
th{
  color:rgba(234,240,255,.85);
  text-align:left;
  background:rgba(0,0,0,.18);
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:11px
}
.odds td:nth-child(2),.odds td:nth-child(3),.odds th:nth-child(2),.odds th:nth-child(3){text-align:center}
tbody tr:hover{background:rgba(34,211,238,.06)}

.draftOrder{
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:auto;
  min-height:260px;
  padding-right:4px;
}
.draftEmpty{color:rgba(234,240,255,.55);font-size:12px;padding:10px}
.pickRow{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03)
}
.pickRow.known{border-color:rgba(34,211,238,.22);background:rgba(34,211,238,.06)}
.pickNum{
  width:36px;height:28px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  font-weight:1000;font-size:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
  flex:0 0 auto;
}
.pickRow.top1 .pickNum{border-color:rgba(212,175,55,.55);box-shadow:0 0 0 3px rgba(212,175,55,.10)}
.pickTeam{font-weight:950;font-size:13px}
.pickMeta{margin-left:auto;color:rgba(234,240,255,.55);font-size:12px}

/* Stage */
.stageHead{display:flex;align-items:center;justify-content:space-between;gap:10px}
.stageTitle{font-weight:1000;letter-spacing:-.02em}
.stageSub{font-size:12px;color:var(--muted);margin-top:4px}
.stageWrap{
  flex:1;
  min-height:0;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.07);
  background:rgba(0,0,0,.10);
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
canvas{width:100%;height:100%;display:block}

/* Collapsible reveal log */
.collapse{
  margin-top:10px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(255,255,255,.02);
  padding:10px 10px;
}
.collapse summary{
  cursor:pointer;
  font-weight:900;
  color:rgba(234,240,255,.85);
}
.results{
  margin:10px 0 0 0;
  padding-left:18px;
  font-size:13px;
  overflow:auto;
  max-height:220px;
  padding-right:6px;
}

/* Mobile: stack */
@media (max-width: 980px){
  body{overflow:auto}
  .shell{padding:10px;gap:10px}
  .topbar{position:sticky;top:0;z-index:20;backdrop-filter:blur(10px);flex-wrap:wrap}
  .layout{grid-template-columns:1fr;gap:10px}
  .panelCard{height:auto;max-height:none}
  .stageWrap{height:380px}
}
