/* Public Scoreboard Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* NO GAME - FUTURISTIC BOCCE THEME */
/* ═══════════════════════════════════════════════════════════════════ */

.no-game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a12 100%);
  overflow: hidden;
  z-index: 100;
}

/* Floating Bocce Balls Background */
.no-game-balls-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.floating-ball {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  filter: blur(1px);
}

.floating-ball.ball-1 {
  width: clamp(120px, 15vh, 250px);
  height: clamp(120px, 15vh, 250px);
  background: radial-gradient(circle at 30% 30%, #ffd700 0%, #b8860b 60%, #8b6914 100%);
  box-shadow: inset -20px -20px 40px rgba(0,0,0,0.4), 0 0 60px rgba(255, 215, 0, 0.3);
  top: 15%;
  left: 10%;
  animation: float-ball-1 12s ease-in-out infinite;
}

.floating-ball.ball-2 {
  width: clamp(100px, 12vh, 200px);
  height: clamp(100px, 12vh, 200px);
  background: radial-gradient(circle at 30% 30%, #ff4040 0%, #cc0000 60%, #8b0000 100%);
  box-shadow: inset -15px -15px 30px rgba(0,0,0,0.4), 0 0 50px rgba(255, 64, 64, 0.3);
  top: 60%;
  right: 15%;
  animation: float-ball-2 15s ease-in-out infinite;
}

.floating-ball.ball-3 {
  width: clamp(80px, 10vh, 180px);
  height: clamp(80px, 10vh, 180px);
  background: radial-gradient(circle at 30% 30%, #ffd700 0%, #b8860b 60%, #8b6914 100%);
  box-shadow: inset -12px -12px 24px rgba(0,0,0,0.4), 0 0 40px rgba(255, 215, 0, 0.3);
  bottom: 20%;
  left: 20%;
  animation: float-ball-3 18s ease-in-out infinite;
}

.floating-ball.ball-4 {
  width: clamp(90px, 11vh, 190px);
  height: clamp(90px, 11vh, 190px);
  background: radial-gradient(circle at 30% 30%, #ff4040 0%, #cc0000 60%, #8b0000 100%);
  box-shadow: inset -14px -14px 28px rgba(0,0,0,0.4), 0 0 45px rgba(255, 64, 64, 0.3);
  top: 25%;
  right: 25%;
  animation: float-ball-4 14s ease-in-out infinite;
}

.floating-ball.pallino {
  width: clamp(40px, 5vh, 80px);
  height: clamp(40px, 5vh, 80px);
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #e0e0e0 60%, #b0b0b0 100%);
  box-shadow: inset -6px -6px 12px rgba(0,0,0,0.2), 0 0 30px rgba(255, 255, 255, 0.4);
  top: 45%;
  left: 50%;
  transform: translateX(-50%);
  animation: float-pallino 10s ease-in-out infinite;
  opacity: 0.25;
}

@keyframes float-ball-1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, 20px) rotate(90deg); }
  50% { transform: translate(10px, 40px) rotate(180deg); }
  75% { transform: translate(-20px, 15px) rotate(270deg); }
}

@keyframes float-ball-2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-25px, -30px) rotate(-90deg); }
  50% { transform: translate(-40px, 10px) rotate(-180deg); }
  75% { transform: translate(-10px, 35px) rotate(-270deg); }
}

@keyframes float-ball-3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(40px, -20px) rotate(120deg); }
  66% { transform: translate(20px, 30px) rotate(240deg); }
}

@keyframes float-ball-4 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-35px, 25px) rotate(180deg); }
}

@keyframes float-pallino {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-30px); }
}

/* Main Content Area */
.no-game-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 5vh, 6rem);
  padding: 2rem;
}

/* Icon Ring with Glow */
.no-game-icon-ring {
  position: relative;
  width: clamp(180px, 25vh, 350px);
  height: clamp(180px, 25vh, 350px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 64, 64, 0.3)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ring-pulse 3s ease-in-out infinite;
}

