:root {
  --bg-0: #0B1120;
  --bg-card: #131C2E;
  --bg-card-alt: #0D1525;
  --bg-footer: #0F1825;
  --border: #1e293b;
  --border-subtle: rgba(30, 41, 59, 0.5);
  --text: #e2e8f0;
  --text-white: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #5EEAD4;
  --accent-home: #0a4f95;
  --accent-away: #7f1d2d;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-0);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: #1E293B; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #334155; }

/* App Shell */
.app-shell {
  min-height: 100vh;
  width: 100%;
}

.content-column {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
}

/* Logo */
.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.logo-img {
  height: 144px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.4));
}

/* Clock Pill */
.clock-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
}

.clock-pill {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 6px 16px;
  margin-bottom: 6px;
}

.clock-text {
  color: var(--text-white);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.venue-text {
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* Scoreboard Card */
.scoreboard-card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.team-row:last-child {
  border-bottom: none;
}

.team-row-possession {
  background: var(--bg-card);
}

.team-row-alt {
  background: #1A2332;
}

.team-left {
  display: flex;
  align-items: center;
}

.team-info {
  display: flex;
  flex-direction: column;
}

.team-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-name {
  color: var(--text-white);
  font-weight: 700;
  font-size: 18px;
}

.possession-badge {
  display: none;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.possession-badge.active {
  display: inline-block;
}

.team-situation {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
  display: none;
}

.team-situation.active {
  display: block;
}

.team-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.team-score {
  color: var(--text-white);
  font-weight: 700;
  font-size: 36px;
}

.team-prob {
  color: var(--accent);
  font-weight: 700;
  font-size: 24px;
  width: 64px;
  text-align: right;
}

/* Win Probability Chart */
.chart-card {
  margin-top: 24px;
  background: var(--bg-card-alt);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.chart-header-left {
  display: flex;
  flex-direction: column;
}

.chart-header-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.chart-header-pct {
  color: var(--text-white);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.chart-header-right {
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding-top: 4px;
}

.chart-area {
  position: relative;
  height: 256px;
  width: 100%;
  background: var(--bg-card-alt);
}

/* Grid Lines */
.chart-gridlines {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 0;
  pointer-events: none;
}

.chart-gridlines::before,
.chart-gridlines::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.04);
}

.chart-gridline {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.04);
}

/* X-Axis Labels */
.chart-x-labels {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
  pointer-events: none;
}

.chart-x-labels span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Bottom Overlay */
.chart-bottom-overlay {
  position: absolute;
  bottom: 32px;
  left: 16px;
  z-index: 10;
  pointer-events: none;
}

.chart-bottom-label {
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.chart-bottom-pct {
  color: rgba(148, 163, 184, 0.5);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

/* SVG Chart */
.chart-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 16px 0 32px 0;
}

/* Game Chatter & Drives Sections */
.section-block {
  margin-top: 24px;
}

.section-block-last {
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
}

.section-title {
  margin: 0;
  color: var(--text-white);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-pill {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 2px 8px;
  background: var(--bg-card);
}

/* Feed Items (Game Chatter) */
.feed, .drives {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-item {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--text-dim);
}

.feed-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.feed-item-author {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.feed-item-time {
  color: var(--text-dim);
  font-size: 12px;
}

.feed-item-text {
  margin: 0;
  color: var(--text-white);
  font-size: 14px;
  line-height: 1.5;
}

.feed-item-text a {
  color: var(--text-white);
  text-decoration: none;
}

.feed-item-text a:hover {
  text-decoration: underline;
}

/* Drive Items */
.drive-item {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--border);
}

.drive-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.drive-item-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-white);
}

.drive-item-title.touchdown {
  color: var(--accent);
}

.drive-item-title.current {
  color: var(--text-white);
}

.drive-item-stats {
  display: flex;
  gap: 12px;
}

.drive-item-stat {
  color: var(--text-muted);
  font-size: 12px;
}

.drive-item-range {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text);
}

.drive-item-range-line {
  flex: 1;
  height: 1px;
  margin: 0 12px;
  background: rgba(51, 65, 85, 0.5);
}

/* Empty state */
.empty {
  color: var(--text-muted);
  padding: 12px 0;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 480px) {
  .content-column {
    padding: 20px 12px;
  }

  .logo-img {
    height: 120px;
  }

  .team-score {
    font-size: 28px;
  }

  .team-prob {
    font-size: 20px;
    width: 52px;
  }

  .chart-header-pct {
    font-size: 40px;
  }

  .chart-bottom-pct {
    font-size: 28px;
  }
}
