:root {
  --bg-primary: #07080b;
  --bg-secondary: #0d0f15;
  --bg-surface: #13161f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.065);
  --bg-card-active: rgba(229, 9, 20, 0.12);
  --border-color: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.15);
  --accent-red: #e50914;
  --accent-red-hover: #ff1e27;
  --accent-red-glow: rgba(229, 9, 20, 0.35);
  --accent-cyan: #00d2ff;
  --accent-emerald: #00e676;
  --accent-emerald-glow: rgba(0, 230, 118, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* ── Top Navigation Bar ────────────────────────────────────────────── */
.navbar {
  height: var(--header-height);
  background: rgba(10, 12, 16, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #e50914, #b20710);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.35);
}

.brand-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

.brand-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.35);
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.brand-logo-img:hover {
  transform: scale(1.05);
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  user-select: none;
}

.brand-white {
  color: #ffffff;
  font-weight: 900;
}

.brand-red {
  color: #e50914;
  font-weight: 900;
}

.brand-tv {
  color: #ffffff;
  font-weight: 800;
  margin-left: 4px;
}

.nav-search {
  position: relative;
  width: 420px;
  max-width: 42vw;
  display: flex;
  align-items: center;
}

.nav-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 10px 38px 10px 40px;
  border-radius: 22px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-search input::placeholder {
  color: var(--text-dim);
}

.nav-search input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(229, 9, 20, 0.6);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15), 0 4px 20px rgba(0, 0, 0, 0.4);
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  pointer-events: none;
  transition: color 0.2s ease;
}

.nav-search input:focus~.search-icon {
  color: var(--accent-red);
}

.search-clear {
  position: absolute;
  right: 12px;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
}

.search-clear:hover {
  background: var(--accent-red);
  transform: scale(1.1);
}

.nav-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.25);
  color: var(--accent-emerald);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 230, 118, 0.08);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-emerald 2s infinite;
}

@keyframes pulse-emerald {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 12px var(--accent-emerald);
  }

  100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
}

/* ── Main Layout ───────────────────────────────────────────────────── */
.app-container {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* ── Left / Main Player Section ────────────────────────────────────── */
.player-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  position: relative;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.player-section::-webkit-scrollbar {
  width: 6px;
}

.player-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Custom Video Player Wrapper */
.player-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  margin: 0 auto;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* Floating Player Controls Overlay */
.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to bottom,
      transparent 55%,
      rgba(0, 0, 0, 0.4) 75%,
      rgba(0, 0, 0, 0.9) 100%);
  opacity: 1;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 20;
}

.player-wrapper.idle .player-overlay {
  opacity: 0;
}

/* Center Play/Pause Splash */
.center-splash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 72px;
  height: 72px;
  background: rgba(10, 12, 16, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 30;
}

.center-splash.animate {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.15);
}

/* Bottom Control Bar */
.player-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  pointer-events: auto;
  gap: 16px;
}

.bottom-left-controls,
.bottom-right-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Player Action Icons */
.ctrl-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.ctrl-btn svg {
  width: 20px;
  height: 20px;
}

/* Live Edge Button */
.live-edge-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.6);
  color: #fff;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.6px;
  transition: all 0.2s ease;
}

.live-edge-pill:hover {
  background: var(--accent-red);
  box-shadow: 0 0 14px var(--accent-red);
}

.live-edge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-red);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-red);
}

.live-edge-pill:hover .live-edge-dot {
  background: #fff;
  box-shadow: 0 0 8px #fff;
}

/* Volume Control */
.volume-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.volume-slider:hover {
  height: 6px;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Track Selectors Dropdowns */
.track-select-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  font-family: inherit;
}

.track-select-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.track-select-pill option {
  background: #141720;
  color: #fff;
}

/* Loading Spinner */
.video-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent-red);
  border-right-color: rgba(229, 9, 20, 0.4);
  border-radius: 50%;
  animation: cinema-spin 0.8s linear infinite;
  display: none;
  z-index: 25;
  pointer-events: none;
  box-shadow: 0 0 24px rgba(229, 9, 20, 0.35);
}

@keyframes cinema-spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ── Channel Playing Info Bar ──────────────────────────────────────── */
.channel-playing-header {
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.channel-meta-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.channel-playing-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  background: #000;
  border-radius: 12px;
  padding: 5px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.channel-meta-info h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.channel-meta-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-live {
  background: rgba(229, 9, 20, 0.15);
  color: #ff4d4d;
  border: 1px solid rgba(229, 9, 20, 0.4);
}

.badge-live-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: pulse-dot 1.4s infinite;
}

.badge-cat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

/* Action buttons */
.channel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-red), #b20710);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-red-hover), #d10813);
  box-shadow: 0 6px 22px rgba(229, 9, 20, 0.5);
  transform: translateY(-1px);
}

/* ── Diagnostics HUD ───────────────────────────────────────────────── */
.diagnostics-bar {
  padding: 12px 24px;
  background: rgba(13, 15, 21, 0.95);
  border-bottom: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  font-size: 12px;
}

