@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #27272a;
}

html {
  scroll-behavior: smooth;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  font-family: Inter, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
  transition: filter 0.3s ease;
}

html.color-mode {
  filter: grayscale(0%);
  -webkit-filter: grayscale(0%);
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(135deg, #0f0f23, #1a1a2e, #16213e 50%, #0f0f23);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Premium Header */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  height: 5rem;
  border-bottom: 1px solid rgba(39, 39, 42, 0.3);
  background: #000000;
  box-shadow: 0 1px rgba(255, 255, 255, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.brand__logo {
  font-size: 1.75rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.brand__name {
  background: linear-gradient(135deg, #fff, #e4e4e7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand__by {
  font-size: 0.875rem;
  font-weight: 400;
  color: #a1a1aa;
  margin: 0 0.25rem;
}

.brand__algobets {
  color: #00ff88;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
  text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
  transition: all 0.3s ease;
  padding: 0.25rem 0.5rem;
  border: 2px solid transparent;
}

/* Color mode ALGOBETS styling */
html.color-mode .brand__algobets {
  border: 2px solid var(--theme-primary);
  background: rgba(0, 0, 0, 0.6);
  text-shadow: none;
  letter-spacing: 0.5px;
  padding: 0.35rem 0.6rem;
  border-radius: 2px;
}

html.color-mode .brand__algobets::before {
  content: 'ALGOBETS';
  background: linear-gradient(90deg, var(--theme-primary) 0%, var(--theme-primary) 50%, #ffffff 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* Hide the original text in color mode */
html.color-mode .brand__algobets {
  font-size: 0;
  line-height: 0;
}

html.color-mode .brand__algobets::before {
  font-size: 14px;
  line-height: 1.2;
}

.nav {
  display: flex;
  gap: 0.5rem;
  margin-left: 3rem;
}

.nav__item {
  cursor: pointer;
  border: 1px solid rgba(39, 39, 42, 0.5);
  background-color: rgba(24, 24, 27, 0.4);
  backdrop-filter: blur(24px);
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #a1a1aa;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__item:hover {
  background-color: rgba(39, 39, 42, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
}

.nav__item--active {
  border-color: rgba(var(--theme-primary-rgb), 0.6);
  background-color: rgba(var(--theme-primary-rgb), 0.8);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(var(--theme-primary-rgb), 0.3), inset 0 1px rgba(255, 255, 255, 0.1);
}

/* Theme Selector */
.theme-selector {
  display: flex;
  align-items: center;
}

.theme-selector__dropdown {
  cursor: pointer;
  appearance: none;
  border: 1px solid rgba(71, 85, 105, 0.3);
  background-color: rgba(30, 41, 59, 0.8);
  color: rgba(250, 250, 250, 0.9);
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fafafa' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  backdrop-filter: blur(10px);
}

.theme-selector__dropdown:hover {
  background-color: rgba(30, 41, 59, 1);
  border-color: rgba(var(--theme-primary-rgb), 0.5);
}

.theme-selector__dropdown:focus {
  outline: none;
  border-color: rgba(var(--theme-primary-rgb), 0.7);
  box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), 0.5),
              0 6px 24px rgba(var(--theme-primary-rgb), 0.5),
              inset 0 1px rgba(255, 255, 255, 0.15);
}

/* Theme Styles - CSS Custom Properties */
:root {
  --theme-primary: #0ea5e9;
  --theme-primary-rgb: 14, 165, 233;
  --theme-secondary: #06b6d4;
  --theme-secondary-rgb: 6, 182, 212;
  --theme-accent: #3b82f6;
  --theme-accent-rgb: 59, 130, 246;
  --theme-success: #14b8a6;
  --theme-warning: #f59e0b;
  --theme-error: #ef4444;
}

html[data-theme="ocean"] {
  --theme-primary: #0ea5e9;
  --theme-primary-rgb: 14, 165, 233;
  --theme-secondary: #06b6d4;
  --theme-secondary-rgb: 6, 182, 212;
  --theme-accent: var(--theme-primary);
  --theme-accent-rgb: 59, 130, 246;
  --theme-success: #14b8a6;
  --theme-warning: #f59e0b;
  --theme-error: #ef4444;
}

html[data-theme="forest"] {
  --theme-primary: #10b981;
  --theme-primary-rgb: 16, 185, 129;
  --theme-secondary: #22c55e;
  --theme-secondary-rgb: 34, 197, 94;
  --theme-accent: #84cc16;
  --theme-accent-rgb: 132, 204, 22;
  --theme-success: #10b981;
  --theme-warning: #f59e0b;
  --theme-error: #ef4444;
}

html[data-theme="sunset"] {
  --theme-primary: #f97316;
  --theme-primary-rgb: 249, 115, 22;
  --theme-secondary: #fb923c;
  --theme-secondary-rgb: 251, 146, 60;
  --theme-accent: #fbbf24;
  --theme-accent-rgb: 251, 191, 36;
  --theme-success: #10b981;
  --theme-warning: #f59e0b;
  --theme-error: #ef4444;
}

html[data-theme="purple"] {
  --theme-primary: var(--theme-secondary);
  --theme-primary-rgb: 168, 85, 247;
  --theme-secondary: #c084fc;
  --theme-secondary-rgb: 192, 132, 252;
  --theme-accent: #e879f9;
  --theme-accent-rgb: 232, 121, 249;
  --theme-success: #10b981;
  --theme-warning: #f59e0b;
  --theme-error: #ef4444;
}

html[data-theme="midnight"] {
  --theme-primary: #64748b;
  --theme-primary-rgb: 100, 116, 139;
  --theme-secondary: #475569;
  --theme-secondary-rgb: 71, 85, 105;
  --theme-accent: #94a3b8;
  --theme-accent-rgb: 148, 163, 184;
  --theme-success: #10b981;
  --theme-warning: #f59e0b;
  --theme-error: #ef4444;
}


/* Theme Background Overlays */
html[data-theme="ocean"]::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top, rgba(14, 165, 233, 0.25), transparent 50%),
              radial-gradient(ellipse at bottom right, rgba(6, 182, 212, 0.2), transparent 60%),
              linear-gradient(180deg, rgba(14, 165, 233, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

html[data-theme="forest"]::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top, rgba(16, 185, 129, 0.25), transparent 50%),
              radial-gradient(ellipse at bottom left, rgba(34, 197, 94, 0.2), transparent 60%),
              linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

html[data-theme="sunset"]::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top, rgba(249, 115, 22, 0.25), transparent 50%),
              radial-gradient(ellipse at bottom right, rgba(251, 191, 36, 0.2), transparent 60%),
              linear-gradient(180deg, rgba(249, 115, 22, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

html[data-theme="purple"]::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top, rgba(var(--theme-secondary-rgb), 0.25), transparent 50%),
              radial-gradient(ellipse at bottom right, rgba(232, 121, 249, 0.2), transparent 60%),
              linear-gradient(180deg, rgba(var(--theme-secondary-rgb), 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

html[data-theme="midnight"]::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(100, 116, 139, 0.15), transparent 60%),
              linear-gradient(180deg, rgba(71, 85, 105, 0.1) 0%, rgba(15, 15, 35, 0.3) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Ensure content is above overlay */
.top-bar,
.content {
  position: relative;
  z-index: 1;
}

html.color-mode .color-toggle .color-toggle__icon {
  animation: pulse-rainbow 2s ease-in-out infinite;
}

@keyframes pulse-rainbow {
  0%, 100% {
    filter: hue-rotate(0deg) brightness(1);
  }
  50% {
    filter: hue-rotate(60deg) brightness(1.2);
  }
}

/* Content Area */
.content {
  flex: 1;
  padding: 2rem;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

/* Glass Card Components */
.glass-card {
  border: 1px solid rgba(39, 39, 42, 0.3);
  background-color: rgba(24, 24, 27, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: linear-gradient(135deg, rgba(39, 39, 42, 0.4), rgba(24, 24, 27, 0.6));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05),
              0 8px 32px rgba(0, 0, 0, 0.3),
              inset 0 1px rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.5rem;
}

.premium-card {
  border: 1px solid rgba(63, 63, 70, 0.4);
  background-color: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: linear-gradient(135deg, rgba(39, 39, 42, 0.6), rgba(24, 24, 27, 0.8));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08),
              0 12px 40px rgba(0, 0, 0, 0.4),
              inset 0 1px rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover {
  border-color: rgba(82, 82, 91, 0.6);
  background-color: rgba(39, 39, 42, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(var(--theme-primary-rgb), 0.5),
              0 16px 48px rgba(0, 0, 0, 0.5),
              inset 0 1px rgba(255, 255, 255, 0.12);
}

/* View Sections */
.view {
  display: none;
  flex-direction: column;
  gap: 2rem;
  animation: fadeIn 0.3s ease-in-out;
}

.view--active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #fff, #e4e4e7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

/* Date Controls */
.date-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Premium Button Styles */
.btn {
  cursor: pointer;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: #ffffff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-image: linear-gradient(to right, var(--theme-primary), var(--theme-secondary));
  box-shadow: 0 4px 20px rgba(var(--theme-primary-rgb), 0.3);
  transform: translateY(0);
}

.btn:hover {
  transform: scale(1.05) translateY(-1px);
  background-image: linear-gradient(to right, var(--theme-primary), var(--theme-secondary));
  box-shadow: 0 6px 24px rgba(var(--theme-primary-rgb), 0.4);
}

.btn--ghost {
  background: rgba(39, 39, 42, 0.4);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(63, 63, 70, 0.3);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(63, 63, 70, 0.5);
  border-color: rgba(82, 82, 91, 0.5);
  transform: translateY(-1px);
}

input[type="date"] {
  padding: 0.75rem 1rem;
  border-radius: 0;
  border: 1px solid rgba(63, 63, 70, 0.3);
  background: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(16px);
  color: inherit;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 500;
  transition: all 0.2s ease;
}

input[type="date"]:focus {
  outline: none;
  border-color: rgba(var(--theme-primary-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.1);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(0.8);
  cursor: pointer;
}

/* Schedule Layout */
.schedule-layout {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 2rem;
  height: calc(100vh - 200px);
}

.schedule-list {
  background: linear-gradient(135deg, rgba(39, 39, 42, 0.4), rgba(24, 24, 27, 0.6));
  backdrop-filter: blur(24px);
  border-radius: 1rem;
  padding: 1rem;
  overflow-y: auto;
  border: 1px solid rgba(39, 39, 42, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05),
              0 8px 32px rgba(0, 0, 0, 0.3),
              inset 0 1px rgba(255, 255, 255, 0.08);
}

/* Scrollbar Styling */
.schedule-list::-webkit-scrollbar,
.game-detail::-webkit-scrollbar {
  width: 8px;
}

.schedule-list::-webkit-scrollbar-track,
.game-detail::-webkit-scrollbar-track {
  background: rgba(39, 39, 42, 0.3);
  border-radius: 4px;
}

.schedule-list::-webkit-scrollbar-thumb,
.game-detail::-webkit-scrollbar-thumb {
  background: rgba(82, 82, 91, 0.6);
  border-radius: 4px;
}

.schedule-list::-webkit-scrollbar-thumb:hover,
.game-detail::-webkit-scrollbar-thumb:hover {
  background: rgba(113, 113, 122, 0.8);
}

.games-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Game Card - Ticker Style */
.game-card {
  border: 1px solid rgba(39, 39, 42, 0.4);
  background-color: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(16px);
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-card:hover {
  border-color: rgba(63, 63, 70, 0.6);
  background-color: rgba(39, 39, 42, 0.6);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.game-card--active {
  border-color: rgba(82, 82, 91, 0.8);
  background-color: rgba(39, 39, 42, 0.8);
  box-shadow: 0 0 0 1px rgba(var(--theme-primary-rgb), 0.5),
              0 8px 32px rgba(0, 0, 0, 0.4),
              inset 0 1px rgba(255, 255, 255, 0.1);
}

.game-card__header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a1a1aa;
}

.team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.team-name {
  font-weight: 600;
  font-size: 1rem;
  color: #ffffff;
}

.team-score {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #f4f4f5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.team-meta {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a1a1aa;
}

.game-card__preview-btn {
  align-self: flex-end;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--theme-primary);
  background: rgba(var(--theme-primary-rgb), 0.15);
  border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-card__preview-btn:hover {
  background: rgba(var(--theme-primary-rgb), 0.25);
  border-color: rgba(var(--theme-primary-rgb), 0.5);
  color: #bfdbfe;
  transform: translateY(-1px);
}

/* Game Detail */
.game-detail {
  background: linear-gradient(135deg, rgba(39, 39, 42, 0.4), rgba(24, 24, 27, 0.6));
  backdrop-filter: blur(24px);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border: 1px solid rgba(39, 39, 42, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05),
              0 8px 32px rgba(0, 0, 0, 0.3),
              inset 0 1px rgba(255, 255, 255, 0.08);
  overflow-y: auto;
}

.game-detail__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.game-detail__header-text {
  flex: 1;
  min-width: 0;
}

.game-detail__header h2 {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.game-header-teams {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.game-header-team {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.game-header-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.game-header-team span {
  background: linear-gradient(135deg, #fff, #f4f4f5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-header-vs {
  color: #71717a;
  font-size: 1.25rem;
  font-weight: 600;
}

.game-detail__header p {
  margin: 0.5rem 0 0;
  color: #a1a1aa;
  font-weight: 500;
}

/* WebSocket Live Indicator */
.websocket-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgb(34, 197, 94);
}

.websocket-indicator__dot {
  width: 8px;
  height: 8px;
  background: rgb(34, 197, 94);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  }
  50% {
    opacity: 0.6;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
  }
}

.game-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: #a1a1aa;
}

/* Stat Item */
.stat-item {
  border: 1px solid rgba(63, 63, 70, 0.4);
  background-color: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(24px);
  background: linear-gradient(135deg, rgba(39, 39, 42, 0.6), rgba(24, 24, 27, 0.8));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08),
              0 12px 40px rgba(0, 0, 0, 0.4),
              inset 0 1px rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1rem;
}

/* Linescore Table */
.linescore {
  overflow-x: auto;
  background: rgba(24, 24, 27, 0.4);
  border-radius: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(39, 39, 42, 0.3);
}

.linescore table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 480px;
  font-size: 0.875rem;
}

.linescore th,
.linescore td {
  padding: 0.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(63, 63, 70, 0.3);
}

.linescore th:not(:first-child),
.linescore td:not(:first-child) {
  min-width: 32px;
  max-width: 40px;
}

.linescore th:first-child,
.linescore td:first-child {
  text-align: left;
  min-width: 80px;
}

.linescore thead {
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.2), rgba(var(--theme-secondary-rgb), 0.1));
}

.linescore th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  color: #a1a1aa;
}

.linescore td {
  color: #ffffff;
  font-weight: 500;
  position: relative;
}

.linescore td.active-inning {
  box-shadow: 0 0 0 2px var(--theme-primary);
  background: rgba(var(--theme-primary-rgb), 0.15);
  animation: inning-pulse 2s ease-in-out infinite;
}

@keyframes inning-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px var(--theme-primary);
  }
  50% {
    box-shadow: 0 0 0 2px var(--theme-primary), 0 0 12px rgba(var(--theme-primary-rgb), 0.6);
  }
}

/* Decisions Section */
.decisions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(24, 24, 27, 0.4);
  border-radius: 0.75rem;
  border: 1px solid rgba(39, 39, 42, 0.3);
}

.rosters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(24, 24, 27, 0.45);
  border-radius: 0.75rem;
  border: 1px solid rgba(39, 39, 42, 0.3);
}

.rosters h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #e4e4e7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rosters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.roster-card {
  border: 1px solid rgba(63, 63, 70, 0.35);
  background: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(18px);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.roster-card h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #d4d4d8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.roster-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.roster-list::-webkit-scrollbar {
  width: 6px;
}

.roster-list::-webkit-scrollbar-track {
  background: rgba(39, 39, 42, 0.3);
  border-radius: 3px;
}

.roster-list::-webkit-scrollbar-thumb {
  background: rgba(82, 82, 91, 0.6);
  border-radius: 3px;
}

.roster-list::-webkit-scrollbar-thumb:hover {
  background: rgba(113, 113, 122, 0.8);
}

.roster-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  background: rgba(39, 39, 42, 0.4);
  border: 1px solid rgba(63, 63, 70, 0.25);
  color: #e4e4e7;
  font-size: 0.85rem;
}

.roster-player--empty {
  cursor: default;
  justify-content: center;
  background: rgba(39, 39, 42, 0.2);
  border-style: dashed;
  color: #a1a1aa;
}

.roster-player:hover,
.roster-player:focus-visible {
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.35), rgba(var(--theme-secondary-rgb), 0.3));
  transform: translateY(-2px);
  outline: none;
}

