/* ==========================================================================
   HALFTIME CENTER - ESPN / SPORTSBOOK GRAPHICS STYLE SHEET
   ========================================================================== */

:root {
  /* High-Contrast Sportsbook Theme Colors */
  --bg-main: #060608;
  --bg-card: #1b1b1f;
  --bg-header: #121214;
  --bg-input: #232326;
  
  --border-color: #38383f;
  --border-focus: #ff002b;
  
  /* Sports Branding Colors */
  --espn-red: #cc0000;
  --espn-red-hover: #e60000;
  --espn-red-glow: rgba(204, 0, 0, 0.4);
  
  --espn-yellow: #f5a623;
  --espn-yellow-glow: rgba(245, 166, 35, 0.3);
  
  --espn-green: #00e676;
  --espn-green-glow: rgba(0, 230, 118, 0.3);
  
  --text-primary: #ffffff;
  --text-secondary: #c5c5c9;
  --text-muted: #8e8e93;
  
  /* Layout Controls - Sharp, Blocky Grid */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --border-radius: 4px; /* Blocky, clean corners */
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}

body.light-theme {
  --bg-main: #f1f5f9; /* Slate-100 for clear card contrast */
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --bg-input: #f8fafc;
  
  --border-color: #cbd5e1; /* Slate-300 for distinct borders */
  --border-focus: #cc0000;
  
  --text-primary: #0f172a; /* Slate-900 for readable headings */
  --text-secondary: #334155; /* Slate-700 for body text */
  --text-muted: #64748b; /* Slate-500 for secondary text */
  
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

/* Reset & Baseline */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.4;
  overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--border-radius);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Main Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px;
}

/* ESPN Header Brand */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background-color: var(--bg-header);
  border-bottom: 3px solid var(--espn-red);
  box-shadow: var(--box-shadow);
  margin-bottom: 12px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-container {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s ease;
}

.logo-container:hover {
  transform: rotate(-8deg) scale(1.05);
}

.header-logo h1 {
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.header-logo h1 span {
  color: var(--text-muted);
  font-weight: 300;
  margin-left: 2px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Horizontal Sports Ticker */
.sports-ticker-container {
  display: flex;
  background-color: #111112;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  height: 36px;
  align-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
  margin-bottom: 24px;
}

.ticker-label-box {
  background-color: var(--espn-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  gap: 6px;
  z-index: 10;
  position: relative;
  box-shadow: 4px 0 10px rgba(0,0,0,0.5);
}

.ticker-filter-btn {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  padding: 0;
  transition: all 0.15s ease;
}

.ticker-filter-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.08);
}


.ticker-content-track {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.ticker-scroll {
  display: flex;
  white-space: nowrap;
  gap: 40px;
  animation: marquee-scroll 60s linear infinite;
  padding-left: 20px;
}

.ticker-scroll:hover {
  animation-play-state: paused;
  cursor: grab;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.ticker-item .ticker-score {
  font-family: var(--font-mono);
  color: #ffffff;
  background-color: #242427;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 11px;
}

.ticker-item .ticker-status {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--espn-yellow);
  font-weight: 600;
  min-width: 80px;
  display: inline-block;
  text-align: center;
}

.ticker-item .ticker-status.live {
  color: var(--espn-green);
}

.ticker-item .ticker-divider {
  color: var(--border-color);
}

@keyframes marquee-scroll {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

/* Main Grid Layout */
.app-main {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
  flex-grow: 1;
}

.app-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.app-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* Blocky Module Cards */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: #555560;
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.95);
}

.card-header {
  padding: 14px 20px;
  background-color: #121214;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title svg {
  color: var(--espn-red);
}

.card-title h2 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-body {
  padding: 20px;
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

/* Buttons - Solid, Bold Athletics Style */
.btn {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 16px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background-color: var(--espn-red);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--espn-red-hover);
}

.btn-primary:active {
  transform: translateY(1px);
}

/* In-App PWA Install Button */
#btn-install-pwa {
  background: linear-gradient(135deg, #f5a623 0%, #d97706 100%);
  color: #0b0b0d;
  border: 1px solid #fbbf24;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.35);
  letter-spacing: 0.5px;
}

#btn-install-pwa:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f5a623 100%);
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.5);
  transform: translateY(-1px);
}

#btn-install-pwa:active {
  transform: translateY(1px);
}

#btn-install-pwa svg {
  stroke: #0b0b0d;
}

