@charset "UTF-8";
:root {
  --bg: #0d1117;
  --fg: #e6edf3;
  --dim: #8b949e;
  --accent: #58a6ff;
  --ember: #e07a2c;
  --ember-soft: rgba(224, 122, 44, 0.55);
  --ok: #3fb950;
  --warn: #d29922;
  --off: #f85149;
  --line: rgba(139, 148, 158, 0.16);
  --pad-y: clamp(18px, 3vh, 36px);
}

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

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: radial-gradient(60vmin 60vmin at 50% 0%, rgba(88, 166, 255, 0.12), transparent 70%), radial-gradient(40vmin 40vmin at 85% 20%, rgba(224, 122, 44, 0.08), transparent 72%), var(--bg);
  color: var(--fg);
  font: 300 15px/1.5 ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(139, 148, 158, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(139, 148, 158, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(80vmax 80vmax at 50% 10%, #000 20%, transparent 80%);
  mask-image: radial-gradient(80vmax 80vmax at 50% 10%, #000 20%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

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

a:hover {
  text-decoration: underline;
}

.mono {
  font-family: ui-monospace, "DejaVu Sans Mono", Menlo, monospace;
}

/* ── Layout ────────────────────────────────────────────────────── */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  color: var(--fg);
}
.brand b {
  color: var(--accent);
  font-weight: 500;
  text-shadow: 0 0 12px rgba(88, 166, 255, 0.4);
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: 12px;
  flex-wrap: wrap;
}
.nav a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav a:hover {
  color: var(--fg);
  background: rgba(88, 166, 255, 0.08);
  text-decoration: none;
}
.nav a.is-active {
  color: var(--fg);
  background: rgba(88, 166, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.3);
}

.spacer {
  flex: 1 1 auto;
}

.viewer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--dim);
}

.container {
  width: 100%;
  padding: clamp(20px, 3vw, 40px) clamp(16px, 3vw, 48px) 80px;
}

/* ── Zweispaltiges Layout: Sidebar links · Inhalt rechts ───────── */
.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 36px);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}
.sidebar__group {
  margin-bottom: 20px;
}
.sidebar__title {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 8px;
}
.sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar__list a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--dim);
  border-left: 2px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__list a:hover {
  color: var(--fg);
  background: rgba(88, 166, 255, 0.07);
  text-decoration: none;
}
.sidebar__list a.is-active {
  color: var(--fg);
  background: rgba(88, 166, 255, 0.14);
  border-left-color: var(--accent);
}

/* Kategorie-Verwaltung (Einstellungen) */
.catrow--off {
  opacity: 0.55;
}

.catmove {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--dim);
  cursor: pointer;
  font-size: 9px;
  line-height: 1;
  padding: 1px 5px;
}
.catmove:hover:not(:disabled) {
  color: var(--fg);
  border-color: rgba(88, 166, 255, 0.5);
}
.catmove:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .sidebar__list {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
/* ── Hero / Dashboard-Kopf ─────────────────────────────────────── */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0 26px;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 200;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero .sub {
  margin-top: 6px;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}

.stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.stats .stat {
  min-width: 92px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.6);
}
.stats .stat__n {
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
}
.stats .stat__l {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #67737e;
}

.rule {
  height: 1px;
  margin: 6px 0 26px;
  background: linear-gradient(90deg, var(--ember), rgba(139, 148, 158, 0.1) 60%, transparent);
  box-shadow: 0 0 10px var(--ember-soft);
}