.roster-player__name {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.roster-player__name span:first-child {
  font-weight: 600;
}

.roster-player__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #a1a1aa;
}

.roster-player__badge {
  background: rgba(var(--theme-secondary-rgb), 0.25);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.roster-player__market-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
  padding: 0.25rem 0.625rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
  animation: pulse-glow 2s ease-in-out infinite;
  cursor: pointer;
  transition: all 0.2s ease;
}

.roster-player__market-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6);
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.7), 0 0 16px rgba(245, 158, 11, 0.3);
  }
}

.roster-player__order {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #f4f4f5;
}

.roster-player__stat {
  font-size: 0.8rem;
  color: #cbd5f5;
  text-align: right;
  min-width: 72px;
}

.metrics-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.metrics-card {
  border: 1px solid rgba(39, 39, 42, 0.35);
  background: rgba(24, 24, 27, 0.55);
  backdrop-filter: blur(18px);
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.35);
  width: 100%;
  max-width: 100%;
}

.metrics-card__header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f4f4f5;
}

.metrics-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.metrics-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.metrics-form__row--single {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.metrics-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #cbd5f5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metrics-form input {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(var(--theme-primary-rgb), 0.25);
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
  color: #f8fafc;
  font-size: 0.9rem;
}

.metrics-form__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.metrics-form__actions--inline {
  justify-content: flex-start;
}

