/* Custom Web Design System - WC26 Stream Hub */
:root {
  --bg-primary: #0c0c0e;
  --bg-secondary: #141417;
  --bg-glass: rgba(20, 20, 23, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(229, 0, 124, 0.5); /* WC26 LIVE Pink-Red */
  
  --text-primary: #ffffff;
  --text-muted: #b3b3b6;
  --text-dark: #76767a;

  --accent-teal: #e5007c; /* WC26 LIVE Pink-Red */
  --accent-emerald: #ff1a8b;
  --accent-gradient: linear-gradient(135deg, #e5007c 0%, #ff1a8b 100%);
  --accent-glow: 0 0 20px rgba(229, 0, 124, 0.35);
  
  --status-active: #ff1a8b;
  --status-inactive: #f59e0b;
  --status-error: #ef4444;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
}

/* BBC iPlayer-Style Header Styling */
.iplayer-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 40px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}

.iplayer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stream-blocks {
  display: flex;
  gap: 3px;
  align-items: center;
}

.stream-block {
  background-color: #ffffff;
  color: #000000;
  font-weight: 900;
  font-size: 13px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: -0.5px;
}

.stream-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-teal);
  letter-spacing: -0.5px;
  margin-left: 2px;
}

.iplayer-nav {
  display: flex;
  gap: 8px;
  height: 100%;
  align-items: center;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0 20px;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: all 0.2s ease;
  border-radius: 0;
}

.nav-lbl-mobile {
  display: none;
}

.nav-lbl-desktop {
  display: inline;
}

.nav-item:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.02);
}

.nav-item.active {
  color: var(--text-primary);
  background: none;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-gradient);
  box-shadow: var(--accent-glow);
}

.nav-item .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: color 0.2s ease;
}

.nav-item:hover .icon {
  color: var(--text-primary);
}

.nav-item.active .icon {
  color: var(--accent-teal);
}

.iplayer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--status-active);
  box-shadow: 0 0 8px var(--status-active);
  position: relative;
  display: inline-block;
}

.status-dot-pulse::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--status-active);
  animation: status-pulse-glow 1.8s infinite ease-out;
  opacity: 0;
}

@keyframes status-pulse-glow {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.status-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
}
/* Main Content Area */
.content-area {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background-color: var(--bg-primary);
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  border-bottom: 1px solid var(--border-color);
}

.page-title h2 {
  font-size: 20px;
  font-weight: 700;
}

.page-title p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.viewer-count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.03);
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

/* Tab Panes */
.tab-pane {
  display: none;
  padding: 40px;
  flex-grow: 1;
}

.tab-pane.active {
  display: block;
}

/* BBC iPlayer Adaptive Channels Layout */
.channels-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 40px 40px;
  transition: all 0.3s ease;
}

.player-column {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.channels-column {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  transition: all 0.3s ease;
}

/* State: Not playing (storefront grid) */
.channels-layout:not(.has-active-player) .player-column {
  display: none !important;
}

.channels-layout:not(.has-active-player) .channels-column {
  width: 100% !important;
  max-width: 100% !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

/* State: Has active playing video */
.channels-layout.has-active-player {
  flex-direction: column !important;
  align-items: center;
}

.channels-layout.has-active-player .player-column {
  width: 100% !important;
  max-width: 1000px !important;
  display: flex !important;
}

.channels-layout.has-active-player .channels-column {
  width: 100% !important;
  max-width: 1000px !important;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-top: 16px;
  max-height: 600px;
  overflow-y: auto;
}

.channels-column-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.channels-column-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.channels-column-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.channels-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Redesigned Premium Channel Cards (iPlayer Style) */
.channel-card {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.channel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.channel-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(229, 0, 124, 0.4);
  box-shadow: 0 10px 25px rgba(229, 0, 124, 0.2), var(--accent-glow);
}

.channel-card:hover::before {
  opacity: 1;
}

.channel-card.active {
  background-color: rgba(229, 0, 124, 0.06);
  border-color: var(--accent-teal);
  box-shadow: 0 10px 25px rgba(229, 0, 124, 0.25), var(--accent-glow);
}

.channel-card.active::before {
  opacity: 1;
}

.card-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-title {
  display: flex;
  flex-direction: column;
}

.card-title h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.card-title span {
  font-size: 10px;
  color: var(--text-dark);
  font-weight: 600;
  text-transform: uppercase;
}

.source-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Card badge cluster (multi-source + type + favorite) */
.card-badges {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Multi-source badge — indicates auto-fallback sources are available */
.multi-src-badge {
  background-color: rgba(245, 158, 11, 0.12) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.3);
  cursor: help;
}

/* Favorite star toggle */
.fav-star {
  font-size: 16px;
  line-height: 1;
  color: var(--text-dark);
  cursor: pointer;
  user-select: none;
  padding: 0 2px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.fav-star:hover {
  color: #fbbf24;
  transform: scale(1.2);
}
.fav-star.active {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

/* Channel search bar in column header */
.channels-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.channel-search-wrapper {
  position: relative;
  flex: 0 0 auto;
}
.channel-search-wrapper .search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  opacity: 0.6;
  pointer-events: none;
}
.channel-search-input {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  padding: 6px 10px 6px 28px;
  width: 160px;
  outline: none;
  transition: all 0.2s ease;
}
.channel-search-input::placeholder {
  color: var(--text-dark);
  opacity: 0.7;
}
.channel-search-input:focus {
  border-color: var(--accent-emerald);
  background-color: rgba(255, 255, 255, 0.06);
  width: 200px;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

/* Video Player Box styling */
.player-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.video-placeholder {
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
  background: radial-gradient(circle at center, #1b0a14 0%, #08080a 100%);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 80px rgba(229, 0, 124, 0.15);
  border-radius: 12px;
}

.stream-placeholder-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  width: 100%;
}

.stream-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 15px;
}

.stream-block-logo {
  background-color: #ffffff;
  color: #000000;
  font-weight: 900;
  font-size: 12px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.5px;
  font-family: inherit;
}

.stream-logo-txt {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.8px;
  margin-left: 4px;
}

.stream-play-btn-pulse {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(229, 0, 124, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px auto;
  animation: stream-play-pulse 2s infinite ease-in-out;
  cursor: pointer;
  transition: all 0.3s ease;
}

.stream-play-btn-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stream-play-btn-circle svg {
  margin-left: 4px;
  transition: transform 0.3s ease;
}

.video-placeholder:hover .stream-play-btn-circle {
  background: #e5007c;
  color: #ffffff;
  box-shadow: 0 0 25px rgba(229, 0, 124, 0.7);
  transform: scale(1.08);
}

.video-placeholder:hover .stream-play-btn-circle svg {
  transform: scale(1.1);
}

.video-placeholder:hover .stream-play-btn-pulse {
  background: rgba(229, 0, 124, 0.25);
}

.video-placeholder h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.video-placeholder p {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.6;
}

@keyframes stream-play-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 0, 124, 0.4);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(229, 0, 124, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(229, 0, 124, 0);
  }
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
}

.playing-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.playing-info h3 {
  font-size: 13px;
  font-weight: 600;
}

.live-tag {
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: var(--accent-gradient);
  padding: 1px 4px;
  border-radius: 3px;
}

.close-player-btn {
  background: none;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--status-error);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-player-btn:hover {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: var(--status-error);
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #000;
}

#video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-error-overlay,
.video-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(8, 12, 20, 0.95);
  z-index: 10;
  text-align: center;
  padding: 20px;
}

.error-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.video-error-overlay h4 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.video-error-overlay p {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 380px;
  word-break: break-all;
  overflow-wrap: break-word;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(229, 0, 124, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-emerald);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 12px;
}

/* System Debug Console */
.debug-console {
  background-color: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  font-family: Consolas, Monaco, monospace;
  font-size: 11px;
  display: flex;
  flex-direction: column;
}

.debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-weight: 700;
}

