/* SciThek – Public Frontend Styles */

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

:root {
  --color-bg: #0b0f19;
  --color-surface: #141a2a;
  --color-border: #1e293b;
  --color-text: #e2e8f0;
  --color-text-secondary: #94a3b8;
  --color-accent: #3b82f6;
  --color-accent-hover: #60a5fa;
  --color-success: #22c55e;
  --color-success-bg: rgba(34,197,94,0.1);
  --font: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 0.5rem;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --max-width: 1600px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; color-scheme: dark; }

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  background: #0f172a;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* ── Header Filter Slot (desktop: hamburger in header) ── */
.header-filter-slot { display: none; flex-shrink: 0; }
@media (min-width: 769px) {
  .header-filter-slot { display: flex; align-items: center; }
  .header-filter-slot .filter-hamburger { display: flex !important; }
}

.logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; flex-shrink: 0; }
.logo img { height: 34px; width: 34px; border-radius: 8px; }
.logo-text { font-size: 1.1rem; font-weight: 700; color: #fff; }
.logo-text span { color: #60a5fa; }

.header-tagline {
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 0.45rem 0.75rem 0.45rem 2.25rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.06);
  color: #fff;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.header-search input::placeholder {
  color: #64748b;
  font-style: italic;
}

.header-search input:focus {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

.header-search input:focus::placeholder {
  font-style: normal;
}

.smart-search-badge {
  display: none;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: #94a3b8;
  padding: 0.15rem 0.5rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.corrected-query-link {
  background: none;
  border: none;
  color: var(--color-accent);
  font-weight: 600;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}
.corrected-query-link:hover { color: var(--color-accent-hover); }

/* ── Search Term Pills (smart search grouping) ── */
.search-term-pills {
  display: none;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0;
}

.search-term-pill {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.search-term-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.search-term-pill.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.search-term-pill.original {
  border-color: var(--color-accent);
  font-weight: 600;
}

.search-term-pill.original.active {
  background: var(--color-accent);
  color: #fff;
}

/* ── Search Autocomplete Dropdown ── */
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  max-height: 420px;
  overflow-y: auto;
  z-index: 9999;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}
.search-dropdown::-webkit-scrollbar { width: 6px; }
.search-dropdown::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

.sd-group-label {
  padding: 0.45rem 0.85rem 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sd-item {
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  transition: background 0.1s;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.sd-item:hover, .sd-item.sd-active {
  background: rgba(59,130,246,0.15);
}
.sd-item-title {
  font-size: 0.85rem;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sd-item-title mark {
  background: rgba(59,130,246,0.3);
  color: #fff;
  border-radius: 2px;
  padding: 0 1px;
}
.sd-meta {
  font-size: 0.7rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sd-full-search {
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--color-accent);
  font-size: 0.85rem;
  flex-direction: row;
}
.sd-empty {
  padding: 1rem;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}

.matched-channel-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.matched-channel-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
a.matched-channel-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
}
a.matched-channel-title:hover {
  color: var(--color-accent);
}
.matched-channel-meta {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}
.matched-channel-show-all {
  font-size: 0.8rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  margin-left: auto;
}
.matched-channel-show-all:hover {
  text-decoration: underline;
}

/* Channel filter bar (drill-into-channel mode) */
.channel-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.channel-filter-back {
  font-size: 0.85rem;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
}
.channel-filter-back:hover {
  text-decoration: underline;
}
.channel-filter-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}
.matched-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.match-tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(59,130,246,0.1);
  color: var(--color-accent);
  font-size: 0.65rem;
  font-weight: 500;
}

.header-search .search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.85rem;
  pointer-events: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  font-size: 0.9rem;
}

.nav-links a { color: #94a3b8; }
.nav-links a:hover, .nav-links a.active { color: #fff; text-decoration: none; }

.nav-links a { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.nav-count:empty { display: none; }
.nav-count {
  font-size: 0.6rem;
  font-weight: 400;
  opacity: 0.5;
}

/* ── UI Language Switch ───────────────────────────────────────────────────── */
/* ── Language Selector Dropdown ────────────────────────────────────────────── */
.lang-selector {
  position: relative;
  margin-left: 0.75rem;
  flex-shrink: 0;
}

.lang-selector-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
  font-family: var(--font);
}

.lang-selector-btn:hover {
  border-color: var(--color-text-secondary);
  color: var(--color-text);
}

.lang-selector-btn .lang-globe {
  font-size: 0.9rem;
  line-height: 1;
}

.lang-selector-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 60;
  min-width: 200px;
  padding: 0.5rem 0;
}

.lang-selector-menu.open {
  display: block;
}

.lang-menu-section {
  padding: 0.4rem 0.75rem 0.25rem;
}

.lang-menu-section + .lang-menu-section {
  border-top: 1px solid var(--color-border);
  margin-top: 0.25rem;
  padding-top: 0.5rem;
}

.lang-menu-heading {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0;
  user-select: none;
}
.lang-menu-heading::after {
  content: '\25B6';
  font-size: 0.55rem;
  transition: transform 0.2s;
}
.lang-menu-heading.open::after {
  transform: rotate(90deg);
}
.lang-menu-body {
  display: none;
  padding-top: 0.3rem;
}
.lang-menu-body.open {
  display: block;
}

.lang-menu-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.2rem;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--color-text);
  border-radius: 4px;
  transition: background 0.12s;
}

.lang-menu-option:hover {
  background: rgba(255,255,255,0.06);
}

.lang-menu-option input[type="radio"],
.lang-menu-option input[type="checkbox"] {
  accent-color: var(--color-accent);
  width: 14px;
  height: 14px;
}

/* Scrollable container showing ~6 items */
.lang-menu-scroll {
  max-height: 145px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.lang-menu-scroll::-webkit-scrollbar { width: 5px; }
.lang-menu-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.country-count { margin-left: auto; font-size: 0.7rem; color: var(--color-text-secondary); }

/* (hero section removed – producer types moved to sidebar) */

/* ── Producer Pills (sidebar) ─────────────────────────────────────────────── */
.producer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0;
}

.producer-tab-badge:empty { display: none; }
.producer-tab-badge {
  font-size: 0.65rem;
  background: rgba(59,130,246,0.2);
  color: var(--color-accent);
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  margin-left: 0.2rem;
}

.producer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.45);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.producer-pill:hover {
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.12);
}

.producer-pill.active {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.45);
  color: #fff;
}

.producer-pill .producer-emoji {
  font-size: 0.85rem;
  line-height: 1;
}

.producer-pill .producer-count {
  font-size: 0.65rem;
  opacity: 0.7;
  font-weight: 400;
}

/* ── Search Bar ────────────────────────────────────────────────────────────── */
.search-bar {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.75rem;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: rgba(255,255,255,0.12);
  color: #fff;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.search-bar input::placeholder { color: rgba(255,255,255,0.6); }
.search-bar input:focus {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  pointer-events: none;
}

/* ── Main Layout (Sidebar + Content) ──────────────────────────────────────── */
.main-layout {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  flex: 1;
}

/* Legacy container for non-sidebar pages */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  flex: 1;
}

/* ── Sidebar Hamburger (in header) ────────────────────────────────────────── */
.sidebar-hamburger {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s;
}
.sidebar-hamburger:hover { border-color: var(--color-accent); }
.sidebar-hamburger span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--color-text-secondary);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.sidebar-hamburger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.sidebar-hamburger.open span:nth-child(2) { opacity: 0; }
.sidebar-hamburger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ── Channel Panel (dropdown below header) ────────────────────────────────── */
.channel-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  background: #0f172a;
  border-bottom: 1px solid var(--color-border);
  transition: max-height 0.3s ease, opacity 0.25s ease;
  opacity: 0;
  z-index: 45;
}
.channel-panel.panel-open {
  max-height: 60vh;
  overflow-y: auto;
  opacity: 1;
}
.channel-panel .sidebar-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1.5rem 0.5rem;
}
.channel-panel .channel-list,
.channel-panel .producer-list,
.channel-panel .hidden-channel-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.15rem 1rem;
  max-height: 40vh;
  overflow-y: auto;
}
.channel-panel::-webkit-scrollbar { width: 4px; }
.channel-panel::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }

/* Panel backdrop */
.panel-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 39;
}
.panel-backdrop.visible { display: block; }

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0.5rem;
}

.sidebar-tabs {
  display: flex;
  gap: 0.15rem;
}

.sidebar-tab {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.03em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.sidebar-tab:hover {
  color: var(--color-text);
  background: rgba(255,255,255,0.05);
}

.sidebar-tab.active {
  color: var(--color-accent);
  background: rgba(59,130,246,0.1);
}

.sidebar-tab .hidden-count:empty,
.sidebar-tab .tab-badge:empty { display: none; }
.sidebar-tab .hidden-count,
.sidebar-tab .tab-badge {
  font-size: 0.65rem;
  background: rgba(148,163,184,0.2);
  color: var(--color-text-secondary);
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  margin-left: 0.2rem;
}
.sidebar-tab .hidden-count {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
}

.sidebar-header h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Hidden channel list items */
.hidden-channel-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.hidden-channel-item .channel-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unhide-btn {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.unhide-btn:hover {
  border-color: var(--color-success);
  color: var(--color-success);
}

.hidden-empty {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  padding: 1rem 0.5rem;
  text-align: center;
  opacity: 0.6;
}

.sidebar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sidebar-toggle-all {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.sidebar-toggle-all:hover { border-color: var(--color-accent); color: var(--color-accent); }

.channel-list { display: flex; flex-direction: column; gap: 2px; }
.sidebar-sentinel { height: 1px; flex-shrink: 0; }

.channel-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.12s, opacity 0.2s;
  user-select: none;
}

.channel-item:hover { background: rgba(255,255,255,0.05); }

.channel-item.disabled {
  opacity: 0.4;
}

.channel-item input[type="checkbox"] {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.channel-item-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-border);
}

.channel-item-avatar img { width: 100%; height: 100%; object-fit: cover; }

.channel-item-avatar a { display: block; width: 100%; height: 100%; }

.channel-item-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  background: var(--color-bg);
}