.metrics-status {
  font-size: 0.8rem;
  color: #94a3b8;
}

.metrics-status--error {
  color: #fca5a5;
}

.metrics-table-wrapper {
  overflow-x: auto;
  border-radius: 0.5rem;
  border: 1px solid rgba(71, 85, 105, 0.35);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0 0 0;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(71, 85, 105, 0.2);
}

.pagination__btn {
  cursor: pointer;
  border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
  background: rgba(var(--theme-primary-rgb), 0.2);
  color: var(--theme-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.pagination__btn:hover:not(:disabled) {
  background: rgba(var(--theme-primary-rgb), 0.3);
  border-color: rgba(var(--theme-primary-rgb), 0.5);
  transform: translateY(-1px);
}

.pagination__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination__info {
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 100px;
  text-align: center;
}

.metrics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  color: #e2e8f0;
}

.metrics-table thead {
  background: rgba(30, 41, 59, 0.8);
}

.metrics-table th,
.metrics-table td {
  padding: 0.6rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(71, 85, 105, 0.35);
  white-space: nowrap;
}

.metrics-table th:first-child,
.metrics-table td:first-child {
  position: sticky;
  left: 0;
  background: rgba(30, 41, 59, 0.95);
  z-index: 10;
  min-width: 140px;
}

.metrics-table thead th:first-child {
  background: rgba(30, 41, 59, 0.95);
}

.metrics-table tbody tr:nth-child(even) td:first-child {
  background: rgba(15, 23, 42, 0.95);
}

.metrics-table tbody tr:hover td:first-child {
  background: rgba(var(--theme-primary-rgb), 0.25);
}

.metrics-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.35);
}

.metrics-table tbody tr:hover {
  background: rgba(var(--theme-primary-rgb), 0.18);
}

.metrics-table tbody tr td:last-child {
  white-space: nowrap;
}

.player-panel {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  z-index: 900;
}

.player-panel__overlay {
  flex: 1;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(4px);
}

.player-panel__sheet {
  width: min(650px, 90%);
  max-width: 90vw;
  background: rgba(15, 23, 42, 0.96);
  border-left: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: -24px 0 60px rgba(2, 6, 23, 0.55);
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.player-panel__close {
  align-self: flex-end;
  border: none;
  background: rgba(71, 85, 105, 0.2);
  color: #e2e8f0;
  font-size: 1.75rem;
  line-height: 1;
  border-radius: 999px;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.player-panel__close:hover,
.player-panel__close:focus-visible {
  background: rgba(var(--theme-primary-rgb), 0.35);
  transform: translateY(-1px);
  outline: none;
}

.player-panel__headshot-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.player-panel__headshot {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(var(--theme-primary-rgb), 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(39, 39, 42, 0.8), rgba(24, 24, 27, 0.9));
}

.player-panel__header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f8fafc;
}

.player-panel__header p {
  margin: 0.25rem 0 0;
  color: #94a3b8;
}

.player-panel__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.player-panel__meta span {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.player-panel__meta span strong {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.player-panel__section h4 {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #94a3b8;
}

.player-panel__stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.player-panel__stat-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: rgba(30, 41, 59, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 88px;
}

.player-panel__stat-card h5 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
}

.player-panel__stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
}

.player-panel__stat-meta {
  font-size: 0.75rem;
  color: #94a3b8;
}

.player-panel__loading,
.player-panel__error {
  font-size: 0.95rem;
  color: #e2e8f0;
  text-align: center;
}

.player-panel__error {
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(31, 41, 55, 0.5);
  border-radius: 0.75rem;
  padding: 0.9rem;
}

.player-panel__content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.player-panel__empty {
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Plays Section */
.plays {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
  width: 100%;
  margin: 0;
}

.diamond-section,
.recent-plays-section {
  border: 1px solid rgba(63, 63, 70, 0.4);
  background-color: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(24px);
  background: linear-gradient(135deg, rgba(39, 39, 42, 0.6), rgba(24, 24, 27, 0.8));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08),
              0 12px 40px rgba(0, 0, 0, 0.4),
              inset 0 1px rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: visible;
  min-width: 0;
}

.diamond-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  padding: 1.2rem 1.25rem 1.6rem;
}

