/* ==========================================================================
   Türksat TV & Radyo Frekans Rehberi - Modern Design System
   ========================================================================== */

:root {
  /* Color Palette - Dark Theme (Default) */
  --bg-base: #0a0e1a;
  --bg-surface: #111827;
  --bg-surface-elevated: #1a2234;
  --bg-surface-hover: #222d42;
  --bg-glass: rgba(17, 24, 39, 0.75);
  --bg-glass-card: rgba(26, 34, 52, 0.65);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-bright: rgba(56, 189, 248, 0.4);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-faint: #64748b;
  --text-inverse: #0f172a;

  /* Accent Colors */
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-green-bg: rgba(16, 185, 129, 0.12);
  --accent-amber: #f59e0b;
  --accent-amber-bg: rgba(245, 158, 11, 0.12);
  --accent-purple: #8b5cf6;
  --accent-purple-bg: rgba(139, 92, 246, 0.12);
  --accent-red: #ef4444;

  /* Badges */
  --badge-4k-bg: linear-gradient(135deg, #d97706, #f59e0b);
  --badge-4k-text: #ffffff;
  --badge-hd-bg: rgba(59, 130, 246, 0.15);
  --badge-hd-text: #60a5fa;
  --badge-sd-bg: rgba(100, 116, 139, 0.2);
  --badge-sd-text: #cbd5e1;
  --badge-rd-bg: rgba(168, 85, 247, 0.15);
  --badge-rd-text: #c084fc;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.2);

  /* Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-card: rgba(255, 255, 255, 0.9);

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.15);
  --border-bright: rgba(6, 182, 212, 0.6);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-faint: #94a3b8;
  --text-inverse: #ffffff;

  --accent-cyan-glow: rgba(6, 182, 212, 0.15);
  --accent-green-bg: rgba(16, 185, 129, 0.1);
  --accent-amber-bg: rgba(245, 158, 11, 0.1);
  --accent-purple-bg: rgba(139, 92, 246, 0.1);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.15);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(ellipse 60% 40% at 50% -20%, rgba(6, 182, 212, 0.15), transparent 70%),
    radial-gradient(circle at 90% 20%, rgba(59, 130, 246, 0.08), transparent 40%);
  background-attachment: fixed;
}

/* ==========================================================================
   Header & Brand
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
  transition: var(--transition);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  margin: 0 auto;
}

.brand-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #ff7a00, #ea580c);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 122, 0, 0.35);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 28px;
  height: 28px;
}

.brand-title {
  font-family: 'Myriad Pro', Myriad, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}

.brand-orange {
  color: #ff8800;
  font-weight: 700;
}

.brand-net {
  font-style: italic;
  font-weight: 600;
  font-size: 0.96em;
  letter-spacing: -0.01em;
  margin-left: 1px;
}

[data-theme="dark"] .brand-net {
  color: #ffffff;
  background: transparent;
}

[data-theme="light"] .brand-net {
  color: #000000;
  background: transparent;
}

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

/* ==========================================================================
   Buttons & Inputs
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #0891b2);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--bg-surface-elevated);
  border-color: var(--border-medium);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
  color: var(--text-main);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

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

.btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 0.74rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
}

.btn-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-toggle.active {
  background: var(--accent-cyan);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-cyan-glow);
}

.btn-toggle:not(.active):hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
}

.select-control {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 8px 12px;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.select-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

.select-sm {
  padding: 4px 8px;
  font-size: 0.8rem;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  width: 100%;
}

.dropdown-item:hover {
  background: var(--bg-surface-hover);
  color: var(--accent-cyan);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.badge-pill {
  border-radius: var(--radius-full);
  background: var(--accent-cyan);
  color: #fff;
  padding: 1px 7px;
  font-size: 0.72rem;
  font-family: var(--font-body);
}

.badge-4k {
  background: var(--badge-4k-bg);
  color: var(--badge-4k-text);
  box-shadow: 0 1px 6px rgba(245, 158, 11, 0.4);
}

.badge-hd {
  background: var(--badge-hd-bg);
  color: var(--badge-hd-text);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-sd {
  background: var(--badge-sd-bg);
  color: var(--badge-sd-text);
}

.badge-rd {
  background: var(--badge-rd-bg);
  color: var(--badge-rd-text);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-green {
  background: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-amber {
  background: var(--accent-amber-bg);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.hero-category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px;
  margin-bottom: 8px;
  align-items: center;
}

.hero-cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full, 9999px);
  text-decoration: none;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.hero-cat-tag:hover {
  color: #ff8800;
  background: rgba(255, 136, 0, 0.09);
  border-color: rgba(255, 136, 0, 0.35);
  transform: translateY(-1px);
}

.cat-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff8800;
  box-shadow: 0 0 6px rgba(255, 136, 0, 0.6);
  flex-shrink: 0;
}

/* ==========================================================================
   Main App Layout
   ========================================================================== */
.app-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Hero Section */
.hero-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card.active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.icon-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}
.icon-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}
.icon-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}
.icon-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}
.icon-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-sub {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 2px;
}

