:root {
  color-scheme: dark;
  --bg: #070807;
  --panel: #10120f;
  --panel-2: #171a15;
  --line: #283020;
  --text: #f5f7ef;
  --muted: #8d9488;
  --accent: #c8ff00;
  --accent-2: #44d7b6;
  --danger: #ff2a5f;
  --warn: #f2b705;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  margin: 0;
}

button, input, select {
  border-radius: 6px;
  font: inherit;
  min-height: 42px;
}

button {
  background: var(--accent);
  border: 0;
  color: #101010;
  cursor: pointer;
  font-weight: 900;
  padding: 10px 14px;
  text-transform: uppercase;
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.55;
}

button.secondary {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
}

input, select {
  background: #090a09;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 10px;
  width: 100%;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  text-transform: uppercase;
}

.boot, .auth-shell {
  align-items: center;
  display: grid;
  min-height: 100svh;
  padding: 24px;
  place-items: center;
}

.auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  max-width: 430px;
  padding: 22px;
  width: 100%;
}

.auth-card img { width: 72px; }

.auth-card h1 {
  font-size: 42px;
  line-height: 1;
  margin: 0;
}

.auth-card p, .muted {
  color: var(--muted);
  margin: 0;
}

.auth-status {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  min-height: 20px;
}

.app-shell {
  min-height: 100svh;
  padding-bottom: 86px;
}

.topbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 18px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 8, 7, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  align-items: center;
  display: flex;
  gap: 10px;
}

.brand img { width: 42px; }

.brand strong { display: block; font-size: 20px; }
.brand span, .eyebrow {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

main {
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: 980px;
  padding: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.section-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-head h2, .panel h3 {
  margin: 0;
}

.section-head p {
  color: var(--muted);
  margin: 3px 0 0;
}

.match-hero {
  display: grid;
  gap: 18px;
}

.match-line {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr;
  text-align: center;
}

.team {
  display: grid;
  gap: 7px;
}

.flag { font-size: 42px; }
.team strong { font-size: clamp(18px, 5vw, 30px); text-transform: uppercase; }
.score { color: var(--accent); font-size: 34px; font-weight: 950; }

.tip-grid {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 92px 1fr;
}

.stepper {
  display: grid;
  grid-template-rows: 54px 78px 54px;
}

.stepper button { border-radius: 0; font-size: 28px; }
.stepper button:first-child { border-radius: 6px 6px 0 0; }
.stepper button:last-child { background: var(--danger); border-radius: 0 0 6px 6px; color: white; }

.tip-value {
  align-items: center;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  font-size: 54px;
  font-weight: 950;
  place-items: center;
}

.colon {
  align-items: center;
  display: grid;
  font-size: 54px;
  font-weight: 900;
  place-items: center;
}

.toggle-row, .stat-grid, .market-grid, .two-col {
  display: grid;
  gap: 10px;
}

.toggle-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-grid, .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.choice {
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 12px;
}

.choice input { min-height: auto; width: auto; }

.pill, .status {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 8px;
  text-transform: uppercase;
}

.list {
  display: grid;
  gap: 10px;
}

.row {
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  padding: 12px;
}

.row small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.stat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.stat span { color: var(--muted); display: block; font-size: 12px; text-transform: uppercase; }
.stat strong { display: block; font-size: 28px; margin-top: 4px; }

.tabs {
  background: rgba(7, 8, 7, 0.96);
  border-top: 1px solid var(--line);
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  left: 0;
  padding: 6px 8px max(6px, env(safe-area-inset-bottom));
  position: fixed;
  right: 0;
  z-index: 20;
}

.tab {
  background: transparent;
  color: var(--muted);
  display: grid;
  font-size: 11px;
  gap: 3px;
  min-height: 58px;
  padding: 5px 2px;
  place-items: center;
}

.tab.active {
  background: var(--accent);
  color: #111;
}

.tab .icon { font-size: 22px; }

.toast {
  background: var(--accent);
  border-radius: 8px;
  bottom: 92px;
  color: #111;
  font-weight: 900;
  left: 50%;
  max-width: calc(100vw - 32px);
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  position: fixed;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 30;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 720px) {
  main { padding: 14px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .two-col, .toggle-row { grid-template-columns: 1fr; }
  .stat-grid, .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: 1fr; }
}
