/* public/assets/css/app.css — Premium Modern Retro-Dark Design System */

:root {
  /* Colors */
  --bg-deep: #05070a;
  --bg-surface: #0c1017;
  --bg-surface-elevated: #121824;
  
  --accent-neon-red: #ff2d55;
  --accent-neon-amber: #ffae00;
  --accent-neon-green: #00ff66;
  --accent-neon-cyan: #00f0ff;
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-color: rgba(255, 255, 255, 0.06);
  --border-color-glow: rgba(255, 45, 85, 0.25);
  
  /* Fonts */
  --font-header: 'Outfit', -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
  
  /* Layout */
  --max-width: 1280px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  /* Shadows & Glows */
  --glow-red: 0 0 15px rgba(255, 45, 85, 0.35);
  --glow-amber: 0 0 15px rgba(255, 174, 0, 0.35);
  --glow-green: 0 0 15px rgba(0, 255, 102, 0.35);
  --glow-cyan: 0 0 15px rgba(0, 240, 255, 0.35);
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-header);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Retro CRT Tech Scanline Overlay */
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 4px, 6px 100%;
  opacity: 0.8;
}

/* Layout Containers */
.content-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Glassmorphic Topbar Redesign */
.topbar-glass {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 10, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 20px;
}

.topbar-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

/* Retro Neon Brand Badge */
.brand-retro {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.brand-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-neon-red);
  box-shadow: 0 0 10px var(--accent-neon-red);
}

.brand-text {
  color: var(--text-primary);
}

.brand-alt {
  color: var(--accent-neon-red);
  text-shadow: 0 0 8px rgba(255, 45, 85, 0.5);
}

/* Sleek Expandable Cyber Search Box */
.search-wrap-expandable {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  width: 40px;
  height: 40px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.search-wrap-expandable .search-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.search-wrap-expandable .search-toggle-btn:hover {
  color: var(--text-primary);
}

.search-wrap-expandable input[type="search"] {
  width: 0;
  padding: 0;
  opacity: 0;
  font-size: 14px;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-header);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-wrap-expandable input[type="search"]::placeholder {
  color: var(--text-muted);
}

/* Expansion states */
.search-wrap-expandable:focus-within,
.search-wrap-expandable:hover,
.search-wrap-expandable:has(input[type="search"]:not(:placeholder-shown)) {
  width: 240px;
  border-color: var(--accent-neon-red);
  box-shadow: 0 0 12px rgba(255, 45, 85, 0.2);
  background: var(--bg-surface-elevated);
}

.search-wrap-expandable:focus-within input[type="search"],
.search-wrap-expandable:hover input[type="search"],
.search-wrap-expandable:has(input[type="search"]:not(:placeholder-shown)) input[type="search"] {
  width: 180px;
  padding-right: 14px;
  opacity: 1;
}

/* Categories Bar Redesign (Inline) */
.cats-wrapper-inline {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
  margin-left: 100px; /* Large gap next to logo */
}

.cats-wrapper-inline::-webkit-scrollbar {
  display: none;
}

.cats-wrapper-inline::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--bg-deep));
  pointer-events: none;
  z-index: 2;
}

.cats-retro {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  width: max-content;
  margin-left: auto; /* Shift filter buttons to the right */
}

.cats-retro::-webkit-scrollbar {
  display: none;
}

.cats-retro a {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.cats-retro a:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.cats-retro a.active {
  color: var(--bg-deep);
  background: var(--accent-neon-amber);
  border-color: var(--accent-neon-amber);
  box-shadow: var(--glow-amber);
  font-weight: 600;
}

/* Pulsing Badge & Status Indicators */
.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
}

.pulse-dot.green {
  background-color: var(--accent-neon-green);
  animation: pulse-green 1.6s infinite alternate;
}

.pulse-dot.red {
  background-color: var(--accent-neon-red);
  animation: pulse-red 1.6s infinite alternate;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 2px var(--accent-neon-green); }
  100% { box-shadow: 0 0 10px var(--accent-neon-green); }
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 2px var(--accent-neon-red); }
  100% { box-shadow: 0 0 10px var(--accent-neon-red); }
}