.debug-clear-btn {
  background: none;
  border: none;
  color: var(--text-dark);
  font-size: 10px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.02);
}

.debug-clear-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.debug-log-list {
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-item {
  line-height: 1.4;
}

.log-item.info {
  color: #38bdf8;
}

.log-item.success {
  color: #4ade80;
}

.log-item.warn {
  color: #fbbf24;
}

.log-item.error {
  color: #f87171;
}

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

/* Responsive Media Queries */
@media (max-width: 1100px) {
  .channels-layout {
    flex-direction: column;
    min-height: auto;
  }
  .player-column {
    flex: none;
    width: 100%;
  }
  .channels-column {
    flex: none;
    width: 100%;
    max-height: 400px;
  }
}

.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: var(--accent-glow);
}

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

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

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

/* Proxy Settings Tab CSS */
.proxy-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.proxy-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
}

.proxy-card h3, .proxy-guide h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.proxy-card p, .proxy-guide p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.info-group {
  margin-bottom: 24px;
}

.info-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dark);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.input-copy-group {
  display: flex;
  gap: 8px;
}

.input-copy-group input {
  flex-grow: 1;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 6px;
  outline: none;
}

.input-copy-group input:focus {
  border-color: rgba(229, 0, 124, 0.3);
}

.helper-text {
  display: block;
  font-size: 11px;
  color: var(--text-dark);
  margin-top: 6px;
}

.credentials-box {
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
}

.credentials-box h4 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 12px;
  font-weight: 700;
}

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

.cred-item {
  display: flex;
  flex-direction: column;
}

.cred-item .label {
  font-size: 10px;
  color: var(--text-dark);
  text-transform: uppercase;
}

.cred-item .value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

/* Guide Container */
.guide-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.guide-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  cursor: pointer;
  position: relative;
  bottom: -1px;
  transition: all 0.2s ease;
}

.guide-tab:hover {
  color: var(--text-primary);
}

.guide-tab.active {
  color: var(--accent-emerald);
  border-bottom: 2px solid var(--accent-emerald);
}

.guide-content {
  display: none;
}

.guide-content.active {
  display: block;
}

.guide-content ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-content li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.guide-content strong {
  color: var(--text-primary);
}

.link {
  color: var(--accent-emerald);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

/* Schedule Tab CSS */
.schedule-container {
  max-width: 800px;
  margin: 0 auto;
}

.schedule-header {
  margin-bottom: 30px;
}

.schedule-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.schedule-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.day-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dark);
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.match-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s ease;
}

.match-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.match-meta {
  font-size: 11px;
  color: var(--text-dark);
  width: 160px;
}

.match-teams {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  font-weight: 600;
  flex-grow: 1;
}

.vs {
  font-size: 11px;
  color: var(--text-dark);
  text-transform: uppercase;
}

.match-broadcast {
  display: flex;
  align-items: center;
  gap: 16px;
}

.broadcaster {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.broadcaster.uk {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.broadcaster.itv {
  background-color: rgba(13, 148, 136, 0.1);
  color: #14b8a6;
}

.broadcaster.sbs {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

/* Status/Settings Tab CSS */
.settings-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}

.status-card-full, .debug-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
}

.status-card-full h3, .debug-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.status-card-full p, .debug-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.status-table th {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
}

.status-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--status-error);
}