body.light-theme #btn-install-pwa {
  background: linear-gradient(135deg, #f5a623 0%, #b45309 100%);
  color: #ffffff;
  border-color: #d97706;
}

body.light-theme #btn-install-pwa svg {
  stroke: #ffffff;
}

.btn-secondary {
  background-color: #2d2d30;
  color: #ffffff;
  border: 1px solid #3f3f46;
}

.btn-secondary:hover {
  background-color: #3f3f46;
  border-color: #52525b;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

.btn-icon-only {
  width: 38px;
  height: 38px;
  padding: 0 !important;
  border-radius: var(--border-radius);
  background-color: #1e1e21;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-only:hover {
  background-color: #2e2e33;
  color: var(--espn-red);
}

.btn-link {
  background: transparent;
  color: var(--espn-yellow);
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  text-transform: uppercase;
}

.btn-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.btn-small {
  padding: 6px 12px;
  font-size: 11px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-accent {
  background-color: #27272a;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge-live {
  background-color: var(--espn-red);
  color: #ffffff;
}

/* Simulation Widgets */
.simulation-card {
  border-top: 3px solid var(--espn-yellow);
}

.sim-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.sim-speed-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #111112;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.sim-speed-container label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}

.sim-speed-container label span {
  color: var(--espn-yellow);
  font-family: var(--font-mono);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background-color: var(--border-color);
  outline: none;
  cursor: pointer;
  border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 0; /* Boxy handle */
  background-color: var(--espn-yellow);
  transition: transform 0.1s;
}

/* Forms */
.form-card {
  border-top: 3px solid var(--border-color);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-group.col {
  flex: 1;
}

label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="number"],
select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--border-radius);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: var(--border-focus);
}

/* Live Dashboard Header */
.tracker-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title-wrapper h2 {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

/* Live Pulsing Dot */
.live-dot-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 10px;
  height: 10px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: var(--espn-green);
  border-radius: 50%;
}

.live-pulse {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: var(--espn-green);
  opacity: 0.6;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}

/* Filters */
.filter-tabs {
  background-color: #1e1e21;
  padding: 3px;
  border-radius: var(--border-radius);
  display: flex;
  gap: 2px;
  border: 1px solid var(--border-color);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 2px;
  cursor: pointer;
}

.tab-btn.active {
  background-color: var(--espn-red);
  color: #ffffff;
}

/* Match Board Grid */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

/* Match Card Box styling */
.match-card {
  border-top: 4px solid var(--border-color);
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.match-card.state-first_half { border-top-color: var(--espn-green); }
.match-card.state-halftime { border-top-color: var(--espn-yellow); }
.match-card.state-second_half { border-top-color: var(--espn-green); }
.match-card.state-completed { border-top-color: var(--text-muted); }

.match-card .card-header {
  background-color: transparent;
  border-bottom: none;
  padding: 12px 16px 4px 16px;
}

.match-league {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

.match-card-body {
  padding: 8px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Match Scoreboard Row Layout */
.match-teams-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 16px;
  background-color: #0f0f11;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.match-team {
  display: flex;
  align-items: center;
  gap: 10px;
}

.match-team.team-away {
  justify-content: flex-end;
}

.team-flag-mock {
  width: 28px;
  height: 28px;
  border-radius: 2px;
  background-color: #242427;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 1px solid var(--border-color);
}

.team-name {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-score {
  font-size: 26px;
  font-weight: 900;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  padding: 0 12px;
}

.score-divider {
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 400;
}

/* Linear Halftime Broadcast Progress Bar */
.halftime-timer-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: #0f0f11;
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--border-radius);
  margin-top: auto;
}

.halftime-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-label-wrap {
  display: flex;
  flex-direction: column;
}

.timer-state-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--espn-yellow);
  letter-spacing: 0.5px;
}

.timer-time-stamp {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.timer-countdown {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
}

/* Flat horizontal progress bar styling */
.progress-bar-container {
  height: 6px;
  background-color: #242427;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-bar-linear {
  height: 100%;
  width: 0%;
  background-color: var(--espn-yellow);
  transition: width 0.3s linear;
}

/* Overrun flashing alert */
.halftime-timer-block.ending-soon .progress-bar-linear {
  background-color: var(--espn-red);
}

.halftime-timer-block.ending-soon .timer-state-label {
  color: var(--espn-red);
  animation: flash-text 1s step-start infinite;
}

@keyframes flash-text {
  50% { opacity: 0.3; }
}

/* Match Action Buttons */
.match-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.match-card-actions .btn {
  flex: 1;
}

.game-time-pill {
  background-color: #111112;
  padding: 5px 12px;
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--espn-green);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 2px;
  align-self: center;
  margin-bottom: 12px;
}