.plays-history-section {
  border: 1px solid rgba(63, 63, 70, 0.4);
  background-color: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(24px);
  background: linear-gradient(135deg, rgba(39, 39, 42, 0.6), rgba(24, 24, 27, 0.8));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08),
              0 12px 40px rgba(0, 0, 0, 0.4),
              inset 0 1px rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.plays > .recent-plays-section {
  grid-column: 2;
}

.plays > .plays-history-section {
  grid-column: 1 / -1;
}

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

  .plays > .recent-plays-section {
    grid-column: 1;
  }
}

.plays h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #e4e4e7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.recent-plays {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.plays-history {
  max-height: 500px;
  overflow-y: auto;
}

.plays-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.plays-list li {
  background: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(16px);
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(39, 39, 42, 0.3);
  font-size: 0.875rem;
  color: #e4e4e7;
  transition: all 0.2s ease;
  position: relative;
}

.plays-history li {
  padding-left: 3.5rem;
  padding-top: 1rem;
}

.plays-history {
  counter-reset: play-counter;
}

.plays-history li {
  counter-increment: play-counter;
}

.plays-history li::before {
  content: counter(play-counter);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 8px rgba(var(--theme-primary-rgb), 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.1);
}

.recent-plays li {
  padding-left: 1rem;
}

.plays-list li:hover {
  background: rgba(39, 39, 42, 0.6);
  transform: translateX(4px);
}

/* Empty State */
.empty-state {
  text-align: center;
  color: #a1a1aa;
  padding: 4rem 2rem;
  font-size: 1rem;
  font-weight: 500;
}

/* Standings */
.standings {
  display: grid;
  gap: 2rem;
}

.standings-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.standings-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #fff, #e4e4e7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.standings-meta {
  font-size: 0.875rem;
  color: #a1a1aa;
  font-weight: 500;
}

.standings-card {
  background: linear-gradient(135deg, rgba(39, 39, 42, 0.4), rgba(24, 24, 27, 0.6));
  backdrop-filter: blur(24px);
  border-radius: 1rem;
  border: 1px solid rgba(39, 39, 42, 0.3);
  padding: 1.5rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05),
              0 8px 32px rgba(0, 0, 0, 0.3),
              inset 0 1px rgba(255, 255, 255, 0.08);
}

.standings-card h3 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #e4e4e7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.standings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.standings-table th,
.standings-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(63, 63, 70, 0.3);
}

.standings-table th {
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.2), rgba(var(--theme-secondary-rgb), 0.1));
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: #a1a1aa;
}

.standings-table td {
  color: #ffffff;
  font-weight: 500;
}

.standings-table tbody tr:hover {
  background: rgba(39, 39, 42, 0.3);
}

/* Team Logo Styles */
.team-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-info-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.team-logo-small {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 1))
          drop-shadow(0 0 4px rgba(255, 255, 255, 0.8))
          drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  transition: filter 0.3s ease;
}

.team-logo-small:hover {
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 1))
          drop-shadow(0 0 6px rgba(255, 255, 255, 0.9))
          drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

/* Add pulsing glow animation for active game */
.game-card--active .team-logo-small {
  animation: logo-glow 2s ease-in-out infinite;
}

@keyframes logo-glow {
  0%, 100% {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 1))
            drop-shadow(0 0 4px rgba(255, 255, 255, 0.8))
            drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 1))
            drop-shadow(0 0 8px rgba(255, 255, 255, 0.9))
            drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
  }
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.95), rgba(var(--theme-secondary-rgb), 0.95));
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(20px);
  font-weight: 500;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Glossary Panel */
.glossary-panel {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  z-index: 900;
}

.glossary-panel__overlay {
  flex: 1;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(4px);
}

.glossary-panel__sheet {
  width: min(480px, 100%);
  background: rgba(15, 23, 42, 0.96);
  border-left: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: -24px 0 60px rgba(2, 6, 23, 0.55);
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.glossary-panel__close {
  align-self: flex-end;
  border: none;
  background: rgba(71, 85, 105, 0.2);
  color: #e2e8f0;
  font-size: 1.75rem;
  line-height: 1;
  border-radius: 999px;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.glossary-panel__close:hover,
.glossary-panel__close:focus-visible {
  background: rgba(var(--theme-primary-rgb), 0.35);
  transform: translateY(-1px);
  outline: none;
}

.glossary-panel__header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #f8fafc;
}

.glossary-subtitle {
  margin: 0.5rem 0 0 0;
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 400;
}

.glossary-panel__content {
  padding-bottom: 1rem;
}

.glossary-section {
  border: 1px solid rgba(var(--theme-primary-rgb), 0.2);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  background: rgba(15, 23, 42, 0.4);
  transition: all 0.2s ease;
}

.glossary-section:hover {
  border-color: rgba(var(--theme-primary-rgb), 0.4);
  background: rgba(15, 23, 42, 0.6);
}

.glossary-section[open] {
  border-color: rgba(var(--theme-primary-rgb), 0.5);
  background: rgba(15, 23, 42, 0.7);
}

.glossary-section__title {
  cursor: pointer;
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--theme-primary);
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.2s ease;
}

.glossary-section__title:hover {
  color: var(--theme-primary);
}

.glossary-section__title::after {
  content: '▼';
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  color: #64748b;
}

.glossary-section:not([open]) .glossary-section__title::after {
  transform: rotate(-90deg);
}

.glossary-section summary::-webkit-details-marker {
  display: none;
}

.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
  padding: 1rem;
}