.status-badge.active {
  background-color: rgba(229, 0, 124, 0.1);
  color: var(--status-active);
}

.active-streams-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.no-streams {
  font-size: 13px;
  color: var(--text-dark);
  font-style: italic;
}

.active-stream-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 6px;
}

.stream-name {
  font-size: 13px;
  font-weight: 600;
}

.stream-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.smart-tips {
  margin-top: 32px;
  background-color: rgba(229, 0, 124, 0.02);
  border: 1px dashed rgba(229, 0, 124, 0.2);
  border-radius: 8px;
  padding: 20px;
}

.smart-tips h4 {
  font-size: 13px;
  color: var(--accent-emerald);
  margin-bottom: 6px;
  font-weight: 700;
}

.smart-tips p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.spacer {
  margin-top: 40px;
}

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

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 0, 124, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(229, 0, 124, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 0, 124, 0); }
}

/* Responsive adjustments */
@media(max-width: 1024px) {
  .proxy-dashboard, .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   POLISHED MATCH SCHEDULE
   ========================================================================== */
.schedule-day {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.day-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-emerald);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.match-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.match-card:hover {
  border-color: var(--accent-emerald);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(229, 0, 124, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.match-meta {
  font-size: 12px;
  color: var(--text-muted);
  width: 250px;
  flex-shrink: 0;
}

.match-teams {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  flex-grow: 1;
}

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

.match-teams .vs {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.match-broadcast {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.match-broadcast button {
  background: rgba(229, 0, 124, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(229, 0, 124, 0.2);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.match-broadcast button:hover {
  background: var(--accent-emerald);
  color: #000;
  border-color: var(--accent-emerald);
  transform: scale(1.05);
}

/* ==========================================================================
   CUSTOM PLAYER CONTROLS (GLASSMORPHIC UI)
   ========================================================================== */
.custom-video-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  border-radius: 8px;
}

.custom-video-container video,
.custom-video-container iframe {
  width: 100%;
  height: 100%;
  display: block;
}

.custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85) 40%, rgba(0, 0, 0, 0.95));
  padding: 16px;
  opacity: 0;
  pointer-events: auto; /* Allow hovering even when transparent */
  transition: opacity 0.3s ease;
  z-index: 10;
}

.custom-controls:hover,
.custom-controls.active {
  opacity: 1;
}

/* Center Big Play Button Overlay */
.center-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(229, 0, 124, 0.85);
  box-shadow: 0 0 20px rgba(229, 0, 124, 0.4);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9;
}

.center-play-overlay.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.center-play-icon {
  font-size: 24px;
  color: #000;
  margin-left: 4px;
}

/* Custom Progress Bar */
.controls-progress-wrapper {
  position: relative;
  width: 100%;
  height: 6px;
  cursor: pointer;
  margin-bottom: 12px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
}

.controls-progress-buffered {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.controls-progress-current {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--accent-emerald);
  border-radius: 3px;
  box-shadow: 0 0 8px var(--accent-emerald);
}

.controls-progress-handler {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.1s ease;
}

.controls-progress-wrapper:hover .controls-progress-handler {
  transform: translate(-50%, -50%) scale(1);
}

.controls-progress-wrapper:hover {
  height: 8px;
}

/* Button & Dropdown layout */
.controls-buttons-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.controls-btn-group-left,
.controls-btn-group-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Make toolbar responsive to prevent clipping during zoom in/out or small screens */
@media (max-width: 850px) {
  .custom-controls {
    padding: 10px;
  }
  .controls-btn-group-left,
  .controls-btn-group-right {
    gap: 6px;
  }
  .player-btn {
    padding: 4px 6px;
    font-size: 11px;
  }
  .player-btn svg {
    width: 16px;
    height: 16px;
  }
  .volume-range {
    width: 45px;
  }
  .cc-btn-text {
    display: none;
  }
}

@media (max-width: 580px) {
  .custom-controls {
    padding: 6px 8px !important;
  }
  .controls-progress-wrapper {
    margin-bottom: 6px !important;
  }
  .controls-buttons-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .controls-btn-group-left {
    display: flex !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
  }
  .controls-btn-group-right {
    display: flex !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
  }
  .player-btn {
    padding: 4px 5px !important;
    font-size: 10.5px !important;
  }
  .player-btn svg {
    width: 15px !important;
    height: 15px !important;
  }
  .volume-control-wrapper {
    gap: 4px !important;
  }
  .volume-range {
    width: 40px !important;
  }
  .player-time {
    font-size: 10px !important;
    font-family: monospace;
    white-space: nowrap;
  }
  .live-indicator {
    padding: 3px 5px !important;
    font-size: 10px !important;
    gap: 3px !important;
  }
  .live-dot {
    width: 6px !important;
    height: 6px !important;
  }
  .custom-cc-box {
    font-size: 9px !important;
    padding: 0px 2px !important;
    margin-right: 2px !important;
  }
  .player-menu-dropdown {
    bottom: 30px !important;
    min-width: 100px !important;
  }
  .dropdown-item {
    padding: 6px 12px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 360px) {
  .volume-range {
    display: none !important;
  }
}

.player-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.85;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 4px;
}

.player-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.player-btn:hover {
  opacity: 1;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.15);
}

.player-btn.active {
  color: #f0037f !important; /* WC26 LIVE pink/red accent */
  opacity: 1 !important;
}

/* UK closed caption square label */
.custom-cc-box {
  display: inline-block;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  font-weight: 800;
  font-size: 10px;
  padding: 0px 4px;
  margin-right: 6px;
  line-height: 1.2;
}

/* Live indicators */
.live-indicator {
  background: none;
  border: none;
  color: var(--status-error);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.live-indicator:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.live-indicator.active {
  color: #ff3366; /* Glowing Live Red */
}

.live-indicator.lagging {
  color: var(--text-dark);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  display: inline-block;
}

.live-indicator.active .live-dot {
  animation: live-pulse 1.5s infinite;
}

@keyframes live-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(255, 51, 102, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 51, 102, 0);
  }
}