.diag-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.diag-label {
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.diag-value {
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Mono", "Segoe UI Mono", monospace;
  font-size: 13px;
  font-weight: 600;
}

#diag-bitrate {
  color: var(--accent-cyan);
}

#diag-buffer {
  color: var(--accent-emerald);
}

/* ── Player Showcase Section (Fills empty area below player) ────── */
.player-showcase {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, transparent 100%);
}

.showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

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

.showcase-glow-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-red);
}

.showcase-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.showcase-title span {
  color: var(--accent-red);
}

.showcase-sub {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.showcase-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.showcase-card:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  border-color: rgba(229, 9, 20, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(229, 9, 20, 0.15);
}

.showcase-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.showcase-logo-wrap {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.showcase-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.5);
}

.showcase-card:hover .showcase-play-btn {
  opacity: 1;
  transform: scale(1);
}

.showcase-card-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.showcase-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.showcase-card-group {
  font-size: 11px;
  color: var(--text-dim);
}

/* ── Quick Genre Explorer ─────────────────────────────────────────── */
.genre-shortcuts-section {
  padding: 24px 28px 36px;
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.genre-tile {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.genre-tile:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.genre-tile-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.genre-tile-count {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Curated Channel Shelves (Netflix / Hotstar Rows) ──────────────── */
.channel-shelf {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border-color);
}

#curated-shelves-container {
  padding-bottom: 20px;
}

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

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

.shelf-glow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.shelf-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.shelf-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-dim);
}

.shelf-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.shelf-scroll::-webkit-scrollbar {
  display: none;
}

.shelf-card {
  flex: 0 0 190px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.shelf-card:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  border-color: rgba(229, 9, 20, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(229, 9, 20, 0.15);
}

.shelf-card:hover .showcase-play-btn {
  opacity: 1;
  transform: scale(1);
}

/* ── Legal Disclaimer Footer ────────────────────────────────────────── */
.legal-disclaimer-section {
  padding: 28px 32px 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 10, 14, 0.45);
}

.legal-disclaimer-content {
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-disclaimer-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.legal-disclaimer-title svg {
  color: var(--accent-red);
}

.legal-disclaimer-text {
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0;
}

.legal-disclaimer-text strong {
  color: #fff;
  font-weight: 600;
}

.legal-copyright {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 4px;
}

/* ── Right / Channel Sidebar Section ───────────────────────────────── */
.channel-sidebar {
  width: 440px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Category Filter Bar - Clean, NO White Windows Scrollbar */
.categories-bar {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE / Edge */
}

.categories-bar::-webkit-scrollbar {
  display: none;
  /* Chrome / Safari / Opera */
}

.cat-chip {
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-chip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.cat-chip.active {
  background: linear-gradient(135deg, var(--accent-red), #b20710);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.4);
}

/* Channels List Container */
.channel-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.channel-list-container::-webkit-scrollbar {
  width: 5px;
}

.channel-list-container::-webkit-scrollbar-track {
  background: transparent;
}

.channel-list-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.channel-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.empty-state {
  padding: 36px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}

/* ── Modern Channel Card ───────────────────────────────────────────── */
.channel-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
}

.channel-card:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.channel-card.active {
  background: linear-gradient(145deg, rgba(229, 9, 20, 0.16), rgba(229, 9, 20, 0.04));
  border-color: rgba(229, 9, 20, 0.7);
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.2);
}

.card-logo-wrap {
  width: 46px;
  height: 46px;
  background: #000;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.channel-card.active .card-logo-wrap {
  border-color: rgba(229, 9, 20, 0.5);
}

.card-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

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

.card-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-card.active .card-name {
  color: #fff;
  font-weight: 700;
}

.card-hd-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(123, 97, 255, 0.25));
  border: 1px solid rgba(0, 210, 255, 0.4);
  color: #70d6ff;
  line-height: 1.3;
  flex-shrink: 0;
}

.card-sub {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-group-tag {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 500;
}

/* Animated Equalizer for Now Playing Channel */
.card-now-playing {
  display: none;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
  margin-left: auto;
  padding-left: 8px;
  flex-shrink: 0;
}

.card-now-playing.visible {
  display: flex;
}

.eq-bar {
  width: 3px;
  background: var(--accent-red);
  border-radius: 2px;
  animation: eq-bounce 0.8s ease-in-out infinite alternate;
}

.eq-bar.bar-1 {
  height: 14px;
  animation-delay: 0.1s;
}

.eq-bar.bar-2 {
  height: 8px;
  animation-delay: 0.35s;
}

.eq-bar.bar-3 {
  height: 12px;
  animation-delay: 0.2s;
}

@keyframes eq-bounce {
  0% {
    height: 4px;
  }

  100% {
    height: 16px;
  }
}

/* ── Modal ─────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
}

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

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.embed-code-box {
  background: #000;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  color: var(--accent-cyan);
  font-family: -apple-system, BlinkMacSystemFont, "SF Mono", monospace;
  font-size: 12.5px;
  word-break: break-all;
  user-select: all;
  line-height: 1.5;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .channel-sidebar {
    width: 100%;
    height: 520px;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }

  .player-wrapper {
    max-height: none;
  }

  .nav-search {
    width: 220px;
  }
}