:root {
  --bg-deep: #020617;
  --bg-card: rgba(15, 23, 42, 0.6);
  --border: rgba(255, 255, 255, 0.08);
  --accent: #38bdf8;
  --red: #ef4444;
  --green: #22c55e;
  --text: #f8fafc;
  --muted: #94a3b8;
}

* { margin:0; padding:0; box-sizing:border-box; font-family: 'Inter', sans-serif; }

body {
  background-color: var(--bg-deep);
  background-image: radial-gradient(circle at top right, rgba(56, 189, 248, 0.05), transparent 40%);
  color: var(--text);
  min-height: 100vh;
}

header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 40px; background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}

.brand { font-weight: 700; font-size: 1.2rem; }
.live-pill { 
  background: rgba(34, 197, 94, 0.1); color: var(--green); 
  font-size: 0.7rem; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--green);
}

.header-info { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 15px; }
.active { color: var(--green); font-weight: 600; }
.refresh-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: white; padding: 5px 10px; border-radius: 6px; cursor: pointer; }

.container { padding: 40px; max-width: 1400px; margin: auto; }
.page-title { text-align: center; margin-bottom: 40px; }
.page-title h2 { font-size: 2rem; margin-bottom: 5px; }

.dashboard-grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 20px;
}

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 25px; backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
}

.card-status { position: absolute; top: 15px; right: 15px; }
.pulse-dot { 
  height: 8px; width: 8px; background: var(--green); border-radius: 50%; display: block;
  box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.teams-top { display: flex; justify-content: space-between; align-items: center; text-align: center; margin-bottom: 30px; }
.team img { width: 45px; margin-bottom: 10px; border-radius: 4px; }
.team p { font-size: 0.85rem; font-weight: 600; }
.score-center h3 { font-size: 2.5rem; color: var(--text); }

.data-section { background: rgba(0,0,0,0.2); border-radius: 10px; padding: 15px; margin-bottom: 20px; }
.section-header { font-size: 0.75rem; color: var(--accent); font-weight: 700; display: flex; justify-content: space-between; margin-bottom: 10px; }
.row { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 8px; }

.match-math { margin-bottom: 20px; font-size: 0.95rem; }
.highlight { font-weight: 600; margin: 5px 0 15px; }
.ball-tracker { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
.balls { display: flex; gap: 5px; }
.balls span { background: #1e293b; padding: 2px 8px; border-radius: 4px; }
.balls span.w { background: var(--red); font-weight: 700; }

.run-rates { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 15px; font-size: 0.85rem; font-weight: 600; }

.sparkline { width: 100%; height: 50px; margin-top: 10px; }

/* TRENDS */
.trend-box { margin-bottom: 30px; }
.trend-box h4 { font-size: 0.8rem; color: var(--muted); text-align: center; margin-bottom: 15px; }

/* COMMENTARY */
.teams-mini { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.mini-score { text-align: center; }
.commentary-list { height: 200px; overflow-y: auto; background: rgba(0,0,0,0.2); border-radius: 10px; padding: 10px; margin-bottom: 20px; }
.item { font-size: 0.8rem; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--muted); }

footer { text-align: center; margin-top: 50px; font-size: 0.8rem; color: var(--muted); }
.blue { color: var(--accent); }

@media (max-width: 1024px) { .dashboard-grid { grid-template-columns: 1fr; } }