/* Retro Hero Banner Design */
.retro-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  background: linear-gradient(135deg, var(--bg-surface), rgba(12, 16, 23, 0.4));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  margin-bottom: 40px;
  align-items: center;
}

@media (min-width: 768px) {
  .retro-hero {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-badge {
  display: flex;
  align-items: center;
  background: rgba(0, 255, 102, 0.07);
  border: 1px solid rgba(0, 255, 102, 0.15);
  border-radius: 99px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.badge-text {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-neon-green);
}

.retro-hero h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--text-primary), #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 540px;
}

/* Hero Diagnostic Tech Box */
.console-box {
  background: #020305;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.console-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.console-header span[class^="dot-"] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #f59e0b; }
.dot-green { background-color: #10b981; }

.console-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
  letter-spacing: 0.1em;
}

.console-body {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
}

.console-line {
  color: var(--text-secondary);
}

.c-accent { color: var(--accent-neon-red); }
.c-green { color: var(--accent-neon-green); text-shadow: 0 0 6px rgba(0, 255, 102, 0.3); }
.c-amber { color: var(--accent-neon-amber); }

/* Section Headers */
.section-container {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.section-tag-red, .section-tag-amber {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.section-tag-red {
  background: rgba(255, 45, 85, 0.08);
  border: 1px solid rgba(255, 45, 85, 0.2);
  color: var(--accent-neon-red);
}

.section-tag-amber {
  background: rgba(255, 174, 0, 0.08);
  border: 1px solid rgba(255, 174, 0, 0.2);
  color: var(--accent-neon-amber);
}

.section-line {
  flex-grow: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-color), transparent);
}

/* Beautiful Grid Systems */
.grid-retro {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
}

@media (min-width: 480px) {
  .grid-retro {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* Categories Stack — full-width rows, one per category */
.categories-stack {
  display: flex;
  flex-direction: column;
  gap: 36px;
  width: 100%;
}

.category-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.category-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 174, 0, 0.08);
  border: 1px solid rgba(255, 174, 0, 0.22);
  color: var(--accent-neon-amber);
}

.category-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
}

.category-channels {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
}

@media (min-width: 480px) {
  .category-channels {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

.grid-featured {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Redesigned Premium Cards with Neon Hover */
.card-retro {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  aspect-ratio: 16/11;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Card Hover 3D Shift & Neon Glow */
.card-retro:hover {
  transform: translateY(-4px) scale(1.02);
  background: var(--bg-surface-elevated);
  border-color: var(--accent-neon-red);
  box-shadow: 0 8px 30px rgba(255, 45, 85, 0.15), var(--glow-red);
}

/* Neon border glowing line */
.card-retro::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent-neon-red), var(--accent-neon-amber)) border-box;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-retro:hover::after {
  opacity: 0.8;
}

.card-logo-wrap {
  width: 100%;
  height: 65%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-logo-wrap img {
  max-width: 75%;
  max-height: 75%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  transition: transform 0.25s ease;
}

.card-retro:hover .card-logo-wrap img {
  transform: scale(1.08);
}

/* Custom Gradient Logo Placeholders */
.placeholder-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-neon-red), var(--accent-neon-amber));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Card Badges and Labels */
.card-live-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--accent-neon-red);
  color: #fff;
  box-shadow: 0 2px 6px rgba(255, 45, 85, 0.4);
}

.card-info {
  width: 100%;
  margin-top: auto;
  text-align: center;
}

.card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
  display: block;
}

/* Empty/Error State Styling */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.01);
}

/* Watch Page Layout Redesign */
.watch-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

@media (min-width: 960px) {
  .watch-layout {
    grid-template-columns: 1fr 300px;
  }
}

.watch-nav-indicator {
  display: flex;
  align-items: center;
  background: rgba(255, 45, 85, 0.07);
  border: 1px solid rgba(255, 45, 85, 0.15);
  border-radius: 99px;
  padding: 4px 12px;
}

.watch-status-text {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-neon-red);
}

