/* ============================================
   LUMENTUBE — style.css
   Mitternachtsblau · Lumen-Glow · Intent-First
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=DM+Mono:wght@300;400&display=swap');

/* ── Variables ── */
:root {
  --bg:          #0a0e17;
  --bg-2:        #0f1520;
  --bg-3:        #151d2e;
  --bg-4:        #1a2338;
  --border:      rgba(255,255,255,0.06);
  --border-glow: rgba(100,160,255,0.18);
  --text:        #f0f4ff;
  --text-dim:    #8a9ab8;
  --text-dimmer: #5a6880;
  --accent:      #4d9fff;
  --accent-glow: rgba(77,159,255,0.15);
  --accent-soft: rgba(77,159,255,0.08);
  --green:       #2d6a4f;
  --green-light: #52b788;
  --green-bg:    #0d1f17;
  --font-main:   'DM Sans', sans-serif;
  --font-mono:   'DM Mono', monospace;
  --radius:      10px;
  --radius-lg:   16px;
  --transition:  0.22s cubic-bezier(0.4,0,0.2,1);
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 48px rgba(0,0,0,0.6);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ── Layout Shell ── */
/* Curtain-Start: nur Hero. Nach Suche schiebt sich die Sidebar rein. */
/* max-width = 21-Zoll-Anker (Full HD). Breitere Screens bekommen nur Luft. */
.shell {
  display: grid;
  grid-template-columns: 0 1fr;
  grid-template-rows: 56px 1fr;
  height: 100vh;
  width: 100%;
  transition: grid-template-columns 0.32s cubic-bezier(0.4,0,0.2,1);
}
/* Sidebar offen (Push-Modus) ab 701px */
@media (min-width: 701px) {
  .shell.nav-open { grid-template-columns: 280px 1fr; }
}

/* ── Top Bar ── */
.topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  padding: 0 16px 0 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
}

.topbar-left {
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hamburger {
  width: 36px;
  height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
  transition: background var(--transition);
}
.hamburger:hover { background: var(--bg-3); }
.hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: var(--transition);
}

.logo {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.logo span { color: var(--accent); }
.logo-powered {
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-dimmer);
  display: flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
}
.logo-powered img {
  height: 8px;
  opacity: 0.5;
  vertical-align: middle;
}

/* Search in topbar (visible after search) */
.topbar-search {
  flex: 1;
  max-width: 520px;
  display: none;
}
.topbar-search.visible { display: block; }

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px 44px 8px 16px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input::placeholder { color: var(--text-dimmer); }
.search-input:focus {
  border-color: var(--border-glow);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 20px var(--accent-glow);
}

.search-btn {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
}
.search-btn:hover { opacity: 0.85; }
.search-btn svg { width: 13px; height: 13px; stroke: #fff; }

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.browser-link {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  opacity: 0.5;
  transition: opacity var(--transition);
}
.browser-link:hover { opacity: 1; }
.browser-link img { width: 20px; height: 20px; }

/* ── Sidebar (Menü, grau, schiebt Inhalt) ── */
/* Füllt IMMER die volle linke Höhe (= Zeile 2), scrollt nie als Ganzes. */
.sidebar {
  grid-column: 1;
  grid-row: 2;
  height: 100%;
  background: #f4f4f5;
  border-right: 1px solid transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.shell.nav-open .sidebar,
.watch-shell.nav-open .sidebar { border-right-color: #e2e2e4; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e4e4e6;
  flex-shrink: 0;
  min-width: 280px;
}
.sidebar-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f0f0f;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sidebar-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #2a2a2a;
  opacity: 0.85;
  transition: opacity var(--transition), background var(--transition);
}
.sidebar-close:hover { opacity: 1; background: #e8e8ea; }

.sidebar-nav {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  min-width: 280px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  color: #111111;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}
.sidebar-item:hover {
  background: #e8e8ea;
  color: #000000;
}
/* Einheitlicher Menüpunkt-Marker (Funkel-Icon in Akzentfarbe) */
.sidebar-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--accent);
}
.sidebar-item-icon svg {
  width: 30px;
  height: 30px;
}
.sidebar-item:hover .sidebar-item-icon { color: var(--accent); }

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid #e4e4e6;
  flex-shrink: 0;
  min-width: 280px;
}
.lang-label {
  font-size: 11px;
  color: #3a3a3a;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.lang-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lang-select {
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background: #fff;
  font-size: 13px;
  color: #111;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.lang-select:focus {
  border-color: var(--accent);
}

