/* ProofGM web — ProofPicks base: black #030304, cards #0E0E10, accent blue #3B82F6 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #030304; --card: #0E0E10; --card2: #161618; --line: #232326;
  --text: #F4F4F5; --muted: #9CA3AF; --dim: #6B7280;
  --blue: #3B82F6; --blue-dk: #1D4ED8; --green: #22C55E; --red: #EF4444;
  --amber: #F59E0B; --lime: #CDED13; --radius: 22px;
}
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.45;
  max-width: 560px; margin: 0 auto; min-height: 100vh;
}
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--text); }
a { color: var(--blue); }
img { display: block; max-width: 100%; }

#app { padding-bottom: 92px; }
#topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px; position: sticky; top: 0; z-index: 30;
  background: linear-gradient(#030304 85%, transparent);
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--blue);
  display: grid; place-items: center; font-family: Anton, sans-serif;
  font-size: 20px; color: #fff;
}
.brand-name { font-family: Anton, sans-serif; font-size: 22px; letter-spacing: .5px; }
.brand-name span { color: var(--blue); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.pill-btn {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
  font-weight: 700; font-size: 13px; background: var(--card);
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--card);
  border: 1px solid var(--line); font-size: 17px; display: grid; place-items: center;
}
#leagueBar { padding: 4px 16px 10px; display: flex; align-items: center; gap: 10px; }
#leagueSelect {
  flex: 1; background: var(--card); border: 1px solid var(--blue);
  border-radius: 12px; padding: 10px 12px; font-weight: 700; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%239CA3AF' stroke-width='2' fill='none'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}
.updated { font-size: 12px; color: var(--dim); white-space: nowrap; }
#view { padding: 0 16px; }

/* generic */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card h2 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.card h3 { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.sub { color: var(--muted); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.mt { margin-top: 10px; } .mb { margin-bottom: 10px; }
.small { font-size: 12.5px; } .tiny { font-size: 11.5px; color: var(--dim); }
.muted { color: var(--muted); }
.green { color: var(--green); } .red { color: var(--red); } .amber { color: var(--amber); }
.blue { color: var(--blue); }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.btn {
  display: inline-block; background: var(--blue); color: #fff; font-weight: 700;
  border-radius: 12px; padding: 10px 16px; font-size: 14px; text-align: center;
}
.btn.ghost { background: var(--card2); border: 1px solid var(--line); color: var(--text); }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.block { display: block; width: 100%; }
.btn:disabled { opacity: .45; }
select.band, input.band {
  width: 100%; background: var(--card2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; font-weight: 600; margin: 6px 0;
  appearance: none;
}
select.band {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%239CA3AF' stroke-width='2' fill='none'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}
select.band.hero { background-color: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); color: #fff; }
select.band.hero option { color: #111; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.pill {
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px;
  font-size: 13px; font-weight: 700; background: var(--card);
}
.pill.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip {
  display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 8px;
  border-radius: 999px; background: var(--card2); border: 1px solid var(--line);
  color: var(--muted); white-space: nowrap;
}
.chip.red { color: #fff; background: var(--red); border-color: var(--red); }
.chip.amber { color: #111; background: var(--amber); border-color: var(--amber); }
.chip.green { color: #fff; background: var(--green); border-color: var(--green); }
.chip.blue { color: #fff; background: var(--blue); border-color: var(--blue); }

/* hero */
.hero {
  background: linear-gradient(135deg, #0B2A6B 0%, #1D4ED8 45%, #3B82F6 100%);
  border-radius: var(--radius); padding: 22px 18px; margin-bottom: 12px; color: #fff;
}
.hero h1 { font-family: Anton, sans-serif; font-size: 30px; line-height: 1.05; letter-spacing: .3px; }
.hero p { opacity: .85; margin-top: 6px; font-size: 14px; }
.hero .ask { margin-top: 14px; display: flex; gap: 8px; }
.hero .ask input {
  flex: 1; border: 0; border-radius: 12px; padding: 11px 12px;
  background: rgba(255,255,255,.16); color: #fff; outline: none;
}
.hero .ask input::placeholder { color: rgba(255,255,255,.75); }
.hero .ask button { background: #fff; color: #1D4ED8; border-radius: 12px; padding: 0 16px; font-weight: 800; }
.ask-answer { margin-top: 12px; background: rgba(0,0,0,.28); border-radius: 12px; padding: 12px; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.action-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; text-align: left; min-height: 86px;
}
.action-tile .ico { font-size: 22px; }
.action-tile b { display: block; margin-top: 6px; font-size: 15px; }
.action-tile span { font-size: 12.5px; color: var(--muted); }

/* league / section rectangles */
.rect {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); margin-bottom: 12px; min-height: 132px;
  display: block; width: 100%; text-align: left; color: #fff; padding: 0;
}
.rect img { width: 100%; height: 132px; object-fit: cover; }
.rect .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.82)); }
.rect .body { position: absolute; left: 14px; right: 14px; bottom: 12px; }
.rect .body b { font-size: 17px; display: block; }
.rect .body span { font-size: 12.5px; opacity: .9; }
.rect .live-line { margin-top: 4px; font-size: 13px; font-weight: 700; }
.rect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rect-grid .rect img { height: 104px; }
.rect-grid .rect { min-height: 104px; }
.rect-grid .body b { font-size: 14.5px; }

/* player rows */
.prow {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--line); width: 100%; text-align: left;
}
.prow:last-child { border-bottom: 0; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none;
  background: var(--card2); border: 1px solid var(--line);
}
.avatar-fallback {
  width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid;
  place-items: center; background: var(--blue-dk); font-weight: 800; font-size: 15px; color: #fff;
}
.pname { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmeta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmid { flex: 1; min-width: 0; }
.pright { text-align: right; flex: none; }
.rank-num { width: 26px; text-align: center; color: var(--dim); font-weight: 800; flex: none; }

/* scoreboard / duel */
.score-big { display: flex; align-items: center; justify-content: space-between; text-align: center; }
.score-big .side { flex: 1; }
.score-big .pts { font-family: Anton, sans-serif; font-size: 34px; }
.winbar { height: 8px; border-radius: 99px; background: var(--card2); overflow: hidden; margin: 10px 0 4px; }
.winbar > div { height: 100%; background: var(--blue); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 5px; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* tab bar */
#tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(560px, 100%); display: flex; z-index: 40;
  background: rgba(14,14,16,.96); border-top: 1px solid var(--line);
  padding: 6px 2px calc(8px + env(safe-area-inset-bottom));
}
#tabbar button { flex: 1; padding: 5px 0 2px; color: var(--dim); font-size: 10.5px; font-weight: 700; }
#tabbar button.on { color: var(--blue); }
.tab-ico { display: block; font-size: 19px; line-height: 1.1; }

/* sheet / overlays */
.hidden { display: none !important; }
#sheetWrap { position: fixed; inset: 0; z-index: 60; }
#sheetBackdrop { position: absolute; inset: 0; background: rgba(0,0,0,.65); }
#sheet {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 0;
  width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--card); border-radius: 26px 26px 0 0; padding: 18px 18px 34px;
  border: 1px solid var(--line);
}
#sheet .grab { width: 42px; height: 4px; border-radius: 99px; background: var(--line); margin: 0 auto 14px; }
.sheet-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.sheet-head img, .sheet-head .avatar-fallback { width: 64px; height: 64px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.stat-cell { background: var(--card2); border-radius: 12px; padding: 10px 6px; text-align: center; }
.stat-cell b { display: block; font-size: 16px; }
.stat-cell span { font-size: 11px; color: var(--muted); }
.stars { color: var(--amber); letter-spacing: 2px; }
.sent-bar { height: 8px; border-radius: 99px; background: var(--card2); overflow: hidden; }
.sent-bar > div { height: 100%; background: var(--green); }

#searchOverlay {
  position: fixed; inset: 0; z-index: 55; background: rgba(3,3,4,.97);
  padding: 18px 16px; overflow-y: auto;
}
#searchOverlay input {
  width: 100%; background: var(--card2); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px; font-size: 16px; margin: 10px 0;
}
#toasts { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); z-index: 80; width: min(520px, 92%); }
.toast {
  background: var(--card2); border: 1px solid var(--blue); border-radius: 12px;
  padding: 12px 14px; margin-top: 8px; font-size: 14px; font-weight: 600;
}
#popups { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 90; width: min(520px, 92%); }
.popup {
  background: #12294d; border: 1px solid var(--blue); border-radius: 14px;
  padding: 12px 14px; margin-top: 8px; font-weight: 700; font-size: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
.popup small { display: block; font-weight: 500; color: var(--muted); margin-top: 2px; }
.verdict { border-radius: 14px; padding: 14px; font-weight: 800; text-align: center; margin: 10px 0; }
.verdict.win { background: rgba(34,197,94,.15); color: var(--green); }
.verdict.lose { background: rgba(239,68,68,.12); color: var(--red); }
.verdict.even { background: var(--card2); color: var(--muted); }
.tier-head { font-family: Anton, sans-serif; font-size: 18px; margin: 14px 0 6px; color: var(--blue); }
.tool-row { display: flex; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.tool-row:last-child { border-bottom: 0; }
.tool-row .ico { font-size: 20px; width: 30px; text-align: center; }
.tool-row b { display: block; font-size: 14.5px; }
.tool-row span { font-size: 12.5px; color: var(--muted); }
.price { font-family: Anton, sans-serif; font-size: 30px; }
.check { color: var(--green); font-weight: 800; }
.xmark { color: var(--dim); }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.feed-item { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed-item:last-child { border-bottom: 0; }
.src-note { font-size: 12px; color: var(--dim); margin-top: 10px; line-height: 1.5; }
.err { background: rgba(239,68,68,.12); border: 1px solid var(--red); border-radius: 12px; padding: 12px; font-size: 13.5px; margin-bottom: 12px; }
@media (max-width: 400px) {
  body { font-size: 14.5px; }
  .hero h1 { font-size: 27px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