/* Premium Player Bezel Design */
.player-bezel {
  background: #0f131a;
  border-radius: var(--radius-lg);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--box-shadow);
}

.player-glow-border {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.05);
  transition: all 0.3s ease;
}

.player-canvas {
  background: #000;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.player-canvas video {
  width: 100%;
  height: 100%;
  background: #000;
}

.status-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 3, 5, 0.95);
  color: var(--accent-neon-cyan);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-shadow: var(--glow-cyan);
  pointer-events: none;
}

.player-canvas.playing .status-overlay {
  display: none;
}

/* Details and Description Box */
.chan-details-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 20px;
}

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

.chan-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
}

.badge-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 4px 12px;
  border-radius: 99px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.chan-desc {
  font-size: 14px;
  line-height: 1.6;
}

/* Custom Tuning/Proxy Metrics Panel */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

@media (min-width: 576px) {
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.metric-value {
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.text-green { color: var(--accent-neon-green) !important; }
.text-amber { color: var(--accent-neon-amber) !important; }

/* Sidebar Layout Redesign */
.sidebar-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.sidebar-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.sidebar-line {
  flex-grow: 1;
  height: 1px;
  background: var(--border-color);
}

.sidebar-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (max-width: 959px) {
  .sidebar-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* Mobile: 3 channels per row, full list (no inner scroll) */
@media (max-width: 768px) {
  #related.sidebar-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  #related.sidebar-grid .card-retro {
    padding: 8px;
  }

  #related.sidebar-grid .card-logo-wrap img {
    max-width: 80%;
    max-height: 80%;
  }

  #related.sidebar-grid .placeholder-logo {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  #related.sidebar-grid .card-live-tag {
    top: 6px;
    left: 6px;
    font-size: 7px;
    padding: 2px 4px;
  }

  #related.sidebar-grid .card-name {
    font-size: 11px;
  }

  #related.sidebar-grid .card-meta {
    font-size: 8px;
    margin-top: 0;
  }
}

/* Custom Footer */
.footer-retro {
  max-width: var(--max-width);
  margin: 60px auto 0;
  padding: 24px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

@media (min-width: 576px) {
  .footer-retro {
    flex-direction: row;
    justify-content: space-between;
  }
}

.admin-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 99px;
  transition: all 0.2s ease;
}

.admin-pill:hover {
  border-color: var(--accent-neon-red);
  color: var(--accent-neon-red);
  box-shadow: var(--glow-red);
}

/* Vintage and Modern Utility */
.muted {
  color: var(--text-secondary);
}

/* Responsive CSS support for Admin Login & Dashboard */
.login {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 400px;
  margin: 80px auto;
  box-shadow: var(--box-shadow);
}

.login h1 {
  font-family: var(--font-mono);
  font-size: 26px;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.field input, textarea, select {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.field input:focus, textarea:focus, select:focus {
  border-color: var(--accent-neon-cyan);
}

.btn {
  background: var(--accent-neon-red);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 45, 85, 0.25);
}

.btn:hover {
  background: #ff5573;
  box-shadow: var(--glow-red);
}

.btn.ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.btn.ghost:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-secondary);
}

.btn.danger {
  background: #3e121a;
  box-shadow: none;
  color: #ff8a9f;
  border: 1px solid #7c2030;
}

.btn.danger:hover {
  background: #5c1824;
}

/* Dashboard Styling */
.admin-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.admin-user-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 4px 10px;
  border-radius: 99px;
  text-shadow: var(--glow-cyan);
}

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

.dash-welcome {
  margin-bottom: 32px;
}

