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

body {
  background-color: #0b0f19;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  gap: 30px;
}

/* --- Scorecard Main Frame --- */
.scorecard-container {
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  user-select: none;
}

.team-india, .team-pakistan {
  display: flex;
  align-items: center;
  height: 60px;
}

.logo-box {
  width: 60px;
  height: 60px;
  background: #1d4ed8;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pak-logo-bg {
  background: #a3e635;
}

.team-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.score-box {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 140px;
  font-weight: 900;
  font-size: 18px;
  text-align: center;
}

.score-top {
  background: #2563eb;
  color: #ff5722;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid #ff5722;
}

.score-bottom {
  background: #00b0ff;
  color: #000;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-info {
  display: flex;
  flex-direction: column;
  height: 60px;
  width: 260px;
  border-left: 2px solid #ff5722;
  border-right: 2px solid #ff5722;
}

.batsmen-row {
  background: #00b0ff;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-bottom: 2px solid #ff5722;
  padding: 0 8px;
}

.batsman {
  color: #ff5722;
  font-size: 13px;
  font-weight: bold;
}

.batsman-divider {
  width: 2px;
  height: 100%;
  background: #ff5722;
}

.match-title {
  background: #2563eb;
  color: #000;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

/* --- Bowler + Black THIS OVER Box --- */
.bowler-box {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 200px;
}

.bowler-top {
  background: #22c55e;
  color: #000;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 13px;
  font-weight: bold;
}

.this-over-box {
  background: #000000;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  border-top: 1px solid #222;
}

.over-label {
  color: #cbd5e1;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.ball-slots {
  display: flex;
  gap: 3px;
}

.ball-slot {
  width: 18px;
  height: 18px;
  background: #262626;
  border: 1px solid #404040;
  border-radius: 2px;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ball-slot.has-val {
  background: #1d4ed8;
  border-color: #3b82f6;
}

.ball-slot.is-four {
  background: #f59e0b;
  color: #000;
  border-color: #fbbf24;
}

.ball-slot.is-six {
  background: #8b5cf6;
  border-color: #a78bfa;
}

.ball-slot.is-wicket {
  background: #dc2626;
  border-color: #ef4444;
}

.ball-slot.is-extra {
  background: #047857;
  font-size: 9px;
}

/* --- Control Dashboard Panel --- */
.dashboard-panel {
  background: #1e293b;
  border-radius: 14px;
  padding: 20px;
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid #334155;
}

.panel-header {
  color: #f8fafc;
  font-size: 16px;
  font-weight: 800;
  border-bottom: 1px solid #334155;
  padding-bottom: 6px;
}

.control-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-title {
  color: #94a3b8;
  font-size: 12px;
  font-weight: bold;
}

.btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
  gap: 8px;
}

.btn {
  padding: 12px 8px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  color: #fff;
}

.btn:active {
  opacity: 0.8;
  transform: scale(0.98);
}

.btn-dot { background: #64748b; }
.btn-run { background: #0284c7; }
.btn-four { background: #f59e0b; color: #000; }
.btn-six { background: #7c3aed; }
.btn-extra { background: #059669; }
.btn-wicket { background: #dc2626; }
.btn-reset { background: #475569; }

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.input-grid input {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
}

@media (max-width: 600px) {
  .scorecard-container {
    transform: scale(0.85);
  }
  .input-grid {
    grid-template-columns: 1fr;
  }
}