.ring-glow::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 215, 0, 0.4), transparent, rgba(255, 64, 64, 0.4), transparent);
  animation: ring-rotate 8s linear infinite;
  filter: blur(8px);
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes ring-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.bocce-icon-center {
  width: clamp(120px, 18vh, 280px);
  height: clamp(120px, 18vh, 280px);
  border-radius: 50%;
  background: rgba(20, 20, 35, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.center-logo {
  width: 80%;
  height: 80%;
  object-fit: contain;
  border-radius: 50%;
}

/* Text Group */
.no-game-text-group {
  text-align: center;
}

.no-game-title {
  font-size: clamp(2rem, 8vh, 7rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, #ffd700 50%, #ff6040 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  margin-bottom: clamp(0.5rem, 2vh, 2rem);
  animation: title-shimmer 4s ease-in-out infinite;
}

@keyframes title-shimmer {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

.no-game-subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 3rem);
  color: rgba(255, 255, 255, 0.5);
  font-size: clamp(0.9rem, 3vh, 2.5rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.subtitle-line {
  width: clamp(40px, 8vw, 150px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
}

/* Stats Bar */
.no-game-stats-bar {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1rem, 2.5vh, 3rem) clamp(2rem, 5vw, 6rem);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  backdrop-filter: blur(10px);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1vw, 1.5rem);
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(0.9rem, 2.5vh, 2rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-item i {
  font-size: clamp(1.1rem, 3vh, 2.5rem);
  color: #ffd700;
}

.stat-divider {
  width: 1px;
  height: clamp(24px, 4vh, 50px);
  background: rgba(255, 255, 255, 0.15);
}

/* Venue Bar for No-Game Mode */
.no-game-venue-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 2vh, 3rem) 2rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
  z-index: 50;
}

.no-game-venue-bar .venue-location {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1vw, 1.5rem);
  font-size: clamp(1rem, 3vh, 2.5rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.no-game-venue-bar .venue-location i {
  color: #ffd700;
  font-size: 1.2em;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .no-game-content {
    gap: 2rem;
    padding: 1rem;
  }
  
  .no-game-icon-ring {
    width: 140px;
    height: 140px;
  }
  
  .bocce-icon-center {
    width: 100px;
    height: 100px;
  }
  
  .no-game-stats-bar {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-radius: 20px;
  }
  
  .stat-divider {
    width: 60px;
    height: 1px;
  }
  
  .floating-ball.ball-1,
  .floating-ball.ball-2,
  .floating-ball.ball-3,
  .floating-ball.ball-4 {
    width: 60px;
    height: 60px;
  }
  
  .floating-ball.pallino {
    width: 25px;
    height: 25px;
  }
  
  .subtitle-line {
    width: 30px;
  }
}

body {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%) !important;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
}

/* Main Layout */
#ScoreboardLayout {
  position: relative;
  box-sizing: border-box;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 4vh 9vh 38vh 2vh 10vh 18vh;
  height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  gap: 0;
  row-gap: 2vh;
}

/* Fullscreen & Frames Buttons */
#FullscreenBtn { 
  position: static;
  background: rgba(40, 40, 40, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.8vh 1.6vh;
  font-size: 1.6vh;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
#FullscreenBtn:hover { 
  background: rgba(60, 60, 60, 0.95);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

#OpenFramesBtn { 
  position: absolute;
  top: 2%;
  right: 8%;
  background: rgba(40, 40, 40, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.2vh 2.4vh;
  font-size: 1.6vh;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: none; /* Hidden since frames are now at bottom */
}
#OpenFramesBtn:hover { 
  background: rgba(60, 60, 60, 0.95);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

/* Venue/Court (row 1 - now at top) */
#VenueCourtRow { 
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2vh;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 1.5vh 3vh;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Timeouts Section (row 2) */
.timeouts {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  font-size: 7vh;
  margin: 0;
  padding: 0 15vw;
}

.timeouts > div {
  display: flex;
  gap: 1.5vw;
  justify-content: center;
  align-items: center;
  flex: 1;
}
.score-cell {
  grid-column: 2 / span 2;
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6vw;
  position: relative;
}

/* Score Section (row 3) - now includes balls */
.score-cell {
  grid-column: 1;
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2vw;
  position: relative;
  padding: 0 2vw;
}

.score-side {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 30vw;
}

.score-text { 
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-size: 60vh;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.7),
               0 0 50px rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.score-home {
  color: var(--home-primary-color, #FFD700);
  background: linear-gradient(180deg, var(--home-primary-color, #FFD700) 0%, var(--home-secondary-color, #FFA500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 15px var(--home-primary-color, rgba(255, 215, 0, 0.4)));
}

.score-away {
  color: var(--away-primary-color, #FF3030);
  background: linear-gradient(180deg, var(--away-primary-color, #FF4040) 0%, var(--away-secondary-color, #FF1010) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 15px var(--away-primary-color, rgba(255, 48, 48, 0.4)));
}

/* Balls Container - now part of score row */
.balls-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1vw;
  padding: 0;
  flex-shrink: 0;
  width: 12vw;
}

#HomeBalls {
  order: 0;
}

#AwayBalls {
  order: 4;
}

.balls-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5vh;
  width: 100%;
}

/* Frames Display Under Teams */
.team-frames-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5vh;
  width: 100%;
}

/* Frame History Containers */
.frames-history {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
  margin: 0;
  max-height: none;
  overflow-y: visible;
  padding: 0;
}

.frames-history::-webkit-scrollbar {
  width: 4px;
}

.frames-history::-webkit-scrollbar-track {
  background: transparent;
}

.frames-history::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.frame-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(30, 30, 30, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 1vh 1vw;
  margin-top: 1vh;
  min-width: 3vw;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.frame-badge.frame-enter {
  animation: frameSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes frameSlideIn {
  0% {
    transform: translateY(-20px) scale(0.8);
    opacity: 0;
  }
  50% {
    transform: translateY(5px) scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.frame-badge.home-won {
  border-color: var(--home-primary-color, #FFD700);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.1) 100%);
}

.frame-badge.away-won {
  border-color: var(--away-primary-color, #FF3030);
  background: linear-gradient(135deg, rgba(255, 48, 48, 0.15) 0%, rgba(255, 16, 16, 0.1) 100%);
}

.frame-badge-number {
  font-size: 1.4vh;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.2vh;
  letter-spacing: 0.05em;
}

.frame-badge-points {
  font-size: 2.8vh;
  font-weight: 800;
}

.frame-badge.home-won .frame-badge-points {
  color: var(--home-primary-color, #FFD700);
}

.frame-badge.away-won .frame-badge-points {
  color: var(--away-primary-color, #FF3030);
}

/* Frame In Progress - Centered and Bigger */
#FrameInProgress {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 10vw;
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
  border: 3px solid rgba(92, 255, 92, 0.7);
  border-radius: 16px;
  padding: 2.5vh 2.5vw;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.9),
              0 0 50px rgba(92, 255, 92, 0.4),
              inset 0 1px 5px rgba(92, 255, 92, 0.15);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100;
}

#FrameInProgress.active {
  display: flex;
  animation: frameInProgressPulse 2s ease-in-out infinite;
}

#FrameInProgress.moving-to-home {
  left: 25%;
  transform: translate(-50%, -50%);
  border-color: var(--home-primary-color, #FFD700);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.9),
              0 0 50px var(--home-primary-color, rgba(255, 215, 0, 0.4)),
              inset 0 1px 5px var(--home-primary-color, rgba(255, 215, 0, 0.15));
}

#FrameInProgress.moving-to-away {
  left: 75%;
  transform: translate(-50%, -50%);
  border-color: var(--away-primary-color, #FF3030);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.9),
              0 0 50px var(--away-primary-color, rgba(255, 48, 48, 0.4)),
              inset 0 1px 5px var(--away-primary-color, rgba(255, 48, 48, 0.15));
}

@keyframes frameInProgressPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.9),
                0 0 50px rgba(92, 255, 92, 0.4),
                inset 0 1px 5px rgba(92, 255, 92, 0.15);
    border-color: rgba(92, 255, 92, 0.7);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.9),
                0 0 70px rgba(92, 255, 92, 0.6),
                inset 0 2px 8px rgba(92, 255, 92, 0.25);
    border-color: rgba(92, 255, 92, 0.9);
  }
}

.frame-in-progress-label {
  font-size: 2.5vh;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.8vh;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.frame-in-progress-number {
  font-size: 7vh;
  font-weight: 900;
  color: #5CFF5C;
  display: flex;
  align-items: center;
  gap: 1.2vw;
  text-shadow: 0 0 20px rgba(92, 255, 92, 0.6),
               0 0 40px rgba(92, 255, 92, 0.4),
               0 3px 12px rgba(0, 0, 0, 0.8);
  filter: drop-shadow(0 0 10px rgba(92, 255, 92, 0.5));
}

/* Make frame in progress match frame badge size */
@media (max-width: 1200px) {
  .frame-in-progress-number {
    font-size: 3vh;
  }
}

@media (max-width: 992px) {
  .frame-in-progress-number {
    font-size: 2.8vh;
  }
}

@media (max-width: 768px) {
  .frame-in-progress-number {
    font-size: 2.5vh;
  }
}

@media (max-width: 480px) {
  .frame-in-progress-number {
    font-size: 2.2vh;
  }
}

.frame-in-progress-spinner {
  color: #5CFF5C;
  font-size: 5.5vh;
  animation: spin 1s linear infinite;
  filter: drop-shadow(0 0 10px rgba(92, 255, 92, 0.6));
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ball-image {
  height: 9vh;
  width: 9vh;
  border-radius: 50%;
  object-fit: contain; /* Consistent display */
  background: rgba(40, 40, 40, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5),
              inset 0 2px 4px rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); /* Smoother transition */
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2)); /* Subtle glow */
  padding: 0.3vh; /* Consistent sizing */
  will-change: transform, opacity, filter; /* Performance optimization */
  backface-visibility: hidden; /* Smoother animations */
  perspective: 1000px; /* 3D effect */
}

/* Hovering any ball will subtly highlight all balls */
.balls-container:hover .ball-image {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Animation classes for ball appearance/disappearance */
.ball-enter {
  animation: ballEnter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.ball-exit {
  animation: ballExit 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes ballEnter {
  0% { 
    opacity: 0;
    transform: scale(0) rotate(-45deg);
    filter: brightness(1.5) drop-shadow(0 0 10px rgba(255,255,255,0.7));
  }
  60% {
    transform: scale(1.2) rotate(var(--random-rotate, 15deg));
  }
  100% { 
    opacity: 1;
    transform: scale(1) rotate(0);
    filter: brightness(1) drop-shadow(0 0 0 transparent);
  }
}

@keyframes ballExit {
  0% { 
    opacity: 1;
    transform: scale(1) rotate(0);
  }
  30% {
    transform: scale(1.1) rotate(calc(var(--random-rotate, -5deg) * -0.5));
  }
  100% { 
    opacity: 0;
    transform: scale(0) rotate(var(--random-rotate, 45deg));
    filter: brightness(0.7);
  }
}

/* Ball hover effect */
.ball-image {
  transition: transform 0.2s ease, filter 0.2s ease;
  cursor: default;
}
.ball-image:hover {
  transform: scale(1.1) translateY(-2px);
  filter: brightness(1.2);
}

.balls-side img[src=""],
.balls-side img:not([src]) {
  display: none;
}

.balls-side img:hover {
  transform: scale(1.05);
}

/* Teams (row 5) */
.team-row {
  grid-column: 1;
  grid-row: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4vw;
  margin-top: 1vh; /* Add space between scores and team names */
  padding: 0 15vw;
}

.timeouts > div {
  display: flex;
  gap: 1.5vw;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.timeouts .fa-clock,
.timeouts .fa-clock-o { 
  color: #fff;
  font-size: inherit;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  opacity: 0.9;
  transition: all 0.3s ease;
}

.timeouts .fa-clock:hover,
.timeouts .fa-clock-o:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Frames Display (row 5 - at bottom) */
/* OLD FRAMES DISPLAY REMOVED - Now showing frames next to balls */

/* Bottom Chronological Frames Display */
#BottomFramesRow {
  grid-column: 1;
  grid-row: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2vw;
  row-gap: 1.5vh;
  padding: 2vh 4vw;
  flex-wrap: wrap;
  min-height: 18vh;
  max-height: none;
  overflow: visible;
  align-content: flex-start;
}

.bottom-frame-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 30, 30, 0.85);
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 9vh;
  height: 9vh;
  font-size: 5.5vh;
  font-weight: 900;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  margin: 0.5vh 0;
}

.bottom-frame-badge.home-won {
  color: var(--home-primary-color, #FFD700);
  border-color: var(--home-primary-color, #FFD700);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.1) 100%);
  text-shadow: 0 0 15px var(--home-primary-color, #FFD700),
               0 2px 8px rgba(0, 0, 0, 0.8);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5),
              0 0 25px var(--home-primary-color, rgba(255, 215, 0, 0.3));
}

.bottom-frame-badge.away-won {
  color: var(--away-primary-color, #FF3030);
  border-color: var(--away-primary-color, #FF3030);
  background: linear-gradient(135deg, rgba(255, 48, 48, 0.2) 0%, rgba(255, 16, 16, 0.1) 100%);
  text-shadow: 0 0 15px var(--away-primary-color, #FF3030),
               0 2px 8px rgba(0, 0, 0, 0.8);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5),
              0 0 25px var(--away-primary-color, rgba(255, 48, 48, 0.3));
}

.bottom-frame-badge.frame-enter {
  animation: bottomFrameSlideIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bottomFrameSlideIn {
  0% {
    transform: translateY(40px) scale(0.3);
    opacity: 0;
  }
  50% {
    transform: translateY(-10px) scale(1.15);
    opacity: 0.9;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.bottom-frame-badge:hover {
  transform: scale(1.15) translateY(-3px);
  filter: brightness(1.15);
}

.team-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
}

.team-name {
  width: 100%;
  font-weight: 800;
  font-size: 7vh;
  text-align: center;
  line-height: 1.1;
  word-break: break-word;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6),
               0 0 30px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 12vh;
}

.team-name img {
  max-width: 100%;
  max-height: 12vh;
  object-fit: contain;
  max-width: 40vw;
  flex: 1;
}

/* Frames Display (row 5 - at bottom) */
/* OLD FRAMES DISPLAY REMOVED - Now showing frames next to balls */


/* Modal - Hidden since frames moved to sides */
#FramesModal { 
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
  #ScoreboardLayout {
    grid-template-columns: 1fr;
    grid-template-rows: 4vh 9vh 33vh 2vh 10vh 16vh;
    row-gap: 2vh;
  }
  .score-cell {
    padding: 0 1.5vw;
    gap: 1.5vw;
  }
  .balls-side {
    width: 11vw;
  }
  .score-text { font-size: 52vh; }
  .team-name { font-size: 6vh; }
  .ball-image { height: 8vh; width: 8vh; }
  .frame-badge { min-width: 3.5vw; }
  .bottom-frame-badge { width: 8.5vh; height: 8.5vh; font-size: 5.2vh; }
  #BottomFramesRow { gap: 1.8vw; padding: 2vh 3vw; row-gap: 1.5vh; min-height: 16vh; }
}

@media (max-width: 1200px) {
  #ScoreboardLayout {
    grid-template-columns: 1fr;
    grid-template-rows: 4vh 8vh 31vh 2vh 9vh 15vh;
    row-gap: 2vh;
  }
  .score-cell {
    padding: 0 1.5vw;
    gap: 1.5vw;
  }
  .balls-side {
    width: 10vw;
  }
  .score-text { font-size: 48vh; }
  .team-name { font-size: 5.5vh; }
  .ball-image { height: 7vh; width: 7vh; }
  .timeouts { font-size: 6vh; }
  .frame-badge { min-width: 4vw; }
  .bottom-frame-badge { width: 8vh; height: 8vh; font-size: 5vh; }
  #BottomFramesRow { gap: 1.5vw; padding: 2vh 2vw; row-gap: 1.5vh; min-height: 15vh; }
}

@media (max-width: 992px) {
  #ScoreboardLayout {
    grid-template-columns: 1fr;
    grid-template-rows: 6vh 7vh 27vh 6vh 8vh 14vh;
    row-gap: 2vh;
  }
  .score-cell {
    padding: 0 1vw;
    gap: 1vw;
  }
  .balls-side {
    width: 8vw;
  }
  .score-text { font-size: 42vh; }
  .team-name { font-size: 5vh; }
  .ball-image { height: 6vh; width: 6vh; }
  .timeouts { font-size: 5.5vh; }
  .frame-badge { min-width: 4.5vw; padding: 0.8vh 0.8vw; }
  .frame-badge-points { font-size: 2.4vh; }
  .frame-badge-number { font-size: 1.2vh; }
  #FrameInProgress {
    min-width: 10vw;
    padding: 2.5vh 2.5vw;
  }
  .frame-in-progress-number { font-size: 7vh; }
  .frame-in-progress-label { font-size: 2.6vh; }
  .frame-in-progress-spinner { font-size: 5.5vh; }
  .bottom-frame-badge { width: 7.5vh; height: 7.5vh; font-size: 4.8vh; gap: 1.5vw; }
  #BottomFramesRow { gap: 1.2vw; padding: 1.5vh 2vw; row-gap: 1.5vh; min-height: 14vh; }
}

@media (max-width: 1024px) {
  #ScoreboardLayout {
    grid-template-columns: 1fr;
    grid-template-rows: 5vh 7vh 29vh 6vh 8vh 14vh;
    row-gap: 2vh;
  }
  .score-cell {
    padding: 0 1.2vw;
    gap: 1.2vw;
  }
  .balls-side {
    width: 9vw;
  }
  .score-text { font-size: 45vh; }
  .team-name { font-size: 5.2vh; }
  .ball-image { height: 6.5vh; width: 6.5vh; }
  .timeouts { font-size: 5.8vh; }
  .frame-badge { min-width: 4.2vw; padding: 0.9vh 0.9vw; }
  .frame-badge-points { font-size: 2.6vh; }
  .frame-badge-number { font-size: 1.3vh; }
  #FrameInProgress {
    min-width: 11vw;
    padding: 2.8vh 2.8vw;
  }
  .frame-in-progress-number { font-size: 7.5vh; }
  .frame-in-progress-label { font-size: 2.8vh; }
  .frame-in-progress-spinner { font-size: 5.8vh; }
  .bottom-frame-badge { width: 8vh; height: 8vh; font-size: 5vh; }
  #BottomFramesRow { gap: 1.5vw; padding: 2vh 2vw; row-gap: 1.5vh; min-height: 14vh; }
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }
  
  #ScoreboardLayout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto auto auto auto;
    padding: 2vh 3vw;
    row-gap: 1.5vh;
    height: auto;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
  }
  
  /* Reorganize layout for mobile */
  #VenueCourtRow {
    grid-column: 1;
    grid-row: 1;
    font-size: 2.4vh;
    padding: 1vh 0;
    width: 100%;
  }
  
  .score-cell {
    grid-column: 1;
    grid-row: 2;
    flex-direction: column;
    gap: 2vh;
    padding: 2vh 0;
    width: 100%;
    position: relative;
  }
  
  .score-side {
    width: 100%;
    justify-content: center;
    position: relative;
  }
  
  .score-text {
    font-size: 28vh;
    line-height: 1;
  }
  
  #HomeBalls {
    grid-column: 1;
    grid-row: 4;
    flex-direction: column;
    justify-content: center;
    padding: 1vh 0;
    width: 100%;
  }
  
  #AwayBalls {
    grid-column: 1;
    grid-row: 5;
    flex-direction: column;
    justify-content: center;
    padding: 1vh 0;
    width: 100%;
  }
  
  #BottomFramesRow {
    grid-column: 1;
    grid-row: 7;
    gap: 2vw;
    row-gap: 1.5vh;
    padding: 1.5vh 2vw;
    min-height: auto;
  }
  
  .bottom-frame-badge {
    width: 7vh;
    height: 7vh;
    font-size: 4.5vh;
  }
  
  .balls-side {
    padding-top: 0;
    width: 100%;
    position: relative;
  }
  
  .balls-container {
    flex-direction: row;
    gap: 1.5vw;
    justify-content: center;
    width: 100%;
    overflow-x: auto;
    padding: 1vh 0;
  }
  
  .frames-history {
    flex-direction: row;
    max-width: 100%;
    overflow-x: auto;
    padding: 1vh 0;
    width: 100%;
    justify-content: center;
  }
  
  .team-column {
    width: 100%;
    margin-bottom: 1vh;
  }
  
  .frame-badge {
    min-width: 12vw;
    padding: 1vh 1.5vw;
    flex-shrink: 0;
  }
  
  .team-row {
    grid-column: 1;
    grid-row: 6;
    flex-direction: column;
    gap: 2vh;
    width: 100%;
    margin-top: 1vh; /* Add space between scores and team names on mobile */
  }
  
  .team-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5vh;
  }
  
  .team-name {
    font-size: 4vh;
    height: auto;
    min-height: 8vh;
    width: 100%;
  }
  
  .team-name img {
    max-height: 8vh;
    max-width: 80vw;
  }
  
  .ball-image {
    height: 5vh;
    width: 5vh;
    flex-shrink: 0;
  }
  
  #FrameInProgress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 100;
    min-width: 25vw;
    max-width: 30vw;
    padding: 2vh 3vw;
  }
  
  .frame-in-progress-number { font-size: 6vh; }
  .frame-in-progress-label { font-size: 2.2vh; }
  .frame-in-progress-spinner { font-size: 5vh; }
}

