/* SBB Analytics — Kurumsal Koyu Spor Analitiği Teması (Saf CSS, Build Gerektirmez) */
:root {
  --bg: #080c14;
  --bg-elev: #0f1624;
  --bg-card: #121b2d;
  --bg-card-hover: #162238;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(56, 189, 248, 0.32);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --away: #f59e0b;
  --home: #10b981;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(600px 300px at 15% -5%, rgba(56, 189, 248, 0.12), transparent 70%),
    radial-gradient(500px 280px at 85% 0%, rgba(16, 185, 129, 0.08), transparent 70%);
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

/* Header */
.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(8, 12, 20, 0.84);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  color: #041018;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.brand-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-weight: 500;
  color: var(--accent);
  font-size: 0.9rem;
  margin-left: 4px;
}

.brand-tagline {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.topbar-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
}

.pill-accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--border-strong);
}

.pill-muted {
  background: var(--bg-elev);
  color: var(--text-muted);
}

/* Main */
.main-content {
  padding-top: 24px;
  padding-bottom: 48px;
}

/* Summary Strip */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.kpi-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
}

.kpi-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
}

.kpi-sm {
  font-size: 0.96rem;
}

.kpi-mono {
  font-family: var(--font-mono);
}

.kpi-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Controls */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.live-dot {
  font-size: 0.78rem;
  color: var(--home);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 3px 10px;
  border-radius: 999px;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-input {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.86rem;
  width: 210px;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: var(--accent);
}

.view-toggle {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.toggle-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toggle-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* State Banner */
.state-banner {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.state-banner.error {
  border-color: rgba(248, 113, 113, 0.4);
  color: var(--danger);
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, background 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.game-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.matchup-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.team-away {
  color: var(--away);
}

.team-at {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.9rem;
}

.team-home {
  color: var(--home);
}

.card-time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.status-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

.status-badge.final {
  background: rgba(16, 185, 129, 0.18);
  color: var(--home);
}

/* Projections Row */
.proj-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.proj-box {
  background: rgba(8, 12, 20, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.proj-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 3px;
}

.proj-score {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 700;
  color: #f8fafc;
}

.proj-sub {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Win Prob Bar */
.winprob-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.winprob-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.winprob-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.25);
  overflow: hidden;
  display: flex;
}

.winprob-away {
  background: linear-gradient(90deg, #d97706, #f59e0b);
  transition: width 0.35s ease;
}

.winprob-home {
  background: linear-gradient(90deg, #059669, #10b981);
  transition: width 0.35s ease;
}

/* Quarters Mini Table */
.q-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.q-table th,
.q-table td {
  padding: 5px 6px;
  text-align: right;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.q-table th:first-child,
.q-table td:first-child {
  text-align: left;
  font-weight: 700;
}

.q-table th {
  color: var(--text-dim);
  font-weight: 600;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 4px;
}

.foot-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
}

.chip {
  background: rgba(148, 163, 184, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--text-muted);
}

/* Data Table View */
.table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table th {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: rgba(8, 12, 20, 0.5);
}

.data-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.05);
}

.mono {
  font-family: var(--font-mono);
}

/* Methodology & Footer */
.method-box {
  margin-top: 28px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.method-box h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  color: var(--accent);
}

.method-box p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer {
  border-top: 1px solid var(--border);
  background: rgba(8, 12, 20, 0.9);
  padding: 22px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.disclaimer {
  margin: 0;
  font-size: 0.84rem;
  color: #cbd5e1;
}

.footer-meta {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Responsive */
@media (max-width: 960px) {
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .games-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .summary-strip {
    grid-template-columns: 1fr;
  }
  .proj-row {
    grid-template-columns: 1fr;
  }
  .search-input {
    width: 100%;
  }
}