/* ── Rows & Grid ───────────────────────────────────────────────── */
.section {
  margin-bottom: 34px;
}
.section__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.section__head h2 {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--fg);
}
.section__head a.more {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 168px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

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

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(88, 166, 255, 0.05), rgba(13, 17, 23, 0.2) 55%), rgba(13, 17, 23, 0.9);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  color: var(--fg);
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(88, 166, 255, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  text-decoration: none;
}
.card__img {
  aspect-ratio: 2/3;
  background: #05070a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a545e;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
}
.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card--live .card__img {
  aspect-ratio: 16/9;
}
.card--live .card__img img {
  object-fit: contain;
  padding: 12px;
  box-sizing: border-box;
}
.card__body {
  padding: 9px 11px 11px;
}
.card__title {
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta {
  margin-top: 4px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: #67737e;
  display: flex;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(139, 148, 158, 0.28);
  color: var(--dim);
}
.badge--accent {
  border-color: rgba(88, 166, 255, 0.5);
  color: var(--accent);
}
.badge--ember {
  border-color: rgba(224, 122, 44, 0.5);
  color: var(--ember);
}
.badge--off {
  border-color: rgba(248, 81, 73, 0.5);
  color: var(--off);
}
.badge--ok {
  border-color: rgba(63, 185, 80, 0.5);
  color: var(--ok);
}

/* ── Panels / Forms ────────────────────────────────────────────── */
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(88, 166, 255, 0.05), rgba(13, 17, 23, 0) 60%), rgba(13, 17, 23, 0.94);
  padding: 18px 20px;
}
.panel__title {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 14px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.field label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #67737e;
}

input,
select {
  font: inherit;
  color: var(--fg);
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
}
input:focus,
select:focus {
  outline: none;
  border-color: rgba(88, 166, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  background: rgba(139, 148, 158, 0.12);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 14px;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}
.btn:hover {
  border-color: rgba(88, 166, 255, 0.5);
  background: rgba(88, 166, 255, 0.1);
  text-decoration: none;
}
.btn--accent {
  background: rgba(88, 166, 255, 0.16);
  border-color: rgba(88, 166, 255, 0.55);
  color: #cfe6ff;
}
.btn--ember {
  background: rgba(224, 122, 44, 0.16);
  border-color: rgba(224, 122, 44, 0.55);
  color: #ffd9b5;
}
.btn--danger {
  background: rgba(248, 81, 73, 0.14);
  border-color: rgba(248, 81, 73, 0.5);
  color: #ffc9c4;
}
.btn--sm {
  padding: 5px 10px;
  font-size: 10.5px;
}

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

.notice {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(13, 17, 23, 0.7);
  color: var(--dim);
  font-size: 13px;
  margin-bottom: 16px;
}
.notice--ok {
  border-color: rgba(63, 185, 80, 0.45);
  color: #b7f0c0;
}
.notice--err {
  border-color: rgba(248, 81, 73, 0.45);
  color: #ffc9c4;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.chips a {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
}
.chips a:hover {
  text-decoration: none;
  color: var(--fg);
  border-color: rgba(88, 166, 255, 0.4);
}
.chips a.is-active {
  color: var(--fg);
  border-color: rgba(88, 166, 255, 0.6);
  background: rgba(88, 166, 255, 0.12);
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar form {
  display: flex;
  gap: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th,
.table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.table th {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #67737e;
}

/* ── Detailseite ───────────────────────────────────────────────── */
.detail {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: 30px;
}
.detail__poster {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #05070a center/cover no-repeat;
  aspect-ratio: 2/3;
}
.detail__title {
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 200;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.detail__meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.detail__plot {
  color: #c9d1d9;
  line-height: 1.7;
  max-width: 70ch;
  margin-bottom: 22px;
}

.episodes {
  margin-top: 26px;
}
.episodes details {
  border-top: 1px solid var(--line);
  padding: 10px 0 4px;
}
.episodes details summary {
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
}
.episodes li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(139, 148, 158, 0.1);
  list-style: none;
  font-size: 13px;
  color: #c9d1d9;
}
.episodes li .ep-num {
  color: #67737e;
  min-width: 28px;
}

/* ── Player ────────────────────────────────────────────────────── */
.player__stage {
  position: relative;
  width: 100%;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.player__stage video {
  display: block;
  width: 100%;
  max-height: 78vh;
  background: #000;
}
.player__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.player__status {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.player__source {
  margin-top: 16px;
}
.player__source label {
  display: block;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.player__source-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.player__source input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  font-family: ui-monospace, "DejaVu Sans Mono", Menlo, monospace;
  font-size: 12px;
  color: #c9d1d9;
  background: rgba(139, 148, 158, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.login-shell {
  max-width: 420px;
  margin: 8vh auto;
}

.empty {
  padding: 40px;
  text-align: center;
  color: #4a545e;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
  }
  .detail {
    grid-template-columns: 1fr;
  }
  .detail__poster {
    max-width: 220px;
  }
  .brand {
    font-size: 13px;
  }
}