@media (max-width: 480px) {
  #ScoreboardLayout {
    padding: 1.5vh 2vw;
    width: 100%;
    max-width: 100vw;
  }
  
  #VenueCourtRow {
    font-size: 2vh;
    width: 100%;
  }
  
  .score-text {
    font-size: 18vh;
  }
  
  .team-name {
    font-size: 3.5vh;
    min-height: 7vh;
    width: 100%;
  }
  
  .team-name img {
    max-height: 7vh;
    max-width: 90vw;
  }
  
  .timeouts {
    font-size: 4vh;
    width: 100%;
  }
  
  .ball-image {
    height: 4vh;
    width: 4vh;
    flex-shrink: 0;
  }
  
  .frame-badge {
    min-width: 15vw;
    padding: 0.8vh 1.2vw;
    flex-shrink: 0;
  }
  
  .frame-badge-points {
    font-size: 2vh;
  }
  
  .frame-badge-number {
    font-size: 1vh;
  }
  
  .balls-container {
    gap: 1vw;
  }
  
  #BottomFramesRow {
    gap: 2.5vw;
    row-gap: 1.5vh;
    padding: 1.5vh 2vw;
  }
  
  .bottom-frame-badge {
    width: 5.5vh;
    height: 5.5vh;
    font-size: 3.5vh;
  }
  
  #FrameInProgress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 100;
    min-width: 30vw;
    max-width: 35vw;
    padding: 1.8vh 2.5vw;
  }
  
  .frame-in-progress-number { font-size: 5.5vh; }
  .frame-in-progress-label { font-size: 2vh; }
  .frame-in-progress-spinner { font-size: 4.5vh; }
  
  #BottomFramesRow {
    gap: 3vw;
    row-gap: 1.5vh;
    padding: 1.5vh 1.5vw;
  }
  
  .bottom-frame-badge {
    width: 5vh;
    height: 5vh;
    font-size: 3.2vh;
  }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) and (hover: none) and (pointer: coarse) {
  #FullscreenBtn {
    padding: 1vh 1.5vh;
    font-size: 1.4vh;
    min-height: 36px; /* iOS touch target minimum */
    min-width: 36px;
  }
  
  .ball-image {
    cursor: pointer;
    margin: 0.5vh;
  }
  
  .frame-badge {
    margin: 0.5vh;
    cursor: default;
  }
}

/* Landscape orientation for mobile devices */
@media (max-height: 600px) and (orientation: landscape) {
  #ScoreboardLayout {
    grid-template-columns: 5vw 1fr 1fr 5vw;
    grid-template-rows: 8vh 6vh 25vh 8vh 5vh 12vh;
    row-gap: 1vh;
  }
  
  .score-text {
    font-size: 28vh;
  }
  
  .team-name {
    font-size: 4.5vh;
    height: 10vh;
  }
  
  .team-name img {
    max-height: 10vh;
  }
  
  .timeouts {
    font-size: 5vh;
  }
  
  .ball-image {
    height: 5vh;
    width: 5vh;
  }
  
  .bottom-frame-badge {
    width: 5vh;
    height: 5vh;
    font-size: 3.2vh;
  }
}