.system-tag-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-neon-green);
  border: 1px solid rgba(0, 255, 102, 0.2);
  background: rgba(0, 255, 102, 0.06);
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.dash-title {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.dash-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.spacer {
  flex: 1;
}

/* Custom Search Input */
.search-wrap {
  position: relative;
  width: min(320px, 100%);
}

.search-wrap input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 38px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-wrap input:focus {
  border-color: var(--accent-neon-red);
  box-shadow: 0 0 10px rgba(255, 45, 85, 0.15);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

/* Custom Styled Dropdown Wrap */
.select-wrap {
  position: relative;
  width: min(200px, 100%);
}

.select-wrap select {
  width: 100%;
  appearance: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 10px 36px 10px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-wrap select:focus {
  border-color: var(--accent-neon-cyan);
}

.select-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.field-select {
  width: 100% !important;
}

/* View Switcher Controls */
.view-switcher {
  display: flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.view-btn.active {
  color: var(--accent-neon-cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.25);
  box-shadow: var(--glow-cyan);
}

/* Row Redesign */
.row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 20px;
  align-items: center;
  background: rgba(12, 16, 23, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  transition: all 0.2s ease;
}

.row:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(12, 16, 23, 0.85);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.logo-wrap {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 10, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  overflow: hidden;
}

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

/* Custom Gradient Logo Placeholder inside Row */
.row-placeholder-logo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.meta .t {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.meta .s {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.category-capsule {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 99px;
  color: var(--text-primary);
}

.divider {
  color: var(--text-muted);
}

.badge-featured {
  background: rgba(255, 174, 0, 0.1);
  border: 1px solid rgba(255, 174, 0, 0.3);
  color: var(--accent-neon-amber);
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-shadow: var(--glow-amber);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.active {
  color: var(--accent-neon-green);
}

.status-badge.inactive {
  color: var(--text-muted);
}

.dot.pulse {
  box-shadow: 0 0 8px var(--accent-neon-green);
  animation: pulse-glow-badge 1.5s infinite;
}

@keyframes pulse-glow-badge {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--accent-neon-green); }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.actions {
  display: flex;
  gap: 8px;
}

/* --- Dashboard Channels View Layouts (List vs Card) --- */

/* List View (Highly Compact Single-Line Layout) */
#chList.view-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#chList.view-list .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  gap: 16px;
  border-radius: var(--radius-md);
}

#chList.view-list .logo-wrap {
  width: 36px;
  height: 36px;
  padding: 2px;
  border-radius: var(--radius-sm);
}

#chList.view-list .row-placeholder-logo {
  font-size: 11px;
}

#chList.view-list .meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  flex: 1;
}

#chList.view-list .meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#chList.view-list .meta .t {
  font-size: 14px;
  font-weight: 600;
}

#chList.view-list .meta .s {
  margin-top: 0;
  gap: 8px;
}

#chList.view-list .actions {
  display: flex;
  gap: 8px;
}

#chList.view-list .actions .btn {
  padding: 6px 12px !important;
  font-size: 12px;
  height: 30px;
}

/* Card View (Responsive Neon Grid Layout) */
#chList.view-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

#chList.view-cards .row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  height: 200px;
}

#chList.view-cards .logo-wrap {
  width: 68px;
  height: 68px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#chList.view-cards .row-placeholder-logo {
  font-size: 18px;
}

#chList.view-cards .meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#chList.view-cards .meta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

#chList.view-cards .meta .t {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

/* Hide divider, stream feed count, status badge in card view as requested */
#chList.view-cards .meta .s .divider,
#chList.view-cards .meta .s .links-count,
#chList.view-cards .meta .s .status-badge {
  display: none;
}

#chList.view-cards .category-capsule {
  font-size: 10px;
  padding: 2px 8px;
}

/* Hover Actions Glassmorphic Overlay */
#chList.view-cards .actions {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.96);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.95);
}

#chList.view-cards .row:hover .actions {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

#chList.view-cards .actions .btn {
  width: 100px;
  height: 36px;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