/* Search Container */
.search-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.search-row .search-wrapper,
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 220px;
  width: 100%;
}

.search-addon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-select {
  height: 42px;
  padding: 0 34px 0 14px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  appearance: none;
  -webkit-appearance: none;
}

.search-select:hover {
  border-color: rgba(255, 122, 0, 0.45);
}

.search-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow), var(--shadow-md);
}

.search-row .view-mode-toggle {
  height: 42px;
  padding: 3px;
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.search-row .btn-toggle {
  height: 34px;
  width: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.search-row .btn-toggle svg {
  width: 16px;
  height: 16px;
}

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

.search-icon svg {
  width: 18px;
  height: 18px;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 72px 0 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow), var(--shadow-md);
}

.search-input::placeholder {
  color: var(--text-faint);
  font-size: 0.85rem;
}

.search-clear {
  position: absolute;
  right: 44px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-full);
}

.search-clear svg {
  width: 15px;
  height: 15px;
}

.search-clear:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
}

.search-kbd-hint {
  position: absolute;
  right: 14px;
  pointer-events: none;
}

.search-kbd-hint kbd {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 1px 6px;
}

/* Quick Pills */
.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-body);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.pill:hover:not(.active) {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: rgba(255, 122, 0, 0.35);
}

.pill.active {
  background: linear-gradient(135deg, #ff7a00, #ea580c);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 14px rgba(255, 122, 0, 0.45);
}

.pill:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Toolbar & Filter Controls
   ========================================================================== */
.toolbar-section {
  background: var(--bg-glass-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.toolbar-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sort-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.view-mode-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.results-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  gap: 10px;
}

.active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-main);
}

.filter-chip button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 1rem;
  line-height: 1;
}

.filter-chip button:hover {
  color: var(--accent-red);
}

