.ui-c {
  --gully-bg: #121218;
  --gully-surface: #1e1e2a;
  --gully-card: #262636;
  --gully-neon: #5ee9b5;
  --gully-sky: #6cb4ee;
  --gully-orange: #f0a05a;
  --gully-yellow: #f0cc5a;
  --gully-muted: #9090a8;
}
body.ui-c {
  background: var(--gully-bg);
  color: #e8e8e8;
  font-family: 'Fredoka One', system-ui, sans-serif;
}

.ui-c .cricket-nav {
  background: var(--gully-surface);
}
.ui-c .cricket-nav .nav-pills .nav-link.active {
  background: rgba(94, 233, 181, 0.2);
  color: var(--gully-neon);
}

.ui-c #screen-setup .scoreboard,
.ui-c .scoreboard-screen .scoreboard {
  background: var(--gully-surface);
  border-radius: 20px;
}
.ui-c .scoreboard header h1 {
  font-family: 'Bangers', cursive;
  font-size: 2.2rem;
  letter-spacing: 2px;
  color: var(--gully-neon);
}
.ui-c .scoreboard-header h1 { font-size: 1.8rem; }
.ui-c .subtitle, .ui-c .match-info { opacity: 0.9; color: #b0b0b0; }

.ui-c .gully-score-hero {
  background: var(--gully-card);
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.ui-c .gully-batting-label {
  font-family: 'Bangers', cursive;
  font-size: 1rem;
  letter-spacing: 3px;
  color: var(--gully-sky);
  margin-bottom: 0.25rem;
}
.ui-c .gully-team-name {
  font-family: 'Bangers', cursive;
  font-size: 1.6rem;
  color: var(--gully-yellow);
  margin-bottom: 0.5rem;
}
.ui-c .gully-score-big {
  font-family: 'Bangers', cursive;
  font-size: 3.5rem;
  line-height: 1.1;
  color: var(--gully-neon);
}
.ui-c .gully-score-big .sep { color: var(--gully-sky); margin: 0 0.15em; }
.ui-c .gully-overs {
  font-size: 1.1rem;
  color: var(--gully-orange);
  margin-top: 0.35rem;
}
.ui-c .gully-target {
  font-family: 'Bangers', cursive;
  font-size: 1.3rem;
  color: var(--gully-sky);
  margin-top: 0.5rem;
}

.ui-c .gully-other {
  background: var(--gully-card);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}
.ui-c .gully-other .label { font-size: 0.75rem; color: var(--gully-orange); }
.ui-c .gully-other .team-name { color: #e8e8e8; font-size: 1.1rem; }
.ui-c .gully-other .score { color: var(--gully-neon); font-size: 1.2rem; }

.ui-c .controls {
  background: var(--gully-card);
  border-radius: 16px;
  padding: 1.5rem;
}
.ui-c .controls h3 {
  font-family: 'Bangers', cursive;
  font-size: 1.2rem;
  letter-spacing: 2px;
  color: var(--gully-orange);
  margin-bottom: 0.75rem;
}

.ui-c .run-btn, .ui-c .wicket-btn {
  font-family: 'Bangers', cursive;
  font-size: 1.2rem;
  padding: 0.7rem 0;
  border-radius: 10px;
  border: none;
  background: #353550;
  color: var(--gully-neon);
  width: 100%;
  transition: background 0.15s;
}
.ui-c .run-btn:hover, .ui-c .wicket-btn:hover {
  background: #404060;
}
.ui-c .run-btn:active, .ui-c .wicket-btn:active {
  transform: scale(0.96);
}
.ui-c .run-btn.run-dot { background: #2a2a3a; color: var(--gully-muted); }
.ui-c .run-btn.run-dot:hover { background: #333348; }
.ui-c .run-btn[data-runs="4"] { background: rgba(240,204,90,0.18); color: var(--gully-yellow); }
.ui-c .run-btn[data-runs="4"]:hover { background: rgba(240,204,90,0.28); }
.ui-c .run-btn[data-runs="6"] { background: rgba(108,180,238,0.18); color: var(--gully-sky); }
.ui-c .run-btn[data-runs="6"]:hover { background: rgba(108,180,238,0.28); }
.ui-c .wicket-btn { background: #b33030; color: #fff; }
.ui-c .wicket-btn:hover { background: #cc3a3a; }

.ui-c .extra-btn {
  font-family: 'Fredoka One', system-ui, sans-serif;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-radius: 8px;
  border: none;
  background: rgba(240,160,90,0.12);
  color: var(--gully-orange);
  width: 100%;
  transition: background 0.15s;
}
.ui-c .extra-btn:hover { background: rgba(240,160,90,0.22); }

.ui-c .action-btn {
  border-radius: 10px;
  border: none;
  background: #353550;
  color: var(--gully-neon);
  font-weight: 600;
  padding: 0.65rem 1rem;
  transition: background 0.15s;
}
.ui-c .action-btn:hover { background: #404060; }
.ui-c .action-btn.undo-btn { background: rgba(240,160,90,0.12); color: var(--gully-orange); }
.ui-c .action-btn.undo-btn:hover { background: rgba(240,160,90,0.22); }
.ui-c .action-btn.switch { background: rgba(108,180,238,0.12); color: var(--gully-sky); }
.ui-c .action-btn.switch:hover { background: rgba(108,180,238,0.22); }
.ui-c .action-btn.reset { background: #2a2a3a; color: var(--gully-muted); }
.ui-c .action-btn.reset:hover { background: #333348; }

.ui-c .last-ball {
  font-family: 'Fredoka One', system-ui, sans-serif;
  font-size: 1rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: var(--gully-card);
  margin-top: 1.25rem;
  text-align: center;
}
.ui-c .last-ball.innings-over-notification {
  background: rgba(240,204,90,0.15);
  color: var(--gully-yellow);
}

.ui-c .history-section {
  background: var(--gully-card);
  border-radius: 14px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}
.ui-c .history-section h2 {
  font-family: 'Bangers', cursive;
  font-size: 1.3rem;
  color: var(--gully-orange);
  letter-spacing: 1px;
}
.ui-c .history-item {
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.3rem;
}
.ui-c .history-item.history-boundary { background: rgba(240,204,90,0.12); }
.ui-c .history-item.history-wicket { background: rgba(108,180,238,0.12); }

.ui-c .setup-field label { color: #c0c0c0; }
.ui-c .setup-field input[type="text"],
.ui-c .setup-field input[type="number"] {
  background: var(--gully-card);
  border: none;
  border-radius: 10px;
  color: #fff;
}
.ui-c .setup-field input:focus { outline: none; box-shadow: 0 0 0 2px rgba(94,233,181,0.4); }
.ui-c .action-btn.start-btn, .ui-c .action-btn.toss-btn {
  background: rgba(94,233,181,0.15);
  color: var(--gully-neon);
}

.ui-c .runs-grid .run-btn,
.ui-c .runs-grid .wicket-btn { margin: 0; }
.ui-c .extras-grid .extra-btn { margin: 0; }

.ui-c .controls.innings-complete .runs-grid,
.ui-c .controls.innings-complete .extras-grid,
.ui-c .controls.match-over .runs-grid,
.ui-c .controls.match-over .extras-grid {
  pointer-events: none;
  opacity: 0.6;
}

/* Match result banner */
.ui-c .gully-match-result {
  background: var(--gully-neon);
  color: var(--gully-bg);
  font-family: 'Bangers', cursive;
  font-size: 1.5rem;
  letter-spacing: 1px;
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  animation: gullyResultPop 0.5s ease-out;
}
@keyframes gullyResultPop {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* Accordion styling */
.ui-c .gully-accordion {
  margin-top: 1.5rem;
}
.ui-c .gully-accordion .accordion-item {
  background: var(--gully-card);
  border: none;
  border-radius: 14px !important;
  overflow: hidden;
}
.ui-c .gully-accordion .accordion-button {
  background: var(--gully-card);
  color: var(--gully-orange);
  font-family: 'Bangers', cursive;
  font-size: 1.3rem;
  letter-spacing: 1px;
  padding: 1rem 1.25rem;
  box-shadow: none;
}
.ui-c .gully-accordion .accordion-button:not(.collapsed) {
  background: #2e2e42;
  color: var(--gully-orange);
}
.ui-c .gully-accordion .accordion-button::after {
  filter: invert(1) brightness(0.7);
}
.ui-c .gully-accordion .accordion-body {
  background: var(--gully-card);
  padding: 0.75rem 1.25rem 1.25rem;
}

/* Score card flash animations */
.ui-c .gully-score-hero {
  position: relative;
  overflow: hidden;
}
.ui-c .gully-score-hero.flash-four {
  animation: gullyFlashFour 0.7s ease-out;
}
.ui-c .gully-score-hero.flash-six {
  animation: gullyFlashSix 0.8s ease-out;
}
.ui-c .gully-score-hero.flash-wicket {
  animation: gullyFlashWicket 0.7s ease-out;
}
@keyframes gullyFlashFour {
  0%, 15% { background: rgba(240,204,90,0.5); }
  100% { background: var(--gully-card); }
}
@keyframes gullyFlashSix {
  0%, 20% { background: rgba(94,233,181,0.5); transform: scale(1.04); }
  100% { background: var(--gully-card); transform: scale(1); }
}
@keyframes gullyFlashWicket {
  0%, 15% { background: rgba(200,40,40,0.5); }
  100% { background: var(--gully-card); }
}

/* Cheer overlay */
.ui-c .gully-cheer-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}
.ui-c .gully-cheer-text {
  font-family: 'Bangers', cursive;
  font-size: 3rem;
  letter-spacing: 4px;
  opacity: 0;
  transform: scale(0.3);
  animation: gullyCheerPop 0.9s ease-out forwards;
}
.ui-c .gully-cheer-text.cheer-four {
  color: var(--gully-yellow);
  text-shadow: 0 0 20px rgba(240,204,90,0.6);
}
.ui-c .gully-cheer-text.cheer-six {
  color: var(--gully-neon);
  font-size: 3.5rem;
  text-shadow: 0 0 25px rgba(94,233,181,0.6);
}
@keyframes gullyCheerPop {
  0% { opacity: 0; transform: scale(0.3); }
  30% { opacity: 1; transform: scale(1.3); }
  60% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.1) translateY(-10px); }
}
