:root,
[data-theme="dark"] {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --navy: #0d1b3e;
  --navy-light: #1a237e;
  --gold: #ffd700;
  --gold-dim: #c9a227;
  --cricket-red: #e53935;
  --text-primary: #f1f5f9;
  --text-muted: #94a3b8;
  --glass-border: rgba(255, 215, 0, 0.15);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f0f4f8;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --text-primary: #0f172a;
  --text-muted: #64748b;
  --glass-border: rgba(26, 35, 126, 0.2);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}
body.cricket-body {
  font-family: "Outfit", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.stadium-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(26, 35, 126, 0.4) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 80%,
      rgba(229, 57, 53, 0.08) 0%,
      transparent 40%
    ),
    linear-gradient(180deg, #0a0e1a 0%, #0d1b3e 50%, #0a0e1a 100%);
  z-index: -1;
  pointer-events: none;
}

.glass-nav {
  background: rgba(10, 14, 26, 0.85) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}
.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(255, 215, 0, 0.1);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: 1.2rem;
}
.brand-text {
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
}
.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-link:hover {
  color: var(--gold) !important;
}

.text-gold {
  color: var(--gold) !important;
}
.text-red {
  color: var(--cricket-red) !important;
}
.text-muted-small {
  color: var(--text-muted);
  font-size: 0.9rem;
}
[data-theme="dark"] .text-black,
[data-theme="dark"] .text-dark {
  color: var(--text-primary) !important;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--navy) !important;
  border: none;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.5rem 1.25rem;
  transition: all var(--transition);
}
.btn-gold:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
}
.btn-outline-gold {
  border: 2px solid var(--gold);
  color: var(--gold) !important;
  background: transparent;
  border-radius: 10px;
  font-weight: 600;
}
.btn-outline-gold:hover {
  background: var(--gold);
  color: var(--navy) !important;
}
.btn-danger-cricket {
  background: var(--cricket-red);
  border: none;
  color: #fff;
}
.btn-icon {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--gold);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-content {
  padding: 2rem 0 4rem;
  min-height: calc(100vh - 200px);
}

/* Hero */
.hero-banner {
  position: relative;
  padding: 4rem 0;
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(
    135deg,
    var(--navy) 0%,
    #1a237e 50%,
    rgba(229, 57, 53, 0.3) 100%
  );
  border: 1px solid var(--glass-border);
}
.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffd700' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
}
.hero-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
}
.live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cricket-red);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Live score cards */
.match-card {
  padding: 1.25rem;
  margin-bottom: 1rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.match-card.live {
  border-left: 4px solid var(--cricket-red);
}
.team-logo-sm {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
  background: var(--navy);
}
.score-display {
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s;
}
.score-display.updated {
  animation: scorePop 0.4s ease;
}
@keyframes scorePop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
    color: var(--gold);
  }
  100% {
    transform: scale(1);
  }
}

/* Ball timeline */
.ball-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1rem;
}
.ball-chip {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--navy-light);
  border: 1px solid var(--glass-border);
}
.ball-chip.four {
  background: #2e7d32;
}
.ball-chip.six {
  background: #1565c0;
}
.ball-chip.wicket {
  background: var(--cricket-red);
}
.ball-chip.wide,
.ball-chip.nb {
  background: #f57c00;
}
.ball-chip.dot {
  opacity: 0.6;
}

/* Scoring panel */
.scoring-panel {
  position: sticky;
  top: 80px;
}
.scoring-btn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.scoring-btn {
  padding: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all 0.15s;
  cursor: pointer;
}
.scoring-btn:hover {
  background: var(--navy-light);
  border-color: var(--gold);
}
.scoring-btn.wicket {
  background: rgba(229, 57, 53, 0.2);
  border-color: var(--cricket-red);
}
.scoring-btn.run-4 {
  border-color: #4caf50;
}
.scoring-btn.run-6 {
  border-color: #2196f3;
}

/* Wagon wheel */
.wagon-wheel {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(26, 35, 126, 0.5) 0%,
    transparent 70%
  );
  border: 2px dashed var(--glass-border);
  margin: 0 auto;
  position: relative;
}

/* Points table */
.points-table th {
  background: var(--navy);
  color: var(--gold);
  font-weight: 600;
  border: none;
  padding: 1rem;
}
.points-table td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-color: var(--glass-border);
}
.points-table tr:hover td {
  background: rgba(255, 215, 0, 0.05);
}