/* Overlay nur im Float-Modus (schmale Bildschirme) */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* ── Feed in der Sidebar (unter "Videos") ── */
.sidebar-feed {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 280px;
  border-top: 1px solid #e4e4e6;
}
.sidebar-feed-label {
  padding: 12px 20px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #3a3a3a;
  flex-shrink: 0;
}
.sidebar-feed .feed-stream {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #ececee;
  scrollbar-width: thin;
  scrollbar-color: #c8c8cc transparent;
}
.sidebar-feed .feed-composer {
  padding: 10px 12px;
  border-top: 1px solid #e4e4e6;
  background: #f4f4f5;
  flex-shrink: 0;
}
.sidebar-feed .composer-prompt {
  font-size: 11px;
  color: #222222;
  margin-bottom: 6px;
}
.sidebar-feed .composer-chars { color: #555555; }
.sidebar-feed .composer-msg::placeholder,
.sidebar-feed .composer-link::placeholder,
.sidebar-feed .composer-alias::placeholder { color: #888888; }

/* ── Main Content ── */
/* Scrollt intern; Fußleiste klebt unten (Sticky-Footer). Sidebar bleibt unberührt. */
.main {
  grid-column: 2;
  grid-row: 2;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
}

/* Fußleiste schließt an den Inhalt an, bleibt unten, scrollt mit den Videos mit */
.site-footer {
  margin-top: auto;
  text-align: center;
  padding: 18px 20px;
  font-size: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.site-footer a { color: var(--text-dimmer); text-decoration: none; }
.site-footer a:hover { color: var(--text-dim); }

/* ── Hero Search (Startseite) ── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  padding: 40px 24px;
}

.hero-logo {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.hero-logo strong {
  color: var(--text);
  font-weight: 500;
}
.hero-logo span { color: var(--accent); }
.hero-logo .logo-powered {
  font-size: 14px;
}
.hero-logo .logo-powered img {
  height: 14px;
}

.hero-search-wrap {
  width: 100%;
  max-width: 560px;
  position: relative;
}

.hero-input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 18px 56px 18px 28px;
  font-size: 16px;
  font-weight: 300;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  letter-spacing: 0.01em;
}
.hero-input::placeholder { color: var(--text-dimmer); }
.hero-input:focus {
  background: var(--bg-3);
  border-color: var(--border-glow);
  box-shadow:
    0 0 0 4px var(--accent-soft),
    0 0 40px var(--accent-glow),
    0 0 80px rgba(77,159,255,0.06);
}

.hero-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition), transform var(--transition);
}
.hero-search-btn:hover { opacity: 0.85; transform: translateY(-50%) scale(1.05); }
.hero-search-btn svg { width: 17px; height: 17px; stroke: #fff; }

/* ── Platzhalter „Im Aufbau…" ── */
.construction {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 40px 24px;
}
.construction.visible { display: flex; }
.construction-text {
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

/* ── Results View ── */
/* max-width begrenzt Player + Grid, sodass beide zusammen in die Höhe passen.
   Größer = Video größer (weniger Luft unten), kleiner = mehr Luft. */
.results {
  display: none;
  flex-direction: column;
  padding: 24px;
  gap: 20px;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}
.results.visible { display: flex; flex: 1; }

/* Active video player */
.active-player {
  display: none;
  flex-direction: column;
  gap: 12px;
}
.active-player.visible { display: flex; }

/* Player 16:9, volle Breite des (begrenzten) Inhalts */
.active-player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.active-player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.active-player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.share-label {
  font-size: 11px;
  color: var(--text-dimmer);
  font-family: var(--font-mono);
  white-space: nowrap;
  flex-shrink: 0;
}
.share-input {
  flex: 1;
  min-width: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  outline: none;
  cursor: text;
}
.share-copy-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  flex-shrink: 0;
  transition: all var(--transition);
}
.share-copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.autoplay-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.autoplay-toggle {
  width: 36px;
  height: 20px;
  background: var(--bg-4);
  border-radius: 10px;
  border: 1px solid var(--border);
  position: relative;
  transition: background var(--transition);
}
.autoplay-toggle.on { background: var(--accent); border-color: var(--accent); }
.autoplay-toggle::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform var(--transition);
}
.autoplay-toggle.on::after { transform: translateX(16px); }

.nav-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.nav-btn {
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11px;
  transition: all var(--transition);
}
.nav-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.nav-btn:disabled { opacity: 0.3; cursor: default; }
.nav-counter { padding: 0 6px; }

/* ── Video Grid ── */
.grid-label {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dimmer);
  margin-bottom: -8px;
}
.yt-attribution {
  margin: 8px 0 -4px;
  line-height: 1;
}

/* ── Kategorie-Chips ── */
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}
.cat-chips-results {
  justify-content: flex-start;
  margin-top: 0;
  margin-bottom: 4px;
}
.cat-chip {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-dim);
  white-space: nowrap;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.cat-chip:hover { border-color: var(--border-glow); color: var(--text); }