/* Volume Slider */
.volume-control-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-range {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.player-time {
  font-size: 12px;
  font-family: monospace;
  color: var(--text-muted);
}

/* Menu Dropdown Popup */
.player-menu-container {
  position: relative;
}

.player-menu-dropdown {
  position: absolute;
  bottom: 35px;
  right: 50%;
  transform: translateX(50%);
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 120px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  z-index: 100;
  backdrop-filter: blur(10px);
}

.dropdown-item {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.dropdown-item:hover {
  background: rgba(229, 0, 124, 0.1);
  color: var(--accent-emerald);
}

.dropdown-item.active {
  color: var(--accent-emerald);
  font-weight: 700;
  background: rgba(229, 0, 124, 0.15);
}

/* ==========================================================================
   LIVE SCORE HUB (NEON GLASS DESIGN)
   ========================================================================== */
.live-score-hub {
  background: rgba(10, 10, 25, 0.5);
  border: 1px solid rgba(229, 0, 124, 0.15);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(10px);
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

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

.score-title-wrapper h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.score-live-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
  50% { opacity: 0.4; }
}

.score-time-elapsed {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-emerald);
}

.score-delay-warning {
  font-size: 11px;
  color: rgba(251, 191, 36, 0.8);
  font-weight: 600;
}

.score-matchup-board {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 8px 0;
}

.score-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.score-team.team-left {
  justify-content: flex-end;
  text-align: right;
}

.score-team.team-right {
  justify-content: flex-start;
  text-align: left;
}

.score-team-flag {
  font-size: 28px;
}

.score-team-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.score-display {
  display: flex;
  align-items: center;
  gap: 16px;
}

.score-digits {
  font-family: monospace;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.score-separator {
  font-size: 24px;
  color: var(--text-dark);
  font-weight: 700;
}

/* Scorers section */
.score-scorers-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 12px;
}

.score-scorers-container div {
  max-width: 180px;
  line-height: 1.4;
}

/* Tabs */
.score-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 4px;
}

.score-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.score-tab-btn:hover {
  color: var(--text-primary);
}

.score-tab-btn.active {
  color: var(--accent-emerald);
}

.score-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-emerald);
  box-shadow: 0 -2px 10px var(--accent-emerald);
}

.score-tab-content {
  padding-top: 8px;
}

/* Stats view bar details */
.stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stats-row .stat-label {
  font-weight: 700;
  color: var(--text-primary);
}

.stat-bar-wrapper {
  display: flex;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
}

.stat-bar-fill {
  height: 100%;
}

.stat-bar-fill.home {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.stat-bar-fill.away {
  background: var(--accent-teal);
  box-shadow: 0 0 6px var(--accent-teal);
}

/* Timeline/Log View */
.timeline-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 8px;
}

.timeline-item {
  display: flex;
  gap: 12px;
  font-size: 12px;
  line-height: 1.4;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.02);
  padding-bottom: 8px;
}

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

.timeline-time {
  font-family: monospace;
  font-weight: 700;
  color: var(--accent-emerald);
  width: 30px;
  flex-shrink: 0;
}

.timeline-icon {
  width: 20px;
  text-align: center;
}

.timeline-detail {
  flex-grow: 1;
  color: var(--text-muted);
}

.timeline-detail strong {
  color: var(--text-primary);
}

.spacer-s {
  margin-top: 8px;
}

/* Live indicator button styling */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  padding: 4px 8px !important;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 8px;
  text-transform: uppercase;
}

.live-indicator:hover {
  background: rgba(239, 68, 68, 0.2) !important;
}

.live-indicator.lagging {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-color) !important;
  animation: none !important;
}

.live-indicator.active::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-live 1.5s infinite;
}

.live-indicator.lagging::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: #9ca3af;
  border-radius: 50%;
  display: inline-block;
}

@keyframes pulse-live {
  0% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); opacity: 0.8; box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Channel Grouping Layout styles migrated to bottom sections */

/* ==========================================
   Google-Style Match Fixtures & Live Score Card
   ========================================== */

.google-match-card {
  background-color: #202124;
  border: 1px solid #3c4043;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.google-match-card:hover {
  background-color: #303134;
  border-color: #5f6368;
}

.google-match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #bdc1c6;
  border-bottom: 1px solid #3c4043;
  padding-bottom: 8px;
}

.tournament-name {
  font-weight: 700;
  color: #bdc1c6;
}

.stadium-name {
  color: #9aa0a6;
}

.google-match-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  gap: 12px;
}

.google-match-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.google-match-team.team-home {
  justify-content: flex-end;
  text-align: right;
}

.google-match-team.team-away {
  justify-content: flex-start;
  text-align: left;
}

.google-team-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.google-flag {
  display: flex;
  align-items: center;
  justify-content: center;
}

.google-flag-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #3c4043;
  display: inline-block;
  vertical-align: middle;
  background-color: #303134;
}

.card-title .google-flag-img {
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-width: 1px;
}

.score-team-flag-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #3c4043;
  display: inline-block;
  background-color: #303134;
  vertical-align: middle;
}

.google-match-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  text-align: center;
  gap: 4px;
}

.google-match-score-display {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
}

