/* Premium CSS Stylesheet for SubsDrop TV */

/* Theme Variables */
:root {
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Color Palette */
  --bg-app: hsl(224, 25%, 8%);
  --bg-sidebar: hsl(224, 25%, 11%);
  --bg-panel: hsla(224, 25%, 15%, 0.6);
  --bg-panel-solid: hsl(224, 25%, 14%);
  --bg-card: hsl(224, 25%, 16%);
  --bg-card-hover: hsl(224, 25%, 20%);
  --border-color: hsla(224, 25%, 25%, 0.4);
  --border-focus: hsla(262, 83%, 58%, 0.6);
  
  --primary: hsl(262, 83%, 58%);
  --primary-hover: hsl(262, 83%, 50%);
  --primary-glow: hsla(262, 83%, 58%, 0.35);
  
  --text-main: hsl(210, 20%, 98%);
  --text-muted: hsl(218, 12%, 65%);
  --text-dark: hsl(224, 25%, 8%);
  
  --danger: hsl(0, 72%, 51%);
  --danger-hover: hsl(0, 72%, 45%);
  --success: hsl(145, 63%, 49%);
  --warning: hsl(48, 89%, 50%);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 15px;
  overflow: hidden;
}

/* Layout Container */
.app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Top Header Bar */
.top-bar {
  height: 75px;
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-sidebar);
  z-index: 90;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.logo-icon {
  color: var(--primary);
  width: 28px;
  height: 28px;
}

.logo span strong {
  color: var(--primary);
  font-weight: 700;
}

.current-channel-info {
  display: none !important;
}

.current-channel-info .channel-avatar {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.15rem;
  flex-shrink: 0;
  text-transform: uppercase;
}

.current-channel-info .channel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.channel-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.channel-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}



/* Main Content Wrapper */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Video Player Panel */
.player-outer-wrapper {
  background-color: #07070c;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  filter: blur(140px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 1;
  transition: all var(--transition-slow) ease-in-out;
}

.player-container {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16/9;
  background-color: #000;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-color);
  z-index: 5;
}

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

/* Player Overlays */
.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  transition: opacity var(--transition-fast);
}

.loading-overlay {
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: none;
  gap: 1.25rem;
  color: var(--text-main);
  font-size: 1.1rem;
}

.loading-overlay span {
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  color: #fff;
}


.dot-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dot-loader .dot {
  width: 12px;
  height: 12px;
  background-color: var(--primary);
  border-radius: 50%;
  animation: bounce-dot 1.2s infinite ease-in-out both;
  box-shadow: 0 0 10px var(--primary-glow);
}

.dot-loader .dot:nth-child(1) {
  animation-delay: -0.32s;
}

.dot-loader .dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce-dot {
  0%, 80%, 100% { 
    transform: scale(0);
    opacity: 0.35;
  } 
  40% { 
    transform: scale(1.0);
    opacity: 1;
  }
}

.state-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.state-overlay svg {
  width: 64px;
  height: 64px;
  color: white;
  animation: scale-fade 0.5s ease-out forwards;
}

@keyframes scale-fade {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

/* Error Card */
.error-card {
  max-width: 420px;
  padding: 2rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.error-icon {
  width: 52px;
  height: 52px;
  color: var(--danger);
}

.error-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.error-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.error-actions {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.error-actions .btn {
  flex: 1;
}

/* Video Controls HUD */
.video-controls-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.5) 100%);
  z-index: 10;
  opacity: 1;
  transition: opacity var(--transition-normal);
  pointer-events: auto;
}

.player-container.idle .video-controls-overlay {
  opacity: 0;
  pointer-events: none;
}