.cat-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Bubblebreaker-Switch ── */
.bubble-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-dim);
  white-space: nowrap;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.cat-chips-results .bubble-switch { margin-top: 0; }
.bubble-switch:hover { border-color: var(--border-glow); color: var(--text); }
.bubble-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  flex-shrink: 0;
  transition: background var(--transition), box-shadow var(--transition);
}
.bubble-switch.on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.bubble-switch.on .bubble-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Bubblebreaker-Brücke ── */
.bridge-note {
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin: 4px 0;
}
.bridge-note[hidden] { display: none; }
.bridge-why { color: var(--text-dim); margin-left: 6px; }

/* ── Zeilen-Label + Karussell ── */
.row-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 8px 0 -4px;
}

.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.carousel-nav {
  position: absolute;
  z-index: 10;
  width: 32px;
  height: 80px;
  background: rgba(10, 14, 23, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid var(--border);
  display: none; /* Standardmäßig aus */
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition), background var(--transition);
  border-radius: 4px;
  cursor: pointer;
}

@media (pointer: fine) {
  .carousel-wrapper:hover .carousel-nav { display: flex; }
  .carousel-nav:hover { background: var(--bg-4); border-color: var(--accent); }
}

.carousel-nav.left { left: -10px; }
.carousel-nav.right { right: -10px; }

.carousel-nav svg {
  width: 20px;
  height: 20px;
}
.carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-4) transparent;
}
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 3px; }