.glossary-list dt {
  font-weight: 700;
  font-size: 1rem;
  color: var(--theme-primary);
  margin: 0;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.glossary-list dd {
  margin: 0.35rem 0 0 0;
  color: #cbd5e1;
  line-height: 1.6;
  font-size: 0.9rem;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Animations */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(var(--theme-primary-rgb), 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(var(--theme-primary-rgb), 0.6);
  }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .schedule-layout {
    grid-template-columns: 1fr;
  }

  .game-detail {
    min-height: 420px;
  }

  .content {
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .top-bar {
    padding: 0.75rem 1rem;
  }

  .nav__item {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .game-card {
    padding: 0.75rem;
  }

  .game-detail {
    padding: 1rem;
  }
}

/* Preview Panel */
.preview-panel {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  z-index: 900;
}

.preview-panel__overlay {
  flex: 1;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(4px);
}

.preview-panel__sheet {
  width: min(750px, 90%);
  max-width: 90vw;
  background: rgba(15, 23, 42, 0.96);
  border-left: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: -24px 0 60px rgba(2, 6, 23, 0.55);
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.preview-panel__close {
  align-self: flex-end;
  border: none;
  background: rgba(71, 85, 105, 0.2);
  color: #e2e8f0;
  font-size: 1.75rem;
  line-height: 1;
  border-radius: 999px;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.preview-panel__close:hover,
.preview-panel__close:focus-visible {
  background: rgba(var(--theme-primary-rgb), 0.35);
  transform: translateY(-1px);
  outline: none;
}

.preview-panel__header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f8fafc;
}

.preview-panel__header p {
  margin: 0.25rem 0 0;
  color: #94a3b8;
  font-size: 0.95rem;
}

.preview-panel__content {
  overflow-x: hidden;
  width: 100%;
}

.preview-panel__section {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(71, 85, 105, 0.2);
  overflow-x: hidden;
  width: 100%;
}

.preview-panel__section:last-child {
  border-bottom: none;
}

.preview-panel__section h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--theme-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  font-size: 0.9rem;
  width: 100%;
  max-width: 100%;
}

.preview-info-grid span {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.preview-info-grid strong {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.preview-pitchers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
}

.preview-pitcher {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
}

.preview-pitcher--away {
  border-left: 3px solid var(--theme-primary);
}

.preview-pitcher--home {
  border-left: 3px solid #34d399;
}

.preview-pitcher h5 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
}

.preview-pitcher-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.preview-pitcher-stats span {
  display: flex;
  justify-content: space-between;
  color: #cbd5e1;
}

.preview-pitcher-stats strong {
  color: #94a3b8;
  font-weight: 500;
}

.preview-panel__loading,
.preview-panel__error {
  padding: 2rem;
  text-align: center;
  color: #94a3b8;
}

.preview-panel__error {
  color: #fca5a5;
}

/* Preview Panel Markets */
.preview-markets__loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  font-size: 0.875rem;
  color: #94a3b8;
}

.spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(var(--theme-primary-rgb), 0.2);
  border-top-color: var(--theme-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.preview-markets__grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
}

.preview-markets__team {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(71, 85, 105, 0.4);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.preview-markets__team-name {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--theme-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 8px rgba(var(--theme-primary-rgb), 0.3);
  border-bottom: 2px solid rgba(var(--theme-primary-rgb), 0.3);
  padding-bottom: 0.5rem;
}

.preview-markets__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.preview-market-card {
  position: relative;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-left: 4px solid;
  border-radius: 0.625rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.preview-market-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.02));
  pointer-events: none;
}

.preview-market-card.perfect {
  border-left-color: #22c55e;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(15, 23, 42, 0.95));
}

.preview-market-card.excellent {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(15, 23, 42, 0.95));
}

.preview-market-card.good {
  border-left-color: #a855f7;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(15, 23, 42, 0.95));
}

.preview-market-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-left-width: 5px;
}

.preview-market-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.preview-market-card__market {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.preview-market-card__badge {
  flex-shrink: 0;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 800;
  border-radius: 0.5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.preview-market-card__badge.perfect {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.preview-market-card__badge.excellent {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

.preview-market-card__badge.good {
  background: linear-gradient(135deg, #a855f7, #9333ea);
  color: #fff;
}

.preview-market-card__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  border: 1px solid rgba(71, 85, 105, 0.2);
}

.preview-market-card__line,
.preview-market-card__record {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.preview-market-card__line .label,
.preview-market-card__record .label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.preview-market-card__line .value,
.preview-market-card__record .value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e8f0;
}

.preview-market-card__record .value {
  font-family: 'Courier New', monospace;
  color: var(--theme-primary);
}

.preview-market-card__context {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.5;
  font-style: italic;
  padding-top: 0.625rem;
  border-top: 1px solid rgba(71, 85, 105, 0.25);
}

.preview-markets__more {
  padding: 0.75rem;
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--theme-primary);
  font-weight: 600;
  opacity: 0.9;
  background: rgba(var(--theme-primary-rgb), 0.08);
  border-radius: 0.5rem;
  border: 1px dashed rgba(var(--theme-primary-rgb), 0.3);
}

.preview-markets__empty,
.preview-markets__error {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  font-style: italic;
}

.preview-markets__error {
  color: #f87171;
}

/* Player Panel Streaks */
.player-streaks__loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  font-size: 0.875rem;
  color: #94a3b8;
}

.player-streaks__empty {
  padding: 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  font-style: italic;
}

.player-streaks__empty p {
  margin: 0;
}

.player-streaks__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.player-streak-item {
  position: relative;
  padding: 0.875rem;
  padding-bottom: 2.5rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-left: 4px solid;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  overflow: hidden;
}

.player-streak-item.perfect {
  border-left-color: #22c55e;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(30, 41, 59, 0.5));
}

.player-streak-item.excellent {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(30, 41, 59, 0.5));
}

.player-streak-item.good {
  border-left-color: #a855f7;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(30, 41, 59, 0.5));
}

.player-streak-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-left-width: 5px;
}

.player-streak-item__header {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 0.625rem;
  padding-right: 1rem;
}

.player-streak-item__market {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.3;
  word-break: break-word;
  flex: 1;
}

.player-streak-item__hit-rate {
  position: absolute;
  bottom: 0.75rem;
  right: 0.875rem;
  padding: 0.375rem 0.75rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.player-streak-item.perfect .player-streak-item__hit-rate {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.player-streak-item.excellent .player-streak-item__hit-rate {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.player-streak-item.good .player-streak-item__hit-rate {
  background: linear-gradient(135deg, #a855f7, #9333ea);
}

.player-streak-item__details {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: #cbd5e1;
  flex-wrap: wrap;
}

.player-streak-item__line {
  font-weight: 600;
  color: var(--theme-primary);
  font-size: 0.75rem;
}

.player-streak-item__record {
  font-family: 'Courier New', monospace;
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.75rem;
}

.player-streak-item__context {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
  font-style: italic;
  padding-top: 0.5rem;
  padding-right: 5rem;
  border-top: 1px solid rgba(71, 85, 105, 0.2);
  word-break: break-word;
}

/* Visual Data Styles */
.visuals-grid {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .visuals-grid {
    grid-template-columns: 400px 1fr;
  }
}

.visuals-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: 0.5rem;
  overflow: hidden;
}

.visuals-card__header {
  background: rgba(15, 23, 42, 0.6);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.visuals-card__header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #e2e8f0;
}

.visuals-form {
  padding: 1.5rem;
}

.visuals-form__row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.visuals-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #94a3b8;
}

.visuals-form input {
  padding: 0.5rem 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 0.375rem;
  color: #e2e8f0;
  font-size: 0.875rem;
}

.visuals-form input:focus {
  outline: none;
  border-color: var(--theme-primary);
}

.visuals-form__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.visuals-chart {
  padding: 2rem;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.visuals-card--chart .visuals-chart {
  min-height: 600px;
}

.visuals-image {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.visuals-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: #94a3b8;
}

.visuals-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(148, 163, 184, 0.3);
  border-top-color: var(--theme-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.visuals-error {
  color: #fca5a5;
  text-align: center;
}

.visuals-meta {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 400;
}

.visuals-health {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
}

.visuals-health--online {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.visuals-health--offline {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.visuals-search-results {
  position: relative;
  margin-top: 0.5rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 0.375rem;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.visuals-search-item {
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
  transition: background-color 0.15s;
}

.visuals-search-item:last-child {
  border-bottom: none;
}

.visuals-search-item:hover {
  background: rgba(var(--theme-primary-rgb), 0.1);
}

.visuals-search-item__name {
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.25rem;
}

.visuals-search-item__details {
  font-size: 0.875rem;
  color: #94a3b8;
}

.visuals-search-empty {
  padding: 1rem;
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
}

/* ========================================
   Analytics Section
   ======================================== */

.analytics-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
}

.analytics-selector {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
  border-radius: 1rem;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.analytics-selector__header {
  margin-bottom: 1rem;
}

.analytics-selector__header h3 {
  margin: 0;
  font-size: 1.125rem;
  color: #e2e8f0;
}

.analytics-date-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.analytics-date-controls__row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.analytics-date-controls__row input[type="date"] {
  flex: 1;
  min-width: 0;
}

.analytics-today-btn {
  width: 100%;
}

.analytics-games-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  max-height: 600px;
  overflow-y: auto;
}

.analytics-game-item {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(51, 65, 85, 0.6));
  border: 1px solid rgba(71, 85, 105, 0.4);
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.analytics-game-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--theme-primary-rgb), 0.1), transparent);
  transition: left 0.5s;
}

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

.analytics-game-item:hover {
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.2), rgba(var(--theme-primary-rgb), 0.2));
  border-color: rgba(var(--theme-primary-rgb), 0.6);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), 0.2);
}