/* ==========================================================================
   Table View
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.channel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.channel-table thead {
  position: sticky;
  top: 0;
  background: var(--bg-surface-elevated);
  z-index: 10;
}

.channel-table th {
  padding: 12px 14px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-medium);
  white-space: nowrap;
  user-select: none;
}

.channel-table th[data-sort] {
  cursor: pointer;
  transition: var(--transition);
}

.channel-table th[data-sort]:hover {
  color: var(--accent-cyan);
}

.channel-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.channel-table tbody tr {
  cursor: pointer;
  transition: var(--transition);
}

.channel-table tbody tr:hover {
  background: var(--bg-surface-hover);
}

.col-fav {
  width: 36px;
  text-align: center;
}

.col-id {
  width: 50px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.col-logo {
  width: 56px;
  text-align: center;
  padding: 6px 4px !important;
}

.channel-logo-box {
  width: 44px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  vertical-align: middle;
}

[data-theme="light"] .channel-logo-box {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.channel-row:hover .channel-logo-box {
  border-color: rgba(255, 136, 0, 0.45);
  transform: scale(1.06);
}

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

.channel-logo-empty {
  background: rgba(255, 255, 255, 0.04);
}

.channel-logo-fallback {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.channel-logo-fallback.is-radio {
  font-size: 0.85rem;
}

.col-name {
  font-weight: 600;
  min-width: 160px;
}

.channel-title {
  cursor: pointer;
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}

.channel-title:hover {
  color: var(--accent-cyan);
}

.col-type {
  width: 90px;
  text-align: center;
}

.badge-tv {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.35);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.badge-gray {
  background: var(--bg-surface-elevated);
  color: var(--text-faint);
  border: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.col-platforms {
  min-width: 250px;
}

.plat-badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.plat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-family: var(--font-mono);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  white-space: nowrap;
}

.plat-badge .plat-name {
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: 0.7rem;
}

.plat-badge .plat-num {
  font-weight: 700;
  color: var(--text-main);
}

.plat-badge.plat-digiturk {
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.08);
}
.plat-badge.plat-digiturk .plat-num {
  color: #c084fc;
}

.plat-badge.plat-dsmart {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
}
.plat-badge.plat-dsmart .plat-num {
  color: #60a5fa;
}

.plat-badge.plat-kablo {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.08);
}
.plat-badge.plat-kablo .plat-num {
  color: #22d3ee;
}

.plat-badge.plat-tivibu {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}
.plat-badge.plat-tivibu .plat-name {
  color: #f87171;
  font-weight: 600;
}
.plat-badge.plat-tivibu .plat-num {
  color: #f87171;
}

.plat-badge.plat-tvplus {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}
.plat-badge.plat-tvplus .plat-num {
  color: #fbbf24;
}

.plat-badge.plat-tabii {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}
.plat-badge.plat-tabii .plat-name {
  color: #34d399;
  font-weight: 600;
}
.plat-badge.plat-tabii .plat-num {
  color: #34d399;
}

.plat-badge.plat-sat {
  border-color: rgba(14, 165, 233, 0.4);
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  font-weight: 600;
}
.plat-badge.plat-sat .plat-name {
  color: #38bdf8;
  font-weight: 600;
}

.plat-badge.plat-none {
  opacity: 0.6;
  font-size: 0.72rem;
  font-family: var(--font-body);
}

.col-sat {
  font-weight: 600;
  min-width: 170px;
}

.sat-freq-link {
  text-decoration: none;
  display: inline-flex;
}

.sat-freq-link .badge {
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sat-freq-link:hover .badge {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

.card-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 10px 0;
}

.card-header-main .channel-logo-box {
  width: 52px;
  height: 38px;
  flex-shrink: 0;
}

.card-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.star-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.star-btn:hover {
  transform: scale(1.2);
  color: #fbbf24;
}

.star-btn.active {
  color: #f59e0b;
}

.table-action-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-table-action {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-table-action:hover {
  background: var(--bg-surface-hover);
  color: var(--accent-cyan);
  border-color: var(--border-medium);
}

/* ==========================================================================
   Card Grid View
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.channel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.channel-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition);
}

.card-name:hover {
  color: var(--accent-cyan);
}

.card-freq-block {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.card-freq-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.card-freq-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: #38bdf8;
}

.card-freq-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-detail-item {
  display: flex;
  justify-content: space-between;
}

.card-package {
  font-size: 0.75rem;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.empty-icon {
  color: var(--text-faint);
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
}

.empty-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 400px;
}

/* Pagination */
.pagination-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 4px;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.per-page-select {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  background: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
}