.vid-card {
  flex: 0 0 200px;
  width: 200px;
  cursor: pointer;
  scroll-snap-align: start;
}
.vid-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-3);
}
.vid-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform var(--transition);
}
.vid-card:hover .vid-thumb img { transform: scale(1.05); }
.vid-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  background: linear-gradient(to top, rgba(10,14,23,0.55), transparent 55%);
  transition: opacity var(--transition);
}
.vid-card:hover .vid-play { opacity: 1; }
.vid-play svg {
  width: 38px; height: 38px;
  fill: rgba(255,255,255,0.95);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.vid-badge-klein {
  position: absolute; left: 6px; bottom: 6px;
  font-size: 10px; padding: 2px 7px; border-radius: 10px;
  background: rgba(82,183,136,0.92); color: #fff; font-weight: 500;
}
.vid-title {
  font-size: 13px; line-height: 1.3; margin-top: 7px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vid-channel { font-size: 11px; color: var(--text-dimmer); margin-top: 3px; }
.carousel-empty { font-size: 13px; color: var(--text-dimmer); padding: 20px 4px; }
.skeleton-box {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

.video-tile {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.video-tile:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tile-thumb {
  position: relative;
  padding-top: 56.25%;
  background: var(--bg-4);
  overflow: hidden;
}
.tile-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.video-tile:hover .tile-thumb img { transform: scale(1.04); }

.tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,14,23,0.8) 0%, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.video-tile:hover .tile-overlay { opacity: 1; }
.play-icon {
  width: 44px;
  height: 44px;
  background: rgba(77,159,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-icon svg { width: 18px; height: 18px; fill: #fff; margin-left: 2px; }

.tile-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(10,14,23,0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
}

.tile-info {
  padding: 10px 12px 12px;
}
.tile-category {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 4px;
  font-family: var(--font-mono);
}
.tile-title {
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-channel {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Loading skeleton */
.tile-skeleton {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.skeleton-thumb {
  padding-top: 56.25%;
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.skeleton-line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-line.short { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Feed Panel ── */
.feed-panel {
  grid-column: 3;
  grid-row: 2;
  border-left: 1px solid #b0b0b0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  color: #000000;
}

.feed-top {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #ffffff;
}

.feed-stream {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: #d0d0d0 transparent;
  background: #f8f8f8;
}

.feed-post {
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid #d0d0d0;
  background: #ffffff;
  transition: border-color var(--transition);
  animation: fadeSlideIn 0.3s ease;
}
.feed-post:hover { border-color: #999; }

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

.feed-post-msg {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 4px;
  word-break: break-word;
}
.feed-post-link {
  font-size: 11px;
  font-family: var(--font-mono);
  color: #1a6ef5;
  opacity: 0.8;
  word-break: break-all;
  display: block;
  margin-top: 2px;
}
.feed-post-link:hover { opacity: 1; }
.feed-post-meta {
  font-size: 10px;
  color: #555555;
  margin-top: 6px;
  display: flex;
  gap: 8px;
}

/* Grade-based colors — dunkler Text auf hellem Grund, hoher Kontrast */
/* Grade 1-2 (authentisch): fast schwarz auf weiß, fett */
.grade-1 { color: #0a0a0a; background: #ffffff; border-color: #d0d0d0; }
.grade-2 { color: #1a1a1a; background: #f7f7f7; border-color: #d5d5d5; }
/* Grade 3: Unbequem/Unachtsam */
.grade-3 { color: #555555; background: #eeeeee; border-color: #cccccc; }
/* Grade 4: Toxisch */
.grade-4 { color: #888888; background: #e4e4e4; border-color: #c0c0c0; }
/* Grade 5: Schädlich */
.grade-5 { color: #cccccc; background: #d0d0d0; border-color: #b0b0b0; }

/* Authentische Posts fett */
.grade-1 .feed-post-msg,
.grade-2 .feed-post-msg { font-weight: 500; }

/* ── Feed Composer ── */
.feed-composer {
  border-top: 1px solid #e0e0e0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
}

.composer-prompt {
  font-size: 13px;
  color: #222222;
  line-height: 1.5;
  font-weight: 500;
}

.composer-msg {
  width: 100%;
  background: #f5f5f5;
  border: 1px solid #d0d0d0;
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 12px;
  color: #111111;
  resize: none;
  height: 60px;
  outline: none;
  transition: border-color var(--transition);
}
.composer-msg:focus { border-color: #4d9fff; }
.composer-msg::placeholder { color: #aaaaaa; }

.composer-chars {
  font-size: 10px;
  font-family: var(--font-mono);
  color: #aaaaaa;
  text-align: right;
}
.composer-chars.warn { color: #e07800; }
.composer-chars.over { color: #cc0000; }

.composer-link {
  width: 100%;
  background: #f5f5f5;
  border: 1px solid #d0d0d0;
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: #111111;
  outline: none;
  transition: border-color var(--transition);
}
.composer-link:focus { border-color: #4d9fff; }
.composer-link::placeholder { color: #aaaaaa; }

.composer-alias {
  width: 100%;
  background: #f5f5f5;
  border: 1px solid #d0d0d0;
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 12px;
  color: #111111;
  outline: none;
  transition: border-color var(--transition);
}
.composer-alias:focus { border-color: #4d9fff; }
.composer-alias::placeholder { color: #aaaaaa; }

.composer-actions {
  display: flex;
  gap: 6px;
}

.btn-preview {
  flex: 1;
  padding: 7px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-3);
  transition: all var(--transition);
}
.btn-preview:hover { border-color: var(--accent); color: var(--accent); }

.btn-discard {
  flex: 1;
  padding: 7px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,80,80,0.25);
  font-size: 12px;
  color: #ff6b6b;
  background: rgba(255,80,80,0.06);
  transition: all var(--transition);
  display: none;
}
.btn-discard.visible { display: block; }
.btn-discard:hover { border-color: #ff6b6b; background: rgba(255,80,80,0.12); }

.btn-submit {
  flex: 1;
  padding: 7px;
  border-radius: var(--radius);
  background: var(--accent);
  font-size: 12px;
  color: #fff;
  font-weight: 500;
  transition: opacity var(--transition);
  display: none;
}
.btn-submit.visible { display: block; }
.btn-submit:hover { opacity: 0.85; }

/* Preview card */
.preview-card {
  display: none;
  border-radius: var(--radius);
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  background: #f5f5f5;
}
.preview-card.visible { display: block; }

.preview-grade-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.preview-grade-track {
  flex: 1;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}
.preview-grade-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.preview-grade-num {
  font-size: 10px;
  font-family: var(--font-mono);
  color: #555555;
  white-space: nowrap;
}
.preview-category {
  font-size: 10px;
  color: #555555;
  margin-top: 4px;
  font-style: italic;
}

/* ── Watch Page ── */
.watch-shell {
  display: grid;
  grid-template-columns: 0 1fr;
  grid-template-rows: 56px 1fr;
  height: 100vh;
  width: 100%;
  transition: grid-template-columns 0.32s cubic-bezier(0.4,0,0.2,1);
}
@media (min-width: 701px) {
  .watch-shell.nav-open { grid-template-columns: 280px 1fr; }
}

.watch-main {
  grid-column: 2;
  grid-row: 2;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.watch-player-wrap {
  position: relative;
  width: 100%;
  max-width: calc(72vh * 16 / 9);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.watch-player-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.watch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  max-width: calc(72vh * 16 / 9);
}

.mehr-davon-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--border-glow);
  color: var(--accent);
  font-size: 12px;
  font-family: var(--font-main);
  transition: all var(--transition);
  white-space: nowrap;
}
.mehr-davon-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Utility ── */
.hidden { display: none !important; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 2px; }

/* ── Responsive ── */

/* Der alte rechte Feed-Panel existiert nicht mehr — Feed ist in der Sidebar */
.feed-panel { display: none !important; }

/* Hamburger immer sichtbar — Feed/Menü auch ohne Suche erreichbar */

/* Float-Modus: Sidebar nimmt >40% ein (≤700px) → schwebt als Drawer über dem Inhalt */
@media (max-width: 700px) {
  /* Grid wird echt einspaltig: keine Phantom-Sidebarspalte mehr */
  .shell, .watch-shell { grid-template-columns: 100%; }
  .main, .watch-main { grid-column: 1; }

  .sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    width: 280px;
    height: calc(100vh - 56px);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 4px 0 28px rgba(0,0,0,0.35);
    border-right-color: #e2e2e4;
  }
  /* min-width der Inhalte hier neutralisieren (Sidebar ist schon fix 280px breit) */
  .sidebar-header, .sidebar-nav, .sidebar-footer,
  .sidebar-feed, .sidebar-feed-label { min-width: 0; }

  .shell.nav-open .sidebar,
  .watch-shell.nav-open .sidebar { transform: translateX(0); }

  .shell.nav-open .sidebar-overlay,
  .watch-shell.nav-open .sidebar-overlay {
    opacity: 1;
    pointer-events: all;
  }
}

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