.google-match-time-display {
  font-size: 20px;
  font-weight: 800;
  color: #8ab4f8;
}

.google-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  color: #f28b82;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: #d93025;
  border-radius: 50%;
  animation: google-blink 1.2s infinite;
}

@keyframes google-blink {
  50% { opacity: 0.3; }
}

.google-status-label {
  font-size: 11px;
  color: #9aa0a6;
  font-weight: 600;
}

.google-match-broadcast {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #3c4043;
  padding-top: 10px;
  flex-wrap: wrap;
}

.broadcast-label {
  font-size: 11px;
  color: #bdc1c6;
  font-weight: 600;
}

.broadcast-channels {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.google-btn-channel {
  background-color: #303134;
  border: 1px solid #5f6368;
  color: #e8eaed;
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.google-btn-channel:hover {
  background-color: #3c4043;
  border-color: #8ab4f8;
  color: #8ab4f8;
}

/* Authentic Google Live Score Hub Overrides */
.live-score-hub {
  background-color: #202124 !important;
  border: 1px solid #3c4043 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

.score-header {
  border-bottom: 1px solid #3c4043 !important;
  padding-bottom: 12px !important;
  margin-bottom: 16px !important;
}

.score-live-badge {
  background-color: #d93025 !important;
  color: #ffffff !important;
  border: none !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  animation: google-blink 1.5s infinite !important;
}

.score-digits {
  font-family: inherit !important;
  font-size: 40px !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  text-shadow: none !important;
}

.score-separator {
  font-size: 28px !important;
  color: #9aa0a6 !important;
  font-weight: 400 !important;
}

.score-team-flag {
  font-size: 32px !important;
}

.score-team-name {
  font-size: 16px !important;
  font-weight: 700 !important;
}

.score-scorers-container {
  border-bottom: 1px solid #3c4043 !important;
  padding-bottom: 16px !important;
}

.stream-note-banner {
  background-color: rgba(138, 180, 248, 0.08);
  border: 1px solid rgba(138, 180, 248, 0.15);
  border-left: 4px solid #8ab4f8;
  color: #bdc1c6;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  line-height: 1.4;
  font-family: inherit;
}

.stream-note-banner strong {
  color: #ffffff;
}

.stream-note-banner .banner-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.bypass-badge {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.4);
  animation: pulse-glow 1.5s infinite alternate;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 4px rgba(217, 119, 6, 0.4);
    opacity: 0.95;
  }
  100% {
    box-shadow: 0 0 12px rgba(217, 119, 6, 0.8);
    opacity: 1;
  }
}

/* ==========================================================================
   ANTI-BLOCKER BYPASS TAB CSS (GLASSMORPHISM)
   ========================================================================== */
.bypass-guide-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px;
}

.bypass-header {
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 12px;
}

.bypass-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-emerald);
  margin-bottom: 10px;
}

.bypass-header p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.bypass-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media(max-width: 768px) {
  .bypass-cards-grid {
    grid-template-columns: 1fr;
  }
}

.bypass-card {
  background: rgba(32, 33, 36, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(10px);
}

.bypass-card .card-icon {
  font-size: 32px;
  line-height: 1;
}

.bypass-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.bypass-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.bypass-card .action-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bypass-card .code-box {
  background: #121214;
  border: 1px solid #2d2d30;
  border-radius: 6px;
  padding: 12px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  color: #34d399;
  word-break: break-all;
  user-select: all;
}

.bypass-card .step-guide h5 {
  font-size: 12px;
  text-transform: uppercase;
  color: #bdc1c6;
  margin-bottom: 8px;
  font-weight: 700;
}

.bypass-card .step-guide ol {
  padding-left: 20px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.5;
}

.bypass-card .step-guide li strong {
  color: #ffffff;
}

/* ==========================================================================
   SCHEDULE TODAY HIGHLIGHT
   ========================================================================== */
.schedule-today {
  border: 1px solid rgba(229, 0, 124, 0.3);
  background: rgba(229, 0, 124, 0.04);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 0 20px rgba(229, 0, 124, 0.08);
}

.schedule-today .day-title {
  color: var(--accent-emerald) !important;
  text-shadow: 0 0 10px rgba(229, 0, 124, 0.3);
}

/* ==========================================================================
   CHANNEL ACCORDION GROUPS
   ========================================================================== */
/* ==========================================================================
   CHANNEL ACCORDION GROUPS -> FLAT BBC iPLAYER CAROUSELS
   ========================================================================== */
.channel-group-flat {
  margin-bottom: 28px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.channel-group-header-flat {
  padding: 0 0 8px 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.channel-group-header-flat .group-title-flat {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Horizontal scrolling carousel view */
.channel-group-content.carousel-view {
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 16px 4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Make cards stretch correctly inside carousel */
.channel-group-content.carousel-view .channel-card {
  flex: 0 0 280px;
  min-width: 280px;
  height: 140px;
  margin: 0;
}

/* Grid layout for search and side list playback */
.channel-group-content.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  padding: 4px;
}

.channel-group-content.grid-view .channel-card {
  height: auto;
}

/* Custom premium horizontal scrollbar */
.channel-group-content.carousel-view::-webkit-scrollbar {
  height: 6px;
}
.channel-group-content.carousel-view::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}
.channel-group-content.carousel-view::-webkit-scrollbar-thumb {
  background: rgba(229, 0, 124, 0.3);
  border-radius: 3px;
  transition: background 0.2s ease;
}
.channel-group-content.carousel-view::-webkit-scrollbar-thumb:hover {
  background: rgba(229, 0, 124, 0.6);
}

/* Highlight card pulse animation */
.highlight-pulse {
  animation: highlight-pulse-anim 1s ease-in-out 3;
  border-color: #8ab4f8 !important;
}

@keyframes highlight-pulse-anim {
  0% {
    box-shadow: 0 0 4px rgba(138, 180, 248, 0.2);
    background-color: #202124;
  }
  50% {
    box-shadow: 0 0 20px rgba(138, 180, 248, 0.8);
    background-color: #303134;
  }
  100% {
    box-shadow: 0 0 4px rgba(138, 180, 248, 0.2);
    background-color: #202124;
  }
}

/* Match Stats Glassmorphic Modal (BBC iPlayer Inspired Accent Theme) */
.stats-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  animation: fadeIn 0.25s ease-out;
}

.stats-modal-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 90%;
  max-width: 620px;
  padding: 28px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow: hidden;
}

.stats-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stats-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: rotate(90deg);
}