.page-btn.active {
  background: var(--accent-cyan);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px var(--accent-cyan-glow);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.modal-lg {
  max-width: 820px;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

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

.modal-channel-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

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

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* Tuning Metrics Grid in Modal */
.tuning-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.tuning-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.tuning-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.tuning-value {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.highlight-cyan {
  color: #38bdf8 !important;
}

.highlight-blue {
  color: #60a5fa !important;
}

.highlight-green {
  color: #10b981 !important;
}

.section-subtitle {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.param-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.param-table td:first-child {
  color: var(--text-muted);
  width: 40%;
}

.code-box-wrapper {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.code-box {
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: #38bdf8;
  margin: 0;
}

.tuning-steps {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 0.85rem;
}

.steps-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  margin-top: 6px;
}

.steps-list li strong {
  color: var(--text-main);
}

/* Guide Modal Custom Styles */
.guide-banner {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.guide-banner-icon {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.guide-banner h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #38bdf8;
}

.guide-banner p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.guide-source-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  margin-top: 14px;
}

.guide-source-text {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.guide-source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-cyan);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

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

.network-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.network-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.network-card:hover {
  border-color: var(--border-bright);
}

.network-card.recommended {
  border-color: rgba(6, 182, 212, 0.45);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.07) 0%, var(--bg-surface-elevated) 100%);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.network-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.network-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.network-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.network-badge.recommended {
  background: rgba(6, 182, 212, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.network-badge.east {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.network-badge.alt {
  background: rgba(100, 116, 139, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.network-params {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-muted);
}

.guide-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface-elevated);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  text-align: left;
}

.guide-table th {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-medium);
  white-space: nowrap;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guide-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  white-space: nowrap;
  vertical-align: middle;
}

.guide-table tr:last-child td {
  border-bottom: none;
}

.guide-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.coverage-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
}

.coverage-pill.west {
  background: rgba(6, 182, 212, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.coverage-pill.east {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.steps-flow {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--accent-cyan);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.step-text strong {
  color: var(--text-main);
}

.tkgs-notice {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--accent-amber);
  margin-top: 12px;
}

.tkgs-notice p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.45;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px var(--accent-cyan-glow);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastFadeOut 0.3s 2.7s forwards;
  pointer-events: auto;
}

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

@keyframes toastFadeOut {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 24px 0;
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 100%;
}

.footer-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-title-sm {
  font-family: 'Myriad Pro', Myriad, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: baseline;
}

.footer-net {
  font-style: italic;
  font-weight: 600;
  color: var(--text-main);
  margin-left: 1px;
}

.footer-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ==========================================================================
   Utility & Responsive Media Queries
   ========================================================================== */
.hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .tuning-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .network-cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-main {
    padding: 16px;
    gap: 18px;
  }
  
  .header-container,
  .footer-container {
    padding: 0 16px;
  }

  .brand-subtitle {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-input {
    font-size: 0.95rem;
    padding: 14px 70px 14px 46px;
  }

  .search-kbd-hint {
    display: none;
  }

  .search-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .search-row .search-wrapper {
    flex: 1 1 100%;
    width: 100%;
  }

  .search-addon {
    flex: 1;
    min-width: 130px;
  }

  .search-addon .search-select {
    width: 100%;
  }

  .toolbar-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .view-controls {
    margin-left: 0;
    justify-content: space-between;
  }

  .pagination-container {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .header-actions span {
    display: none;
  }
  .filter-controls {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================================
   Footer & Theme Selector at Bottom
   ========================================================================== */
.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 28px 0;
  transition: var(--transition);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand .brand-title-sm {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-theme-selector {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface-elevated);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.theme-selector-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.theme-switch-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.theme-choice-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.theme-choice-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.theme-choice-btn.active {
  background: linear-gradient(135deg, #ff7a00, #ea580c);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 122, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.15);
}

.footer-stats {
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 16px;
  }
  .footer-theme-selector {
    order: -1;
  }
}

/* Print Stylesheet */
@media print {
  .app-header, .hero-section, .toolbar-section, .pagination-container, .modal, .toast-container, .col-actions, .col-fav {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .channel-table {
    border: 1px solid #ccc;
  }
  .channel-table th, .channel-table td {
    color: #000000 !important;
    border-color: #ddd !important;
  }
}