/* Styled File Upload Zone */
.file-upload-zone {
  position: relative;
  width: 100%;
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed var(--border-color);
  background: rgba(255, 255, 255, 0.01);
  border-radius: var(--radius-md);
  padding: 20px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.file-upload-label svg {
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.file-upload-label:hover {
  border-color: var(--accent-neon-cyan);
  background: rgba(0, 240, 255, 0.02);
  color: var(--text-primary);
}

.file-upload-label:hover svg {
  color: var(--accent-neon-cyan);
  transform: translateY(-2px);
}

.file-upload-label.selected {
  border-style: solid;
  border-color: var(--accent-neon-green);
  background: rgba(0, 255, 102, 0.02);
  color: var(--text-primary);
}

.file-upload-label.selected svg {
  color: var(--accent-neon-green);
}

.file-upload-label.has-file {
  border-color: var(--accent-neon-amber);
  background: rgba(255, 174, 0, 0.02);
  color: var(--text-primary);
}

.file-upload-label.has-file svg {
  color: var(--accent-neon-amber);
}

/* Modals */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, 0.85);
  backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-back.open {
  display: flex;
}

.modal {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: min(560px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 2px rgba(255, 255, 255, 0.05);
}

.modal-title {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  color: var(--text-primary);
}

.modal .row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .modal .row2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.01);
}

.dash-welcome {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 32px;
}

.dash-title {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.dash-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.list {
  display: grid;
  gap: 12px;
}

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

.tabs button {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tabs button.active {
  color: var(--accent-neon-red);
  border-bottom-color: var(--accent-neon-red);
  text-shadow: 0 0 10px rgba(255, 45, 85, 0.2);
}

/* Spinner */
.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

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

/* Dynamic Stream Link Fields inside Admin Modal */
.links-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

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

.links-list-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}

.links-list-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}

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

.link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.link-quality-input {
  width: 140px !important;
  flex-shrink: 0;
}

.link-url-input {
  flex-grow: 1;
}

.btn-remove-link {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 45, 85, 0.08);
  border: 1px solid rgba(255, 45, 85, 0.2);
  color: var(--accent-neon-red);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-remove-link:hover {
  background: var(--accent-neon-red);
  color: #fff;
  box-shadow: var(--glow-red);
}

/* Watch Page Redesigned "No-Scroll" Layout */
@media (min-width: 960px) {
  .watch-layout {
    grid-template-columns: 1fr 340px !important;
    height: calc(100vh - 90px) !important;
    overflow: hidden !important;
    gap: 24px !important;
    padding-bottom: 0 !important;
  }
  
  .player-column {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
  }

  .player-bezel {
    flex-shrink: 0;
  }

  .sidebar-column {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    gap: 16px !important;
    padding: 20px !important;
  }

  .chan-details-card {
    flex-shrink: 0 !important;
    margin-top: 0 !important;
    padding: 20px !important;
  }

  .related-section {
    flex-grow: 1 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  #related.sidebar-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: 135px !important;
    overflow-y: auto !important;
    flex-grow: 1 !important;
    padding-right: 6px !important;
    gap: 10px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
  }

  #related.sidebar-grid .card-retro {
    aspect-ratio: auto !important;
    height: 100% !important;
    padding: 10px !important;
  }

  #related.sidebar-grid .placeholder-logo {
    width: 38px !important;
    height: 38px !important;
    font-size: 12px !important;
  }

  #related.sidebar-grid .card-live-tag {
    top: 6px !important;
    left: 6px !important;
    font-size: 7px !important;
    padding: 2px 5px !important;
    letter-spacing: 0.05em !important;
  }

  #related.sidebar-grid .card-logo-wrap {
    height: 60% !important;
  }

  #related.sidebar-grid .card-logo-wrap img {
    max-width: 75% !important;
    max-height: 75% !important;
  }

  #related.sidebar-grid .card-name {
    font-size: 12px !important;
  }

  #related.sidebar-grid .card-meta {
    font-size: 9px !important;
    margin-top: 2px !important;
  }
}

/* Custom Scrollbar for Related Channels Grid */
#related.sidebar-grid::-webkit-scrollbar {
  width: 4px;
}

#related.sidebar-grid::-webkit-scrollbar-track {
  background: transparent;
}

#related.sidebar-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

#related.sidebar-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Topbar Categories Navigation Menu */
.topbar-cats-menu {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
  max-width: 65%;
  align-items: center;
  margin-left: 20px;
}

.topbar-cats-menu::-webkit-scrollbar {
  display: none;
}