.stats-modal-header {
  text-align: center;
  margin-bottom: 12px;
}

.stats-modal-tournament {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-teal);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.stats-modal-stadium {
  display: block;
  font-size: 12px;
  color: var(--text-dark);
  margin-top: 4px;
}

.stats-modal-matchup {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;
  padding: 0 10px;
}

.modal-team {
  width: 38%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.modal-team.team-home {
  justify-content: flex-end;
  text-align: right;
}

.modal-team.team-away {
  justify-content: flex-start;
  text-align: left;
}

.modal-team-flag {
  font-size: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-team-flag-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #3c4043;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  background-color: #303134;
}

.modal-team-name {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
}

.modal-score-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.modal-score {
  font-size: 40px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.modal-status-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  letter-spacing: 1px;
}

.modal-status-badge.status-live {
  background-color: rgba(255, 26, 139, 0.15);
  border-color: rgba(255, 26, 139, 0.3);
  color: #ff1a8b;
  animation: blinker 1.5s linear infinite;
}

.modal-status-badge.status-ft {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.modal-clock {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-emerald);
}

.modal-scorers {
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 18px;
  max-height: 80px;
  overflow-y: auto;
}

.modal-scorers-layout {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.modal-scorers-col {
  width: 48%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-scorers-col.left {
  text-align: right;
  align-items: flex-end;
}

.modal-scorers-col.right {
  text-align: left;
  align-items: flex-start;
}

.modal-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.modal-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.modal-tab-btn.active {
  color: var(--accent-teal);
  border-bottom-color: var(--accent-teal);
}

.modal-tab-pane {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.modal-stats-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 10px;
}

.m-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
}

.m-stat-label {
  color: var(--text-muted);
  font-weight: 500;
}

.m-stat-val {
  font-weight: 700;
  color: #ffffff;
}

.m-stat-bar-bg {
  height: 6px;
  background-color: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  margin-top: 6px;
  display: flex;
  overflow: hidden;
}

.m-stat-bar-fill {
  height: 100%;
  transition: width 0.4s ease;
}

.m-stat-bar-fill.home {
  background: var(--accent-gradient);
  border-radius: 3px 0 0 3px;
}

.m-stat-bar-fill.away {
  background-color: #3f3f46;
  border-radius: 0 3px 3px 0;
}

.modal-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 10px;
}

.m-timeline-item {
  display: flex;
  gap: 12px;
  font-size: 13px;
  align-items: flex-start;
  border-left: 2px solid rgba(255, 255, 255, 0.05);
  padding-left: 16px;
  margin-left: 8px;
  position: relative;
}

.m-timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border-color);
}

.m-timeline-item.important::before {
  background-color: var(--accent-teal);
  box-shadow: 0 0 8px var(--accent-teal);
}

.m-timeline-time {
  font-weight: 800;
  color: var(--accent-teal);
  min-width: 28px;
}

.m-timeline-icon {
  font-size: 14px;
}

.m-timeline-detail {
  color: var(--text-muted);
  line-height: 1.4;
}

.modal-lineups-container {
  display: flex;
  gap: 24px;
  padding-bottom: 10px;
}

.lineup-col {
  flex: 1;
}

.lineup-col h5 {
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 12px;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lineup-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lineup-list li {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  background-color: rgba(255, 255, 255, 0.01);
  border-radius: 4px;
}

.lineup-list li:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: #ffffff;
}

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

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

/* Spinner for stats loading */
.stats-loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-teal);
  animation: stats-spin 0.8s ease-in-out infinite;
}

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

.pulse-loader {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-teal);
  margin-right: 6px;
  animation: pulse-loader-anim 1.2s infinite ease-in-out;
}