.controls-top-row {
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.badge {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
}

.badge-live {
  background-color: var(--danger);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.badge-resolution {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.controls-bottom-panel {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Seek Bar */
.progress-bar-container {
  height: 16px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.progress-bar-rail {
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: absolute;
}

.progress-bar-buffer {
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  position: absolute;
  width: 0%;
}

.progress-bar-fill {
  height: 4px;
  background-color: var(--primary);
  border-radius: 2px;
  position: absolute;
  width: 0%;
}

.progress-bar-handle {
  width: 12px;
  height: 12px;
  background-color: var(--primary);
  border-radius: 50%;
  position: absolute;
  left: 0%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  box-shadow: 0 0 8px var(--primary);
}

.progress-bar-container:hover .progress-bar-rail,
.progress-bar-container:hover .progress-bar-buffer,
.progress-bar-container:hover .progress-bar-fill {
  height: 6px;
}

.progress-bar-container:hover .progress-bar-handle {
  opacity: 1;
  transform: translateX(-50%) scale(1.2);
}

/* Control Buttons & Grouping */
.controls-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.control-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.control-btn:hover {
  color: var(--primary);
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.08);
}

.control-btn svg {
  width: 22px;
  height: 22px;
}

.play-btn {
  background-color: var(--primary);
  padding: 0.6rem;
  border-radius: 50%;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.play-btn:hover {
  background-color: var(--primary-hover);
  color: white;
  transform: scale(1.1);
}

.play-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Volume Slider */
.volume-control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.volume-slider-container {
  width: 0px;
  overflow: hidden;
  transition: width var(--transition-normal) ease;
  display: flex;
  align-items: center;
}

.volume-control-group:hover .volume-slider-container,
.volume-slider-container:focus-within {
  width: 80px;
}

.volume-slider-container input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  background: rgba(255, 255, 255, 0.2);
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.volume-slider-container input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--primary);
}

.time-display {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  font-variant-numeric: tabular-nums;
}

/* Quality Popover */
.quality-popover {
  position: absolute;
  bottom: 45px;
  right: 0;
  background-color: var(--bg-panel-solid);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.5rem;
  width: 160px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.popover-title {
  padding: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
}

.quality-list {
  list-style: none;
}

.quality-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-fast);
}

.quality-item:hover {
  background-color: var(--bg-card-hover);
}

.quality-item.active {
  color: var(--primary);
  font-weight: 600;
}

/* --- Bottom Dashboard Style --- */
.dashboard-bottom {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Important for inner vertical scrolling */
  background-color: var(--bg-app);
}

/* Dashboard Controls Bar */
.dashboard-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-sidebar);
  gap: 1.25rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background-color: var(--bg-card-hover);
}