/* Stats / caps */
.cap-card {
  text-align: center;
  padding: 1.5rem;
}
.cap-card.orange {
  border-top: 3px solid #ff6f00;
}
.cap-card.purple {
  border-top: 3px solid #7b1fa2;
}
.player-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  margin-bottom: 0.75rem;
}

/* Admin sidebar */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 76px);
}
.admin-sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--glass-border);
  padding: 1.5rem 0;
  flex-shrink: 0;
}
.admin-sidebar .nav-link {
  color: var(--text-muted) !important;
  padding: 0.75rem 1.5rem;
  border-left: 3px solid transparent;
}
.admin-sidebar .nav-link.active,
.admin-sidebar .nav-link:hover {
  color: var(--gold) !important;
  background: rgba(255, 215, 0, 0.08);
  border-left-color: var(--gold);
}
.admin-content {
  flex: 1;
  padding: 2rem;
  overflow: auto;
}
.stat-card {
  padding: 1.5rem;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Commentary feed */
.commentary-feed {
  max-height: 400px;
  overflow-y: auto;
}
.commentary-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--glass-border);
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Auth */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
}
.form-control,
.form-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}
[data-theme="light"] .form-control {
  background: #fff;
}
.form-control:focus {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--gold);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.site-footer {
  background: rgba(10, 14, 26, 0.95);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}
.footer-links {
  list-style: none;
  padding: 0;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--gold);
}
.share-btn {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--navy-light);
  color: var(--gold);
  margin-right: 8px;
  text-decoration: none;
  transition: transform var(--transition);
}
.share-btn:hover {
  transform: scale(1.1);
  color: var(--gold);
}

.section-title {
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin-left: 1rem;
}

/* Match slider */
.matches-slider {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}
.matches-slider .match-card {
  min-width: 320px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ── Home Hero Banner ── */
.home-hero {
  position: relative;
  padding: 5rem 2.5rem;
  margin: 0 0 3rem;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(
    125deg,
    rgba(13, 27, 62, 0.97) 0%,
    rgba(26, 35, 126, 0.92) 45%,
    rgba(229, 57, 53, 0.35) 100%
  );
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 85% 20%,
      rgba(255, 215, 0, 0.12) 0%,
      transparent 40%
    ),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffd700' fill-opacity='0.04'%3E%3Cpath d='M40 0L48 32L80 40L48 48L40 80L32 48L0 40L32 32z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.home-hero-content {
  position: relative;
  z-index: 1;
}
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: var(--gold);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
}
.home-hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.home-hero-title .highlight {
  color: var(--gold);
}
.home-hero-desc {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.15rem;
  max-width: 540px;
  line-height: 1.6;
}
.home-hero-actions {
  margin-top: 2rem;
}
.home-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-cricket-ball {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 35%,
    #fff 0%,
    #c62828 45%,
    #b71c1c 100%
  );
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset -8px -8px 20px rgba(0, 0, 0, 0.2);
  animation: floatBall 4s ease-in-out infinite;
}
.hero-cricket-ball::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: rotate(-30deg);
}
@keyframes floatBall {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}
.home-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: -2rem 0 3rem;
  position: relative;
  z-index: 2;
}
.home-stat-box {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.home-stat-box .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.home-stat-box .lbl {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.feature-card {
  padding: 1.75rem;
  text-align: center;
  transition: transform var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px);
}
.feature-card .icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.2),
    rgba(26, 35, 126, 0.5)
  );
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--gold);
}
.live-match-card {
  min-width: 340px;
  padding: 1.5rem;
  scroll-snap-align: start;
  flex-shrink: 0;
  border-left: 4px solid var(--cricket-red);
}
.live-match-card .match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
}
.live-match-card .team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}
.live-match-card .vs-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 20px;
}
.live-match-card .live-score-big {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* ── International Scoreboard (Admin Scoring) ── */
.intl-scoreboard {
  background: linear-gradient(160deg, #0d1b3e 0%, #111827 60%, #0a0e1a 100%);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 215, 0, 0.08);
}
.intl-scoreboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.intl-innings-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.intl-score-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 0.5rem;
}
.intl-score-runs {
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -2px;
  transition:
    transform 0.2s,
    color 0.2s;
}
.intl-score-runs.updated {
  animation: scorePop 0.4s ease;
}
.intl-score-sep {
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 2px;
}
.intl-score-wkts {
  color: var(--cricket-red);
}
.intl-wickets-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 57, 53, 0.15);
  border: 1px solid rgba(229, 57, 53, 0.4);
  color: #ff8a80;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.intl-score-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.intl-divider {
  opacity: 0.4;
}
.intl-wickets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.fow-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.fow-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--cricket-red);
  border-radius: 50%;
}