.analytics-game-item--active {
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.3), rgba(var(--theme-secondary-rgb), 0.25));
  border-color: rgba(var(--theme-primary-rgb), 0.8);
  box-shadow: 0 0 20px rgba(var(--theme-primary-rgb), 0.3);
}

.analytics-game-item__teams {
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.analytics-game-item__time {
  font-size: 0.75rem;
  color: #94a3b8;
}

.analytics-dashboard {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
  border-radius: 1rem;
  padding: 2rem;
  min-height: 600px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.analytics-game-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.analytics-game-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: #e2e8f0;
}

.analytics-game-header p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.875rem;
}

.analytics-game-nav {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.analytics-model-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.analytics-model-btn {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(71, 85, 105, 0.5);
  color: #94a3b8;
}

.analytics-model-btn:hover {
  background: rgba(var(--theme-primary-rgb), 0.1);
  border-color: rgba(var(--theme-primary-rgb), 0.5);
  color: var(--theme-primary);
}

.analytics-model-btn--active {
  background: rgba(var(--theme-primary-rgb), 0.2);
  border-color: var(--theme-primary);
  color: var(--theme-primary);
  font-weight: 600;
}

.analytics-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  color: #94a3b8;
}

.analytics-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.375rem;
  padding: 1rem;
  color: #fca5a5;
  margin-bottom: 1.5rem;
}

.analytics-probability {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.analytics-prob-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.8));
  border: 2px solid rgba(var(--theme-primary-rgb), 0.4);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.analytics-prob-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, var(--theme-secondary), var(--theme-accent));
  opacity: 0;
  transition: opacity 0.3s;
}

.analytics-prob-card:hover::before {
  opacity: 1;
}

.analytics-prob-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(var(--theme-primary-rgb), 0.3);
  border-color: rgba(var(--theme-primary-rgb), 0.6);
}

.analytics-prob-card--favorite {
  border-color: rgba(var(--theme-primary-rgb), 0.8);
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.2), rgba(var(--theme-secondary-rgb), 0.15));
  box-shadow: 0 0 30px rgba(var(--theme-primary-rgb), 0.3);
}

.analytics-prob-card--favorite::before {
  opacity: 1;
}

.analytics-prob-card__team {
  font-size: 1.125rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.75rem;
}

.analytics-prob-card__value {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, var(--theme-secondary), var(--theme-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(var(--theme-primary-rgb), 0.5);
}

.analytics-prob-card__odds {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.analytics-prob-card__edge {
  font-size: 0.875rem;
  font-weight: 600;
}

.analytics-prob-card__edge--positive {
  color: #4ade80;
}

.analytics-prob-card__edge--negative {
  color: #fca5a5;
}

.analytics-recommendation {
  background: linear-gradient(135deg,
    rgba(var(--theme-primary-rgb), 0.2),
    rgba(var(--theme-secondary-rgb), 0.15),
    rgba(var(--theme-accent-rgb), 0.15));
  border: 2px solid;
  border-image: linear-gradient(135deg, #6366f1, var(--theme-secondary), var(--theme-accent)) 1;
  border-radius: 1.25rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow:
    0 0 0 1px rgba(var(--theme-primary-rgb), 0.1),
    0 10px 40px rgba(var(--theme-primary-rgb), 0.3),
    0 0 60px rgba(var(--theme-secondary-rgb), 0.2),
    inset 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.analytics-recommendation::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(var(--theme-primary-rgb), 0.15) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

.analytics-recommendation::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, var(--theme-secondary), var(--theme-accent), #6366f1);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

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

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.analytics-recommendation__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.analytics-recommendation__title {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #e4e4e7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: 0.02em;
}

.analytics-recommendation__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: badge-pulse 2s ease-in-out infinite;
}

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

.analytics-recommendation__badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: badge-dot-pulse 1.5s ease-in-out infinite;
}

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

.analytics-recommendation__badge--high {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(16, 185, 129, 0.3));
  color: #4ade80;
  border: 2px solid rgba(34, 197, 94, 0.8);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4), 0 0 20px rgba(34, 197, 94, 0.2);
}

.analytics-recommendation__badge--medium {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.3), rgba(245, 158, 11, 0.3));
  color: #facc15;
  border: 2px solid rgba(234, 179, 8, 0.8);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.4), 0 0 20px rgba(234, 179, 8, 0.2);
}

.analytics-recommendation__badge--low {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.3), rgba(100, 116, 139, 0.3));
  color: #cbd5e1;
  border: 2px solid rgba(148, 163, 184, 0.8);
  box-shadow: 0 4px 12px rgba(148, 163, 184, 0.4);
}

.analytics-recommendation__content {
  position: relative;
  z-index: 1;
}

.analytics-recommendation__text {
  color: #fff;
  margin: 0 0 1.5rem 0;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.analytics-recommendation__text strong {
  background: linear-gradient(135deg, #6366f1, var(--theme-secondary), var(--theme-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2rem;
}

.analytics-recommendation__edges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(var(--theme-primary-rgb), 0.3);
}

.analytics-recommendation__edge-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(var(--theme-primary-rgb), 0.4);
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.3s;
}

.analytics-recommendation__edge-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(var(--theme-primary-rgb), 0.3);
  border-color: rgba(var(--theme-primary-rgb), 0.6);
}

.analytics-recommendation__edge-label {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.analytics-recommendation__edge-value {
  color: #e2e8f0;
  font-size: 1.5rem;
  font-weight: 700;
}

.analytics-components {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.8));
  border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.analytics-components h3 {
  margin: 0 0 0.5rem 0;
  color: #e2e8f0;
  font-size: 1.25rem;
  font-weight: 700;
}

.analytics-components-subtitle {
  margin: 0 0 1.5rem 0;
  color: #94a3b8;
  font-size: 0.875rem;
  font-style: italic;
}

.analytics-components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.analytics-component-card {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.7), rgba(71, 85, 105, 0.5));
  border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.3s;
}

.analytics-component-card.expandable {
  cursor: pointer;
}

.analytics-component-card.expandable:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--theme-primary-rgb), 0.5);
  box-shadow: 0 4px 16px rgba(var(--theme-primary-rgb), 0.2);
}

.analytics-component-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.analytics-component-card__title {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  user-select: none;
}

.analytics-component-card__value {
  color: #e2e8f0;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.analytics-component-card__meta {
  color: #64748b;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.analytics-component-card__weight {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.analytics-component-card__details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  margin-top: 0;
}

