:root {
  --bg: #07111f;
  --card: rgba(255, 255, 255, 0.96);
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --secondary: #475569;
  --soft: #f8fafc;
  --border: #e2e8f0;
  --line: rgba(255,255,255,0.72);
  --gold: #f59e0b;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, Arial, Helvetica, sans-serif; background: radial-gradient(circle at top left, #1e3a8a 0, transparent 30%), linear-gradient(145deg, #020617, #0f172a 45%, #111827); color: var(--text); min-height: 100vh; overflow-x: hidden; }
.background-glow { position: fixed; width: 360px; height: 360px; border-radius: 999px; filter: blur(80px); opacity: .35; pointer-events: none; }
.glow-one { background: #22c55e; top: 10%; right: -120px; }
.glow-two { background: #3b82f6; bottom: -120px; left: -120px; }
.app-header, .app-footer { position: relative; color: #fff; max-width: 1460px; margin: 0 auto; padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.app-header h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.6rem); line-height: .95; letter-spacing: -0.05em; }
.header-subtitle { margin: 10px 0 0; color: #cbd5e1; font-weight: 600; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: #60a5fa; font-weight: 900; }
.app-shell { position: relative; max-width: 1460px; margin: 0 auto; padding: 0 22px 34px; }
.card { background: var(--card); border: 1px solid rgba(255,255,255,.36); border-radius: 26px; padding: 24px; box-shadow: 0 22px 70px rgba(0,0,0,.28); backdrop-filter: blur(14px); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.setup-card { max-width: 560px; margin: 48px auto; text-align: left; }
.setup-icon { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; background: #dbeafe; font-size: 2rem; margin-bottom: 12px; }
.mode-description { color: #1e3a8a; font-weight: 800; background: #dbeafe; border-radius: 14px; padding: 12px; margin: 12px 0 4px; }
.game-mode-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.game-mode-card { border: 2px solid var(--border); border-radius: 18px; padding: 16px; background: #fff; text-align: left; cursor: pointer; color: var(--text); transition: transform .08s ease, border-color .18s ease, box-shadow .18s ease; }
.game-mode-card:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(15,23,42,.12); }
.game-mode-card.selected { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.game-mode-title { display: block; font-weight: 950; font-size: 1rem; margin-bottom: 8px; }
.game-mode-text { display: block; color: var(--muted); font-weight: 700; font-size: .87rem; line-height: 1.28; }
.warning-note { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 14px; padding: 11px 12px; font-weight: 900; line-height: 1.3; margin: 12px 0 0; }
.bid-warning { margin: 0; font-size: .9rem; }
label { display: block; font-weight: 800; margin: 18px 0 8px; }
select, input[type="checkbox"], input[type="text"], input[type="number"] { font-size: 1rem; }
select, input[type="text"], input[type="number"] { width: 100%; padding: 13px 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.user-name-fields { display: grid; gap: 10px; margin-top: 14px; }
.user-name-fields label { margin: 4px 0 6px; font-size: .9rem; color: #334155; }
.checkbox-row { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.btn { border: 0; border-radius: 14px; padding: 12px 17px; color: #fff; font-weight: 900; cursor: pointer; transition: transform .08s ease, box-shadow .2s ease, opacity .2s ease; box-shadow: 0 10px 24px rgba(15, 23, 42, .18); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-wide { width: 100%; margin-top: 12px; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.btn-secondary { background: linear-gradient(135deg, #64748b, #334155); }
.btn-success { background: linear-gradient(135deg, #22c55e, #15803d); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.game-grid { display: grid; grid-template-columns: minmax(320px, 410px) 1fr; gap: 22px; align-items: start; }
.turn-row, .section-title-row, .button-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lives-pill { background: #fef3c7; color: #92400e; padding: 10px 13px; border-radius: 999px; font-weight: 900; }
.budget-pill { background: #dcfce7; color: #166534; }
.player-card { position: relative; overflow: hidden; background: linear-gradient(160deg, #f8fafc, #e0f2fe); border: 1px solid var(--border); border-radius: 22px; padding: 20px; margin: 20px 0; min-height: 230px; }
.player-card:before { content: ""; position: absolute; width: 160px; height: 160px; background: rgba(37,99,235,.12); border-radius: 999px; top: -40px; right: -40px; }
.player-card.blank { display: flex; align-items: center; justify-content: center; text-align: center; }
.player-name { position: relative; font-size: clamp(1.6rem, 4vw, 2.15rem); margin: 4px 0 10px; line-height: 1.05; letter-spacing: -0.04em; }
.badge-row { position: relative; display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.badge { background: #dbeafe; color: #1e40af; font-weight: 900; padding: 7px 10px; border-radius: 999px; }
.badge.dark { background: #0f172a; color: #fff; }
.detail-grid { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 15px; }
.detail { background: rgba(255,255,255,.88); border: 1px solid var(--border); border-radius: 14px; padding: 10px; font-weight: 800; }
.detail span { display: block; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.message { font-weight: 900; color: #1e3a8a; min-height: 24px; }
.bid-controls { margin-top: 18px; display: grid; gap: 14px; }
.bid-order-card { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 16px; padding: 12px; }
.bid-order-display { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.order-chip { background: #fff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: 999px; padding: 6px 10px; font-size: .85rem; font-weight: 900; }
.order-chip.current { background: #1e40af; color: white; }
.bid-inputs { display: grid; gap: 10px; }
.bid-row { display: grid; grid-template-columns: 1fr 110px; gap: 10px; align-items: center; background: #f8fafc; border: 1px solid var(--border); border-radius: 14px; padding: 10px; }
.bid-row.ineligible { opacity: .5; }
.bid-row label { margin: 0; }
.bid-help { color: var(--muted); font-size: .78rem; display: block; margin-top: 2px; }
.bid-help.must-bid { color: #b91c1c; font-weight: 950; }
.skip-line { color: #92400e; font-size: .86rem; font-weight: 900; margin-top: 3px; }
.teams-container { display: grid; grid-template-columns: repeat(2, minmax(500px, 1fr)); gap: 26px; }
.team-card { border: 1px solid var(--border); border-radius: 22px; padding: 18px; background: #f8fafc; }
.team-card h3 { margin: 0; font-size: 1.25rem; }
.team-top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.team-meta { color: var(--muted); font-size: .86rem; font-weight: 800; }
.score { font-weight: 950; color: #0f172a; }
.budget-line { color: #166534; font-size: .86rem; font-weight: 900; margin-top: 3px; }
.pitch { position: relative; height: 650px; border-radius: 22px; overflow: hidden; border: 3px solid rgba(255,255,255,.78); background: repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 38px, transparent 38px 76px), linear-gradient(180deg, #168a43, #0f6b34); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), 0 14px 30px rgba(15,23,42,.18); }
.pitch:before { content: ""; position: absolute; left: 8%; right: 8%; top: 50%; border-top: 2px solid var(--line); }
.pitch:after { content: ""; position: absolute; width: 116px; height: 116px; border: 2px solid var(--line); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.penalty-box { position: absolute; left: 26%; right: 26%; height: 88px; border: 2px solid var(--line); z-index: 1; }
.penalty-box.top { top: -2px; border-top: 0; }
.penalty-box.bottom { bottom: -2px; border-bottom: 0; }
.pitch-player { position: absolute; width: 26%; min-height: 72px; transform: translate(-50%, -50%); border-radius: 15px; background: rgba(255,255,255,.96); border: 1px solid rgba(15,23,42,.12); box-shadow: 0 10px 24px rgba(0,0,0,.2); padding: 7px 7px; text-align: center; z-index: 3; }
.pitch-player.empty-slot { background: rgba(255,255,255,.35); color: rgba(255,255,255,.92); border: 1px dashed rgba(255,255,255,.7); box-shadow: none; min-height: 58px; }
.pitch-player .pos { display: inline-block; font-size: .62rem; font-weight: 950; background: #0f172a; color: #fff; border-radius: 999px; padding: 2px 7px; margin-bottom: 3px; }
.pitch-player .name { display: block; font-size: .76rem; font-weight: 950; line-height: 1.05; overflow-wrap: anywhere; }
.pitch-player .club { display: block; color: #334155; font-size: .62rem; font-weight: 800; line-height: 1.05; margin-top: 2px; overflow-wrap: anywhere; }
.pitch-player .year { display: inline-block; color: #475569; font-size: .64rem; font-weight: 850; margin-top: 3px; }
.pitch-player .rating { display: inline-block; color: #b45309; font-size: .66rem; font-weight: 950; margin-left: 4px; }
.pitch-player .price { display: inline-block; color: #166534; font-size: .66rem; font-weight: 950; margin-left: 4px; }
.pitch-player.gk { left: 50%; top: 92%; }
.pitch-player.def { left: 50%; top: 74%; }
.pitch-player.mid1 { left: 24%; top: 50%; }
.pitch-player.mid2 { left: 76%; top: 50%; }
.pitch-player.fwd { left: 50%; top: 10%; }
.results-card { margin-top: 22px; }
.share-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.results-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.result-card { border: 2px solid var(--border); border-radius: 18px; padding: 16px; background: #f8fafc; }
.result-card.winner { border-color: var(--gold); background: #fffbeb; }
.status-note { display: none; }
.app-footer { font-size: .9rem; opacity: .9; justify-content: center; }
@media (max-width: 1320px) { .teams-container { grid-template-columns: 1fr; } .pitch { height: 670px; } .pitch-player { width: 24%; } }
@media (max-width: 980px) { .game-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .app-header, .app-footer { align-items: flex-start; flex-direction: column; } .teams-container, .results-grid { grid-template-columns: 1fr; } .team-card { padding: 14px; } .pitch { height: 620px; } .pitch-player { width: 34%; min-height: 70px; } .pitch-player.mid1 { left: 25%; top: 50%; } .pitch-player.mid2 { left: 75%; top: 50%; } .share-actions { width: 100%; justify-content: stretch; } .share-actions .btn { flex: 1; } }
@media (max-width: 620px) { .game-mode-cards { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .app-shell, .app-header, .app-footer { padding-left: 14px; padding-right: 14px; } .pitch { height: 560px; } .pitch-player { width: 40%; padding: 6px 6px; min-height: 66px; } .pitch-player .name { font-size: .70rem; } .pitch-player .club { font-size: .58rem; } .pitch-player.gk { top: 92%; } .pitch-player.def { top: 74%; } .pitch-player.mid1 { left: 26%; top: 50%; } .pitch-player.mid2 { left: 74%; top: 50%; } .pitch-player.fwd { top: 10%; } .bid-row { grid-template-columns: 1fr; } }


/* v10 front page refresh */
.setup-card-home {
  max-width: 1040px;
  margin: 42px auto 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.setup-hero-card,
.setup-panel-card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 30px;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
  backdrop-filter: blur(14px);
}

.setup-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 360px;
  gap: 24px;
  align-items: stretch;
  padding: 28px;
  overflow: hidden;
  position: relative;
}

.setup-hero-card:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(34,197,94,.18), transparent 24%),
    radial-gradient(circle at 90% 10%, rgba(37,99,235,.16), transparent 28%);
  pointer-events: none;
}

.setup-copy { position: relative; z-index: 1; }
.setup-copy h2 {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: .95;
  letter-spacing: -0.065em;
  color: #0f172a;
}

.setup-lead {
  max-width: 650px;
  color: #475569;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 18px;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.feature-pills span {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 900;
  font-size: .9rem;
}

.mini-pitch-card {
  position: relative;
  min-height: 280px;
  border-radius: 26px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 28px, transparent 28px 56px),
    linear-gradient(180deg, #16a34a, #166534);
  border: 3px solid rgba(255,255,255,.75);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.16), 0 18px 34px rgba(22,101,52,.28);
  overflow: hidden;
}
.mini-pitch-card:before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  border-top: 2px solid rgba(255,255,255,.72);
}
.mini-pitch-card:after {
  content: "";
  position: absolute;
  width: 86px;
  height: 86px;
  border: 2px solid rgba(255,255,255,.72);
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.mini-player {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,.95);
  color: #0f172a;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 950;
  font-size: .78rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
  z-index: 2;
}
.mini-gk { left: 50%; top: 88%; }
.mini-def { left: 50%; top: 68%; }
.mini-mid-a { left: 32%; top: 47%; }
.mini-mid-b { left: 68%; top: 47%; }
.mini-fwd { left: 50%; top: 16%; }

.setup-panel-card { padding: 24px; }
.setup-panel-card > label:first-child {
  margin-top: 0;
  font-size: 1.1rem;
  color: #0f172a;
}

.game-mode-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.game-mode-card {
  min-height: 166px;
  border-radius: 24px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.game-mode-card:after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  right: -45px;
  bottom: -55px;
  background: rgba(37,99,235,.10);
}
.game-mode-card.selected:after { background: rgba(34,197,94,.13); }
.game-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #e0f2fe;
  border-radius: 16px;
  font-size: 1.35rem;
  margin-bottom: 12px;
}
.game-mode-title { font-size: 1.08rem; margin-bottom: 8px; }
.game-mode-text { font-size: .92rem; line-height: 1.4; max-width: 92%; }

.setup-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: end;
  margin-top: 8px;
}
.setup-note-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  border-radius: 16px;
  padding: 13px 14px;
  font-weight: 750;
  line-height: 1.35;
}
.start-game-btn {
  font-size: 1.05rem;
  padding: 15px 18px;
  margin-top: 18px;
}

@media (max-width: 880px) {
  .setup-hero-card { grid-template-columns: 1fr; }
  .mini-pitch-card { min-height: 240px; }
  .setup-controls-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .setup-card-home { margin-top: 24px; }
  .setup-hero-card, .setup-panel-card { border-radius: 24px; padding: 18px; }
  .game-mode-cards { grid-template-columns: 1fr; }
  .game-mode-card { min-height: 140px; }
  .setup-copy h2 { font-size: 2.35rem; }
}


/* v15 legal footer */
.legal-footer {
  max-width: 1040px;
  margin: 0 auto 24px;
  padding: 18px 22px 26px;
  display: block;
  text-align: center;
  color: rgba(255,255,255,.78);
  font-size: .78rem;
  line-height: 1.45;
}
.legal-footer p {
  margin: 6px auto;
  max-width: 980px;
}
.legal-footer p:first-child {
  color: rgba(255,255,255,.92);
  font-weight: 900;
}