@keyframes pulse-loader-anim {
  0%, 100% { transform: scale(0.6); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* Mobile Responsive Overrides */
@media (max-width: 768px) {
  body {
    overflow-y: auto !important;
    height: auto !important;
  }
  
  .app-container {
    flex-direction: column !important;
    height: auto !important;
    min-height: 100vh;
  }
  
  /* iPlayer Header Mobile Adjustments */
  .iplayer-header {
    padding: 0 12px !important;
    height: 56px !important;
  }
  .iplayer-logo {
    gap: 6px !important;
  }
  .stream-block {
    width: 18px !important;
    height: 18px !important;
    font-size: 11px !important;
  }
  .stream-logo {
    font-size: 16px !important;
  }
  .iplayer-nav {
    gap: 4px !important;
  }
  .nav-item {
    padding: 0 10px !important;
    font-size: 12.5px !important;
    height: 100% !important;
  }
  .nav-item svg {
    width: 15px !important;
    height: 15px !important;
  }
  .nav-lbl-desktop {
    display: none !important;
  }
  .nav-lbl-mobile {
    display: inline !important;
  }
  .iplayer-status {
    padding: 4px 6px !important;
    gap: 0 !important;
  }
  .status-text {
    display: none !important;
  }
  
  /* Player Header mobile adjustments */
  .player-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px 12px !important;
  }
  
  .playing-info {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
  
  .player-header-actions {
    display: flex !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
  }
  
  .back-to-channels-btn-header, .close-player-btn {
    flex: 1 !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
  }
  
  .content-area {
    padding: 8px !important;
    height: auto !important;
    overflow-y: visible !important;
  }
  
  /* Top subheader mobile adjustments */
  .top-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 12px 6px !important;
    margin-bottom: 8px !important;
    border-bottom: 1px solid var(--border-color) !important;
  }
  
  .top-header h2 {
    font-size: 18px !important;
  }
  
  .top-header p {
    font-size: 11px !important;
  }
  
  /* Neat and uniform 34x34px square layout buttons on mobile */
  .layout-controls {
    width: 100% !important;
    justify-content: flex-start !important;
    gap: 6px !important;
  }
  
  .layout-btn {
    padding: 0 !important;
    width: 34px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
  }
  
  .layout-btn .btn-text {
    display: none !important; /* Hide labels, show only icons on mobile */
  }
  
  .view-mode-toggle {
    display: flex !important;
    flex-grow: 0 !important; /* Do not stretch! Keep them square */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    gap: 6px !important;
  }
  
  .view-mode-toggle .layout-btn {
    flex: none !important;
  }
  
  .tab-pane {
    padding: 8px 4px !important;
  }
  
  .channels-layout {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 0 4px 24px 4px !important;
  }
  
  .player-column {
    width: 100% !important;
    flex: none !important;
  }
  
  .channels-column {
    width: 100% !important;
    max-height: 480px !important;
    flex: none !important;
    padding: 16px !important;
    margin-top: 10px !important;
  }
  
  /* Vertical stack for channel header title and search input on mobile */
  .channels-header-top {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .channel-search-wrapper {
    width: 100% !important;
  }
  .channel-search-input {
    width: 100% !important;
    padding: 8px 10px 8px 32px !important;
    font-size: 14px !important;
  }
  
  /* Grid Layout: ensure 2 columns on typical mobile screens */
  .channel-group-content.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 10px !important;
  }
  .grid-view .channel-card {
    min-height: auto !important;
  }
  .grid-view .channel-card .card-thumbnail {
    height: 90px !important;
  }
  .grid-view .channel-card .card-info-footer {
    padding: 8px !important;
  }
  .grid-view .channel-card .card-title-row h4 {
    font-size: 12.5px !important;
  }
  .grid-view .channel-card .card-desc {
    display: none !important; /* Hide description on mobile grids to prevent clutter */
  }
  .grid-view .channel-card .card-provider {
    font-size: 9.5px !important;
  }
  
  .player-container {
    height: auto !important;
    aspect-ratio: none !important;
  }
  
  .active-player-wrapper {
    display: flex !important;
    flex-direction: column !important;
  }
  
  .video-wrapper {
    order: 1 !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9 !important;
  }
  
  .player-header {
    order: 2 !important;
  }
  
  .stream-note-banner {
    order: 3 !important;
  }


  
  /* Match Schedule card overrides */
  .match-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    text-align: center !important;
  }
  .match-meta {
    width: 100% !important;
    text-align: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
  }
  .match-teams {
    width: 100% !important;
    justify-content: center !important;
  }
  .match-broadcast {
    width: 100% !important;
    justify-content: center !important;
  }
  
  /* Proxy settings & tabs page layout on mobile */
  .proxy-dashboard, .settings-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .proxy-card, .proxy-guide, .status-card-full, .debug-card {
    padding: 16px !important;
  }
}

/* Layout Controls */
.layout-controls {
  display: flex;
  gap: 10px;
}

.layout-btn {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.layout-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.05);
}

.layout-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--accent-glow);
}

/* Sidebar Collapsed State (Focus Mode) */
.channels-layout.has-active-player.sidebar-collapsed .channels-column {
  display: none !important;
}

/* Theater Mode State (Cinema Mode) */
.channels-layout.has-active-player.theater-mode {
  max-width: 100% !important;
  padding: 0 !important;
  gap: 0 !important;
}

.channels-layout.has-active-player.theater-mode .player-column {
  max-width: 100% !important;
  width: 100% !important;
}

.channels-layout.has-active-player.theater-mode .player-container {
  border-radius: 0 !important;
  border: none !important;
}

.channels-layout.has-active-player.theater-mode .channels-column {
  max-width: 1200px !important;
  margin: 24px auto !important;
  border-radius: 12px !important;
}

/* View Mode Layouts */
.channel-group-content.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 4px;
}

/* Premium Card with Thumbnail (Grid mode) */
.grid-view .channel-card {
  padding: 0;
  border-radius: 8px;
  height: auto;
  min-height: 200px;
}

.grid-view .channel-card .card-thumbnail {
  width: 100%;
  height: 120px;
  position: relative;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-size: cover !important;
  background-position: center !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.grid-view .channel-card .card-thumbnail::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 60%, rgba(15, 23, 42, 0) 100%);
  z-index: 1;
}