.analytics-component-card[data-expanded="true"] .analytics-component-card__details {
  max-height: 1000px;
  opacity: 1;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.analytics-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.analytics-details-col h4 {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.analytics-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(71, 85, 105, 0.2);
  font-size: 0.875rem;
}

.analytics-stat-row:last-child {
  border-bottom: none;
}

.analytics-stat-row span:first-child {
  color: #94a3b8;
}

.analytics-stat-row span:last-child {
  color: #e2e8f0;
  font-weight: 600;
}

.analytics-details-note {
  color: #64748b;
  font-size: 0.75rem;
  font-style: italic;
  margin: 0.75rem 0 0 0;
}

.analytics-component-card__details p {
  color: #94a3b8;
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.analytics-bvp-hero {
  margin-top: 2rem;
  padding: 1.75rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.25), rgba(2, 132, 199, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.4);
}

.analytics-bvp-hero--empty {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(148, 163, 184, 0.2);
  text-align: center;
}

.analytics-bvp-hero h3 {
  margin: 0;
  color: #e2e8f0;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.analytics-bvp-hero p {
  margin: 0.35rem 0 0 0;
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.9rem;
}

.analytics-bvp-hero__header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.analytics-bvp-legend {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.analytics-bvp-legend__swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  margin-right: 0.4rem;
}

.analytics-bvp-legend__swatch--alert {
  background: linear-gradient(90deg, #f97316, #facc15, #22c55e);
}

.analytics-bvp-legend__swatch--cold {
  background: rgba(239, 68, 68, 0.7);
}

.analytics-bvp-hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.analytics-bvp-hero__footer {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bvp-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.bvp-section__title {
  margin: 0 0 0.35rem 0;
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 600;
}

.bvp-section__subtitle {
  margin: 0 0 1rem 0;
  color: #94a3b8;
  font-size: 0.8rem;
}

.bvp-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.bvp-section__team {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bvp-team-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.bvp-team-title__name {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.bvp-team-title__subtitle {
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bvp-team-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.bvp-team-column h5 {
  margin: 0 0 0.5rem 0;
  color: #cbd5f5;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.bvp-player-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bvp-player {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: rgba(30, 41, 59, 0.55);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.bvp-player--recommended {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
}

.bvp-player--cold {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(127, 29, 29, 0.2);
}

.bvp-player__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.bvp-player__name {
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 0.3rem;
}

.bvp-player__name a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(248, 250, 252, 0.4);
}

.bvp-player__meta {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.85);
}

.bvp-player__status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.bvp-level {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bvp-tier--great { color: #22c55e; }
.bvp-tier--verygood { color: #16a34a; }
.bvp-tier--good { color: #84cc16; }
.bvp-tier--better { color: #facc15; }
.bvp-tier--alright { color: #fb923c; }
.bvp-tier--low { color: #94a3b8; }
.bvp-tier--none { color: #94a3b8; }

.bvp-player__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #0f172a;
  background: rgba(34, 197, 94, 0.85);
}

.bvp-player__badge--low {
  color: #f97316;
  background: rgba(249, 115, 22, 0.12);
}

.bvp-player__badge--cold {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.18);
}

.bvp-player__badge--rebound {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.18);
}

.bvp-meter {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.6);
  overflow: hidden;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.bvp-meter--empty {
  background: rgba(51, 65, 85, 0.3);
}

.bvp-meter__fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: linear-gradient(90deg, #f97316, #facc15, #22c55e);
  border-radius: 999px;
}

.bvp-meter__tick {
  position: absolute;
  top: 100%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: rgba(148, 163, 184, 0.75);
  padding-top: 0.2rem;
}

.bvp-meter__tick::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 10px;
  background: rgba(148, 163, 184, 0.35);
}

.bvp-meter__value {
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.9);
  font-weight: 600;
}

.bvp-player__notes {
  margin-top: 0.45rem;
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.9);
}

.bvp-empty {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(30, 41, 59, 0.4);
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.75rem;
  text-align: center;
}

.bvp-empty--cold {
  background: rgba(127, 29, 29, 0.25);
  color: rgba(248, 113, 113, 0.9);
}

.bvp-section__footnote {
  margin-top: 0.75rem;
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bvp-section--empty {
  text-align: center;
  padding: 1rem;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 0.75rem;
  color: rgba(148, 163, 184, 0.9);
}

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

  .analytics-selector {
    position: static;
  }

  .analytics-probability {
    grid-template-columns: 1fr;
  }
}


.admin-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Header Right Section */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

/* Admin Link */
.admin-link {
  padding: 0.5rem 0.75rem;
  font-size: 1.3rem;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.05);
}

.admin-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

/* Baseball Diamond */
.baseball-diamond {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  margin: 0 auto;
  padding: 1.25rem 0 0;
}

#stadium {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 600px;
  width: 600px;
  transform: translate(-65%, -58%) scale(0.55);
  transform-origin: center;
}

#field {
  position: absolute;
  top: -110px;
  left: 145px;
  height: 700px;
  width: 700px;
  border-radius: 1% 100% 1% 1%;
  border: 1px solid green;
  background-color: green;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

#in-field {
  position: absolute;
  top: 170px;
  left: 265px;
  height: 450px;
  width: 450px;
  border-radius: 1% 50% 1% 1%;
  border: 1px solid #836539;
  background-color: #836539;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

#base-lines {
  position: absolute;
  top: -120px;
  left: 155px;
  height: 670px;
  width: 670px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

#in-field-grass {
  position: absolute;
  top: 330px;
  left: 359px;
  height: 260px;
  width: 260px;
  border: 2px solid green;
  background-color: green;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.base {
  position: absolute;
  height: 13px;
  width: 13px;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
  border: 1px solid white;
  background-color: white;
  z-index: 1000;
}

.base.occupied {
  background-color: #ffd700;
  border-color: #ffd700;
  box-shadow: 0 0 10px #ffd700;
}

#first-base {
  top: 450px;
  left: 706px;
}

#second-base {
  top: 231px;
  left: 484px;
}

#third-base {
  top: 450px;
  left: 262px;
}

#home-plate {
  position: absolute;
  height: 7px;
  width: 13px;
  top: 678px;
  left: 485px;
  border: 1px solid white;
  background-color: white;
}

#home-plate:before,
#home-plate:after {
  top: 100%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}

#home-plate:before {
  border-top-color: white;
  border-width: 8px;
  left: 50%;
  margin-left: -9.5px;
}

.home-plate-pulse {
  position: absolute;
  height: 7px;
  width: 13px;
  top: 678px;
  left: 485px;
}

#pitchers-mound {
  position: absolute;
  top: 420px;
  left: 450px;
  height: 80px;
  width: 80px;
  border-radius: 100% 100% 100% 100%;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
  border: 1px solid #836539;
  background-color: #836539;
}

#pitchers-plate {
  position: absolute;
  top: 458px;
  left: 482px;
  height: 5px;
  width: 16px;
  border: 1px solid white;
  background-color: white;
}

.half-circle {
  position: absolute;
  height: 40px;
  width: 40px;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
  border: 1px solid #836539;
  background-color: #836539;
}

#third-circle {
  top: 440px;
  left: 300px;
  border-radius: 1% 1% 100% 1%;
}

#first-circle {
  top: 440px;
  left: 642px;
  border-radius: 100% 1% 1% 1%;
}

#second-circle {
  top: 275px;
  left: 470px;
  border-radius: 1% 1% 1% 100%;
}

.batters-box {
  position: absolute;
  height: 25px;
  width: 15px;
  border: 2px solid white;
  background-color: #836539;
  opacity: 1.0;
  top: 670px;
}

#batters-box-right {
  box-shadow: 6px 0 #836539;
  left: 461px;
}

#batters-box-left {
  box-shadow: -6px 0 #836539;
  left: 503px;
}

#batting-circle {
  position: absolute;
  top: 634px;
  left: 440px;
  height: 100px;
  width: 100px;
  border-radius: 100% 100% 100% 100%;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
  border: 1px solid #836539;
  background-color: #836539;
}