.channel-item-info {
  flex: 1;
  min-width: 0;
}

.channel-item-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.channel-item-count {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  line-height: 1.2;
}

.loading-small {
  padding: 1rem 0.5rem;
  color: var(--color-text-secondary);
  font-size: 0.8rem;
}

/* Old .sidebar-mobile-toggle removed – replaced by channel-panel */

/* ── SEO Hero ─────────────────────────────────────────────────────────────── */
.seo-hero {
  padding: 20px 24px 12px;
}
.seo-hero h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #e8e8e8;
  line-height: 1.4;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .seo-hero { padding: 14px 16px 10px; }
  .seo-hero h1 { font-size: 1.15rem; white-space: normal; }
}

/* ── Content Area ─────────────────────────────────────────────────────────── */
.content-area { flex: 1; min-width: 0; }

/* ── Filter Bar ────────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}

.filter-bar::-webkit-scrollbar { display: none; }

@media (min-width: 769px) {
  .filter-bar { flex-wrap: wrap; overflow-x: visible; }
}

.filter-right {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.apex-slider-wrap {
  display: none;
  align-items: center;
  gap: 0.35rem;
}
.apex-slider-wrap.visible {
  display: flex;
}
.apex-slider {
  width: 120px;
  height: 4px;
  accent-color: var(--color-accent);
  cursor: pointer;
}
.apex-slider-val {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  min-width: 1.5rem;
  text-align: right;
}

.filter-pill {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-pill:hover { border-color: var(--color-accent); color: var(--color-accent); }
.filter-pill.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.sort-select {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  color-scheme: dark;
}

/* ── Subtopic Bar (Level 2) ──────────────────────────────────────────────── */
.subtopic-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.subtopic-pill {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  opacity: 0.55;
}

.subtopic-pill:hover { border-color: var(--color-accent); color: var(--color-accent); opacity: 1; }
.subtopic-pill.active {
  background: rgba(59,130,246,0.15);
  color: var(--color-accent);
  border-color: rgba(59,130,246,0.4);
  opacity: 1;
}

/* ── Sticky Filter Wrapper ─────────────────────────────────────────────────── */
.sticky-filter-wrapper {
  position: fixed;
  left: 0;
  right: 0;
  top: 0; /* JS sets to header height */
  z-index: 49;
  background: var(--color-bg);
  transition: box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--color-border);
  padding: 0.5rem 1.5rem;
}

.sticky-filter-wrapper.is-sticky {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--color-border);
}

.sticky-filter-wrapper.is-sticky .filter-bar {
  display: contents;
  margin-bottom: 0;
}

/* Hamburger replaces topic pills in fixed bar */
.sticky-filter-wrapper.is-sticky .filter-pill[data-topic] { display: none; }
.sticky-filter-wrapper.is-sticky .filter-hamburger { display: flex !important; order: 1; }
.sticky-filter-wrapper.is-sticky .subtopic-bar { display: none !important; }

.sticky-filter-wrapper.is-sticky .status-toggle {
  display: none;
}

.sticky-filter-wrapper.is-sticky .filter-right {
  margin-left: auto;
  flex-shrink: 0;
  order: 3;
}