.clear-search-btn {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-search-btn:hover {
  color: var(--text-main);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.25rem;
  border-radius: 10px;
}

.tab-btn {
  padding: 0.55rem 1.25rem;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

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

.tab-btn.active {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.tab-icon {
  width: 14px;
  height: 14px;
}

/* Actions */
.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Scrollable Channel Grid */
.channel-grid-container {
  flex: 1;
  overflow-y: auto;
  padding: 2.25rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.server-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: hsla(224, 25%, 12%, 0.5);
  border: 1px solid var(--border-color);
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.825rem;
  color: var(--text-muted);
  max-width: 960px;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.server-notice svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
  flex-shrink: 0;
}

.channel-list {
  width: 100%;
  max-width: 960px;
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.channel-item {
  display: flex;
  align-items: center;
  padding: 0.45rem 1rem;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
  min-width: 110px;
  justify-content: center;
}

.channel-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: hsla(224, 25%, 35%, 0.4);
  transform: translateY(-1px);
}

.channel-item.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.channel-details {
  display: flex;
  align-items: center;
  justify-content: center;
}

.channel-name {
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.channel-item:hover .channel-name {
  color: var(--text-main);
}

.channel-item.active .channel-name {
  color: #fff;
}

/* Streaming Indicator Animation */
.streaming-indicator {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 12px;
  height: 12px;
  margin-left: 0.5rem;
}

.streaming-indicator .bar {
  width: 2px;
  height: 100%;
  background-color: #fff;
  border-radius: 1px;
  animation: bounce-bar 0.75s ease-in-out infinite alternate;
}

.streaming-indicator .bar:nth-child(1) {
  animation-delay: 0.1s;
}

.streaming-indicator .bar:nth-child(2) {
  animation-delay: 0.35s;
}

.streaming-indicator .bar:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes bounce-bar {
  0% {
    height: 30%;
  }
  100% {
    height: 100%;
  }
}

.channel-meta-tags {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.channel-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
  background-color: var(--border-color);
  color: var(--text-muted);
}

.channel-badge.hls {
  background-color: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.channel-badge.mpegts {
  background-color: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.channel-badge.custom-badge {
  background-color: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.channel-fav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.channel-fav-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--warning);
}

.channel-fav-btn.active {
  color: var(--warning);
}

.channel-fav-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.channel-fav-btn:not(.active) svg {
  fill: none;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

/* Buttons and UI elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background-color: var(--danger-hover);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
  border-color: hsla(224, 25%, 35%, 0.4);
}

.btn-icon-left {
  width: 16px;
  height: 16px;
  margin-right: 0.5rem;
}

.small-icon {
  width: 14px;
  height: 14px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  animation: fade-in var(--transition-fast) forwards;
}

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

.modal-card {
  background-color: var(--bg-panel-solid);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: scale-in var(--transition-normal) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes scale-in {
  from { transform: scale(0.9) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

.modal-close-btn {
  border: none;
  width: 32px;
  height: 32px;
}

.form-group {
  padding: 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group select {
  padding: 0.7rem 1rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group-checkbox {
  padding: 0.75rem 1.5rem 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.form-group-checkbox input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.form-group-checkbox label {
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.help-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.settings-content {
  max-height: 55vh;
  overflow-y: auto;
}

.settings-section {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
  border-bottom: none;
}

.settings-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.settings-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.extension-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.extension-list li {
  background-color: var(--bg-card);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.extension-list li strong {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.ext-links {
  display: flex;
  gap: 0.75rem;
}

.ext-links a {
  font-size: 0.75rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.ext-links a:hover {
  text-decoration: underline;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 992px) {
  .player-outer-wrapper {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-y: auto; /* Let page flow naturally */
  }

  .app-container {
    height: auto;
    min-height: 100vh;
    overflow-y: visible;
  }

  .top-bar {
    padding: 0 1rem;
    height: 60px;
  }

  .logo span {
    font-size: 1.2rem;
  }

  .current-channel-info {
    display: none; /* Hide active channel in mobile top header since player has details */
  }
  
  .main-content {
    overflow: visible; /* Prevent inner scroll scrollbars */
  }

  .player-outer-wrapper {
    padding: 0;
    border-bottom: none;
  }
  
  .player-container {
    border-radius: 0; /* Flush flat video player on mobile screen edges */
    border: none;
    box-shadow: none;
  }

  .controls-top-row {
    padding: 0.5rem 0.75rem;
  }

  .controls-bottom-panel {
    padding: 0.5rem 0.75rem;
    gap: 0.35rem;
  }

  .controls-group {
    gap: 0.5rem;
  }

  .control-btn svg {
    width: 18px;
    height: 18px;
  }

  .play-btn {
    padding: 0.5rem;
  }

  .play-btn svg {
    width: 14px;
    height: 14px;
  }

  .volume-slider-container {
    width: 55px !important;
  }

  .time-display {
    font-size: 0.75rem;
  }

  /* Bottom Controls Section on Mobile */
  .dashboard-bottom {
    flex: none;
  }

  .dashboard-controls-bar {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .search-box {
    width: 100%;
  }

  .filter-tabs {
    justify-content: center;
  }

  .tab-btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .dashboard-actions {
    justify-content: space-between;
  }

  .dashboard-actions .btn {
    flex: 1;
  }

  .channel-grid-container {
    padding: 1rem 1rem 4.5rem;
    overflow-y: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
  }

  .server-notice {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 8px;
    gap: 0.35rem;
  }

  .channel-list {
    gap: 0.75rem;
  }

  .error-card {
    max-width: 90%;
    padding: 1.5rem;
  }

  .error-card h3 {
    font-size: 1.1rem;
  }

  .error-card p {
    font-size: 0.85rem;
  }

  .error-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 95;
    background-color: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
    padding: 0.85rem;
  }
}

/* Live Viewers Badge Style */
.live-viewers-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: hsla(262, 83%, 58%, 0.1);
  color: hsl(262, 83%, 75%);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  border: 1px solid hsla(262, 83%, 58%, 0.25);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: default;
  transition: all var(--transition-fast);
}

.live-viewers-badge:hover {
  background-color: hsla(262, 83%, 58%, 0.15);
  border-color: hsla(262, 83%, 58%, 0.4);
}

.live-viewers-badge svg {
  width: 14px;
  height: 14px;
}

/* App Footer Styles */
.app-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background-color: var(--bg-sidebar);
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.footer-dot {
  opacity: 0.5;
}

.footer-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}