.state-pregame .game-time-pill,
.state-completed .game-time-pill {
  color: var(--text-muted);
}

/* Alert Switch Block */
.match-card-alerts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.card-alert-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Solid Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #27272a;
  transition: .15s;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: .15s;
}

input:checked + .switch-slider {
  background-color: var(--espn-red);
}

input:checked + .switch-slider:before {
  transform: translateX(14px);
}

/* Dense Historical Log Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  background-color: #111112;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

.history-table th,
.history-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
}

.history-table th {
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  background-color: #18181b;
  letter-spacing: 0.5px;
}

.history-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.01);
}

.history-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.empty-table-state {
  text-align: center;
  color: var(--text-muted);
  padding: 20px !important;
  font-style: italic;
}

.text-danger { color: #ff334b; }
.text-success { color: var(--espn-green); }

/* Footer styling */
.app-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 40px;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--espn-yellow);
}

/* Loading & Empty Grid States */
.loading-state,
.empty-state {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
  color: var(--text-secondary);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

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

/* Responsive Overrides */
@media (max-width: 1024px) {
  .app-main {
    grid-template-columns: 1fr;
  }
  .app-sidebar {
    order: 1;
  }
  .app-content {
    order: 2;
  }
}

@media (max-width: 600px) {
  .app-container {
    padding: 8px;
  }
  .app-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .header-controls {
    width: 100%;
    justify-content: space-between;
  }
  .matches-grid {
    grid-template-columns: 1fr;
  }
  .app-footer-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* Admin Controls Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fade-in 0.15s ease-out;
}

.modal-content {
  width: 90%;
  max-width: 440px;
  animation: slide-up 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
  border: 1px solid var(--border-color) !important;
}

.btn-modal-close-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.15s;
}

.btn-modal-close-icon:hover {
  color: #ffffff;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Sidebar Sports & Teams Filters */
.sidebar-filter-body {
  padding: 12px 16px;
}

.sidebar-filter-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-sport-group {
  display: flex;
  flex-direction: column;
}

.filter-sport-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s;
}

.filter-sport-row:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.filter-sport-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.filter-sport-row.active .filter-sport-info {
  color: var(--espn-yellow);
}

.filter-sport-count {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  background-color: #242427;
  padding: 2px 6px;
  border-radius: 2px;
}

.filter-team-list {
  list-style: none;
  padding-left: 14px;
  margin-top: 4px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-team-item {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 4px 6px;
  cursor: pointer;
  transition: all 0.15s;
  border-left: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-team-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
  flex-shrink: 0;
}

.filter-team-item:hover {
  color: #ffffff;
  padding-left: 10px;
  background-color: rgba(255, 255, 255, 0.02);
}

.filter-team-item.active {
  color: var(--espn-red);
  border-left-color: var(--espn-red);
  padding-left: 10px;
  background-color: rgba(204, 0, 0, 0.05);
}

/* Data Source Segmented Control Toggle */
.source-mode-toggle {
  display: flex;
  background-color: #0f0f11;
  border: 1px solid var(--border-color);
  padding: 2px;
  border-radius: var(--border-radius);
  margin-bottom: 12px;
}

.source-toggle-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.source-toggle-btn.active {
  background-color: var(--espn-red);
  color: #ffffff;
}

.source-mode-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Sidebar Team / Location Search Box */
.sidebar-search-container {
  position: relative;
  margin-bottom: 14px;
}

.sidebar-search-container input[type="text"] {
  width: 100%;
  padding: 8px 30px 8px 12px; /* Extra right padding for close button */
  background-color: #0f0f11;
  border: 1px solid var(--border-color);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--border-radius);
  outline: none;
  transition: all 0.15s;
}

.sidebar-search-container input[type="text"]:focus {
  border-color: var(--espn-red);
  background-color: #121214;
}

.btn-clear-search {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

/* Search Dropdown Drawer */
.search-drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  margin-top: 4px;
}

body.light-theme .search-drawer {
  background-color: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.search-drawer-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s;
  color: var(--text-secondary);
}

body.light-theme .search-drawer-item {
  border-bottom-color: #e2e8f0;
  color: #334155;
}

.search-drawer-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--espn-yellow);
  padding-left: 16px;
}

