/* PapeOffPicks Stats Live — pure black + red. NO green anywhere. */
:root {
  --bg: #000000;
  --surface: #0d0d0d;
  --surface2: #161616;
  --surface3: #1f1f1f;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --red: #ff3838;
  --red-dark: #4d0b0b;
  --red-soft: #ff6b6b;
  --gold: #ffb020;
  --border: #262626;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--red-soft); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--text); }

#app { max-width: 720px; margin: 0 auto; padding: 0 12px 120px; }

/* header */
header.app-header { position: sticky; top: 0; z-index: 40; background: rgba(0,0,0,.92); backdrop-filter: blur(8px); padding: 12px 0 8px; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--red); flex: none; }
.login-logo { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 3px solid var(--red); margin-bottom: 12px; }
.brand h1 { font-size: 22px; margin: 0; letter-spacing: .5px; }
.brand h1 span { color: var(--red); }
.live-badge { font-size: 11px; font-weight: 800; color: #fff; background: var(--red); border-radius: 999px; padding: 2px 8px; letter-spacing: 1px; }
.live-badge.off { background: #3a3a3a; color: var(--muted); }
.datestamp { font-size: 12px; color: var(--muted); margin-top: 2px; }
.header-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.stat-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px 8px; text-align: center; }
.stat-chip b { display: block; font-size: 15px; }
.stat-chip span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* tabs */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0; }
.tab-btn {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 4px; font-size: 12.5px; font-weight: 700; text-align: center;
}
.tab-btn.active { background: var(--red); border-color: var(--red); color: #fff; }
.tab-btn .count { display: block; font-size: 10px; font-weight: 600; opacity: .85; }

/* filter chips + search */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700;
}
.chip.active { background: var(--red); border-color: var(--red); color: #fff; }
.search-row { display: flex; gap: 8px; margin-bottom: 10px; }
.search-row input {
  flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; outline: none;
}
.search-row input:focus { border-color: var(--red); }

/* prop cards */
.prop-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .prop-grid { grid-template-columns: 1fr 1fr; } }
.prop-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; position: relative;
}
.prop-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.prop-card .player { font-weight: 800; font-size: 16px; }
.prop-card .matchup { font-size: 12px; color: var(--muted); margin-top: 1px; }
.tier { font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 3px 7px; border-radius: 999px; text-transform: uppercase; white-space: nowrap; }
.tier.standard { background: #222; color: #ddd; }
.tier.goblin { background: #3a2a00; color: var(--gold); }
.tier.demon { background: var(--red-dark); color: var(--red-soft); }
.prop-line { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 4px; }
.prop-line .stat { font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.prop-line .line { font-size: 26px; font-weight: 900; }
.prop-line .dir { font-size: 12px; color: var(--muted); }
.prob-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.prob-bar { flex: 1; height: 8px; background: var(--surface3); border-radius: 999px; overflow: hidden; }
.prob-fill { height: 100%; background: var(--red); border-radius: 999px; }
.prob-num { font-size: 13px; font-weight: 800; min-width: 44px; text-align: right; }
.prob-note { font-size: 12px; color: var(--muted); }
.streak-badge { display: inline-block; font-size: 11px; font-weight: 800; color: var(--gold); background: #241a00; border-radius: 999px; padding: 2px 8px; margin-right: 4px; }
.inj-badge { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 8px; margin-right: 4px; }
.inj-badge.Questionable { background: #3a2a00; color: var(--gold); }
.inj-badge.Doubtful { background: #3a1500; color: #ff9a3d; }
.inj-badge.Out { background: var(--red-dark); color: var(--red-soft); }
.inj-badge.Probable { background: #222; color: #ccc; }
.switch-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.switch-row .lbl { font-size: 11px; color: var(--muted); width: 100%; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.stat-chip-btn {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700;
}
.stat-chip-btn.active { background: var(--red); border-color: var(--red); color: #fff; }
.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.btn {
  border: none; border-radius: 10px; padding: 10px 14px; font-weight: 800; font-size: 14px;
  background: var(--red); color: #fff; flex: 1;
}
.btn.secondary { background: var(--surface3); color: var(--text); border: 1px solid var(--border); }
.btn.small { padding: 7px 10px; font-size: 13px; flex: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.added { background: #222; color: var(--gold); }
.prefill-pill { font-size: 11px; color: var(--muted); margin-top: 6px; }
.prefill-pill b { color: var(--red-soft); }

/* sections */
.section-title { font-size: 18px; font-weight: 900; margin: 18px 0 4px; }
.section-sub { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 4px 0; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.gold { color: var(--gold); }
.red-text { color: var(--red-soft); }
.notice { background: var(--red-dark); border: 1px solid #7a1515; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 10px 0; }
.warn { background: #241a00; border: 1px solid #6b4d00; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 10px 0; }

/* AI */
.ai-read { font-size: 15px; line-height: 1.55; }
.ai-read b { color: var(--red-soft); }
.ask-row { display: flex; gap: 8px; margin: 10px 0; }
.ask-row input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; outline: none; }
.ask-row input:focus { border-color: var(--red); }
.ask-answer { white-space: pre-wrap; }

/* parlays */
.parlay-card { border: 1px solid var(--border); border-left: 4px solid var(--red); }
.parlay-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.parlay-head h3 { margin: 0; }
.parlay-meta { font-size: 13px; color: var(--muted); }
.parlay-legs { margin: 8px 0; }
.parlay-leg { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 14px; }
.parlay-leg:first-child { border-top: none; }
.parlay-leg .lp-prob { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* pbp */
.pbp-game { padding: 10px 12px; }
.pbp-score { font-size: 20px; font-weight: 900; display: flex; justify-content: space-between; }
.pbp-status { font-size: 12px; color: var(--muted); }
.play { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.play:first-child { border-top: none; }
.play .clock { min-width: 44px; color: var(--muted); font-size: 12px; font-weight: 700; text-align: right; }
.play.scoring { background: rgba(255,56,56,.07); }
.play .score { margin-left: auto; font-weight: 800; font-size: 12px; color: var(--red-soft); white-space: nowrap; }
.qtr { font-weight: 800; font-size: 13px; color: var(--red-soft); margin: 14px 0 4px; text-transform: uppercase; letter-spacing: .5px; }
.leader-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; border-top: 1px solid var(--border); }

/* lineups */
.lineup-team { margin-bottom: 6px; }
.lineup-team h4 { margin: 8px 0 4px; font-size: 14px; }
.lineup-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; }
.lineup-row .pos { color: var(--muted); font-size: 12px; min-width: 28px; }
.lineup-row .mins { color: var(--muted); font-size: 12px; white-space: nowrap; }
.lineup-row .mins b { color: var(--text); font-size: 13px; }
.onboard { font-size: 10px; font-weight: 800; color: var(--gold); background: #241a00; border-radius: 999px; padding: 2px 6px; margin-left: 6px; }

/* slip */
.slip-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(10,10,10,.97); border-top: 1px solid var(--border);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}
.slip-bar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.slip-info { flex: 1; min-width: 0; }
.slip-info b { font-size: 14px; }
.slip-info span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slip-leg { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--border); }
.slip-leg:first-child { border-top: none; }
.slip-leg .sl-main { flex: 1; }
.slip-leg .sl-line { font-weight: 800; }
.dir-toggle { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.dir-toggle button { background: var(--surface2); color: var(--text); border: none; padding: 6px 10px; font-size: 12px; font-weight: 800; }
.dir-toggle button.active { background: var(--red); color: #fff; }
.remove-x { background: none; border: none; color: var(--muted); font-size: 18px; padding: 4px 8px; }
.payout-box { background: var(--surface2); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.payout-box .row { display: flex; justify-content: space-between; padding: 2px 0; }
.payout-box .row b { font-size: 16px; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px 18px 0 0; width: 100%; max-width: 720px; max-height: 88vh; overflow-y: auto; padding: 16px 16px 30px; }
.modal .close { float: right; background: var(--surface3); border: none; color: var(--text); border-radius: 999px; width: 30px; height: 30px; font-size: 16px; }
.trend-row { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.trend-row .tr-label { color: var(--muted); }
.log-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.log-table th, .log-table td { text-align: left; padding: 5px 4px; border-top: 1px solid var(--border); }
.log-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.hit { color: var(--red-soft); font-weight: 800; }
.miss { color: var(--muted); }

/* login */
.login-wrap { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; }
.login-wrap h1 { font-size: 28px; margin: 0 0 4px; }
.login-wrap h1 span { color: var(--red); }
.login-wrap p { color: var(--muted); max-width: 420px; }
.login-box { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-top: 14px; text-align: left; }
.login-box label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); display: block; margin-bottom: 6px; }
.login-box input { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; outline: none; margin-bottom: 10px; }
.login-box input:focus { border-color: var(--red); }
.login-box .btn { width: 100%; }
.error-text { color: var(--red-soft); font-size: 13px; margin: 6px 0; }
.hidden { display: none !important; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 86px; z-index: 200;
  background: var(--red); color: #fff; font-weight: 800; font-size: 14px;
  padding: 10px 16px; border-radius: 999px; box-shadow: 0 4px 20px rgba(0,0,0,.6);
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--border); vertical-align: top; }
.admin-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.code-plain { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-family: monospace; font-size: 13px; word-break: break-all; margin: 4px 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.form-grid label { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.form-grid input, .form-grid select { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 9px; margin-top: 3px; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