/* Current Over Strip */
.over-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.over-panel-header .over-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}
.over-runs-total {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 215, 0, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}
.over-extras-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 0;
}
.over-extras-strip::before {
  content: "Extras";
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-right: 4px;
}
.over-ball.over-extra {
  width: 40px;
  height: 40px;
  font-size: 0.72rem;
  opacity: 0.95;
  border-style: dashed;
}
.current-over-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1rem 0;
  align-items: center;
}
.over-ball {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  border: 2px solid var(--glass-border);
  background: var(--navy-light);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  font-variant-numeric: tabular-nums;
}
.over-ball:last-child:not(.empty) {
  animation: ballPop 0.35s ease;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
}
@keyframes ballPop {
  0% {
    transform: scale(0.7);
    opacity: 0.5;
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.over-ball.empty {
  opacity: 0.25;
  border-style: dashed;
  font-weight: 400;
  font-size: 1.2rem;
}
.over-ball.dot {
  opacity: 0.7;
  color: var(--text-muted);
}
.over-ball.run {
  background: #1e3a5f;
  border-color: #3d5a80;
}
.over-ball.four {
  background: #1b5e20;
  border-color: #4caf50;
  color: #fff;
}
.over-ball.six {
  background: #0d47a1;
  border-color: #42a5f5;
  color: #fff;
}
.over-ball.wicket {
  background: var(--cricket-red);
  border-color: #ff5252;
  color: #fff;
}
.over-ball.wide,
.over-ball.nb {
  background: #e65100;
  border-color: #ff9800;
  color: #fff;
  font-size: 0.75rem;
}
.over-ball.extra {
  background: #4a148c;
  border-color: #ab47bc;
  color: #fff;
  font-size: 0.8rem;
}
.over-summary-text {
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 14px;
  border-radius: 8px;
  display: inline-block;
}

/* Recent overs history */
.recent-overs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.recent-over-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid transparent;
}
.recent-over-row.current {
  border-color: rgba(255, 215, 0, 0.35);
  background: rgba(255, 215, 0, 0.06);
}
.recent-over-row .over-label {
  min-width: 72px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.recent-over-row.current .over-label {
  color: var(--gold);
}
.recent-over-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}
.recent-over-balls .over-ball {
  width: 32px;
  height: 32px;
  font-size: 0.7rem;
  border-radius: 8px;
}
.recent-over-runs {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.85rem;
  min-width: 36px;
  text-align: right;
}

.scoreboard-mini th {
  color: var(--gold);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
}
.scoreboard-mini tr.on-strike td {
  background: rgba(255, 215, 0, 0.1);
  color: var(--gold);
  font-weight: 600;
}
.bowler-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.fow-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}
.scoring-header h1 {
  font-size: 1.75rem;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
  }
  .scoring-btn-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-banner,
  .home-hero {
    padding: 2.5rem 1.25rem;
  }
  .home-stats-strip {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 0;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .over-ball {
    width: 42px;
    height: 42px;
    font-size: 0.85rem;
  }
  .intl-score-runs {
    font-size: 2.75rem;
  }
}

/* Dark theme text normalization: force readable text colors when using the dark theme */
[data-theme="dark"] {
  background: var(--bg-primary);
  color: var(--text-primary);
}

[data-theme="dark"] * {
  color: var(--text-primary) !important;
}

[data-theme="dark"] a,
[data-theme="dark"] a:visited {
  color: var(--text-primary) !important;
}
[data-theme="dark"] .text-gold {
  color: var(--gold) !important;
}
[data-theme="dark"] .text-red {
  color: var(--cricket-red) !important;
}
[data-theme="dark"] .score-display,
[data-theme="dark"] .btn-gold {
  color: var(--gold) !important;
}

/* Form controls and inputs - make backgrounds dark and text readable */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #111827 !important;
  color: var(--text-primary) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Allow opting-out by adding .no-theme-fix to elements that should retain original styling */
[data-theme="dark"] .no-theme-fix {
  color: inherit !important;
}