body.light-theme .search-drawer-item:hover {
  background-color: #f1f5f9;
  color: var(--espn-red);
}

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

.search-drawer-meta {
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  background-color: rgba(255, 255, 255, 0.05);
  padding: 1px 4px;
  border-radius: 2px;
}

body.light-theme .search-drawer-meta {
  background-color: #f1f5f9;
}

.search-drawer-empty {
  padding: 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}



/* ESPN Team Logo Graphics */
.team-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  position: relative;
}

.team-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.team-logo-fallback {
  width: 28px;
  height: 28px;
  border-radius: 2px;
  background-color: #242427;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 1px solid var(--border-color);
}

.ticker-logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: middle;
}

.ticker-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sidebar-filter-body {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Card Monitoring Highlight Styles */
.match-card {
  cursor: pointer;
  user-select: none;
}

.match-card.monitoring {
  border-color: var(--espn-yellow) !important;
  box-shadow: 0 0 14px var(--espn-yellow-glow);
}

.match-card.monitoring:hover {
  border-color: #ffb74d !important;
}

.monitoring-indicator {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #111112;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.monitoring-indicator.active {
  color: #060608;
  background-color: var(--espn-yellow);
  border-color: var(--espn-yellow);
  box-shadow: 0 0 8px rgba(245, 166, 35, 0.4);
}

.monitoring-indicator i {
  font-size: 10px;
}

/* ==========================================================================
   Light Theme Component Overrides
   ========================================================================== */
body.light-theme .sports-ticker-container {
  background-color: #ffffff;
  border-top-color: #e2e8f0;
  border-bottom-color: #e2e8f0;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.02);
}

body.light-theme .ticker-label-box {
  background-color: #0f172a; /* high-contrast dark label */
}

body.light-theme .ticker-item .ticker-score {
  background-color: #f1f5f9;
  color: #0f172a;
}

body.light-theme .match-teams-container,
body.light-theme .halftime-timer-block,
body.light-theme .sim-speed-container {
  background-color: #f1f5f9; /* Soft well background matching the main page background */
  border-color: #cbd5e1;
}

body.light-theme .game-time-pill {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

body.light-theme .card-header {
  background-color: #f8fafc;
  border-bottom-color: #cbd5e1;
}

body.light-theme .badge-accent {
  background-color: #e2e8f0;
  color: #334155;
  border-color: #cbd5e1;
}

body.light-theme .match-score,
body.light-theme .timer-countdown {
  color: #0f172a;
}

body.light-theme .state-pregame .game-time-pill {
  color: #b45309 !important; /* Premium high-contrast amber/brown instead of bright yellow */
}

body.light-theme .modal-content {
  background-color: #ffffff;
  border-color: #e2e8f0 !important;
}

body.light-theme .history-table th {
  background-color: #f1f5f9;
  color: #334155;
  border-bottom-color: #e2e8f0;
}

body.light-theme .table-responsive {
  background-color: #ffffff;
  border-color: #e2e8f0;
}

body.light-theme .monitoring-indicator {
  background-color: #f1f5f9;
  border-color: #e2e8f0;
}

body.light-theme .monitoring-indicator.active {
  color: #060608;
  box-shadow: 0 0 8px rgba(245, 166, 35, 0.25);
}

body.light-theme .btn-secondary {
  background-color: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

body.light-theme .btn-secondary:hover {
  background-color: #e2e8f0;
  border-color: #94a3b8;
}

body.light-theme .btn-icon-only {
  background-color: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

body.light-theme .btn-icon-only:hover {
  background-color: #e2e8f0;
  color: var(--espn-red);
}

body.light-theme .filter-tabs {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

body.light-theme .tab-btn {
  color: #475569;
}

body.light-theme .tab-btn.active {
  background-color: var(--espn-red);
  color: #ffffff;
}

body.light-theme .sidebar-search-container input[type="text"] {
  background-color: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

body.light-theme .filter-sport-row {
  border-bottom-color: #e2e8f0;
}

body.light-theme .filter-sport-row:hover {
  background-color: #f8fafc;
}

body.light-theme .filter-team-item:hover {
  background-color: #f8fafc;
  color: #0f172a;
}

body.light-theme .filter-sport-info {
  color: #0f172a;
}

body.light-theme .filter-team-item {
  color: #334155;
}

body.light-theme .filter-sport-count {
  background-color: #f1f5f9;
  color: #475569;
}

body.light-theme .filter-team-item.active {
  background-color: rgba(204, 0, 0, 0.05);
}

body.light-theme .progress-bar-container {
  background-color: #e2e8f0;
}

body.light-theme .history-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

body.light-theme .history-table tbody tr:hover {
  background-color: #f1f5f9;
}

/* ==========================================================================
   Tutorial Onboarding Modal Layout
   ========================================================================== */
.tutorial-content {
  max-width: 500px;
  width: 92%;
  border-radius: 6px;
  padding: 24px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color) !important;
}

.tutorial-content .modal-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  width: 100%;
}

.tutorial-content .modal-header .card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tutorial-content .modal-header .card-title i {
  color: var(--espn-yellow);
  font-size: 20px;
}

.tutorial-content .modal-header h2 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tutorial-intro {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.tutorial-content .modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tutorial-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 14px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

body.light-theme .tutorial-step {
  background-color: #f8fafc;
}

.tutorial-step .step-num {
  background-color: var(--espn-red);
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(204, 0, 0, 0.15);
}

.step-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step-details h4 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.step-details p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.tutorial-content .modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.tutorial-content .modal-footer .btn {
  width: auto;
  padding: 8px 30px;
}

/* Favorites Setup Modal */
.favorites-content {
  max-width: 640px;
  width: 92%;
  max-height: 86vh;
  border-radius: 6px;
  padding: 24px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color) !important;
  display: flex;
  flex-direction: column;
}

.favorites-content .modal-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.favorites-content .card-title svg {
  color: var(--espn-yellow);
}

.favorites-controls {
  display: grid;
  grid-template-columns: minmax(120px, 0.85fr) minmax(150px, 1fr) minmax(180px, 1.2fr);
  gap: 10px;
}

.favorites-select,
.favorites-search {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 4px;
  padding: 9px 10px;
  font-family: var(--font-sans);
  font-size: 12px;
}

.favorites-selected-summary {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.favorites-team-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.favorite-team-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.015);
  border-radius: 4px;
  padding: 9px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.favorite-team-option:hover,
.favorite-team-option.selected {
  border-color: var(--espn-yellow);
  background-color: rgba(245, 166, 35, 0.08);
}

.favorite-team-option input {
  accent-color: var(--espn-yellow);
  flex-shrink: 0;
}

.favorite-team-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.favorite-team-name {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-team-league {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.favorite-team-logo-wrap {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 3px;
  transition: all 0.15s ease;
}

body.light-theme .favorite-team-logo-wrap {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.favorite-team-option:hover .favorite-team-logo-wrap,
.favorite-team-option.selected .favorite-team-logo-wrap {
  background: rgba(245, 166, 35, 0.14);
  border-color: rgba(245, 166, 35, 0.4);
}

.favorite-team-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.favorite-team-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
}

.favorite-team-abbr {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.favorites-empty {
  grid-column: 1 / -1;
  padding: 24px;
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
}

.favorites-content .modal-footer {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.favorites-section .matches-section-title {
  border-bottom-color: rgba(245, 166, 35, 0.45);
}

body.light-theme .favorite-team-option {
  background-color: #f8fafc;
}

@media (max-width: 600px) {
  .favorites-controls,
  .favorites-team-list {
    grid-template-columns: 1fr;
  }
}

/* Mobile-Only Hide/Show filter toggles */
.mobile-only-toggle {
  display: none;
}

#btn-theme-toggle svg {
  display: block;
}

/* Make sure all SVG icons inside header control buttons are exactly the same size */
.header-controls .btn-icon-only span.icon,
.header-controls .btn-icon-only svg {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.light-theme .card {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  border-color: #cbd5e1;
}

body.light-theme .filter-card-sidebar {
  border-color: #cbd5e1;
}

/* ==========================================================================
   Mobile-Friendly Media Queries
   ========================================================================== */
@media (max-width: 600px) {
  .app-container {
    padding: 8px;
  }

  .app-header {
    padding: 10px 14px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .header-logo h1 {
    font-size: 18px;
  }

  .logo-container {
    width: 30px;
    height: 30px;
  }

  .header-controls {
    gap: 6px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 11px;
  }

  /* Compact button helper for mobile: hide button text and show only icons in header */
  .header-controls .btn-icon-text span:not(.icon) {
    display: none;
  }

  .header-controls .btn-icon-text {
    padding: 8px;
  }

  .header-controls .btn-icon-only {
    width: 34px;
    height: 34px;
    padding: 0 !important;
  }

  .matches-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .sports-ticker-container {
    margin-bottom: 14px;
  }

  /* Mobile Collapsible filter card overrides */
  .mobile-only-toggle {
    display: inline-flex;
  }
  
  .sidebar-filter-tree {
    display: none;
  }
  
  .sidebar-filter-tree.show-mobile {
    display: flex;
    animation: slide-up 0.15s ease-out;
  }

  .sidebar-filter-body {
    max-height: none;
    padding: 12px 14px;
  }
}

/* Past Halftime and Completed Card Highlights */
.match-card.past-halftime {
  background: linear-gradient(135deg, #131316 0%, #17171c 100%);
  border-color: #27272c;
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.light-theme .match-card.past-halftime {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.past-halftime-note {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ff9800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.5px;
  background-color: rgba(255, 152, 0, 0.1);
  padding: 2px 6px;
  border-radius: 2px;
}

.past-halftime-note.completed {
  color: var(--text-muted);
  background-color: rgba(142, 142, 147, 0.1);
}

body.light-theme .past-halftime-note {
  color: #c2410c; /* Darker warm orange/red for contrast */
  background-color: rgba(194, 65, 12, 0.08);
}

body.light-theme .past-halftime-note.completed {
  color: var(--text-muted);
  background-color: rgba(100, 116, 139, 0.08);
}

/* Dashboard Section Layouts */
.matches-dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.matches-section {
  display: flex;
  flex-direction: column;
}

.matches-section-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.matches-section-title svg {
  display: inline-block;
  flex-shrink: 0;
}

.matches-section-title .section-count {
  font-size: 10px;
  background-color: var(--bg-input);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 10px;
  font-family: var(--font-mono);
  border: 1px solid var(--border-color);
}

.matches-section-placeholder {
  padding: 30px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

body.light-theme .matches-section-placeholder {
  background-color: rgba(0, 0, 0, 0.01);
}

/* ==========================================================================
   Alerts Modal & Tooltip Styles
   ========================================================================== */
.alerts-popup-content {
  position: relative;
  max-width: 420px;
  width: 90%;
  border-radius: 6px;
  padding: 24px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95);
  animation: slide-up 0.2s ease-out;
}

.alerts-popup-content .modal-header {
  padding-right: 44px;
}

.alerts-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.alerts-modal-close:hover,
.alerts-modal-close:focus-visible {
  border-color: var(--espn-yellow);
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
  outline: none;
}

.alerts-options-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.alert-option-item {
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.01);
  border-radius: var(--border-radius);
  padding: 12px 14px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

body.light-theme .alert-option-item {
  background-color: #f8fafc;
}

.alert-option-item:hover:not(.disabled) {
  border-color: #555560;
  background-color: rgba(255, 255, 255, 0.02);
}

.alert-option-item.disabled {
  opacity: 0.55;
  background-color: rgba(0, 0, 0, 0.15);
  border-style: dashed;
}

body.light-theme .alert-option-item.disabled {
  background-color: #f1f5f9;
}

.alert-option-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  width: 100%;
}

.alert-option-item.disabled .alert-option-label {
  cursor: not-allowed;
}

.option-main {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.option-desc {
  font-size: 11px;
  color: var(--text-muted);
  padding-left: 24px;
  line-height: 1.4;
}

/* Tooltip Styling */
.tooltip-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
  margin-left: auto; /* Push info icon to the right */
}

.tooltip-container .info-icon {
  color: var(--text-muted);
  font-size: 13px;
  transition: color 0.15s ease;
}

.tooltip-container:hover .info-icon {
  color: var(--espn-yellow);
}

.tooltip-container .tooltip-text {
  visibility: hidden;
  width: 220px;
  background-color: #121214;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  font-size: 11px;
  font-family: var(--font-sans);
  text-transform: none; /* Prevent uppercase from title */
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.4;
  
  /* Position tooltip above info icon */
  position: absolute;
  z-index: 1000;
  bottom: 130%;
  right: 0;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

body.light-theme .tooltip-container .tooltip-text {
  background-color: #ffffff;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15,23,42,0.15);
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* Checkbox Accent adjustments */
.alert-option-item input[type="checkbox"] {
  accent-color: var(--espn-yellow);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.alert-option-item.disabled input[type="checkbox"] {
  cursor: not-allowed;
}

/* ==========================================================================
   DISCOVERY HEADER & GLOBAL SEARCH BAR
   ========================================================================== */
.discovery-header-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 14px 16px;
  box-shadow: var(--box-shadow);
}

body.light-theme .discovery-header-container {
  background: #ffffff;
  border-color: var(--border-color);
}

.hero-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.hero-search-wrapper .search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.hero-search-wrapper input[type="text"] {
  width: 100%;
  padding: 12px 75px 12px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme .hero-search-wrapper input[type="text"] {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.hero-search-wrapper input[type="text"]:focus {
  border-color: var(--espn-yellow);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.25);
  background: rgba(35, 35, 38, 0.95);
}

body.light-theme .hero-search-wrapper input[type="text"]:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
}

.hero-search-wrapper .search-kbd-hint {
  position: absolute;
  right: 14px;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.hero-search-wrapper .search-kbd-hint kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

body.light-theme .hero-search-wrapper .search-kbd-hint kbd {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #475569;
}

.hero-search-wrapper .btn-clear-search {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  z-index: 3;
}

.hero-search-wrapper .btn-clear-search:hover {
  color: var(--text-primary);
}

/* League Quick-Filter Pills */
.league-pills-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.league-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

body.light-theme .league-pill {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
}

.league-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--espn-yellow);
  color: var(--text-primary);
  transform: translateY(-1px);
}

body.light-theme .league-pill:hover {
  background: #e2e8f0;
  border-color: var(--espn-yellow);
  color: #0f172a;
}

.league-pill.active {
  background: var(--espn-yellow);
  border-color: var(--espn-yellow);
  color: #000000;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.35);
}

.league-pill.active:hover {
  background: #e0961b;
  color: #000000;
}

.league-pill .pill-icon {
  display: inline-flex;
  font-size: 11px;
}

/* Active Filter Indicator Bar */
.active-filter-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: var(--border-radius);
  padding: 8px 14px;
  margin-bottom: 14px;
  animation: fadeIn 0.2s ease-out;
}

.active-filter-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

#active-filter-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--espn-yellow);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-clear-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid rgba(245, 166, 35, 0.5);
  border-radius: 12px;
  color: var(--espn-yellow);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-clear-filter:hover {
  background: var(--espn-yellow);
  color: #000000;
}

/* ==========================================================================
   POPULAR WITH FANS & DAY GROUPING STYLES
   ========================================================================== */
.popular-rank-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.popular-rank-tag.rank-gold {
  background: linear-gradient(135deg, #ffd700, #ffae00);
  color: #000000;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.popular-rank-tag.rank-silver {
  background: linear-gradient(135deg, #e0e0e0, #9e9e9e);
  color: #000000;
}

.popular-rank-tag.rank-bronze {
  background: linear-gradient(135deg, #cd7f32, #a0522d);
  color: #ffffff;
}

.popular-rank-tag.rank-standard {
  background: rgba(245, 166, 35, 0.15);
  border: 1px solid rgba(245, 166, 35, 0.4);
  color: var(--espn-yellow);
}

.popular-subscribers-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--espn-yellow);
  background: rgba(245, 166, 35, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
}

/* Day Group Divider Headers */
.matches-day-group {
  margin-bottom: 24px;
}

.matches-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--espn-yellow);
  border-radius: 2px;
  margin-bottom: 12px;
}

body.light-theme .matches-day-header {
  background: #f8fafc;
  border-left-color: var(--espn-yellow);
}

.matches-day-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.matches-day-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 10px;
}

body.light-theme .matches-day-count {
  background: #e2e8f0;
  color: #475569;
}

/* Home Welcome Discovery Callout */
.home-discovery-banner {
  background: linear-gradient(135deg, rgba(204, 0, 0, 0.08) 0%, rgba(245, 166, 35, 0.08) 100%);
  border: 1px dashed rgba(245, 166, 35, 0.35);
  border-radius: var(--border-radius);
  padding: 16px 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-discovery-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--espn-yellow);
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-discovery-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   COLLEGE FOOTBALL STYLES (Rank Badges & Conference Accordion)
   ========================================================================== */
.team-rank-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: var(--espn-yellow);
  background: rgba(245, 166, 35, 0.15);
  border: 1px solid rgba(245, 166, 35, 0.4);
  border-radius: 3px;
  padding: 1px 4px;
  margin-right: 4px;
  line-height: 1.2;
  vertical-align: middle;
}

.cfb-conf-block {
  margin-bottom: 4px;
}

.cfb-conf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cfb-conf-header:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(245, 166, 35, 0.3);
}

.cfb-conf-header.expanded {
  background: rgba(245, 166, 35, 0.12);
  border-color: rgba(245, 166, 35, 0.4);
  color: var(--espn-yellow);
}

/* CFB Subdivision Badges & Navigation (Option 1) */
.cfb-subdiv-tag {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 1px 6px;
  border-radius: 3px;
  line-height: 1.3;
  text-transform: uppercase;
}

.cfb-subdiv-tag.subdiv-fbs {
  background: rgba(245, 166, 35, 0.18);
  color: #f6c343;
  border: 1px solid rgba(245, 166, 35, 0.4);
}

.cfb-subdiv-tag.subdiv-fcs {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.cfb-subdiv-tag.subdiv-inter {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.4);
}

.cfb-subdiv-sidebar-switcher {
  display: flex;
  gap: 3px;
  margin: 4px 0 8px 0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px;
}

.cfb-subdiv-btn {
  flex: 1;
  padding: 4px 2px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.cfb-subdiv-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.cfb-subdiv-btn.active {
  background: var(--espn-yellow);
  color: #121212;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.cfb-subdiv-section-title {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 800;
  color: var(--text-muted);
  margin: 8px 0 4px 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cfb-subdiv-badge-pill {
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 800;
}

.cfb-subdiv-badge-pill.fbs {
  background: rgba(245, 166, 35, 0.25);
  color: #f6c343;
}

.cfb-subdiv-badge-pill.fcs {
  background: rgba(56, 189, 248, 0.22);
  color: #38bdf8;
}

.cfb-subdiv-pills-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  flex-wrap: wrap;
}

.cfb-subdiv-pill {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cfb-subdiv-pill:hover {
  border-color: rgba(245, 166, 35, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.cfb-subdiv-pill.active {
  background: var(--espn-yellow);
  border-color: var(--espn-yellow);
  color: #121212;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(245, 166, 35, 0.35);
}

/* ==========================================================================
   MODAL & TICKER SETTINGS CUSTOMIZATION
   ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 16px;
  animation: fade-in 0.15s ease-out;
}

.modal.hidden {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  z-index: 1;
}

.modal-dialog {
  position: relative;
  z-index: 2;
  margin: auto;
}

.modal-dialog .modal-content {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color) !important;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
  padding: 22px;
  width: 100%;
  animation: slide-up 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .modal-dialog .modal-content {
  background-color: #ffffff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-modal-close {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transition: all 0.15s;
}

.btn-modal-close:hover {
  border-color: var(--espn-yellow);
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.06);
}

/* Ticker Settings Specific Components */
.ticker-setting-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ticker-setting-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  display: block;
}

.ticker-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ticker-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.ticker-mode-btn strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.ticker-mode-btn span {
  font-size: 11px;
  color: var(--text-muted);
}

.ticker-mode-btn:hover {
  border-color: rgba(245, 166, 35, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.ticker-mode-btn.active {
  border-color: var(--espn-yellow);
  background: rgba(245, 166, 35, 0.12);
  box-shadow: 0 0 10px rgba(245, 166, 35, 0.15);
}

.ticker-mode-btn.active strong {
  color: var(--espn-yellow);
}

body.light-theme .ticker-mode-btn {
  background: #f8fafc;
}

body.light-theme .ticker-mode-btn.active {
  background: rgba(245, 166, 35, 0.12);
}

.ticker-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
  padding: 3px 0;
}

.ticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.ticker-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(245, 166, 35, 0.4);
  color: var(--text-primary);
}

.ticker-chip.active {
  background: var(--espn-yellow);
  border-color: var(--espn-yellow);
  color: #000000;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(245, 166, 35, 0.3);
}

body.light-theme .ticker-chip {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .ticker-chip.active {
  background: var(--espn-yellow);
  border-color: var(--espn-yellow);
  color: #000000;
}

.ticker-selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(245, 166, 35, 0.15);
  border: 1px solid rgba(245, 166, 35, 0.4);
  color: var(--espn-yellow);
}

.ticker-selected-tag .tag-remove-btn {
  background: transparent;
  border: none;
  color: var(--espn-yellow);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
}

.ticker-selected-tag .tag-remove-btn:hover {
  color: #ffffff;
}

#ticker-team-search-dropdown {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  max-height: 170px;
  overflow-y: auto;
  margin-top: 4px;
}

body.light-theme #ticker-team-search-dropdown {
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.ticker-search-item {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background-color 0.12s ease;
}

.ticker-search-item:hover {
  background: rgba(245, 166, 35, 0.15);
  color: var(--espn-yellow);
}

.ticker-search-item .search-league-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}