.grid-view .channel-card .card-thumbnail .thumb-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.grid-view .channel-card .card-thumbnail .thumb-live-tag {
  background: rgba(229, 0, 124, 0.85);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.grid-view .channel-card .card-thumbnail .thumb-live-dot {
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  animation: thumb-live-pulse 1s infinite alternate;
}

@keyframes thumb-live-pulse {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.grid-view .channel-card .card-thumbnail .thumb-logo {
  font-size: 16px;
}

.grid-view .channel-card .card-thumbnail .thumb-channel-title {
  position: relative;
  z-index: 2;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0 12px 10px 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none; /* We show it below in card-info-footer */
}

.grid-view .channel-card .card-thumbnail .thumb-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(229, 0, 124, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 3;
  box-shadow: 0 4px 12px rgba(229, 0, 124, 0.4);
}

.grid-view .channel-card:hover .card-thumbnail .thumb-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.grid-view .channel-card .card-info-footer {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.3);
}

.grid-view .channel-card .card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.grid-view .channel-card .card-title-row h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 8px;
}

.grid-view .channel-card .card-metadata-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.grid-view .channel-card .card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 4px 0 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* List view mode styling (clean, compact rows) */
.channel-group-content.list-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px;
}

.list-view .channel-card {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 16px !important;
  height: auto !important;
  min-height: 48px !important;
  border-radius: 8px !important;
  gap: 12px !important;
}

.list-view .channel-card .card-thumbnail {
  display: none !important;
}

.list-view .channel-card .card-info-footer {
  display: flex;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
}

.list-view .channel-card .card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.list-view .channel-card .card-title-row h4 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.list-view .channel-card .card-metadata-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-view .channel-card .card-provider {
  font-size: 11.5px;
  color: var(--text-muted);
}

.list-view .channel-card .card-desc {
  display: none !important;
}

.list-view .channel-card .card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* View Mode Toggles Active state visual fix */
.view-mode-toggle .layout-btn {
  background: transparent;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
}
.view-mode-toggle .layout-btn.active {
  background: rgba(229, 0, 124, 0.2);
  color: var(--accent-pink);
  border: 1px solid rgba(229, 0, 124, 0.4);
  box-shadow: none;
}

/* Collapsible Channel Groups */
.channel-group-header-flat.collapsible-header {
  padding: 10px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.channel-group-header-flat.collapsible-header:hover {
  background: rgba(255, 255, 255, 0.05);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.channel-group-header-flat.collapsible-header:hover .group-title-flat {
  color: #fff;
}

.channel-group-header-flat.collapsible-header:hover .group-chevron-icon {
  color: var(--accent-pink);
}

/* Floating Back to Channels Action Overlay */
.back-to-channels-btn-header {
  background: none;
  border: 1px solid rgba(229, 0, 124, 0.3);
  color: var(--accent-pink);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.back-to-channels-btn-header:hover {
  background-color: rgba(229, 0, 124, 0.1);
  border-color: var(--accent-pink);
}

/* Scroll Focus Highlight Pulse for Last Clicked Channel */
@keyframes focus-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 0, 124, 0.7), 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(229, 0, 124, 0), 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    transform: scale(1.03);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(229, 0, 124, 0), 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    transform: scale(1);
  }
}

.scroll-focus-highlight {
  animation: focus-pulse 0.9s ease-in-out 2;
  border-color: var(--accent-pink) !important;
  position: relative;
  z-index: 5;
}

/* Extra Small Devices Grid Optimization */
@media (max-width: 580px) {
  .channel-group-content.grid-view {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .grid-view .channel-card {
    min-height: auto !important;
  }
  .grid-view .channel-card .card-thumbnail {
    height: 80px !important;
  }
  .grid-view .channel-card .card-info-footer {
    padding: 8px !important;
  }
  .grid-view .channel-card .card-title-row h4 {
    font-size: 12px !important;
  }
  .grid-view .channel-card .card-desc {
    display: none !important; /* Hide desc to keep cards clean and compact */
  }
  .grid-view .channel-card .card-provider {
    font-size: 9px !important;
  }
  .grid-view .channel-card .fav-star {
    font-size: 13px !important;
  }
  
  /* Compact live score board on tiny mobile screens */
  .score-matchup-board {
    gap: 8px !important;
    padding: 8px !important;
  }
  .score-team-flag {
    font-size: 20px !important;
  }
  .score-team-name {
    font-size: 12px !important;
  }
  .score-digits {
    font-size: 24px !important;
  }
}

/* Smart TV Channel Selection Bar styling */
.smart-tv-channel-bar {
  position: absolute;
  top: 50%;
  bottom: auto;
  left: 20px;
  right: 20px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(-50%) translateY(20px);
  pointer-events: auto; /* Allow hovering even when transparent */
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 15;
}

.smart-tv-channel-bar:hover,
.smart-tv-channel-bar.active {
  opacity: 1;
  transform: translateY(-50%) translateY(0);
}

/* Adjust size on smaller viewports */
@media (max-width: 600px) {
  .smart-tv-channel-bar {
    top: 50%;
    bottom: auto;
    left: 10px;
    right: 10px;
    padding: 4px 0;
  }
}

.smart-tv-carousel {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.smart-tv-carousel::-webkit-scrollbar {
  height: 6px;
}

.smart-tv-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.smart-tv-carousel::-webkit-scrollbar-thumb:hover {
  background: var(--accent-emerald);
}

.smart-tv-item {
  flex: 0 0 auto;
  width: 120px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.smart-tv-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.smart-tv-item.active {
  background: rgba(229, 0, 124, 0.3);
  border-color: var(--accent-pink);
  box-shadow: 0 0 12px rgba(229, 0, 124, 0.5);
}

.smart-tv-item-name {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.smart-tv-item-status {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.smart-tv-item.active .smart-tv-item-status {
  background: #ff1a8b;
  color: #fff;
}

.smart-tv-carousel {
  cursor: grab;
  user-select: none;
}

.smart-tv-carousel.dragging {
  cursor: grabbing;
}