/* Ultra-wide screens (21:9 aspect ratio and wider) */
@media (min-aspect-ratio: 21/9) and (min-width: 1400px) {
  #ScoreboardLayout {
    grid-template-columns: 1fr;
    grid-template-rows: 4vh 9vh 54vh 2vh 10vh 18vh;
    row-gap: 2vh;
  }
  
  .score-cell {
    padding: 0 3vw;
    gap: 3vw;
  }

  .balls-side {
    width: 15vw;
  }

  .score-text {
    font-size: 54vh;
  }
  
  .team-name {
    font-size: 6.5vh;
  }
  
  .ball-image {
    height: 10vh;
    width: 10vh;
  }
  
  .frame-badge {
    min-width: 3vw;
  }
  
  .bottom-frame-badge {
    width: 11vh;
    height: 11vh;
    font-size: 6.5vh;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .ball-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
  
  .team-name img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ========================================
   STAT CELEBRATION OVERLAY STYLES
   ======================================== */

.stat-celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

.stat-celebration-overlay.hidden {
  display: none;
}

.stat-celebration-overlay.show {
  display: block !important;
  pointer-events: auto !important;
  animation: overlayFadeIn 0.3s ease-out forwards;
}

.stat-celebration-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.stat-celebration-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 4rem 6rem;
  border-radius: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.stat-celebration-player-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.stat-celebration-player-avatar {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.stat-celebration-player-name {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
}

.stat-celebration-icon {
  font-size: 12rem;
}

.stat-celebration-text {
  font-size: 4rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes statPopIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(-10deg);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

@keyframes statMoveToHome {
  0% {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  40% {
    top: 48%;
    left: 40%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  100% {
    top: 45%;
    left: 12%;
    transform: translate(-50%, -50%) scale(0.25);
    opacity: 1;
  }
}

@keyframes statMoveToAway {
  0% {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  40% {
    top: 48%;
    left: 60%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  100% {
    top: 45%;
    left: 88%;
    transform: translate(-50%, -50%) scale(0.25);
    opacity: 1;
  }
}

.stat-celebration-content.pop-in {
  animation: statPopIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.stat-celebration-content.move-to-home {
  animation: statMoveToHome 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stat-celebration-content.move-to-away {
  animation: statMoveToAway 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Stat-specific colors for celebration */
.stat-celebration-good-point {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
}

.stat-celebration-bad-point {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.stat-celebration-hit {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.stat-celebration-miss {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
}

.stat-celebration-foot-foul {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
}

.stat-celebration-shot-clock-violation {
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
  color: white;
}

/* Stat Badges that replace balls */
.stat-badge {
  position: relative;
  width: var(--ball-size, 8vh);
  height: var(--ball-size, 8vh);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 3px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.stat-badge-avatar {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.stat-badge-icon {
  position: relative;
  z-index: 1;
  font-size: 3.5vh;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Match Preview Mode Styles
   ============================================ */

.match-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  padding: 2rem;
  gap: 3vh;
  overflow: hidden;
  /* Match the no-game futuristic background */
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a12 100%);
}

/* Floating Bocce Balls Background for Preview Modes */
.preview-balls-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.preview-balls-bg .floating-ball {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  filter: blur(1px);
}

.preview-balls-bg .floating-ball.ball-1 {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at 30% 30%, var(--home-primary-color, #ffd700) 0%, var(--home-secondary-color, #b8860b) 60%, color-mix(in srgb, var(--home-primary-color, #ffd700) 50%, black) 100%);
  box-shadow: inset -20px -20px 40px rgba(0,0,0,0.4), 0 0 60px color-mix(in srgb, var(--home-primary-color, #ffd700) 30%, transparent);
  top: 15%;
  left: 10%;
  animation: float-ball-1 12s ease-in-out infinite;
}

.preview-balls-bg .floating-ball.ball-2 {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at 30% 30%, var(--away-primary-color, #ff4040) 0%, var(--away-secondary-color, #cc0000) 60%, color-mix(in srgb, var(--away-primary-color, #ff4040) 50%, black) 100%);
  box-shadow: inset -15px -15px 30px rgba(0,0,0,0.4), 0 0 50px color-mix(in srgb, var(--away-primary-color, #ff4040) 30%, transparent);
  top: 60%;
  right: 15%;
  animation: float-ball-2 15s ease-in-out infinite;
}

.preview-balls-bg .floating-ball.ball-3 {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 30% 30%, var(--home-primary-color, #ffd700) 0%, var(--home-secondary-color, #b8860b) 60%, color-mix(in srgb, var(--home-primary-color, #ffd700) 50%, black) 100%);
  box-shadow: inset -12px -12px 24px rgba(0,0,0,0.4), 0 0 40px color-mix(in srgb, var(--home-primary-color, #ffd700) 30%, transparent);
  bottom: 20%;
  left: 20%;
  animation: float-ball-3 18s ease-in-out infinite;
}

.preview-balls-bg .floating-ball.ball-4 {
  width: 90px;
  height: 90px;
  background: radial-gradient(circle at 30% 30%, var(--away-primary-color, #ff4040) 0%, var(--away-secondary-color, #cc0000) 60%, color-mix(in srgb, var(--away-primary-color, #ff4040) 50%, black) 100%);
  box-shadow: inset -14px -14px 28px rgba(0,0,0,0.4), 0 0 45px color-mix(in srgb, var(--away-primary-color, #ff4040) 30%, transparent);
  top: 25%;
  right: 25%;
  animation: float-ball-4 14s ease-in-out infinite;
}

.preview-balls-bg .floating-ball.pallino {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #e0e0e0 60%, #b0b0b0 100%);
  box-shadow: inset -6px -6px 12px rgba(0,0,0,0.2), 0 0 30px rgba(255, 255, 255, 0.4);
  top: 45%;
  left: 50%;
  transform: translateX(-50%);
  animation: float-pallino 10s ease-in-out infinite;
  opacity: 0.2;
}

/* Bocce Labs Logo in Preview Modes */
.preview-logo-container {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 100;
}

.preview-logo {
  width: clamp(80px, 8vw, 140px);
  height: auto;
  border-radius: 50%;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .preview-logo {
    width: clamp(60px, 10vw, 100px);
  }
  
  .preview-balls-bg .floating-ball.ball-1,
  .preview-balls-bg .floating-ball.ball-2,
  .preview-balls-bg .floating-ball.ball-3,
  .preview-balls-bg .floating-ball.ball-4 {
    width: 60px;
    height: 60px;
  }
  
  .preview-balls-bg .floating-ball.pallino {
    width: 25px;
    height: 25px;
  }
}

/* Subtle ambient glow - no lines */
.match-preview-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--home-primary-color, #ffd700) 8%, transparent) 0%, transparent 40%),
    radial-gradient(ellipse at 70% 80%, color-mix(in srgb, var(--away-primary-color, #ff4040) 8%, transparent) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* Remove decorative balls - keep it clean */
.match-preview-container::after {
  display: none;
}

/* Position VenueCourtRow at the top of match preview */
.match-preview-container #VenueCourtRow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  background: transparent;
  border-bottom: none;
}

.match-preview-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5vh;
  z-index: 1;
}

.court-name-inline {
  display: flex;
  align-items: center;
  gap: 1vh;
  font-size: 2vh;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.4);
  padding: 1vh 2.5vh;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  margin-bottom: 0.5vh;
}

.court-name-inline::before {
  content: '\f041';
  font-family: 'FontAwesome';
  color: #22c55e;
}

.match-type-badge {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
  color: white;
  padding: 1.2vh 4vh;
  border-radius: 50px;
  font-size: 2.4vh;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  box-shadow: 
    0 4px 25px rgba(34, 197, 94, 0.5),
    0 0 40px rgba(34, 197, 94, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { 
    box-shadow: 0 4px 25px rgba(34, 197, 94, 0.5), 0 0 40px rgba(34, 197, 94, 0.3);
  }
  50% { 
    box-shadow: 0 4px 35px rgba(34, 197, 94, 0.7), 0 0 60px rgba(34, 197, 94, 0.5);
  }
}

.scheduled-time {
  display: flex;
  align-items: center;
  gap: 1vh;
  color: rgba(255, 255, 255, 0.8);
  font-size: 2.5vh;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.3);
  padding: 1vh 2.5vh;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.scheduled-time i {
  color: #22c55e;
  animation: clockPulse 1s ease-in-out infinite;
}

.venue-location {
  display: flex;
  align-items: center;
  gap: 1vh;
  color: rgba(255, 255, 255, 0.8);
  font-size: 2.5vh;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.3);
  padding: 1vh 2.5vh;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.venue-location i {
  color: #22c55e;
  animation: clockPulse 1s ease-in-out infinite;
}

@keyframes clockPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.match-preview-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4vw;
  width: 100%;
  max-width: 1200px;
  z-index: 1;
}

.match-preview-teams.compact {
  gap: 2vw;
}

.match-preview-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2vh;
}

.team-logo-container {
  width: 25vh;
  height: 25vh;
  border-radius: 50%;
  overflow: visible;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  position: relative;
}

/* Glowing ring animation */
.match-preview-team .team-logo-container::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  border: 3px solid;
  border-color: var(--home-primary-color, #FFD700);
  box-shadow: 
    0 0 20px var(--home-primary-color, #FFD700),
    0 0 40px var(--home-primary-color, #FFD700),
    inset 0 0 20px var(--home-primary-color, #FFD700);
  animation: pulseGlow 2s ease-in-out infinite;
  z-index: -1;
}

.match-preview-team.away-team .team-logo-container::before {
  border-color: var(--away-primary-color, #FF3030);
  box-shadow: 
    0 0 20px var(--away-primary-color, #FF3030),
    0 0 40px var(--away-primary-color, #FF3030),
    inset 0 0 20px var(--away-primary-color, #FF3030);
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

.team-logo-container.small {
  width: 15vh;
  height: 15vh;
}

.home-team .team-logo-container {
  border-color: var(--home-primary-color, #FFD700);
  box-shadow: 
    0 0 30px rgba(255, 215, 0, 0.4),
    0 0 60px rgba(255, 215, 0, 0.2),
    inset 0 0 20px rgba(255, 215, 0, 0.1);
}

.away-team .team-logo-container {
  border-color: var(--away-primary-color, #FF3030);
  box-shadow: 
    0 0 30px rgba(255, 48, 48, 0.4),
    0 0 60px rgba(255, 48, 48, 0.2),
    inset 0 0 20px rgba(255, 48, 48, 0.1);
}

.team-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.team-logo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6vh;
  font-weight: 900;
  color: white;
}

.team-logo-placeholder.small span {
  font-size: 4vh;
}

.team-logo-placeholder.home {
  background: linear-gradient(135deg, var(--home-primary-color, #FFD700) 0%, var(--home-secondary-color, #FFA500) 100%);
}

.team-logo-placeholder.away {
  background: linear-gradient(135deg, var(--away-primary-color, #FF3030) 0%, var(--away-secondary-color, #FF1010) 100%);
}

.team-name-preview {
  font-size: 3.5vh;
  font-weight: 800;
  color: white;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  max-width: 30vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.vs-divider span {
  font-size: 8vh;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
  animation: vsPulse 2s ease-in-out infinite;
}

@keyframes vsPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.vs-divider.small span {
  font-size: 4vh;
}

/* Match Games Tabs - Futuristic */
.match-games-tabs {
  display: flex;
  gap: 2vh;
  margin-top: 3vh;
  z-index: 1;
}

.game-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2vh 3.5vh;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.game-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.game-tab:hover::before {
  left: 100%;
}

.game-tab.upcoming {
  opacity: 0.5;
  border-style: dashed;
}

.game-tab.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.4) 0%, rgba(124, 58, 237, 0.4) 100%);
  border-color: #7c3aed;
  box-shadow: 
    0 0 20px rgba(124, 58, 237, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: activeGamePulse 2s ease-in-out infinite;
}

@keyframes activeGamePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.4); }
  50% { box-shadow: 0 0 35px rgba(124, 58, 237, 0.6); }
}

.game-tab.completed {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.3) 100%);
  border-color: #22c55e;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}

.game-number {
  font-size: 1.8vh;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.game-score {
  font-size: 2.5vh;
  font-weight: 900;
  color: white;
  margin-top: 0.5vh;
}

/* ============================================
   Between Games View - Enhanced Intermission
   ============================================ */

.between-games-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  padding: 2rem;
  gap: 2.5vh;
}

/* Position VenueCourtRow at the top of between games view */
.between-games-container #VenueCourtRow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  background: transparent;
}

/* Intermission Banner */
.intermission-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
  margin-top: 2vh;
}

.intermission-text {
  display: flex;
  align-items: center;
  gap: 1.5vh;
  padding: 1.5vh 4vh;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  border: 2px solid rgba(251, 191, 36, 0.4);
  border-radius: 50px;
  animation: intermission-pulse 3s ease-in-out infinite;
}

.intermission-text i {
  font-size: 2.5vh;
  color: #fbbf24;
}

.intermission-text span {
  font-size: 2vh;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: #fbbf24;
  text-transform: uppercase;
}

@keyframes intermission-pulse {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.4);
  }
  50% { 
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.4);
    border-color: rgba(251, 191, 36, 0.6);
  }
}

.match-type-badge-inline {
  font-size: 1.4vh;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* Main Between Games Layout */
.between-games-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4vw;
  width: 100%;
  max-width: 1600px;
  padding: 2vh 0;
}

/* Team Display */
.between-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2vh;
  flex: 1;
  max-width: 400px;
  transition: all 0.3s ease;
}

.between-team.leading {
  transform: scale(1.05);
}

.between-team-logo {
  width: clamp(120px, 18vh, 200px);
  height: clamp(120px, 18vh, 200px);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.3);
}

.between-team.leading .between-team-logo {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.3), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.between-team.home-team.leading .between-team-logo {
  border-color: var(--home-primary-color, #FFD700);
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.3), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.between-team.away-team.leading .between-team-logo {
  border-color: var(--away-primary-color, #FF3030);
  box-shadow: 0 0 40px rgba(255, 48, 48, 0.3), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.between-team-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.between-team-logo .team-logo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5vh;
  font-weight: 900;
}

.between-team-name {
  font-size: clamp(1.2rem, 2.5vh, 2rem);
  font-weight: 800;
  color: white;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.between-team.leading .between-team-name {
  color: #22c55e;
}

.between-team.home-team.leading .between-team-name {
  color: var(--home-primary-color, #FFD700);
}

.between-team.away-team.leading .between-team-name {
  color: var(--away-primary-color, #FF3030);
}

/* Center Score Display */
.between-score-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
}

.between-match-score {
  display: flex;
  align-items: center;
  gap: 2vw;
}

.between-match-score .score-home,
.between-match-score .score-away {
  font-size: clamp(6rem, 18vh, 14rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.4);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  min-width: 12vh;
  text-align: center;
}

.between-match-score .score-home.leading {
  color: var(--home-primary-color, #FFD700);
  text-shadow: 0 0 40px rgba(255, 215, 0, 0.4), 0 4px 20px rgba(0, 0, 0, 0.5);
}

.between-match-score .score-away.leading {
  color: var(--away-primary-color, #FF3030);
  text-shadow: 0 0 40px rgba(255, 48, 48, 0.4), 0 4px 20px rgba(0, 0, 0, 0.5);
}

.between-match-score .score-divider {
  font-size: clamp(4rem, 10vh, 8rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.2);
}

.between-score-label {
  font-size: 1.4vh;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* Game Results Pills */
.between-games-summary {
  display: flex;
  gap: 1.5vh;
  margin-top: 1vh;
  flex-wrap: wrap;
  justify-content: center;
}

.game-result-pill {
  display: flex;
  align-items: center;
  gap: 1.5vh;
  padding: 1.2vh 2vh;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.game-result-pill.completed {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.game-result-pill.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
  border-color: rgba(124, 58, 237, 0.5);
  animation: pulse-glow 2s ease-in-out infinite;
}

.game-result-pill.upcoming {
  opacity: 0.4;
}

.game-result-pill.next-up {
  opacity: 0.7;
  border-color: rgba(251, 191, 36, 0.4);
  animation: next-up-pulse 2s ease-in-out infinite;
}

@keyframes next-up-pulse {
  0%, 100% { border-color: rgba(251, 191, 36, 0.3); }
  50% { border-color: rgba(251, 191, 36, 0.6); }
}

.pill-game-num {
  font-size: 1.4vh;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  min-width: 3vh;
}

.pill-scores {
  display: flex;
  align-items: center;
  gap: 0.8vh;
}

.pill-scores.upcoming {
  color: rgba(255, 255, 255, 0.3);
}

.pill-home, .pill-away {
  font-size: 2.2vh;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
  min-width: 2.5vh;
  text-align: center;
}

.pill-home.winner {
  color: var(--home-primary-color, #FFD700);
}

.pill-away.winner {
  color: var(--away-primary-color, #FF3030);
}

.pill-sep {
  font-size: 1.8vh;
  color: rgba(255, 255, 255, 0.3);
}

.pill-status {
  font-size: 1.2vh;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-result-pill.completed .pill-status {
  color: #22c55e;
}

.pill-status.live {
  color: #7c3aed;
  display: flex;
  align-items: center;
  gap: 0.5vh;
}

.pill-status.live i {
  font-size: 0.8vh;
  animation: live-blink 1s ease-in-out infinite;
}

@keyframes live-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Enhanced Next Game Prompt */
.next-game-prompt-enhanced {
  display: flex;
  align-items: center;
  gap: 2vh;
  margin-top: 2vh;
  padding: 2vh 4vh;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
  border: 2px solid rgba(124, 58, 237, 0.3);
  border-radius: 16px;
  animation: prompt-glow 3s ease-in-out infinite;
}

@keyframes prompt-glow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
  }
  50% { 
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.4);
  }
}

.prompt-icon {
  font-size: 4vh;
  color: #7c3aed;
  animation: prompt-icon-pulse 2s ease-in-out infinite;
}

@keyframes prompt-icon-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

.prompt-text {
  display: flex;
  flex-direction: column;
  gap: 0.5vh;
}

.prompt-main {
  font-size: 2.2vh;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prompt-sub {
  font-size: 1.4vh;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}

/* Mobile responsive for between games */
@media (max-width: 768px) {
  .between-games-main {
    flex-direction: column;
    gap: 3vh;
  }
  
  .between-team {
    flex-direction: row;
    gap: 2vh;
  }
  
  .between-team-logo {
    width: clamp(80px, 15vw, 120px);
    height: clamp(80px, 15vw, 120px);
  }
  
  .between-match-score .score-home,
  .between-match-score .score-away {
    font-size: clamp(4rem, 15vw, 8rem);
  }
  
  .between-score-center {
    order: -1;
  }
  
  .next-game-prompt-enhanced {
    padding: 1.5vh 3vh;
  }
  
  .prompt-icon {
    font-size: 3vh;
  }
}

/* Countdown Timer */
.countdown-timer-container {
  position: absolute;
  bottom: 2vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1vh;
  padding: 1vh 2.5vh;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  z-index: 20;
}

.countdown-timer-container i {
  font-size: 1.6vh;
  color: rgba(255, 255, 255, 0.5);
}

.countdown-text {
  font-size: 1.4vh;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
}

#CountdownSeconds {
  color: #fbbf24;
  font-weight: 700;
  min-width: 4ch;
  display: inline-block;
}

@media (max-width: 768px) {
  .countdown-timer-container {
    bottom: 1.5vh;
    padding: 0.8vh 2vh;
  }
  
  .countdown-timer-container i {
    font-size: 1.4vh;
  }
  
  .countdown-text {
    font-size: 1.2vh;
  }
}

/* Keep old styles for backwards compatibility */
.match-score-header {
  margin-bottom: 2vh;
}

.match-teams-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3vw;
  width: 100%;
  max-width: 1400px;
}

.match-team-side {
  display: flex;
  align-items: center;
  gap: 2vh;
}

.match-team-side.home-side {
  flex-direction: row;
}

.match-team-side.away-side {
  flex-direction: row-reverse;
}

.match-wins-count {
  font-size: 15vh;
  font-weight: 900;
  color: white;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  min-width: 15vh;
  text-align: center;
}

.home-side .match-wins-count {
  color: var(--home-primary-color, #FFD700);
}

.away-side .match-wins-count {
  color: var(--away-primary-color, #FF3030);
}

.match-score-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-score-divider span {
  font-size: 10vh;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.3);
}

/* Game Detail Cards */
.match-games-detail {
  display: flex;
  gap: 2vh;
  margin-top: 3vh;
  flex-wrap: wrap;
  justify-content: center;
}

.game-detail-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2vh 3vh;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  min-width: 15vh;
  transition: all 0.3s ease;
}

.game-detail-card.upcoming {
  opacity: 0.4;
}

.game-detail-card.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.3) 0%, rgba(124, 58, 237, 0.3) 100%);
  border-color: #7c3aed;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(124, 58, 237, 0.3); }
  50% { box-shadow: 0 0 25px rgba(124, 58, 237, 0.6); }
}

.game-detail-card.completed {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
}

.game-header {
  font-size: 1.6vh;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1vh;
}

.game-scores {
  display: flex;
  align-items: center;
  gap: 1vh;
}

.home-game-score,
.away-game-score {
  font-size: 4vh;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.8);
  min-width: 4vh;
  text-align: center;
}

.home-game-score.winner {
  color: var(--home-primary-color, #FFD700);
}

.away-game-score.winner {
  color: var(--away-primary-color, #FF3030);
}

.score-separator {
  font-size: 3vh;
  color: rgba(255, 255, 255, 0.3);
}

.game-status-indicator {
  font-size: 1.4vh;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1vh;
  display: flex;
  align-items: center;
  gap: 0.5vh;
}

.game-detail-card.completed .game-status-indicator {
  color: #22c55e;
}

.game-detail-card.active .game-status-indicator {
  color: #7c3aed;
}

.next-game-prompt {
  margin-top: 3vh;
  padding: 1.5vh 3vh;
  background: rgba(79, 70, 229, 0.2);
  border-radius: 50px;
  animation: pulse-prompt 2s ease-in-out infinite;
}

.next-game-prompt span {
  font-size: 2vh;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

@keyframes pulse-prompt {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ============================================
   Next Match Preview (No Games Mode)
   ============================================ */

.next-match-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 8vh);
  padding: 2rem;
  gap: 3vh;
}

.next-match-label {
  font-size: 3vh;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 2vh;
}

/* Mobile Responsive Adjustments for Preview Modes */
@media (max-width: 768px) {
  .match-preview-teams {
    flex-direction: column;
    gap: 3vh;
  }
  
  .match-preview-teams.compact {
    gap: 2vh;
  }
  
  .team-logo-container {
    width: 18vh;
    height: 18vh;
  }
  
  .team-logo-container.small {
    width: 12vh;
    height: 12vh;
  }
  
  .team-name-preview {
    font-size: 2.5vh;
    max-width: 80vw;
  }
  
  .vs-divider span {
    font-size: 4vh;
  }
  
  .match-teams-score {
    flex-direction: column;
    gap: 2vh;
  }
  
  .match-team-side {
    flex-direction: column !important;
  }
  
  .match-wins-count {
    font-size: 10vh;
  }
  
  .match-score-divider span {
    font-size: 6vh;
  }
  
  .match-games-detail {
    flex-direction: column;
    gap: 1.5vh;
  }
  
  .game-detail-card {
    min-width: 60vw;
  }
}

/* ============================================
   In-Game Match Tabs (shown during active game)
   ============================================ */

.in-game-match-tabs {
  display: flex;
  justify-content: center;
  gap: 1.5vh;
  padding: 1vh 2vw;
  background: rgba(0, 0, 0, 0.3);
  margin-bottom: 1vh;
}

.in-game-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8vh 2vh;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  min-width: 8vw;
}

.in-game-tab.current {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.4) 0%, rgba(124, 58, 237, 0.4) 100%);
  border-color: #7c3aed;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
}

.in-game-tab.completed {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
}

.in-game-tab.upcoming {
  opacity: 0.4;
}

.in-game-tab .game-label {
  font-size: 1.4vh;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.in-game-tab .game-result {
  font-size: 1.8vh;
  font-weight: 800;
  color: white;
  margin-top: 0.3vh;
}

.in-game-tab .game-result.live {
  color: #7c3aed;
  animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ============================================
   After Match Mode Styles (Match Complete)
   ============================================ */

.after-match-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  padding: 2rem;
  gap: 2vh;
}

/* Position VenueCourtRow at the top */
.after-match-container #VenueCourtRow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  background: transparent;
}

/* Confetti Animation */
.confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0.8;
  animation: confetti-fall 4s linear infinite;
}

.confetti-1 { left: 10%; background: #fbbf24; animation-delay: 0s; }
.confetti-2 { left: 20%; background: #22c55e; animation-delay: 0.5s; width: 8px; height: 12px; }
.confetti-3 { left: 30%; background: #3b82f6; animation-delay: 1s; }
.confetti-4 { left: 45%; background: #f43f5e; animation-delay: 0.3s; width: 12px; height: 8px; }
.confetti-5 { left: 60%; background: #8b5cf6; animation-delay: 0.8s; }
.confetti-6 { left: 70%; background: #fbbf24; animation-delay: 1.2s; width: 6px; height: 10px; }
.confetti-7 { left: 85%; background: #22c55e; animation-delay: 0.2s; }
.confetti-8 { left: 95%; background: #3b82f6; animation-delay: 0.7s; width: 8px; height: 8px; }

@keyframes confetti-fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

/* Trophy and Winner Celebration */
.after-match-celebration {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5vh;
  margin-top: 4vh;
  z-index: 5;
  animation: celebration-entrance 1s ease-out;
}

@keyframes celebration-entrance {
  0% { opacity: 0; transform: scale(0.8) translateY(-30px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.trophy-container {
  position: relative;
}

.trophy-icon {
  font-size: clamp(4rem, 10vh, 8rem);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.5));
  animation: trophy-bounce 2s ease-in-out infinite;
}

@keyframes trophy-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.05); }
}

.winner-announcement-text {
  display: flex;
  align-items: center;
  gap: 1.5vh;
}

.winner-crown {
  font-size: 2.5vh;
  color: #fbbf24;
}

.winner-label-enhanced {
  font-size: 2vh;
  font-weight: 800;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.3em;
}

.winner-team-name-large {
  font-size: clamp(2rem, 6vh, 5rem);
  font-weight: 900;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  text-align: center;
  padding: 0 2vw;
}

.match-type-final {
  font-size: 1.4vh;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* Main After Match Layout */
.after-match-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4vw;
  width: 100%;
  max-width: 1400px;
  padding: 2vh 0;
  z-index: 5;
}

/* After Match Team Display */
.after-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5vh;
  flex: 1;
  max-width: 350px;
  transition: all 0.3s ease;
}

.after-team.champion {
  transform: scale(1.05);
}

.after-team.runner-up {
  opacity: 0.6;
}

.after-team-logo {
  position: relative;
  width: clamp(100px, 14vh, 160px);
  height: clamp(100px, 14vh, 160px);
  border-radius: 50%;
  overflow: visible;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.3);
}

.after-team-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.after-team-logo.champion-glow {
  border-color: #fbbf24;
  box-shadow: 0 0 50px rgba(251, 191, 36, 0.5), 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: champion-glow 2s ease-in-out infinite;
}

@keyframes champion-glow {
  0%, 100% { box-shadow: 0 0 50px rgba(251, 191, 36, 0.5), 0 8px 32px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 0 80px rgba(251, 191, 36, 0.8), 0 8px 32px rgba(0, 0, 0, 0.3); }
}

.champion-badge {
  position: absolute;
  bottom: -8px;
  right: -8px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.5);
}

.champion-badge i {
  font-size: 18px;
  color: white;
}

.after-team-name {
  font-size: clamp(1rem, 2vh, 1.5rem);
  font-weight: 800;
  color: white;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.after-team.champion .after-team-name {
  color: #fbbf24;
}

/* Center Final Score Display */
.after-score-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
}

.final-score-display {
  display: flex;
  align-items: center;
  gap: 2vw;
}

.final-score-home,
.final-score-away {
  font-size: clamp(5rem, 14vh, 10rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.3);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  min-width: 10vh;
  text-align: center;
}

.final-score-home.winner {
  color: #fbbf24;
  text-shadow: 0 0 40px rgba(251, 191, 36, 0.5), 0 4px 20px rgba(0, 0, 0, 0.5);
}

.final-score-away.winner {
  color: #fbbf24;
  text-shadow: 0 0 40px rgba(251, 191, 36, 0.5), 0 4px 20px rgba(0, 0, 0, 0.5);
}

.final-score-divider {
  font-size: clamp(3rem, 8vh, 6rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.2);
}

.final-score-label {
  font-size: 1.4vh;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* After Games Summary */
.after-games-summary {
  display: flex;
  gap: 2vh;
  margin-top: 2vh;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 5;
}

.final-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8vh;
  padding: 1.5vh 2.5vh;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  min-width: 100px;
}

.final-game-card.played {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.08);
}

.final-game-card.winner-game {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
}

.final-game-header {
  font-size: 1.2vh;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.final-game-scores {
  display: flex;
  align-items: center;
  gap: 0.8vh;
}

.final-game-home,
.final-game-away {
  font-size: 2.5vh;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
  min-width: 2.5vh;
  text-align: center;
}

.final-game-home.winner {
  color: #fbbf24;
}

.final-game-away.winner {
  color: #fbbf24;
}

.final-game-sep {
  font-size: 2vh;
  color: rgba(255, 255, 255, 0.3);
}

.final-game-status {
  font-size: 1.1vh;
  font-weight: 600;
  color: #22c55e;
  display: flex;
  align-items: center;
  gap: 0.5vh;
}

.final-game-status i {
  font-size: 1vh;
}

/* Legacy styles for backwards compatibility */
.match-complete-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
  margin-bottom: 2vh;
}

.match-complete-badge {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  padding: 1vh 3vh;
  border-radius: 50px;
  font-size: 2.5vh;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.5);
}

.match-winner-announcement {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
  margin: 2vh 0;
}

.winner-label {
  font-size: 2vh;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.winner-team-name {
  font-size: 5vh;
  font-weight: 900;
  color: #22c55e;
  text-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.team-logo-container.winner-glow {
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.6);
  border-color: #22c55e !important;
}

.match-games-detail.final {
  margin-top: 2vh;
}

.game-detail-card.winner-game {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.15);
}

/* Mobile responsive for after match */
@media (max-width: 768px) {
  .after-match-main {
    flex-direction: column;
    gap: 2vh;
  }
  
  .after-team {
    flex-direction: row;
    gap: 2vh;
  }
  
  .after-team-logo {
    width: clamp(70px, 12vw, 100px);
    height: clamp(70px, 12vw, 100px);
  }
  
  .final-score-home,
  .final-score-away {
    font-size: clamp(3rem, 12vw, 6rem);
  }
  
  .after-score-center {
    order: -1;
  }
  
  .trophy-icon {
    font-size: clamp(3rem, 8vh, 5rem);
  }
  
  .winner-team-name-large {
    font-size: clamp(1.5rem, 5vw, 3rem);
  }
  
  .after-games-summary {
    gap: 1vh;
  }
  
  .final-game-card {
    padding: 1vh 1.5vh;
    min-width: 80px;
  }
}

@media (max-width: 768px) {
  .in-game-match-tabs {
    gap: 1vh;
    padding: 0.5vh 1vw;
  }
  
  .in-game-tab {
    padding: 0.5vh 1.5vh;
    min-width: 15vw;
  }
  
  .in-game-tab .game-label {
    font-size: 1.2vh;
  }
  
  .in-game-tab .game-result {
    font-size: 1.5vh;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════════ */
/* BOCCE BALL IN-GAME MODE STYLES - Classic Court Theme                           */
/* ═══════════════════════════════════════════════════════════════════════════════ */

/* Bocce Game Content */
.bocce-game {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  padding: 1.5vh 2vw;
  gap: 1vh;
  background: radial-gradient(ellipse at center, #1a2520 0%, #0d1412 60%, #080c0a 100%);
  overflow: hidden;
}

/* Floating Bocce Balls Background for Game Mode */
.game-balls-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.game-balls-bg .floating-ball {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  filter: blur(2px);
}

.game-balls-bg .floating-ball.ball-1 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle at 30% 30%, var(--home-primary-color) 0%, var(--home-secondary-color) 60%, color-mix(in srgb, var(--home-primary-color) 50%, black) 100%);
  box-shadow: inset -25px -25px 50px rgba(0,0,0,0.4), 0 0 80px color-mix(in srgb, var(--home-primary-color) 30%, transparent);
  top: 10%;
  left: 5%;
  animation: float-ball-1 16s ease-in-out infinite;
}

.game-balls-bg .floating-ball.ball-2 {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at 30% 30%, var(--away-primary-color) 0%, var(--away-secondary-color) 60%, color-mix(in srgb, var(--away-primary-color) 50%, black) 100%);
  box-shadow: inset -20px -20px 40px rgba(0,0,0,0.4), 0 0 60px color-mix(in srgb, var(--away-primary-color) 30%, transparent);
  bottom: 15%;
  right: 8%;
  animation: float-ball-2 20s ease-in-out infinite;
}

.game-balls-bg .floating-ball.ball-3 {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at 30% 30%, var(--home-primary-color) 0%, var(--home-secondary-color) 60%, color-mix(in srgb, var(--home-primary-color) 50%, black) 100%);
  box-shadow: inset -15px -15px 30px rgba(0,0,0,0.4), 0 0 50px color-mix(in srgb, var(--home-primary-color) 30%, transparent);
  bottom: 25%;
  left: 12%;
  animation: float-ball-3 22s ease-in-out infinite;
}

.game-balls-bg .floating-ball.ball-4 {
  width: 110px;
  height: 110px;
  background: radial-gradient(circle at 30% 30%, var(--away-primary-color) 0%, var(--away-secondary-color) 60%, color-mix(in srgb, var(--away-primary-color) 50%, black) 100%);
  box-shadow: inset -18px -18px 36px rgba(0,0,0,0.4), 0 0 55px color-mix(in srgb, var(--away-primary-color) 30%, transparent);
  top: 20%;
  right: 15%;
  animation: float-ball-4 18s ease-in-out infinite;
}

.game-balls-bg .floating-ball.pallino {
  width: 50px;
  height: 50px;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #e0e0e0 60%, #b0b0b0 100%);
  box-shadow: inset -8px -8px 16px rgba(0,0,0,0.2), 0 0 40px rgba(255, 255, 255, 0.15);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float-pallino 12s ease-in-out infinite;
  opacity: 0.1;
}

/* Top Control Bar */
.bocce-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5vh 1vw;
  height: 5vh;
  min-height: 40px;
}

.control-left,
.control-right {
  display: flex;
  align-items: center;
  gap: 1vw;
  min-width: 120px;
}

.control-right {
  justify-content: flex-end;
}

/* Bocce Toggle */
.bocce-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.bocce-toggle input {
  display: none;
}

.toggle-track {
  width: 40px;
  height: 22px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 11px;
  position: relative;
  transition: all 0.3s ease;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.bocce-toggle input:checked + .toggle-track {
  background: rgba(76, 175, 80, 0.3);
  border-color: rgba(76, 175, 80, 0.8);
}

.bocce-toggle input:checked + .toggle-track::after {
  left: 20px;
  background: #4CAF50;
}

.toggle-text {
  font-size: 1.3vh;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Venue Info Center */
.venue-info-center {
  display: flex;
  align-items: center;
  gap: 4vw;
  justify-content: center;
  flex: 1;
}

.venue-text,
.time-text {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 2vh;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.8vh 1.5vw;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.venue-text i,
.time-text i {
  color: #8BC34A;
  font-size: 2.2vh;
  text-shadow: 0 0 10px rgba(139, 195, 74, 0.5);
}

/* Bocce Button */
.bocce-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.8vh 1.2vw;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.8vh;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bocce-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* Match Progress Bar */
.bocce-match-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5vw;
  padding: 1vh 2vw;
}

.bocce-game-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4vh;
  padding: 1vh 2vw;
  background: linear-gradient(180deg, rgba(40, 50, 60, 0.8) 0%, rgba(25, 30, 40, 0.9) 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  min-width: 8vw;
}

.bocce-game-pill.current {
  background: linear-gradient(180deg, rgba(139, 195, 74, 0.25) 0%, rgba(85, 139, 47, 0.2) 100%);
  border-color: rgba(139, 195, 74, 0.7);
  box-shadow: 
    0 0 25px rgba(139, 195, 74, 0.25),
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.bocce-game-pill.completed {
  opacity: 0.7;
}

.bocce-game-pill .pill-label {
  font-size: 1.8vh;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.bocce-game-pill.current .pill-label {
  color: #8BC34A;
  text-shadow: 0 0 10px rgba(139, 195, 74, 0.5);
}

.bocce-game-pill .pill-score {
  font-size: 1.8vh;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

.bocce-game-pill .pill-score.live {
  color: #8BC34A;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 8px rgba(139, 195, 74, 0.5);
}

.bocce-game-pill .pill-score.live i {
  font-size: 1vh;
  animation: liveBlink 1.2s ease-in-out infinite;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Winner Banner */
.bocce-winner-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5vh;
  padding: 1.5vh 3vw;
  background: linear-gradient(180deg, rgba(139, 195, 74, 0.1) 0%, transparent 100%);
}

.bocce-winner-banner .winner-label {
  font-size: 1.4vh;
  font-weight: 700;
  color: #8BC34A;
  text-transform: uppercase;
  letter-spacing: 0.25em;
}

.bocce-winner-banner .winner-name {
  font-size: 3.5vh;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(139, 195, 74, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════════════════ */
/* MAIN SCOREBOARD - 5 Column Layout: Balls | Team | Frame | Team | Balls         */
/* ═══════════════════════════════════════════════════════════════════════════════ */

.bocce-scoreboard {
  flex: 1;
  display: grid;
  grid-template-columns: 12vw 1fr 15vw 1fr 12vw;
  gap: 0;
  align-items: center;
  padding: 0;
  min-height: 0;
}

/* Balls Columns - Far Left and Far Right */
.balls-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 2vh 1vw;
}

.balls-column .balls-container {
  display: flex;
  flex-direction: column;
  gap: 1.5vh;
  align-items: center;
}

.balls-column .ball-slot {
  position: relative;
}

.balls-column .ball-image {
  width: 9vh;
  height: 9vh;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(30, 30, 30, 0.6);
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.5),
    inset 0 2px 5px rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.balls-column .ball-image:hover {
  transform: scale(1.08);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(255, 255, 255, 0.15);
}

/* Team Sections - Contains Timeouts, Score, Team Logo */
.team-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5vh;
  height: 100%;
  padding: 2vh 1vw;
}

.home-section {
  align-items: center;
}

.away-section {
  align-items: center;
}

/* Timeout Row - Above Score */
.bocce-game .timeout-row {
  display: flex;
  gap: 3vw;
  justify-content: center;
  align-items: center;
}

.bocce-game .timeout-icon {
  width: 6vh !important;
  height: 6vh !important;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.bocce-game .timeout-icon.active {
  background: transparent;
}

.bocce-game .timeout-icon i {
  font-size: 6.5vh !important;
  color: rgba(255, 255, 255, 0.85);
}

.bocce-game .timeout-icon.active i {
  color: rgba(255, 255, 255, 0.95);
}

/* Score Area - Big Score Numbers */
.bocce-game .score-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.bocce-game .big-score {
  font-size: clamp(28vh, 38vh, 45vh);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.02em;
  font-family: 'Arial Black', 'Helvetica Neue', sans-serif;
}

.bocce-game .home-score-area .big-score {
  color: var(--home-primary-color, #4FC3F7);
  text-shadow: 
    0 3px 0 color-mix(in srgb, var(--home-primary-color, #4FC3F7) 75%, #000),
    0 6px 0 color-mix(in srgb, var(--home-primary-color, #4FC3F7) 50%, #000),
    0 9px 20px rgba(0, 0, 0, 0.5),
    0 0 40px var(--home-primary-color, rgba(79, 195, 247, 0.6)),
    0 0 80px var(--home-primary-color, rgba(79, 195, 247, 0.3));
}

.bocce-game .away-score-area .big-score {
  color: var(--away-primary-color, #EF5350);
  text-shadow: 
    0 3px 0 color-mix(in srgb, var(--away-primary-color, #EF5350) 75%, #000),
    0 6px 0 color-mix(in srgb, var(--away-primary-color, #EF5350) 50%, #000),
    0 9px 20px rgba(0, 0, 0, 0.5),
    0 0 40px var(--away-primary-color, rgba(239, 83, 80, 0.6)),
    0 0 80px var(--away-primary-color, rgba(239, 83, 80, 0.3));
}

/* Team Logo Row - Below Score */
.bocce-game .team-logo-row {
  width: 100%;
  max-width: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2vh;
}

.bocce-game .team-logo-row .team-logo-img {
  max-height: 10vh;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 5px 20px rgba(0, 0, 0, 0.6));
}

.bocce-game .team-logo-row .team-name-text {
  font-size: clamp(2vh, 3vh, 3.5vh);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
  text-align: center;
}

/* Center Frame Column */
.frame-column {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.frame-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(16vh, 22vh, 28vh);
  height: clamp(16vh, 22vh, 28vh);
  background: linear-gradient(180deg, 
    rgba(100, 140, 100, 0.4) 0%, 
    rgba(60, 100, 70, 0.5) 50%,
    rgba(30, 50, 40, 0.6) 100%);
  border: 5px solid rgba(139, 195, 74, 0.7);
  border-radius: 50%;
  transform: perspective(500px) translateZ(20px);
  box-shadow: 
    0 0 60px rgba(139, 195, 74, 0.4),
    0 0 120px rgba(139, 195, 74, 0.2),
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 4px 10px rgba(255, 255, 255, 0.15),
    inset 0 -4px 10px rgba(0, 0, 0, 0.3);
}

.frame-circle .frame-label {
  font-size: clamp(1.8vh, 2.5vh, 3vh);
  font-weight: 800;
  color: #C5E1A5;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  text-shadow: 0 0 15px rgba(139, 195, 74, 0.8);
}

.frame-circle .frame-number {
  font-size: clamp(7vh, 10vh, 13vh);
  font-weight: 900;
  color: #8BC34A;
  line-height: 1;
  text-shadow: 
    0 2px 0 #689F38,
    0 4px 0 #558B2F,
    0 6px 15px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(139, 195, 74, 0.7),
    0 0 60px rgba(139, 195, 74, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════════════════ */
/* FRAME HISTORY BAR - Bottom of bocce-game mode                                   */
/* ═══════════════════════════════════════════════════════════════════════════════ */

.bocce-game .bocce-frames-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5vw;
  padding: 2.5vh 3vw;
  background: transparent;
  border-top: none;
  min-height: 14vh;
}

.bocce-game .bocce-frames-bar .frames-label {
  display: none !important;
  visibility: hidden;
  width: 0;
  height: 0;
  overflow: hidden;
}

.bocce-game .bocce-frames-bar .frames-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5vw;
  flex-wrap: wrap;
}

/* Circular Frame Badges - Easy to Read */
.bocce-game .bocce-frames-bar .bottom-frame-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10vh;
  height: 10vh;
  border-radius: 50%;
  font-size: 5vh;
  font-weight: 900;
  background: transparent;
  border: 3px solid rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
}

.bocce-game .bocce-frames-bar .bottom-frame-badge.home-won {
  color: var(--home-primary-color, #4FC3F7);
  border-color: var(--home-primary-color, rgba(79, 195, 247, 0.6));
  background: transparent;
  text-shadow: 
    0 2px 0 color-mix(in srgb, var(--home-primary-color, #4FC3F7) 60%, #000),
    0 0 20px var(--home-primary-color, rgba(79, 195, 247, 0.8)),
    0 0 40px var(--home-primary-color, rgba(79, 195, 247, 0.4));
}

.bocce-game .bocce-frames-bar .bottom-frame-badge.away-won {
  color: var(--away-primary-color, #EF5350);
  border-color: var(--away-primary-color, rgba(239, 83, 80, 0.6));
  background: transparent;
  text-shadow: 
    0 2px 0 color-mix(in srgb, var(--away-primary-color, #EF5350) 60%, #000),
    0 0 20px var(--away-primary-color, rgba(239, 83, 80, 0.8)),
    0 0 40px var(--away-primary-color, rgba(239, 83, 80, 0.4));
}

/* Legacy support for old element IDs */
.bocce-game #FrameInProgress {
  position: relative;
  display: flex !important;
  flex-direction: column;
  top: auto;
  left: auto;
  transform: none;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  min-width: auto;
  animation: none;
}

/* ═══════════════════════════════════════════════════════════════════════════════ */
/* RESPONSIVE SCALING                                                              */
/* ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1600px) {
  .bocce-scoreboard {
    grid-template-columns: 10vw 1fr 14vw 1fr 10vw;
  }
  
  .balls-column .ball-image {
    width: 8vh;
    height: 8vh;
  }
  
  .big-score {
    font-size: clamp(12vh, 32vh, 36vh);
  }
}

@media (max-width: 1200px) {
  .bocce-scoreboard {
    grid-template-columns: 9vw 1fr 12vw 1fr 9vw;
  }
  
  .balls-column .ball-image {
    width: 7vh;
    height: 7vh;
  }
  
  .big-score {
    font-size: clamp(10vh, 26vh, 30vh);
  }
  
  .timeout-icon {
    width: 4vh;
    height: 4vh;
  }
  
  .timeout-icon i {
    font-size: 2vh;
  }
  
  .frame-circle {
    width: clamp(10vh, 13vh, 16vh);
    height: clamp(10vh, 13vh, 16vh);
  }
  
  .frame-circle .frame-number {
    font-size: clamp(4vh, 5.5vh, 7vh);
  }
}

@media (max-width: 992px) {
  .bocce-scoreboard {
    grid-template-columns: 8vw 1fr 10vw 1fr 8vw;
  }
  
  .balls-column .ball-image {
    width: 6vh;
    height: 6vh;
  }
  
  .balls-column .balls-container {
    gap: 1vh;
  }
  
  .big-score {
    font-size: clamp(8vh, 20vh, 24vh);
  }
  
  .team-logo-row .team-logo-img {
    max-height: 9vh;
  }
  
  .venue-info-center {
    flex-direction: column;
    gap: 0.3vh;
  }
}

@media (max-width: 768px) {
  .bocce-game {
    padding: 1vh 1vw;
    gap: 0.5vh;
  }
  
  .bocce-scoreboard {
    grid-template-columns: 6vw 1fr 8vw 1fr 6vw;
  }
  
  .balls-column .ball-image {
    width: 5vh;
    height: 5vh;
  }
  
  .big-score {
    font-size: clamp(6vh, 14vh, 18vh);
  }
  
  .timeout-icon {
    width: 3.5vh;
    height: 3.5vh;
  }
  
  .timeout-icon i {
    font-size: 1.5vh;
  }
  
  .frame-circle {
    width: clamp(8vh, 10vh, 12vh);
    height: clamp(8vh, 10vh, 12vh);
  }
  
  .frame-circle .frame-label {
    font-size: 1vh;
  }
  
  .frame-circle .frame-number {
    font-size: clamp(3vh, 4vh, 5vh);
  }
  
  .team-logo-row .team-logo-img {
    max-height: 7vh;
  }
}