#first-base-thing {
  top: 430px;
  left: 667px;
  position: absolute;
  height: 170px;
  width: 13px;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  border-right: 2px solid white;
  border-bottom: 2px solid white;
}

.mowed-grass {
  background-color: #ac0;
  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255, 255, 255, .2)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.75, rgba(255, 255, 255, .2)), color-stop(.75, transparent), to(transparent));
  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
  background-image: -ms-linear-gradient(0deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
  background-image: -o-linear-gradient(0deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
  background-image: linear-gradient(0deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
  -webkit-background-size: 250px 250px;
  -moz-background-size: 50px 50px;
  background-size: 200px 200px;
  background-color: #ac0;
}

.action-area {
  position: relative;
  z-index: 2000;
  cursor: pointer;
  width: 100px;
  height: 100px;
  margin: -50px;
}

.pulse {
  z-index: 1000;
  border: 1px solid #999;
  border-radius: 100%;
  margin: -8px;
  width: 27px;
  height: 27px;
  -webkit-animation: pulsate 1s ease-out;
  -webkit-animation-iteration-count: infinite;
  animation: pulsate 1s ease-out;
  animation-iteration-count: infinite;
  opacity: 0.0;
}

.base.occupied .pulse {
  border-color: #ffd700;
}

@-webkit-keyframes pulsate {
  0% {
    -webkit-transform: scale(1.0, 1.0);
    opacity: 0.0;
  }
  50% {
    opacity: 1.0;
  }
  100% {
    -webkit-transform: scale(2.0, 2.0);
    opacity: 0.0;
  }
}

@keyframes pulsate {
  0% {
    transform: scale(1.0, 1.0);
    opacity: 0.0;
  }
  50% {
    opacity: 1.0;
  }
  100% {
    transform: scale(2.0, 2.0);
    opacity: 0.0;
  }
}

/* ========================================
   SHEETS / BETTING STREAKS - BEAUTIFUL REDESIGN
   ======================================== */

.sheets-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.sheets-filters {
  display: flex;
  gap: 1.25rem;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.05), rgba(var(--theme-primary-rgb), 0.02));
  border: 1px solid rgba(var(--theme-primary-rgb), 0.15);
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08),
              inset 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.sheets-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 160px;
}

.sheets-filter-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--theme-primary);
  opacity: 0.9;
}

.sheets-filter-select {
  padding: 0.625rem 1rem;
  border: 1.5px solid rgba(var(--theme-primary-rgb), 0.2);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sheets-filter-select option {
  background: #1a1a1a;
  color: #ffffff;
  padding: 0.5rem;
}

.sheets-filter-select:hover {
  border-color: var(--theme-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), 0.2);
}

.sheets-filter-select:focus {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 4px rgba(var(--theme-primary-rgb), 0.15),
              0 4px 12px rgba(var(--theme-primary-rgb), 0.2);
}

.btn--small {
  padding: 0.625rem 1.25rem;
  font-size: 0.813rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn--small:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.sheets-loading,
.sheets-error {
  padding: 3rem;
  text-align: center;
  border-radius: 1rem;
}

.sheets-loading {
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.03), rgba(var(--theme-primary-rgb), 0.01));
}

.sheets-error {
  color: #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-weight: 500;
}

.sheets-content {
  margin-top: 1rem;
}

.sheets-summary {
  margin-bottom: 1.25rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.08), rgba(var(--theme-primary-rgb), 0.03));
  border-left: 4px solid var(--theme-primary);
  border-radius: 0.5rem;
  font-size: 0.938rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sheets-table-wrapper {
  overflow-x: auto;
  border-radius: 1rem;
  background: var(--card-bg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
              0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(var(--theme-primary-rgb), 0.1);
}

/* Dark scrollbar for table */
.sheets-table-wrapper::-webkit-scrollbar {
  height: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0 0 1rem 1rem;
}

.sheets-table-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(var(--theme-primary-rgb), 0.6), rgba(var(--theme-primary-rgb), 0.4));
  border-radius: 6px;
  border: 2px solid rgba(0, 0, 0, 0.3);
}

.sheets-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, rgba(var(--theme-primary-rgb), 0.8), rgba(var(--theme-primary-rgb), 0.6));
}

.sheets-table-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 1rem 1rem;
}

.sheets-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.sheets-table thead {
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.15), rgba(var(--theme-primary-rgb), 0.08));
  position: sticky;
  top: 0;
  z-index: 10;
}

.sheets-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-primary);
  border-bottom: 2px solid var(--theme-primary);
  white-space: nowrap;
  background: inherit;
}

.sheets-table th:first-child {
  border-top-left-radius: 1rem;
}

.sheets-table th:last-child {
  border-top-right-radius: 1rem;
}

.sheets-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(var(--border-color-rgb, 200, 200, 200), 0.3);
  transition: all 0.15s ease;
}

.sheets-table tbody tr {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sheets-table tbody tr:hover {
  background: rgba(var(--theme-primary-rgb), 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Streak quality indicators - Enhanced */
.sheets-table tbody tr.streak-perfect {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.04));
  border-left: 4px solid #22c55e;
}

.sheets-table tbody tr.streak-perfect:hover {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.08));
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.25);
}

.sheets-table tbody tr.streak-excellent {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.04));
  border-left: 4px solid #3b82f6;
}

.sheets-table tbody tr.streak-excellent:hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.08));
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}

.sheets-table tbody tr.streak-good {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.12), rgba(168, 85, 247, 0.04));
  border-left: 4px solid #a855f7;
}

.sheets-table tbody tr.streak-good:hover {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.18), rgba(168, 85, 247, 0.08));
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.25);
}

/* Column specific styling - Enhanced */
.streak-game {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  font-size: 0.813rem;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0.8;
}

.streak-player {
  font-weight: 700;
  font-size: 0.938rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.streak-team {
  font-weight: 700;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  font-size: 0.875rem;
  padding: 0.25rem 0.625rem;
  background: rgba(var(--theme-primary-rgb), 0.1);
  border-radius: 0.375rem;
  display: inline-block;
}

.streak-market {
  font-size: 0.813rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.streak-line {
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  color: var(--theme-primary);
}

.streak-context {
  font-size: 0.813rem;
  font-style: italic;
  color: var(--text-secondary);
  opacity: 0.9;
}

.streak-hitrate {
  font-weight: 800;
  font-size: 1.125rem;
  text-align: center;
  color: var(--theme-primary);
  text-shadow: 0 2px 8px rgba(var(--theme-primary-rgb), 0.3);
}

.streak-perfect .streak-hitrate {
  color: #22c55e;
  text-shadow: 0 2px 12px rgba(34, 197, 94, 0.4);
}

.streak-excellent .streak-hitrate {
  color: #3b82f6;
  text-shadow: 0 2px 12px rgba(59, 130, 246, 0.4);
}

.streak-good .streak-hitrate {
  color: #a855f7;
  text-shadow: 0 2px 12px rgba(168, 85, 247, 0.4);
}

.streak-record {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  background: rgba(var(--theme-primary-rgb), 0.08);
  border-radius: 0.375rem;
  display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .sheets-filters {
    padding: 1rem;
    gap: 1rem;
  }

  .sheets-table {
    font-size: 0.813rem;
  }

  .sheets-table th,
  .sheets-table td {
    padding: 0.75rem 1rem;
  }

  .sheets-table tbody tr:hover {
    transform: none;
  }
}