/* Desktop: hide sticky wrapper, show sort-only bar */
@media (min-width: 769px) {
  .sticky-filter-wrapper { display: none !important; }
  .desktop-sort-bar {
    position: sticky;
    top: 0; /* JS sets to header height */
    z-index: 49;
    background: var(--color-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  .desktop-sort-bar .sort-select { font-size: 0.85rem; }
  .desktop-sort-bar { justify-content: flex-end; }
}
@media (max-width: 768px) {
  .desktop-sort-bar { display: none !important; }
}

/* ── Filter Hamburger Button ──────────────────────────────────────────────── */
.filter-hamburger {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-hamburger:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.filter-hamburger.has-active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.filter-hamburger-icon { font-size: 1rem; line-height: 1; }

/* ── Filter Hamburger Dropdown ────────────────────────────────────────────── */
.filter-hamburger-dropdown {
  display: none;
  position: fixed;
  z-index: 50;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  max-height: 60vh;
  overflow-y: auto;
  min-width: 280px;
  max-width: 90vw;
}

.filter-dropdown-status {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.filter-dropdown-status .status-toggle-label {
  flex: 1;
  text-align: center;
}

.filter-dropdown-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.filter-dropdown-subtopics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}

/* ── Video Grid ────────────────────────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1100px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .video-grid { grid-template-columns: 1fr; } }

/* ── Video Card Animations ────────────────────────────────────────────────── */
.video-card {
  animation: fadeIn 0.2s ease-out;
}

.video-grid.filtering .video-card {
  animation: none;
}

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

/* Old mobile sidebar/search overrides removed – handled in Mobile Overrides section below */

/* ── Video Card ────────────────────────────────────────────────────────────── */
.video-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.video-card a { color: inherit; text-decoration: none; }

.card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-border);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-thumb .preview-img,
.ticker-card-thumb .preview-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  object-fit: cover;
}

.duration-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.card-body {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-channel {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.hide-channel-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  opacity: 0.7;
  transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.hide-channel-btn:hover {
  opacity: 1;
  background: rgba(239,68,68,0.15);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.topic-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(59,130,246,0.15);
  color: var(--color-accent-hover);
  font-size: 0.7rem;
  font-weight: 500;
}

.country-badge {
  display: inline-block;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  background: rgba(120,120,120,0.15);
  color: var(--color-text-muted, #888);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  vertical-align: middle;
  line-height: 1.2;
}

.country-flag {
  display: inline-block;
  width: 16px;
  height: 12px;
  border-radius: 1px;
  object-fit: cover;
  vertical-align: middle;
  flex-shrink: 0;
}

.quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: var(--color-success);
  font-weight: 600;
  margin-left: auto;
  background: var(--color-success-bg);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

.quality-badge-news {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: #e8a838;
  font-weight: 600;
  margin-left: auto;
  background: rgba(232, 168, 56, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

.quality-badge-indexed {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: #60a5fa;
  font-weight: 600;
  margin-left: auto;
  background: rgba(96, 165, 250, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

.quality-badge-neutral {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  font-weight: 600;
  margin-left: auto;
  background: rgba(255,255,255,0.06);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

/* ── Status Toggle ────────────────────────────────────────────────────────── */
.status-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.status-toggle-label {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: all 0.15s;
}

.status-toggle-label:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.status-toggle-label.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.status-toggle-label.active[data-status="verified"] {
  background: var(--color-success);
  border-color: var(--color-success);
}

/* ── Top Videos Section ────────────────────────────────────────────────────── */
.top-videos-section {
  background: linear-gradient(135deg, rgba(251,191,36,0.08) 0%, rgba(245,158,11,0.04) 100%);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.25rem;
  margin-bottom: 1.25rem;
}

.top-videos-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-videos-title::before {
  content: '\1F3C6';
  font-size: 1.1rem;
}

.top-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.top-videos-grid .video-card {
  border-color: rgba(251,191,36,0.25);
}

.top-videos-grid .video-card:hover {
  border-color: rgba(251,191,36,0.5);
}

.rank-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(251,191,36,0.9);
  color: #000;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  z-index: 2;
  line-height: 1.3;
}

@media (max-width: 1100px) {
  .top-videos-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .top-videos-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .top-videos-section {
    padding: 0.75rem;
    margin-bottom: 1rem;
  }
}

/* ── Scroll Loader (infinite scroll) ───────────────────────────────────────── */
.scroll-loader {
  padding: 1.5rem 0;
}

/* ── Video Detail Page ─────────────────────────────────────────────────────── */
.video-detail {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}

.video-main {
  min-width: 0;
}

.video-sidebar {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 0.25rem;
}

.video-sidebar::-webkit-scrollbar { width: 4px; }
.video-sidebar::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

.sidebar-header {
  font-size: 0.95rem;
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.sidebar-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  padding: 0.4rem;
  transition: background 0.15s;
  border-left: 3px solid rgba(234, 179, 8, 0.4);
  background: rgba(234, 179, 8, 0.04);
}

.sidebar-card:hover {
  background: rgba(234, 179, 8, 0.09);
}

.sidebar-thumb {
  position: relative;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  aspect-ratio: 16/9;
}

.sidebar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.sidebar-card-title {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-text);
}

.sidebar-card-channel {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.sidebar-card-meta {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  opacity: 0.7;
}

.sidebar-loading {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  padding: 2rem 0;
}

.sidebar-load-more {
  width: 100%;
  padding: 0.6rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sidebar-load-more:hover {
  background: var(--color-border);
  color: var(--color-text);
}

/* ── Wikipedia sidebar cards ── */
.sidebar-wiki-card {
  border-left: 3px solid rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.05);
}
.sidebar-wiki-card:hover {
  background: rgba(168, 85, 247, 0.1);
}
.sidebar-wiki-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a855f7;
  margin-bottom: 0.15rem;
}
.sidebar-wiki-extract {
  font-size: 0.72rem;
  color: var(--color-text-secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wiki-icon-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(168, 85, 247, 0.08);
  border-radius: calc(var(--radius) - 2px);
}
.wiki-icon-placeholder img {
  width: 48px;
  height: 48px;
  opacity: 0.7;
}

/* ── Paper sidebar cards ── */
.sidebar-paper-card {
  border-left: 3px solid var(--color-success, #22c55e);
  background: rgba(34, 197, 94, 0.05);
}
.sidebar-paper-card:hover {
  background: rgba(34, 197, 94, 0.1);
}
.sidebar-paper-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-success, #22c55e);
  margin-bottom: 0.15rem;
}
.sidebar-paper-meta {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-paper-abstract {
  font-size: 0.72rem;
  color: var(--color-text-secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.paper-icon-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  font-size: 2rem;
  border-radius: calc(var(--radius) - 2px);
}

@media (max-width: 1024px) {
  .video-detail {
    grid-template-columns: 1fr;
  }
  .video-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: 1.5rem;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.quality-reasons {
  background: var(--color-success-bg);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.quality-reasons h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-success);
  margin-bottom: 0.5rem;
}

.quality-reasons ul {
  list-style: none;
  padding: 0;
}

.quality-reasons li {
  padding: 0.2rem 0;
  font-size: 0.9rem;
  color: #86efac;
}

.quality-reasons li::before {
  content: "\2713 ";
  color: var(--color-success);
  font-weight: 700;
}

/* Neutral reasons (needs_review / rejected) */
.quality-reasons-neutral {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.quality-reasons-neutral h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

.quality-reasons-neutral ul { list-style: none; padding: 0; }

.quality-reasons-neutral li {
  padding: 0.2rem 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.quality-reasons-neutral li::before {
  content: "\2022 ";
  color: var(--color-text-secondary);
  font-weight: 700;
}

/* ── Channel Evaluation Box ── */
.channel-eval-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}
.channel-eval-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.channel-eval-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.channel-eval-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}
.channel-eval-name {
  font-weight: 600;
  font-size: 1rem;
}
.channel-eval-verdict {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 0.5rem;
}
.channel-eval-verdict.v-trusted { background: #2e7d3233; color: #2e7d32; }
.channel-eval-verdict.v-verified { background: #1565c033; color: #1565c0; }
.channel-eval-verdict.v-promising { background: #f9a82533; color: #b8860b; }
.channel-eval-verdict.v-news { background: #e6851033; color: #e68510; }
.channel-eval-verdict.v-rejected { background: #c6282833; color: #c62828; }
.channel-eval-verdict.v-durchgefallen { background: #c6282833; color: #c62828; }
.channel-eval-verdict.v-unknown { background: #75757533; color: #757575; }

.channel-eval-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
}
.channel-eval-stats span {
  white-space: nowrap;
}
.channel-eval-stats .eval-label {
  color: var(--color-text-secondary);
  opacity: 0.7;
}

/* Science Score Bar */
.science-score-section {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}
.science-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.science-score-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
}
.science-score-value {
  font-size: 1.1rem;
  font-weight: 700;
}
.science-score-value.score-high { color: #2e7d32; }
.science-score-value.score-mid { color: #f9a825; }
.science-score-value.score-low { color: #c62828; }

.science-score-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}
.science-score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.science-score-fill.score-high { background: #2e7d32; }
.science-score-fill.score-mid { background: #f9a825; }
.science-score-fill.score-low { background: #c62828; }

.science-criteria-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 1rem;
  font-size: 0.78rem;
}
.science-criteria-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.science-criteria-item .crit-label {
  color: var(--color-text-secondary);
}
.science-criteria-item .crit-value {
  font-weight: 600;
  min-width: 2em;
  text-align: right;
}
.science-criteria-item .crit-value.cv-high { color: #2e7d32; }
.science-criteria-item .crit-value.cv-mid { color: #f9a825; }
.science-criteria-item .crit-value.cv-low { color: #c62828; }
/* C4 inverted: high clickbait = bad */
.science-criteria-item.c4-inverted .crit-value.cv-high { color: #c62828; }
.science-criteria-item.c4-inverted .crit-value.cv-low { color: #2e7d32; }

.channel-eval-score-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.15s;
}
.channel-eval-score-btn:hover {
  background: var(--color-border);
}

.video-description {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  white-space: pre-line;
}

.video-refs {
  margin-bottom: 2rem;
}

.video-refs h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.video-refs ul {
  list-style: none;
  padding: 0;
}

.video-refs li {
  padding: 0.2rem 0;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* ── Mobile collapsible sections (details/summary) ── */
.mobile-collapse {
  margin-bottom: 1.5rem;
}
.mobile-collapse > summary {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-text);
}
.mobile-collapse > summary::-webkit-details-marker { display: none; }
.mobile-collapse > summary::after {
  content: '\25B8';
  font-size: 0.85em;
  opacity: 0.5;
  transition: transform 0.2s;
}
.mobile-collapse[open] > summary::after {
  transform: rotate(90deg);
}
@media (min-width: 769px) {
  .mobile-collapse > summary {
    pointer-events: none;
    cursor: default;
  }
  .mobile-collapse > summary::after { display: none; }
}
@media (max-width: 768px) {
  .mobile-collapse > summary {
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0.5rem;
  }
  /* Remove redundant h3 inside collapsed sections – summary IS the title */
  .mobile-collapse .quality-reasons h3,
  .mobile-collapse .quality-reasons-neutral h3 { display: none; }
}

/* YouTube Comments */
.video-comments {
  margin-bottom: 2rem;
}

.video-comments h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.comments-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comment-item {
  padding: 0.6rem 0.8rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.comment-text {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
  white-space: pre-line;
  overflow-wrap: break-word;
}

.comment-likes {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  opacity: 0.7;
  padding-top: 0.1rem;
}

.comment-likes::before {
  content: "\25B2 ";
}

/* Related Videos */
.related-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.related-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .related-grid { grid-template-columns: 1fr; } }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  background: #0f172a;
  border-top: none;
  padding: 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #64748b;
}

.footer-tagline {
  width: 100%;
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 0.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a { color: #94a3b8; }
.footer-links a:hover { color: #fff; }

/* ── Static Pages ──────────────────────────────────────────────────────────── */
.static-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.static-page h1 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.static-page h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.static-page h3 {
  font-size: 1.05rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-text-secondary);
}

.static-page p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.static-page strong {
  color: var(--color-text);
}

.static-page ul, .static-page ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.static-page li {
  margin-bottom: 0.4rem;
  color: var(--color-text-secondary);
}

.legal-note {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  color: var(--color-accent-hover);
  font-size: 0.9rem;
}

/* ── Channels Page ─────────────────────────────────────────────────────────── */
.channels-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.channels-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.channels-subtitle {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  width: 100%;
}
@media (max-width: 768px)  {
  .channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .channel-card { padding: 1.5rem 0.5rem 0.75rem; }
  .cc-badge { font-size: 0.55rem; }
  .cc-badge-flag { font-size: 0.7rem; }
  .cc-badge-producer { font-size: 0.5rem; }
  .channel-card-name { font-size: 0.8rem; }
  .channel-avatar { width: 56px; height: 56px; }
  .verdict-pill { font-size: 0.75rem; padding: 0.3rem 0.6rem; }
}
@media (max-width: 480px)  { .channel-grid { grid-template-columns: minmax(0, 1fr); } }

.channel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.75rem 0.75rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s, opacity 0.2s;
  width: 100%;
  min-width: 0;
}

.channel-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.channel-card-hidden {
  opacity: 0.55;
}
.channel-card-hidden:hover { opacity: 0.85; }
.feeds-channel-grid .channel-card-hidden {
  opacity: 1;
  border-style: dashed;
}

/* ── Corner badges ── */
.cc-corner { position: absolute; z-index: 2; }
.cc-top-left { top: 0.4rem; left: 0.4rem; display: flex; gap: 0.2rem; align-items: center; }
.cc-top-right { top: 0.4rem; right: 0.4rem; }
.cc-bottom-left { bottom: 0.4rem; left: 0.4rem; }

.cc-badge {
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
  line-height: 1.3;
}
.cc-badge:hover { transform: scale(1.1); }
.cc-badge-lang { background: rgba(99,102,241,0.15); color: #6366f1; }
.cc-badge-flag { font-size: 0.8rem; padding: 0; background: none; line-height: 1; }
.cc-badge-producer { background: rgba(156,163,175,0.12); color: var(--color-text-secondary); font-weight: 600; font-size: 0.55rem; }

.cc-hide-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  opacity: 0.5;
  transition: opacity 0.15s, background 0.15s;
  line-height: 1;
}
.cc-hide-btn:hover { opacity: 1; background: rgba(239,68,68,0.15); }

.cc-bottom-right { bottom: 0.4rem; right: 0.4rem; }

.cc-badge-verdict { background: rgba(100,116,139,0.15); color: var(--color-text-secondary); font-size: 0.7rem; cursor: pointer; }
.cc-badge-suggestion.cc-badge-pending { background: rgba(251,191,36,0.2); color: #fbbf24; font-size: 0.6rem; animation: pulse-badge 2s ease-in-out infinite; }
@keyframes pulse-badge { 0%,100% { opacity:1 } 50% { opacity:0.6 } }

.cc-verdict-dropdown { position: absolute; bottom: 100%; right: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: 0 -4px 16px rgba(0,0,0,0.5); z-index: 100; min-width: 10rem; padding: 0.25rem 0; margin-bottom: 0.25rem; }
.cc-verdict-option { display: block; width: 100%; padding: 0.4rem 0.75rem; border: none; background: none; color: var(--color-text); font-size: 0.8rem; text-align: left; cursor: pointer; white-space: nowrap; }
.cc-verdict-option:hover { background: rgba(59,130,246,0.15); }
.cc-verdict-current { color: var(--color-accent); font-weight: 600; }
.cc-verdict-suggested { color: #fbbf24; }

/* ── Admin mode ── */
.admin-toggle-btn {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.admin-toggle-btn:hover { border-color: var(--color-accent); color: var(--color-text); }
.admin-toggle-btn.active { background: rgba(59,130,246,0.15); border-color: var(--color-accent); color: var(--color-accent); }

.channels-header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cc-admin-selects {
  display: flex;
  gap: 0.3rem;
  padding: 0.4rem 0.25rem 0;
  width: 100%;
  justify-content: center;
}

.cc-admin-select {
  font-size: 0.65rem;
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  max-width: 50%;
  min-width: 0;
  transition: border-color 0.15s;
}
.cc-admin-select:hover { border-color: var(--color-accent); }
.cc-admin-select:focus { border-color: var(--color-accent); outline: none; box-shadow: 0 0 0 1px rgba(59,130,246,0.3); }

/* Reevaluation popup */
.reeval-popup {
  position: fixed;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.55);
  z-index: 1000;
  min-width: 14rem;
  max-width: 20rem;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}
.reeval-popup.reeval-done {
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}
.reeval-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: reeval-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes reeval-spin { to { transform: rotate(360deg); } }
.reeval-result-verdict {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}
.reeval-result-reason {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
}
.reeval-apply-btn {
  margin-top: 0.25rem;
  padding: 0.35rem 0.75rem;
  background: #eab308;
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
}
.reeval-apply-btn:hover { background: #ca8a04; }
.reeval-confirmed {
  font-size: 0.8rem;
  color: #16a34a;
  font-weight: 500;
}

/* Auth Modal */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  padding: 1.5rem;
  width: 20rem;
  max-width: 90vw;
}
.auth-modal h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--color-text);
}
.auth-modal input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.6rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 0.85rem;
}
.auth-modal input:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 1px rgba(59,130,246,0.3);
}
.auth-modal-error {
  font-size: 0.8rem;
  color: #ef4444;
  min-height: 1.2em;
  margin-bottom: 0.4rem;
}
.auth-modal-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.auth-modal-buttons button {
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}
.auth-modal-buttons button[type="submit"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  font-weight: 600;
}
.auth-modal-buttons button[type="submit"]:hover { opacity: 0.9; }
.auth-modal-buttons button[type="button"]:hover { border-color: var(--color-text-secondary); }

/* ── Science Score Modal ──────────────────────────────────────────────────── */
.science-score-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.science-score-modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  padding: 1.5rem;
  width: 28rem;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.science-score-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.science-score-close:hover { color: var(--color-text); }
.science-score-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.science-score-header h3 { margin: 0; font-size: 1rem; color: var(--color-text); }
.science-score-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}
.science-score-badge.cat-trusted { background: #22c55e; }
.science-score-badge.cat-verified { background: #3b82f6; }
.science-score-badge.cat-promising { background: #f59e0b; }
.science-score-badge.cat-rejected { background: #ef4444; }
.science-score-badge.cat-durchgefallen { background: #6b7280; }
.science-score-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--color-border);
  margin-bottom: 1rem;
  overflow: hidden;
}
.science-score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.science-score-criteria {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.science-score-criterion {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  padding: 0.3rem 0.5rem;
  background: var(--color-bg);
  border-radius: var(--radius);
}
.science-score-criterion span:last-child { font-weight: 600; color: var(--color-text); }
.science-score-assessment {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text);
  margin-bottom: 1rem;
}
.science-score-disclaimer {
  font-size: 0.72rem;
  color: var(--color-text-secondary);
  font-style: italic;
  border-top: 1px solid var(--color-border);
  padding-top: 0.75rem;
}
.science-score-metrics {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
}
.science-score-override {
  font-size: 0.8rem;
  color: #f59e0b;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.75rem;
}
.cc-science-btn {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.cc-science-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.cc-science-row {
  display: flex;
  justify-content: center;
  padding-top: 0.35rem;
}

.cc-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  width: 100%;
}
.cc-link:hover { text-decoration: none; }

.channel-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 0.5rem;
  background: var(--color-border);
  flex-shrink: 0;
}

.channel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  background: var(--color-bg);
}

.channel-card-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.channel-card-count {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.15rem;
}

.channel-card-subs {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  opacity: 0.8;
}

/* ── Channel Verdict Filter ────────────────────────────────────────────────── */
.channel-verdict-filter {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.verdict-pill {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  min-width: 6rem;
  text-align: center;
}
.verdict-pill:hover { border-color: var(--color-accent); color: var(--color-accent); }
.verdict-pill.active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.verdict-pill.active[data-group="excluded"] { background: #dc2626; border-color: #dc2626; }
.verdict-pill.active[data-group="unverified"] { background: #d97706; border-color: #d97706; }
.verdict-pill.active[data-group="news"] { background: #3b82f6; border-color: #3b82f6; }
.verdict-pill.active[data-group="hidden"] { background: #6b7280; border-color: #6b7280; }

.hide-all-btn {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.hide-all-btn:hover { border-color: #dc2626; color: #dc2626; }

.add-channel-inline {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-left: auto;
}
.add-channel-inline input {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.82rem;
  width: 220px;
}
.add-channel-inline input:focus { outline: 2px solid var(--color-accent); border-color: transparent; }
.add-channel-btn {
  padding: 0.4rem 0.9rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.add-channel-btn:hover { background: #1d4ed8; }
.add-channel-btn:disabled { background: #93c5fd; cursor: wait; }
.add-channel-btn.countdown-active {
  background: #334155;
  font-variant-numeric: tabular-nums;
  min-width: 5.5rem;
}
@media (max-width: 768px) {
  .add-channel-inline { width: 100%; margin-left: 0; }
  .add-channel-inline input { flex: 1; min-width: 0; }
}

.verdict-pill-count {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-left: 0.2rem;
}

/* ── Producer type filter pills ── */
.channel-facet-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.facet-select {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  min-width: 0;
  max-width: 200px;
  transition: all 0.15s;
}
.facet-select:hover { border-color: var(--color-accent); color: var(--color-accent); }
.facet-select.active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='white'/%3E%3C/svg%3E"); }
.facet-select:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.channel-facet-filters .channel-producer-filter {
  margin-bottom: 0;
}
.channel-producer-filter {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.channel-producer-filter:empty { display: none; }

.producer-pill {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.producer-pill:hover { border-color: var(--color-accent); color: var(--color-accent); }
.producer-pill.active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

.producer-pill-count {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-left: 0.15rem;
}

/* ── Active badge filter bar ── */
.active-filter-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.active-filter-pill {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--color-accent);
  background: rgba(99,102,241,0.1);
  color: var(--color-accent);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
}
.active-filter-pill:hover { background: rgba(99,102,241,0.2); }
.active-filter-pill.clear-all { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text-secondary); }

/* ── Loading State ─────────────────────────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-secondary);
}

.loading::after {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-left: 0.5rem;
}

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

/* ── Empty State ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-secondary);
}

.empty-state p { font-size: 1.1rem; }

/* ── Hamburger Menu (hidden on desktop) ──────────────────────────────────── */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-secondary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.hamburger-menu.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger-menu.open span:nth-child(2) { opacity: 0; }
.hamburger-menu.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.hamburger-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 60;
  min-width: 180px;
  padding: 0.5rem 0;
}

.hamburger-dropdown.open { display: flex; flex-direction: column; }

.hamburger-dropdown a {
  padding: 0.65rem 1rem;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.12s;
}

.hamburger-dropdown a:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.hamburger-dropdown a.active { color: #fff; font-weight: 600; }
.hamburger-dropdown a .nav-count { display: inline; margin-left: 0.4rem; }

/* Old drawer/FAB styles removed – replaced by channel-panel */

/* ── Mobile Overrides ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* ── Global: prevent any horizontal overflow ── */
  html { overflow-x: hidden; }

  /* ── Header ── */
  .header-search { display: block !important; flex: 1; max-width: none; min-width: 0; }
  .search-dropdown { max-height: 60vh; border-radius: 8px; }
  .sd-item { padding: 0.65rem 0.85rem; }
  .header-tagline { display: none; }
  .nav-links { display: none !important; }
  .hamburger-menu { display: flex; }
  .header-inner { position: relative; padding-left: 1rem; padding-right: 1rem; gap: 0.75rem; }

  .lang-selector { margin-left: auto; }
  .lang-selector-btn { font-size: 0.72rem; padding: 0.25rem 0.5rem; }
  .lang-selector-menu { right: -0.5rem; min-width: 180px; }
  .producer-pill { font-size: 0.7rem; padding: 0.25rem 0.5rem; }
  .producer-pill .producer-count { display: none; }
  .facet-select { font-size: 0.72rem; max-width: 160px; }
  .channel-facet-filters { gap: 0.35rem; }

  .subtopic-bar { flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.75rem; }
  .subtopic-pill { font-size: 0.72rem; padding: 0.25rem 0.55rem; }
  .status-toggle { margin-bottom: 0.5rem; }
  .status-toggle-label { font-size: 0.75rem; padding: 0.25rem 0.55rem; }

  /* ── Panel: single-column on mobile ── */
  .channel-panel .channel-list,
  .channel-panel .producer-list,
  .channel-panel .hidden-channel-list {
    grid-template-columns: 1fr;
    padding: 0 1rem 0.75rem;
    max-height: 50vh;
  }
  .channel-panel .sidebar-header {
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
  }
  .channel-panel .sidebar-header .sidebar-tabs {
    flex-wrap: wrap;
    width: 100%;
  }
  .channel-panel .sidebar-header .sidebar-actions {
    width: 100%;
    justify-content: flex-start;
    padding-top: 0.35rem;
  }
  .channel-panel .channel-item { min-height: 44px; }
  .channel-panel .channel-item input[type="checkbox"] { width: 18px; height: 18px; }

  /* ── Main layout ── */
  .main-layout { padding: 1rem; }

  /* ── Filter bar: hamburger always on mobile ── */
  .filter-bar { flex-wrap: nowrap; overflow-x: visible; gap: 0.35rem; margin-bottom: 0; }
  .filter-bar > .filter-pill[data-topic] { display: none; }
  .filter-hamburger { display: flex !important; font-size: 0.78rem; padding: 0.3rem 0.7rem; }
  .subtopic-bar { display: none !important; }
  .status-toggle { display: none !important; }
  .sticky-filter-wrapper { padding: 0.4rem 1rem; }
  .sticky-filter-wrapper.is-sticky { gap: 0.35rem; padding: 0.4rem 1rem; }
  .filter-hamburger-dropdown { min-width: 240px; }
  .search-term-pill { font-size: 0.7rem; padding: 0.25rem 0.5rem; }

  /* ── Video grid: single column ── */
  .video-grid { grid-template-columns: 1fr; gap: 0.75rem; }

  /* ── Live ticker mobile ── */
  .live-widget { padding: 0.25rem 0.5rem; }

  /* ── Player mobile ── */
  .player-page {
    overflow: hidden;
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
  }
  .player-page .site-header {
    flex-shrink: 0;
  }
  .player-page .player-layout {
    display: block !important;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  .player-header-channels-btn {
    display: inline-flex !important;
  }
  .player-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 80vw;
    max-width: 300px;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex !important;
    flex-direction: column;
    overflow-y: auto;
    background: var(--color-bg);
    border-right: 1px solid var(--color-border);
  }
  .player-sidebar.open {
    transform: translateX(0);
  }
  .player-main {
    width: 100%;
    height: 100%;
  }
  .player-sidebar-backdrop.visible {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
  }
}

/* ── Player landscape: compact header ──────────────────────────────────── */
@media (max-width: 768px) and (orientation: landscape) {
  .player-page .header-inner {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }
  .player-page .logo img {
    height: 26px;
    width: 26px;
  }
  .player-page .logo-text {
    font-size: 0.9rem;
  }
}

/* ── Live Ticker (Homepage Airport-Board) ──────────────────────────────── */

.live-widget {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
}

.live-widget-section {
  background: linear-gradient(135deg, rgba(220,38,38,0.08) 0%, rgba(220,38,38,0.03) 100%);
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.25rem;
}

.live-widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-widget-title .lt-pulse {
  width: 8px;
  height: 8px;
  background: #ef4444;
}

.lt-gagarin {
  font-weight: 400;
  font-style: italic;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .lt-gagarin { display: none; }
}

.lt-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  background: rgba(15,23,42,0.95);
  border-radius: var(--radius);
  overflow: hidden;
  border: none;
}

.lt-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
}

.lt-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.lt-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}

.lt-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.lt-card-board {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 250px; /* initial cap, overridden by ResizeObserver */
}

.lt-fallback {
  grid-template-columns: 1fr;
}

.lt-fallback-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  color: #f8fafc;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

.lt-fallback-link:hover { text-decoration: none; color: #fff; }

/* ── ISS Preview (left) ── */

.lt-preview {
  display: flex;
}

.lt-iss-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #f8fafc;
  width: 100%;
}

.lt-iss-link:hover { text-decoration: none; color: #fff; }

.lt-iss-thumb-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 fallback for browsers without aspect-ratio */
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-border);
}

.lt-iss-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lt-iss-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(220,38,38,0.9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  z-index: 2;
}

.lt-pulse {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.6); }
  50% { box-shadow: 0 0 0 4px rgba(255,255,255,0); }
}

.lt-iss-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  gap: 0.5rem;
}

.lt-iss-label {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.lt-iss-viewers {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

/* ── YouTube Live Slider (middle card) ── */

.lt-slider { position: relative; width: 100%; height: 100%; }

.lt-slider-slide {
  transition: opacity 0.25s ease;
}

.lt-slider-slide.lt-slider-fade {
  opacity: 0;
}

.lt-slider-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.lt-slider-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: background 0.2s;
}

.lt-slider-dot.active {
  background: #fff;
}

.lt-slider-dot-more {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.5);
  margin-left: 2px;
}

/* ── Ticker Board (right) ── */

.lt-board {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.lt-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.lt-board-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lt-count-badge {
  font-size: 0.6rem;
  background: rgba(239,68,68,0.2);
  color: #ef4444;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
}

.lt-board-all {
  font-size: 0.7rem;
  color: rgba(248,250,252,0.5);
  text-decoration: none;
  white-space: nowrap;
}

.lt-board-all:hover { color: #f8fafc; text-decoration: none; }

/* ── Ticker Rows ── */

.lt-rows {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.lt-rows::-webkit-scrollbar { width: 4px; }
.lt-rows::-webkit-scrollbar-track { background: transparent; }
.lt-rows::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.lt-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: #e2e8f0;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;
}

.lt-row:hover {
  background: rgba(255,255,255,0.05);
  text-decoration: none;
  color: #fff;
}

.lt-row-empty {
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  color: rgba(248,250,252,0.4);
}

.lt-empty-text {
  font-size: 0.75rem;
}

.lt-empty-link {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.75rem;
}

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

.lt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lt-dot-live {
  background: #ef4444;
  animation: livePulse 1.5s ease-in-out infinite;
}

.lt-status-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 4px;
  border-radius: 2px;
  flex-shrink: 0;
  min-width: 32px;
  text-align: center;
}

.lt-tag-live {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
}

.lt-tag-upcoming {
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
}

.lt-tag-live-since {
  background: rgba(239,68,68,0.13);
  color: #f87171;
  white-space: nowrap;
}

.lt-flag {
  width: 16px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 1px;
  object-fit: cover;
}

.lt-time {
  font-size: 0.7rem;
  color: #fbbf24;
  min-width: 38px;
  flex-shrink: 0;
}

.lt-progress {
  display: inline-flex;
  align-items: center;
  width: 44px;
  flex-shrink: 0;
  position: relative;
}
.lt-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.lt-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}
.lt-progress-fill.live-since { background: #ef4444; }
.lt-progress-fill.live-hls   { background: #22c55e; }
.lt-progress-text {
  position: absolute;
  top: -9px;
  left: 0;
  font-size: 0.55rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

.lt-row-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.lt-row-name.marquee {
  text-overflow: clip;
}
.lt-row-name.marquee > span {
  display: inline-block;
  animation: ticker-scroll var(--marquee-duration, 8s) linear infinite;
  padding-right: 0;
}

/* ── Live-Since pulsing time indicator ── */
.lt-live-time {
  position: relative;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  overflow: hidden;
  z-index: 0;
}
.lt-live-time::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--live-fill, 5%);
  background: rgba(239, 68, 68, 0.7);
  border-radius: 3px;
  z-index: -1;
  animation: live-time-pulse 2s ease-in-out infinite;
}
@keyframes live-time-pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

.lt-end-time {
  font-size: 0.65rem;
  color: #9ca3af;
  white-space: nowrap;
  flex-shrink: 0;
}

.lt-topic-pill {
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(59,130,246,0.15);
  color: #93c5fd;
  white-space: nowrap;
  flex-shrink: 0;
}

.lt-row-source {
  font-size: 0.6rem;
  color: rgba(248,250,252,0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Live Ticker Mobile ── */

@media (max-width: 640px) {
  .lt-container {
    grid-template-columns: 1fr;
  }
  .lt-grid {
    grid-template-columns: 1fr;
  }
  .lt-grid-3 {
    grid-template-columns: 1fr;
  }
  .live-widget { padding: 0.5rem; }
}

/* ── Nav Live Dot ────────────────────────────────────────────────────────── */

.nav-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
  background: transparent;
  transition: background 0.3s;
}

.nav-live-dot.active {
  background: #ef4444;
  animation: livePulse 1.5s ease-in-out infinite;
}

/* ── Player Layout ───────────────────────────────────────────────────────── */

.player-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 1fr;
  height: calc(100vh - 60px);
  overflow: hidden;
}

.player-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  min-height: 0;
  padding: 0.5rem 0;
}

.player-sidebar-section {
  padding: 0;
  border-bottom: 1px solid var(--color-border);
}

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

.player-sidebar-heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e2e8f0;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s, background 0.15s;
  margin: 0;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 1;
}

.player-sidebar-section:first-child .player-sidebar-heading {
  border-top: none;
}

.player-sidebar-heading:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.player-sidebar-heading .collapse-arrow {
  font-size: 0.55rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.player-sidebar-section.open .collapse-arrow {
  transform: rotate(90deg);
}

.player-sidebar-heading .live-count-badge {
  margin-left: auto;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  white-space: nowrap;
}

.player-channel-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.player-sidebar-section.open .player-channel-list {
  max-height: none;
}

/* Ticker in player sidebar */
.player-ticker-list {
  display: none;
  padding: 0.25rem 0;
  max-height: 160px;
  overflow-y: auto;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.player-ticker-list::-webkit-scrollbar { width: 4px; }
.player-ticker-list::-webkit-scrollbar-track { background: transparent; }
.player-ticker-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.player-sidebar-section.open .player-ticker-list {
  display: block;
}
.player-ticker-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s;
  min-width: 32rem;
}
.player-ticker-row:hover {
  background: rgba(255,255,255,0.06);
}
.player-ticker-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}
.player-ticker-tag-live {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  white-space: nowrap;
}
.player-ticker-tag-upcoming {
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
}
.player-ticker-time {
  font-size: 0.7rem;
  color: #fbbf24;
  min-width: 32px;
  flex-shrink: 0;
}
.player-ticker-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.player-ticker-name.marquee {
  text-overflow: clip;
}
.player-ticker-name.marquee > span {
  display: inline-block;
  animation: ticker-scroll var(--marquee-duration, 8s) linear infinite;
  padding-right: 0;
}
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.player-ticker-heading {
  border-top: 1px solid rgba(239,68,68,0.3) !important;
  border-bottom: 1px solid rgba(239,68,68,0.3);
}

.player-channel-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font);
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.player-channel-item:hover {
  background: rgba(255,255,255,0.04);
}

.player-channel-item.active {
  border-left-color: var(--color-accent);
  background: rgba(59,130,246,0.08);
}

.player-channel-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.player-channel-letter {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.player-channel-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.live {
  background: #22c55e;
  box-shadow: 0 0 4px rgba(34,197,94,0.5);
}

.status-dot.offline {
  background: #4b5563;
}

.geo-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(234,179,8,0.2);
  color: #eab308;
  flex-shrink: 0;
  margin-right: 2px;
}

/* ── Player Main Area ────────────────────────────────────────────────────── */

.player-main {
  display: flex;
  flex-direction: column;
  background: #000;
  overflow: hidden;
}

.player-container {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
}

.player-video,
.player-yt-wrap {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

.player-video {
  object-fit: contain;
}

.player-yt-wrap iframe,
.player-yt-wrap > div {
  width: 100%;
  height: 100%;
}

/* ── Sendepause ──────────────────────────────────────────────────────────── */

.sendepause {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a2e;
  z-index: 5;
}

.sendepause-inner {
  text-align: center;
  padding: 2rem;
}

.sendepause-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.sendepause h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.sendepause-msg {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.sendepause-hint {
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.sendepause-btn {
  padding: 0.5rem 1.25rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

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

/* ── Category Grid ──────────────────────────────────────────────────────── */

.category-grid {
  position: absolute;
  inset: 0;
  background: #111;
  overflow-y: auto;
  z-index: 5;
}

.category-grid-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.5rem;
}
/* When flight board is inside, let it fill the space */
.category-grid-inner:has(.flight-board) {
  display: block;
  padding: 0;
  height: 100%;
}

.category-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.category-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.category-card-visual {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.category-card-visual img {
  max-height: 60%;
  max-width: 60%;
  object-fit: contain;
}
.category-card-visual video,
.category-card-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.category-card-letter {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  opacity: 0.5;
}

.category-card-info {
  padding: 0.5rem 0.75rem;
}
.category-card-name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.8rem;
  color: #e2e8f0;
}
.category-card-epg {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .category-grid-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .category-grid-inner { grid-template-columns: 1fr; padding: 1rem; gap: 0.75rem; }
}

/* ── Departures / Arrivals Board ───────────────────────────────────────── */

.flight-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 1.25rem;
  height: 100%;
  overflow: hidden;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Consolas', monospace;
}
.flight-board-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.flight-board-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
  background: #111;
  z-index: 2;
}
.flight-board-header.departures {
  border-color: #f59e0b;
  color: #f59e0b;
}
.flight-board-header.arrivals {
  border-color: #22d3ee;
  color: #22d3ee;
}
.flight-board-header .fb-icon {
  font-size: 1rem;
}
.flight-board-header .fb-count {
  font-size: 0.7rem;
  font-weight: 400;
  color: #94a3b8;
  margin-left: auto;
}
/* ── Flight Board Filters ────────────────────────────────────────────────── */
.fb-filters {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}
.fb-filter-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #cbd5e1;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.3;
  white-space: nowrap;
}
.fb-filter-btn:hover { background: rgba(255,255,255,0.15); }
.fb-news-toggle { border-color: #ef4444; color: #fca5a5; }
.fb-news-toggle:hover { background: rgba(239,68,68,0.15); }
.fb-news-off { border-color: #22c55e; color: #86efac; }
.fb-news-off:hover { background: rgba(34,197,94,0.15); }
.fb-country-dropdown { position: relative; }
.fb-country-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 0.35rem 0;
  min-width: 130px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  margin-top: 4px;
}
.fb-country-menu-open { display: block; }
.fb-country-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  color: #cbd5e1;
  cursor: pointer;
  white-space: nowrap;
}
.fb-country-item:hover { background: rgba(255,255,255,0.06); }
.fb-country-item input { width: 13px; height: 13px; accent-color: #f59e0b; }
.fb-country-all { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.3rem; margin-bottom: 0.15rem; font-weight: 600; }
.fb-country-cnt { color: #64748b; font-size: 0.6rem; margin-left: auto; }
.fb-country-menu::-webkit-scrollbar { width: 4px; }
.fb-country-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.fb-table-header {
  display: grid;
  grid-template-columns: 3.5rem 6.5rem 1fr auto;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
  background: #111;
  z-index: 1;
}
.fb-rows {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.fb-th {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}
.fb-row {
  display: grid;
  grid-template-columns: 3.5rem 6.5rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.12s;
  min-height: 2.2rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255,255,255,0.08);
}
.fb-row:hover {
  background: rgba(255,255,255,0.06);
}
/* Pulsing fill on badge (live) and time cell (upcoming) */
@keyframes fb-row-pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* Live badge: red fill from left */
.fb-badge.live[style*="--fb-fill"] {
  position: relative;
  z-index: 0;
  overflow: hidden;
}
.fb-badge.live[style*="--fb-fill"]::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: var(--fb-fill, 0%);
  background: #dc2626;
  border-radius: 3px;
  z-index: -1;
  animation: fb-row-pulse 2s ease-in-out infinite;
}
.fb-badge.live[style*="--fb-fill"] {
  color: #fff;
}
/* Upcoming: pulsing fill on time cell only */
.fb-time[style*="--fb-fill"] {
  position: relative;
  z-index: 0;
  border-radius: 3px;
  overflow: hidden;
}
.fb-time[style*="--fb-fill"]::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: var(--fb-fill, 0%);
  background: rgba(245, 158, 11, 0.35);
  border-radius: 3px;
  z-index: -1;
  animation: fb-row-pulse 2s ease-in-out infinite;
}
.fb-time {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fb-to {
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-info {
  min-width: 0;
  overflow: hidden;
}
.fb-channel {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-title {
  font-size: 0.65rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.fb-channel.marquee, .fb-title.marquee {
  text-overflow: clip;
}
.fb-channel.marquee > span, .fb-title.marquee > span {
  display: inline-block;
  animation: ticker-scroll var(--marquee-duration, 8s) linear infinite;
}
.fb-badge {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.fb-badge.live {
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.3);
}
.fb-badge.upcoming {
  background: rgba(245,158,11,0.2);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.3);
}
/* Flight phases for upcoming */
.fb-badge.fb-checkin {
  background: rgba(100,116,139,0.2);
  color: #94a3b8;
  border: 1px solid rgba(100,116,139,0.25);
}
.fb-badge.fb-boarding {
  background: rgba(245,158,11,0.25);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,0.4);
}
.fb-badge.fb-final {
  background: none;
  border: none;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
}
.fb-dot { color: #fbbf24; }
.fb-dot-a { animation: fb-dot-alt 1s ease-in-out infinite; }
.fb-dot-b { animation: fb-dot-alt 1s ease-in-out infinite 0.5s; }
@keyframes fb-dot-alt {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}
.fb-badge.completed {
  background: rgba(100,116,139,0.2);
  color: #94a3b8;
  border: 1px solid rgba(100,116,139,0.25);
}
@keyframes fb-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.fb-empty {
  padding: 1.5rem 0.75rem;
  color: #64748b;
  font-size: 0.75rem;
  text-align: center;
}

@media (max-width: 700px) {
  .flight-board {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
  }
}

/* ── Unmute Overlay ─────────────────────────────────────────────────────── */

.unmute-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  background: rgba(0,0,0,0.4);
  cursor: pointer;
}

.unmute-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 2rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.unmute-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* ── Player Header Channels Button (mobile only) ───────────────────────── */

.player-header-channels-btn {
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.player-header-channels-btn:active {
  background: var(--color-accent-hover);
}

.player-sidebar-backdrop {
  display: none;
}

/* ── Channels Tab Bar ──────────────────────────────────────────────────── */

.channels-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 1.2rem;
}

.channels-tab {
  background: none;
  border: none;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

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

.channels-tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.channels-tab-count {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-left: 0.3rem;
}

/* ── Live-Sender Tab ───────────────────────────────────────────────────── */

.live-channels-header {
  margin-bottom: 1.2rem;
}

.live-channels-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.live-channels-desc {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.live-category-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  padding: 0.5rem 0.8rem;
  background: var(--color-bg-secondary);
  border-radius: 6px 6px 0 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-muted);
  position: sticky;
  top: 0;
  z-index: 1;
}

.live-cat-checks {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.3rem;
  text-align: center;
}

.live-cat-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.78rem;
}

.live-cat-all input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--color-accent);
}

.live-country-grid {
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 6px 6px;
}

.live-country-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid var(--color-border);
  align-items: center;
  transition: background 0.1s;
}

.live-country-row:hover {
  background: var(--color-bg-secondary);
}

.live-country-row:last-child {
  border-bottom: none;
}

.live-country-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  min-width: 0;
}

.live-country-flag {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.live-country-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-country-total {
  font-size: 0.75rem;
  color: var(--color-muted);
  background: var(--color-bg-secondary);
  padding: 0.1rem 0.4rem;
  border-radius: 8px;
  flex-shrink: 0;
}

.live-country-checks {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.3rem;
  text-align: center;
}

.live-country-cb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
}

.live-country-cb.disabled {
  opacity: 0.3;
  cursor: default;
}

.live-country-cb input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--color-accent);
}

.live-cb-count {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.live-channels-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.8rem 0;
}

.live-channels-summary {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.btn-primary {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--color-accent-hover, #2563eb);
}

/* ── Live-Sender Mobile ────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .live-category-header {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .live-cat-label { display: none; }
  .live-cat-checks {
    grid-template-columns: repeat(3, 1fr);
  }
  .live-country-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .live-country-checks {
    grid-template-columns: repeat(3, 1fr);
    padding-left: 1.8rem;
  }
  .channels-tab {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* ── Print Sources Tab ─────────────────────────────────────────────────── */

.print-source-group {
  margin-bottom: 1.5rem;
}

.print-source-group-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: var(--color-bg-secondary);
  border-radius: 6px 6px 0 0;
  border: 1px solid var(--color-border);
  border-bottom: none;
}

img.print-source-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: -3px;
  border-radius: 3px;
  margin-right: 6px;
}

.print-source-name {
  font-size: 1rem;
  font-weight: 600;
}

.print-source-total {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-left: auto;
}

.print-toggle-all {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-muted);
}

.print-toggle-all input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--color-accent);
}

.print-source-grid {
  border: 1px solid var(--color-border);
  border-radius: 0 0 6px 6px;
  max-height: 50vh;
  overflow-y: auto;
}

.print-source-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.1s;
  font-size: 0.9rem;
}

.print-source-row:hover {
  background: var(--color-bg-secondary);
}

.print-source-row:last-child {
  border-bottom: none;
}

.print-source-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--color-accent);
  flex-shrink: 0;
}

.print-source-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-source-count {
  font-size: 0.75rem;
  color: var(--color-muted);
  background: var(--color-bg-secondary);
  padding: 0.1rem 0.4rem;
  border-radius: 8px;
  flex-shrink: 0;
}

/* ── Auth UI (shared across pages) ── */
.user-auth {
  display: flex;
  align-items: center;
  position: relative;
  flex-shrink: 0;
  z-index: 100;
  min-height: 34px;
}
.user-auth:empty { display: none; }
.user-auth-login {
  background: #4285f4;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.user-auth-login:hover { opacity: 0.85; }
.user-auth-login svg { width: 16px; height: 16px; }
.user-avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  cursor: pointer;
  background-size: cover;
  background-position: center;
  padding: 0;
}
.user-avatar-btn:hover { border-color: var(--color-accent, #4285f4); }
.user-menu {
  position: absolute;
  top: 42px;
  right: 0;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 200px;
  z-index: 1000;
  display: none;
}
.user-menu.open { display: block; }
.user-menu-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.85rem;
}
.user-menu-header .user-name { font-weight: 600; }
.user-menu-header .user-email { color: var(--color-muted); font-size: 0.75rem; }
.user-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--color-text);
}
.user-menu-item:hover { background: var(--color-hover, #f5f5f5); }
.user-menu-sep { border-top: 1px solid var(--color-border); margin: 0.25rem 0; }

/* ── Feeds Q-Tabs ── */
.feeds-header { margin-bottom: 1rem; }
.feeds-header h2 { font-size: 1.3rem; margin-bottom: 0.3rem; }
.feeds-desc { color: var(--color-muted); font-size: 0.85rem; }
.feeds-q-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 1rem;
  overflow-x: auto;
}
.feeds-q-tab {
  background: none;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--color-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  font-weight: 500;
}
.feeds-q-tab:hover { color: var(--color-text); }
.feeds-q-tab.active {
  color: var(--color-accent, #4285f4);
  border-bottom-color: var(--color-accent, #4285f4);
}
.feeds-q-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.feeds-q-label { font-size: 0.85rem; color: var(--color-muted); }
.feeds-slider { width: 180px; accent-color: var(--color-accent, #4285f4); }
.feeds-slider-val {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 3rem;
}
.feeds-q-count {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-left: auto;
  display: flex;
  gap: 0.25rem;
}
.feeds-vis-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--color-muted);
}
.feeds-vis-btn:hover { color: var(--color-text); }
.feeds-vis-btn.active {
  background: var(--color-accent, #4285f4);
  color: #fff;
  border-color: var(--color-accent, #4285f4);
}
.feeds-globe-toggle {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0 0.3rem;
  border-left: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 0.7rem;
}
.feeds-globe-toggle:hover { opacity: 0.7; }
.feeds-producer-toggle {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0 0.3rem;
  border-left: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 0.7rem;
}
.feeds-producer-toggle:hover { opacity: 0.7; }
.feeds-q-count {
  position: relative;
}
.feeds-q-count .feeds-country-menu {
  top: 100%;
  right: 0;
  left: auto;
}

/* ── Feeds Country Dropdown ── */
.feeds-country-wrap {
  position: relative;
  display: inline-block;
}
.feeds-country-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.feeds-country-btn.has-filter {
  border-color: var(--color-accent, #4285f4);
  color: var(--color-accent, #4285f4);
}
.feeds-country-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-height: 300px;
  overflow-y: auto;
  min-width: 160px;
  padding: 0.3rem 0;
}
.feeds-country-menu.open { display: block; }
.feeds-country-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}
.feeds-country-item:hover { background: var(--color-hover, #f5f5f5); }
.feeds-country-item input { margin: 0; }
.feeds-country-cnt {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--color-muted);
}
.feeds-exclude-btn, .feeds-include-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem;
}
.feeds-include-btn { color: #34a853; font-weight: 700; }
.feeds-exclude-btn { color: var(--color-muted); }
.feeds-load-more {
  display: block;
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.5rem;
  background: var(--color-bg-secondary, #f5f5f5);
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--color-muted);
  grid-column: 1 / -1;
}
.feeds-load-more:hover { background: var(--color-hover, #eee); }
.feeds-excl-country-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0;
}
.feeds-excl-country-pill {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  cursor: pointer;
  color: var(--color-muted);
  white-space: nowrap;
}
.feeds-excl-country-pill:hover { color: var(--color-text); }
.feeds-excl-country-pill.active {
  background: var(--color-accent, #4285f4);
  color: #fff;
  border-color: var(--color-accent, #4285f4);
}
.feeds-channel-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0.75rem !important;
}
.feeds-channel-grid .channel-card {
  min-height: 160px;
}
@media (max-width: 768px) {
  .feeds-channel-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  .feeds-channel-grid { grid-template-columns: 1fr !important; }
}

/* ── Dual Panel (aktiv | ausgeblendet) ── */
.feeds-dual-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  min-height: 400px;
}
.feeds-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}
.feeds-panel-active { border-color: #4caf50; }
.feeds-panel-excluded { border-color: #e53935; }
.feeds-panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #1a1a2e;
  color: #e0e0e0;
  border-bottom: 1px solid #2a2a4a;
  position: relative;
}
.feeds-panel-active .feeds-panel-header {
  background: #1a2a3e;
}
.feeds-panel-excluded .feeds-panel-header {
  background: #1a2a3e;
}
.feeds-panel-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f0f0f0;
}
.fc-threshold {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: #1a2a3e;
  border-bottom: 1px solid #2a2a4a;
  position: relative;
}
.fc-threshold .feeds-country-menu {
  top: 100%;
  right: 0;
  left: auto;
}
.fc-threshold-label {
  font-size: 0.65rem;
  color: #aaa;
  white-space: nowrap;
}
.fc-threshold .feeds-slider {
  width: 80px;
  height: 4px;
}
.fc-threshold .feeds-slider-val {
  font-size: 0.65rem;
  color: #f0f0f0;
  white-space: nowrap;
}
.fc-sort-pills {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin-left: 0.5rem;
}
.fc-sort-pill {
  font-size: 0.62rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid #444;
  border-radius: 3px;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
.fc-sort-pill:hover { color: #fff; border-color: #888; }
.fc-sort-pill.active {
  background: #4285f4;
  color: #fff;
  border-color: #4285f4;
}
.feeds-panel-globe {
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: auto;
  color: #ccc;
}
.feeds-panel-globe:hover { opacity: 0.7; }
.feeds-panel-header .feeds-country-menu {
  top: 100%;
  right: 0;
  left: auto;
}
.feeds-panel-scroll {
  flex: 1;
  overflow-y: auto;
  max-height: 70vh;
  padding: 0.5rem;
}
.feeds-panel-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
@media (max-width: 900px) {
  .feeds-panel-cards { grid-template-columns: 1fr; }
}
.feeds-panel-cards .channel-card {
  min-height: auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
/* ── Feed Card: Head + Body ── */
.fc-card {
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-surface, #fff);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.fc-card.channel-card-hidden {
  opacity: 1;
}
.fc-card.channel-card-hidden:hover { opacity: 1; }
.fc-card.slide-out-right { transform: translateX(100%); opacity: 0; }
.fc-card.slide-out-left { transform: translateX(-100%); opacity: 0; }

/* ── Head: name (row1 full), topics+avatar (row2) ── */
.fc-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.2rem 0.5rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--color-border, #e0e0e0);
}
.fc-head > .fc-name {
  grid-column: 1 / -1;
}
.fc-head > .fc-topics {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
}
.fc-head > .fc-avatar {
  grid-column: 2;
  grid-row: 2;
}
.fc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.fc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fc-flag {
  font-size: 0.91rem;
  flex-shrink: 0;
}
.fc-head-text {
  min-width: 0;
}
.fc-producer {
  font-size: 0.76rem;
  color: var(--color-muted, #888);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-name {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc-subs {
  font-size: 0.74rem;
  color: var(--color-muted, #888);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 700;
}

/* ── Body: two columns below the line ── */
.fc-body {
  display: flex;
  gap: 0.75rem;
  padding: 0.45rem 0.65rem;
}
.fc-body-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex-shrink: 0;
}
.fc-score-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.fc-crit-col {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.fc-crit {
  display: flex;
}
.fc-crit-label {
  display: inline-block;
  width: 5.5em;
}
.fc-score {
  font-size: 1.36rem;
  font-weight: 800;
  line-height: 1;
}
.fc-score-est {
  font-size: 0.68rem;
  font-weight: 400;
}
.fc-crit {
  font-size: 0.88rem;
  color: var(--color-muted, #666);
}
.fc-crit strong {
  color: var(--color-text, #333);
}
.fc-score-row .cc-science-btn {
  font-size: 0.88rem;
}
.fc-topics {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  margin-top: 0.15rem;
}
.fc-topics-label {
  font-size: 0.76rem;
  color: var(--color-muted, #888);
  white-space: nowrap;
}
.fc-topic {
  font-size: 0.78rem;
  color: var(--color-muted, #666);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.fc-topic-more {
  color: var(--color-muted, #999);
  font-style: italic;
}
.fc-classify-btn {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border: 1px dashed var(--color-muted, #888);
  border-radius: 4px;
  background: transparent;
  color: var(--color-muted, #888);
  cursor: pointer;
  white-space: nowrap;
}
.fc-classify-btn:hover {
  border-color: var(--color-accent, #4f8cff);
  color: var(--color-accent, #4f8cff);
}
.fc-classify-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.fc-body-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 0.75rem;
}
.fc-yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.fc-yt-btn:hover { opacity: 0.85; }
.fc-yt-sub {
  background: #fff;
  color: #0f0f0f;
  border: 1px solid #d0d0d0;
  text-align: left;
  line-height: 1.2;
}
.fc-yt-sub small {
  font-size: 0.6rem;
  font-weight: 400;
  color: #666;
}
.fc-body-divider {
  width: 1px;
  align-self: stretch;
  background: var(--color-border, #e0e0e0);
}
.fc-body-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 0.15rem;
  min-width: 0;
  margin-left: auto;
}
.fc-info-line {
  font-size: 0.76rem;
  color: var(--color-muted, #666);
  white-space: nowrap;
  display: flex;
  justify-content: flex-end;
  gap: 0.35em;
}
.fc-info-val {
  font-weight: 700;
  color: var(--color-text, #333);
  text-align: right;
}
.fc-info-lbl {
  min-width: 3.8em;
  text-align: left;
}
.fc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.6rem;
  border-top: 1px solid var(--color-border, #e0e0e0);
  margin-top: 0.1rem;
}
.fc-footer-producer {
  font-size: 0.74rem;
  color: var(--color-muted, #888);
}
.fc-footer .feeds-exclude-btn,
.fc-footer .feeds-include-btn {
  font-size: 0.74rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  color: var(--color-muted, #888);
}
.fc-footer .feeds-exclude-btn {
  border: 1px solid #e53935;
}
.fc-footer .feeds-exclude-btn:hover { color: #e53935; }
.fc-footer .feeds-include-btn {
  border: 1px solid #4caf50;
}
.fc-footer .feeds-include-btn:hover { color: #4caf50; }

@media (max-width: 600px) {
  .fc-body { flex-direction: column; gap: 0.3rem; }
  .fc-body-right { align-items: flex-start; }
  .fc-name { font-size: 0.81rem; }
  .fc-score { font-size: 1.16rem; }
}
.feeds-panel-cards .channel-card.slide-out-right {
  transform: translateX(100%);
  opacity: 0;
}
.feeds-panel-cards .channel-card.slide-out-left {
  transform: translateX(-100%);
  opacity: 0;
}
.feeds-panel-cards .channel-card.slide-in {
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { transform: translateX(-30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@media (max-width: 768px) {
  .feeds-dual-panel {
    grid-template-columns: 1fr;
  }
  .feeds-panel-scroll { max-height: 50vh; }
}
.feeds-section-heading {
  font-size: 1rem;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border);
}
.feeds-section-heading:first-child { margin-top: 0; }
.feeds-q-note {
  font-size: 0.85rem;
  color: var(--color-muted);
  padding: 0.5rem 0;
}
.feeds-badge-filter {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.feeds-live-matrix { margin-bottom: 1rem; }
.feeds-print-sources { margin-bottom: 1rem; }

/* ── Feeds Sub-Tabs (source level) ── */
.feeds-sub-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1rem;
}
.feeds-sub-tab {
  background: none;
  border: none;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--color-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.feeds-sub-tab:hover { color: var(--color-text); }
.feeds-sub-tab.active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent, #4285f4);
  font-weight: 600;
}

/* ── Feeds Topic Nav ── */
.feeds-topic-wrap {
  display: flex;
  gap: 1rem;
}
.feeds-topic-nav {
  display: flex;
  flex-direction: column;
  min-width: 140px;
  max-width: 180px;
  max-height: 70vh;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 0.3rem 0;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
}
.feeds-topic-nav .topic-nav-item {
  display: block;
  padding: 0.35rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--color-text-secondary, #666);
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  border-left: 3px solid transparent;
}
.feeds-topic-nav .topic-nav-item:hover {
  background: var(--color-bg, #f9f9f9);
  color: var(--color-text);
}
.feeds-topic-nav .topic-nav-item.active {
  background: var(--color-bg, #f9f9f9);
  color: var(--color-accent, #4285f4);
  font-weight: 600;
  border-left-color: var(--color-accent, #4285f4);
}
.feeds-topic-nav .topic-l2-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  padding: 0.15rem 0.3rem 0.2rem 0.8rem;
}
.feeds-topic-nav .topic-l2-inline .filter-pill {
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: transparent;
  color: var(--color-text-secondary, #666);
  cursor: pointer;
}
.feeds-topic-nav .topic-l2-inline .filter-pill.active {
  background: var(--color-accent, #4285f4);
  color: #fff;
  border-color: var(--color-accent, #4285f4);
}
.feeds-topic-grid {
  flex: 1;
  min-width: 0;
}
.feeds-topic-nav .topic-nav-item.has-selected {
  color: var(--color-accent, #4285f4);
}
/* ── Sidebar column: topics + producer types ── */
.feeds-sidebar-col {
  display: flex;
  flex-direction: column;
  min-width: 140px;
  max-width: 180px;
  flex-shrink: 0;
}
.feeds-sidebar-col .feeds-topic-nav {
  border-right: none;
  border-bottom: 1px solid var(--color-border, #e0e0e0);
}
/* ── Sidebar threshold ── */
.feeds-sidebar-threshold {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--color-border, #e0e0e0);
}
.feeds-sidebar-threshold-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-muted, #888);
  margin-bottom: 0.3rem;
}
.feeds-sidebar-threshold-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.feeds-sidebar-threshold-row .feeds-slider {
  flex: 1;
  height: 4px;
}
.feeds-sidebar-threshold-row .feeds-slider-val {
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Sidebar toggles ── */
.feeds-sidebar-toggles {
  display: flex;
  border-bottom: 1px solid var(--color-border, #e0e0e0);
}
.feeds-sidebar-toggle {
  flex: 1;
  padding: 0.4rem 0.3rem;
  border: none;
  background: transparent;
  color: var(--color-muted, #888);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.feeds-sidebar-toggle:hover {
  color: var(--color-text, #333);
}
.feeds-sidebar-toggle.active {
  color: var(--color-accent, #4285f4);
  border-bottom-color: var(--color-accent, #4285f4);
}

/* ── Producer-Type nav (same style as topic nav) ── */
.feeds-producer-nav {
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 0.3rem 0;
  border-right: 1px solid var(--color-border);
}
.producer-pill {
  display: block;
  padding: 0.35rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--color-text-secondary, #666);
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  border-left: 3px solid transparent;
  width: 100%;
  transition: all 0.15s;
}
.producer-pill:hover {
  background: var(--color-bg, #f9f9f9);
  color: var(--color-text);
}
.producer-pill.active {
  background: var(--color-bg, #f9f9f9);
  color: var(--color-accent, #4285f4);
  font-weight: 600;
  border-left-color: var(--color-accent, #4285f4);
}

.feeds-topic-dot {
  display: inline-block;
  background: var(--color-accent, #4285f4);
  color: #fff;
  font-size: 0.55rem;
  min-width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  border-radius: 7px;
  margin-left: 0.3rem;
  font-weight: 700;
}
@media (max-width: 768px) {
  .feeds-topic-wrap { flex-direction: column; }
  .feeds-topic-nav {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: none;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    gap: 0.15rem;
    padding: 0.3rem;
  }
  .feeds-topic-nav .topic-nav-item {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
    flex-shrink: 0;
  }
  .feeds-topic-nav .topic-nav-item.active {
    border-bottom-color: var(--color-accent, #4285f4);
    border-left-color: transparent;
  }
  .feeds-sidebar-col {
    max-width: none;
    flex-direction: column;
  }
  .feeds-sidebar-col .feeds-topic-nav { border-right: none; }
  .feeds-producer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    gap: 0.15rem;
    padding: 0.3rem;
  }
  .producer-pill { width: auto; }
}
.btn-save-feed {
  background: #34a853;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  cursor: pointer;
  white-space: nowrap;
  margin-left: auto;
}
.btn-save-feed:hover { opacity: 0.85; }
.btn-save-feed:disabled { opacity: 0.5; cursor: default; }
/* Custom dropdown inside tab button */
.feeds-dd-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.feeds-dd-label {
  font-size: inherit;
  font-weight: inherit;
}
.feeds-dd-arrow {
  font-size: 0.6em;
  margin-left: 0.2rem;
  opacity: 0.6;
}
.feeds-dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 200px;
  z-index: 500;
  padding: 0.3rem 0;
  font-weight: 400;
  color: var(--color-text);
}
.feeds-dd-menu.open { display: block; }
.feeds-dd-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
}
.feeds-dd-item:hover { background: var(--color-hover, #f5f5f5); }
.feeds-dd-item.selected { font-weight: 600; color: var(--color-accent, #4285f4); }
.feeds-dd-star {
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.4;
  margin-left: auto;
  padding: 0 0.2rem;
}
.feeds-dd-star:hover { opacity: 0.8; }
.feeds-dd-star.is-default { opacity: 1; color: #f5a623; }
.feeds-dd-sep { border-top: 1px solid var(--color-border); margin: 0.2rem 0; }
.channels-tab.active .feeds-dd-label { color: var(--color-accent, #4285f4); }