.topbar-cats-menu a {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 99px;
  white-space: nowrap;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.topbar-cats-menu a:hover,
.topbar-cats-menu a.active {
  color: var(--accent-neon-cyan);
  border-color: var(--accent-neon-cyan);
  background: rgba(0, 240, 255, 0.06);
  text-shadow: var(--glow-cyan);
}

/* Stream Source Switcher Panel */
.server-control-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  margin-top: 4px;
  flex-shrink: 0;
}

.server-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

.server-buttons {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-grow: 1;
}

.server-buttons::-webkit-scrollbar {
  display: none;
}

.btn-server {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-server:hover {
  border-color: var(--accent-neon-cyan);
  color: var(--text-primary);
}

.btn-server.active {
  color: #fff;
  background: var(--accent-neon-cyan);
  border-color: var(--accent-neon-cyan);
  box-shadow: var(--glow-cyan);
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

/* Mobile categories menu trigger (hidden on desktop) */
.topbar-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.topbar-menu-btn:hover,
.topbar-menu-btn[aria-expanded="true"] {
  color: var(--accent-neon-red);
  border-color: var(--accent-neon-red);
}

/* Mobile categories dropdown panel */
.cats-mobile-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(5, 7, 10, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 18px;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
  z-index: 99;
}

.cats-mobile-panel a {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.cats-mobile-panel a.active {
  color: var(--bg-deep);
  background: var(--accent-neon-amber);
  border-color: var(--accent-neon-amber);
  font-weight: 600;
}

/* Mobile-only adjustments */
@media (max-width: 768px) {
  .topbar-glass {
    padding: 12px 14px;
  }

  .topbar-container {
    gap: 10px;
  }

  /* Hide inline categories row, show 3-dot menu */
  .cats-wrapper-inline {
    display: none;
  }

  .topbar-menu-btn {
    display: inline-flex;
  }

  .cats-mobile-panel:not([hidden]) {
    display: flex;
  }

  /* Push search to the right edge */
  .search-wrap-expandable {
    margin-left: auto;
  }

  /* Disable hover-expand on touch; only expand when focused/typing */
  .search-wrap-expandable:hover {
    width: 40px;
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: var(--bg-surface);
  }

  .search-wrap-expandable:hover input[type="search"] {
    width: 0;
    padding: 0;
    opacity: 0;
  }

  .search-wrap-expandable:focus-within,
  .search-wrap-expandable:has(input[type="search"]:not(:placeholder-shown)) {
    width: min(70vw, 260px);
  }

  .search-wrap-expandable:focus-within input[type="search"],
  .search-wrap-expandable:has(input[type="search"]:not(:placeholder-shown)) input[type="search"] {
    width: 100%;
  }

  /* Hide hero block on mobile */
  .retro-hero {
    display: none;
  }

  /* Hide AVAILABLE STATIONS header on mobile */
  .stations-section > .section-header {
    display: none;
  }

  .content-container {
    padding: 16px 14px 60px;
  }

  .categories-stack {
    gap: 24px;
  }

  /* Compact channel details on mobile (watch page) */
  .chan-details-card {
    padding: 14px 16px;
    margin-top: 12px;
  }

  .details-header {
    margin-bottom: 6px;
    gap: 10px;
  }

  .chan-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
  }

  .badge-cat {
    font-size: 9px;
    padding: 3px 8px;
  }

  .chan-desc {
    font-size: 12px;
    line-height: 1.45;
  }

  .related-section .sidebar-header {
    margin-top: 10px;
  }

  .sidebar-tag {
    font-size: 10px;
  }

  /* Featured slideshow: horizontal scroll-snap carousel */
  #featured.grid-featured {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  #featured.grid-featured::-webkit-scrollbar {
    display: none;
  }

  #featured.grid-featured > .card-retro {
    flex: 0 0 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .featured-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
  }

  .featured-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    transition: all 0.25s ease;
  }

  .featured-dot.active {
    width: 18px;
    border-radius: 99px;
    background: var(--accent-neon-red);
    box-shadow: 0 0 6px rgba(255, 45, 85, 0.6);
  }
}

/* Hide dots on desktop */
@media (min-width: 769px) {
  .featured-dots {
    display: none;
  }
}
