/* ============================================================
   34-0-0 — styles. Mobile-first; scales up on wider screens.
   Palette: "Stadium Slate" — soft slate-blue, calm green, gold legends.
   ============================================================ */

:root {
  --bg: #1b2230;
  --bg2: #151b27;
  --panel: #232c3d;
  --panel2: #2a3447;
  --panel3: #323d52;
  --line: #3a4660;
  --ink: #eef1f6;
  --muted: #9aa6bd;
  --accent: #2fae6b;     /* calm green */
  --accent2: #36c97c;
  --gold: #f4c430;
  --gold2: #ffd966;
  --win: #36c97c;
  --loss: #e06a5a;
  --shadow: 0 18px 48px rgba(0, 0, 0, .42);
  --radius: 16px;

  /* position colours */
  --pos-GK: #e8b53b;
  --pos-CB: #5b8def;
  --pos-FB: #2bb6a8;
  --pos-CM: #46b06a;
  --pos-WG: #e8923b;
  --pos-ST: #e0596f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background:
    radial-gradient(1100px 560px at 50% -14%, #28344c 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Archivo', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  padding: 22px 14px 60px;
}

.wrap { max-width: 940px; margin: 0 auto; }
.hide { display: none !important; }

/* ---------- Brand ---------- */
header.brand { position: relative; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.langswitch {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  display: flex; gap: 4px; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 10px; padding: 3px;
}
.langbtn {
  background: transparent; color: var(--muted); border: none; font-family: inherit;
  font-weight: 800; font-size: 12px; letter-spacing: .06em; padding: 5px 10px;
  border-radius: 7px; cursor: pointer; transition: background .12s, color .12s;
}
.langbtn:hover { color: var(--ink); }
.langbtn.active { background: var(--accent); color: #04230f; }
.logo {
  font-family: 'Anton', sans-serif;
  font-size: clamp(48px, 14vw, 92px);
  letter-spacing: 2px; line-height: .9;
  background: linear-gradient(180deg, #ffffff 0%, #c8d2e4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .35));
}
.logo .dash { color: var(--accent); -webkit-text-fill-color: var(--accent); }
.tag {
  text-align: center; color: var(--muted); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; font-size: 11px;
  margin-bottom: 24px; padding: 0 8px;
}

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- Start / hero ---------- */
.hero { padding: 32px 22px; text-align: center; }
.hero h2 {
  font-family: 'Anton', sans-serif; font-weight: 400;
  font-size: clamp(26px, 6.5vw, 44px); letter-spacing: .5px; margin-bottom: 12px;
}
.hero p { color: var(--muted); max-width: 580px; margin: 0 auto 24px; line-height: 1.6; }
.hero em { color: var(--ink); font-style: normal; font-weight: 700; }

.cta {
  display: inline-block; color: #04230f; border: none;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  font-family: 'Anton', sans-serif; font-size: 23px; letter-spacing: 1px;
  padding: 16px 48px; border-radius: 12px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(47, 174, 107, .32);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(47, 174, 107, .45); }
.cta:disabled { opacity: .5; cursor: progress; transform: none; box-shadow: none; }

.loadmsg { color: var(--muted); font-size: 12px; margin-top: 12px; min-height: 16px; }
.loadmsg code { background: var(--panel2); padding: 1px 6px; border-radius: 5px; color: var(--ink); }

/* ---------- Mode toggles ---------- */
.modes {
  border: 1px solid var(--line); border-radius: 14px;
  max-width: 480px; margin: 26px auto 0; padding: 12px 16px 14px; text-align: left;
  background: rgba(0, 0, 0, .12);
}
.modes legend {
  padding: 0 8px; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .14em; font-weight: 700;
}
.mode {
  display: flex; align-items: center; gap: 12px; padding: 9px 8px; cursor: pointer;
  font-size: 14px; border-radius: 9px; transition: background .12s;
}
.mode:hover { background: var(--panel2); }
.mode input { width: 19px; height: 19px; accent-color: var(--accent); cursor: pointer; flex: none; }
.mode b { color: var(--gold); }

/* ---------- Steps ---------- */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin-top: 28px; text-align: left;
}
.step { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 15px; }
.step b { font-family: 'Anton', sans-serif; color: var(--accent2); font-size: 23px; display: block; margin-bottom: 4px; }
.step span { color: var(--muted); font-size: 13px; line-height: 1.45; }

/* ---------- Draft layout ---------- */
.draftgrid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 780px) { .draftgrid { grid-template-columns: 1fr 1fr; align-items: start; } }

.roundbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.roundbar .r { font-family: 'Anton', sans-serif; font-size: 20px; letter-spacing: 1px; }
.roundbar .prog { color: var(--muted); font-size: 13px; font-weight: 700; }

.spinbox { padding: 18px 16px; text-align: center; }
.modebadge {
  color: var(--gold); font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; margin-bottom: 10px; min-height: 14px;
}
.reel {
  background: linear-gradient(180deg, var(--panel2), #20283600);
  background-color: var(--panel2);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; margin-bottom: 14px; min-height: 96px;
  display: flex; flex-direction: column; justify-content: center;
  transition: border-color .2s;
}
.reel .club { font-family: 'Anton', sans-serif; font-size: clamp(22px, 5.5vw, 32px); letter-spacing: .5px; }
.reel .era { color: var(--accent2); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: 13px; margin-top: 4px; }
.reel.spinning .club, .reel.spinning .era { opacity: .35; filter: blur(1px); }
.reel.legendpool { border-color: rgba(244, 196, 48, .5); }
.reel.legendpool .era { color: var(--gold); }

/* ---------- Buttons ---------- */
.btnrow { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  background: var(--panel2); color: var(--ink); border: 1px solid var(--line);
  font-weight: 700; padding: 11px 18px; border-radius: 9px; cursor: pointer;
  font-size: 14px; font-family: inherit; transition: background .12s, border-color .12s, transform .1s;
}
.btn:hover { background: var(--panel3); border-color: #46557a; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, var(--accent2), var(--accent)); color: #04230f; border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.big { padding: 14px 26px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Player pool ---------- */
.pool { margin-top: 8px; text-align: left; max-height: 340px; overflow: auto; padding-right: 2px; }
.pool::-webkit-scrollbar { width: 8px; }
.pool::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.ptitle {
  font-size: 12px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .12em; margin: 4px 4px 10px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.legends-tag {
  color: #2a2200; background: var(--gold); padding: 2px 8px; border-radius: 6px;
  font-weight: 800; letter-spacing: .08em;
}
.prow {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 11px;
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer; text-align: left;
  color: var(--ink); font-family: inherit; transition: transform .1s, border-color .1s, background .1s;
}
.prow:hover { transform: translateX(3px); border-color: var(--accent2); background: var(--panel3); }
.prow.sel { border-color: var(--accent2); background: #1f3a2c; box-shadow: inset 0 0 0 1px var(--accent2); }
.prow.used { opacity: .42; cursor: not-allowed; filter: grayscale(1); }
.prow.used:hover { transform: none; border-color: var(--line); background: var(--panel2); }

/* legend rows: gold accent */
.prow.legend { border-color: rgba(244, 196, 48, .45); background: linear-gradient(180deg, #2c2e2f, #2a2c2a); }
.prow.legend:hover { border-color: var(--gold); background: #33342f; }
.star { color: var(--gold); }

.ovr {
  font-family: 'Anton', sans-serif; font-size: 22px; width: 48px; text-align: center;
  border-radius: 9px; flex: none; padding: 3px 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.ovr.expert { background: var(--panel); color: var(--muted); border: 1px dashed var(--line); box-shadow: none; }
.pname { flex: 1; font-weight: 700; font-size: 15px; }
.pclub { display: block; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ---------- Position chips (made obvious) ---------- */
.ppos {
  font-weight: 800; font-size: 13px; letter-spacing: .06em; flex: none;
  padding: 5px 11px; border-radius: 8px; min-width: 46px; text-align: center;
  color: #10141c; background: var(--muted);
}
.ppos.pos-GK { background: var(--pos-GK); }
.ppos.pos-CB { background: var(--pos-CB); }
.ppos.pos-FB { background: var(--pos-FB); }
.ppos.pos-CM { background: var(--pos-CM); }
.ppos.pos-WG { background: var(--pos-WG); }
.ppos.pos-ST { background: var(--pos-ST); color: #fff; }
.ppos.picked { color: #2a2200; background: var(--gold); }

/* ---------- Pitch ---------- */
.pitchcard { padding: 14px; }
.pitch {
  position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden;
  background: repeating-linear-gradient(0deg, #14492a 0 12.5%, #123f25 12.5% 25%);
  border: 2px solid #1f5c34;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .35);
}
.pitch .lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pitch .lines .ln { fill: none; stroke: rgba(255, 255, 255, .18); stroke-width: 2; vector-effect: non-scaling-stroke; }
.pitch .lines .spot { fill: rgba(255, 255, 255, .3); }
.slots { position: absolute; inset: 0; }

.slot { position: absolute; transform: translate(-50%, -50%); width: 64px; text-align: center; }
.slot .disc {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 4px;
  border: 2px dashed rgba(255, 255, 255, .42);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: rgba(255, 255, 255, .65); font-size: 11px;
  background: rgba(0, 0, 0, .25); transition: .15s;
}
.slot.filled .disc {
  border-style: solid; border-color: #fff;
  background: radial-gradient(circle at 35% 30%, var(--accent2), var(--accent));
  color: #fff; font-family: 'Anton', sans-serif; font-size: 19px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
}
.slot.filled.legend .disc {
  background: radial-gradient(circle at 35% 30%, var(--gold2), var(--gold));
  color: #3a2e05;
}
.slot.open.targetable .disc {
  border-color: var(--gold); color: var(--gold);
  box-shadow: 0 0 0 4px rgba(244, 196, 48, .25); cursor: pointer; animation: pulse 1.2s infinite;
}
.slot.open.targetable { cursor: pointer; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(244, 196, 48, .07); } }
.slot .nm { font-size: 10px; font-weight: 700; line-height: 1.1; text-shadow: 0 1px 3px #000; max-width: 78px; margin: 0 auto; }
.slot .ft { font-size: 10px; color: var(--gold); font-weight: 800; }
.placehint { text-align: center; color: var(--gold); font-weight: 700; font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ---------- Result ---------- */
.result { padding: 34px 22px; text-align: center; position: relative; overflow: hidden; }
.result.celebrate {
  background:
    radial-gradient(620px 320px at 50% -10%, rgba(244, 196, 48, .16), transparent 70%),
    var(--panel);
}
.reclabel { color: var(--muted); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; margin-bottom: 6px; }
.record { font-family: 'Anton', sans-serif; font-size: clamp(58px, 16vw, 120px); letter-spacing: 3px; line-height: .9; }
.record .w { color: var(--win); }
.record .d { color: var(--muted); }
.record .l { color: var(--loss); }
.pts { color: var(--muted); font-weight: 700; letter-spacing: .08em; margin: 12px 0 4px; }

.tier {
  display: inline-block; font-family: 'Anton', sans-serif; font-size: clamp(19px, 5.2vw, 28px);
  letter-spacing: 1px; padding: 12px 26px; border-radius: 12px; margin-top: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.invincible { animation: glow 1.4s infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 40px var(--gold); } }

.sharerow { margin-top: 22px; }
.bdtitle { margin: 30px 0 10px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.breakdown { margin: 0 auto; max-width: 540px; text-align: left; }
.brow { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid var(--line); font-size: 14px; }
.brow .bp {
  font-weight: 800; font-size: 11px; width: 46px; flex: none; text-align: center;
  padding: 5px 0; border-radius: 7px; background: var(--panel2); color: var(--ink);
}
.bp.pos-GK { background: var(--pos-GK); color: #10141c; }
.bp.pos-CB { background: var(--pos-CB); color: #10141c; }
.bp.pos-FB { background: var(--pos-FB); color: #10141c; }
.bp.pos-CM { background: var(--pos-CM); color: #10141c; }
.bp.pos-WG { background: var(--pos-WG); color: #10141c; }
.bp.pos-ST { background: var(--pos-ST); color: #fff; }
.brow .bn { flex: 1; font-weight: 600; }
.brow.legend .bn { color: var(--gold2); }
.brow .bmeta { color: var(--muted); font-weight: 400; font-size: 13px; }
.brow .bo {
  font-family: 'Anton', sans-serif; font-size: 16px; flex: none; min-width: 42px;
  text-align: center; padding: 3px 8px; border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

/* ---------- Footer ---------- */
.foot { margin-top: 32px; text-align: center; }
.adslot { min-height: 0; margin: 0 auto 14px; max-width: 728px; }
.disc { color: var(--muted); font-size: 11px; line-height: 1.5; max-width: 660px; margin: 0 auto 10px; }
.footlinks { font-size: 12px; display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.footlinks .muted { color: var(--muted); }
.footlinks .dot { color: var(--line); }
.flink { color: var(--accent2); text-decoration: none; font-weight: 700; }
.flink:hover { text-decoration: underline; }

/* ---------- Legal pages (privacy, etc.) ---------- */
.legal { padding: 26px 24px; max-width: 760px; margin: 0 auto; line-height: 1.6; }
.legal h1 { font-family: 'Anton', sans-serif; font-weight: 400; font-size: clamp(24px, 5vw, 34px); margin: 8px 0 2px; }
.legal h2 { font-size: 16px; margin: 22px 0 6px; color: var(--ink); }
.legal p, .legal li { color: var(--muted); font-size: 14px; }
.legal ul { padding-left: 20px; margin: 6px 0; }
.legal li { margin-bottom: 6px; }
.legal .updated { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.legal .backrow { font-size: 13px; }
.legal-sep { border: none; border-top: 1px solid var(--line); margin: 32px 0; }
