:root {
  --bg: #0b0b0f;
  --bg-elev: #16161d;
  --surface: #1e1e27;
  --text: #f5f5f7;
  --muted: #9a9aa5;
  --accent: #e50914;
  --accent-hover: #ff1f2a;
  --radius: 10px;
  --maxw: 1280px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── Header ───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: linear-gradient(180deg, rgba(0,0,0,0.85), rgba(0,0,0,0));
  transition: background 0.2s;
}
.site-header.solid { background: var(--bg); border-bottom: 1px solid #222; }
.brand {
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
}
/* ── Header-Suche (mittig) ────────────────────────── */
.header-search { flex: 0 1 460px; margin: 0 24px; min-width: 0; }
.header-search input {
  width: 100%; padding: 9px 16px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid #3a3a45;
  color: var(--text); font-size: 14px;
}
.header-search input::placeholder { color: #b4b4bd; }
.header-search input:focus {
  outline: none; border-color: var(--accent); background: rgba(0, 0, 0, 0.55);
}

.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-right .email { color: var(--muted); font-size: 14px; text-decoration: none; }
.nav-right a.email:hover { color: var(--text); text-decoration: underline; }

.lang-switch {
  background: #2a2a33; color: var(--text);
  border: 1px solid #3a3a45; border-radius: 6px;
  padding: 8px 10px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.lang-switch:focus { outline: none; border-color: var(--accent); }
.lang-float { position: fixed; top: 16px; right: 16px; z-index: 60; }

/* Sprachumschalter als Flaggen */
.lang-flags { display: inline-flex; gap: 6px; align-items: center; }
.flag {
  padding: 0; margin: 0; border: 2px solid transparent; border-radius: 4px;
  background: none; cursor: pointer; width: 30px; height: 20px;
  overflow: hidden; line-height: 0; opacity: 0.45; transition: opacity 0.15s, border-color 0.15s;
}
.flag svg { width: 100%; height: 100%; display: block; }
.flag:hover { opacity: 0.85; }
.flag.active { opacity: 1; border-color: var(--text); }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 6px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: #2a2a33;
  color: var(--text);
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: #3a3a45; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: #5a1d22; color: #ffb3b8; }
.btn-danger:hover { background: #7a262d; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  position: relative;
  height: 62vh;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,11,15,0.2) 0%, rgba(11,11,15,0.5) 60%, var(--bg) 100%),
              linear-gradient(90deg, rgba(11,11,15,0.8) 0%, rgba(11,11,15,0) 60%);
}
.hero-inner { position: relative; z-index: 2; padding: 0 0 56px; max-width: 620px; }
.hero h1 { font-size: 52px; margin: 0 0 14px; line-height: 1.05; }
.hero p { color: #d4d4dc; font-size: 17px; line-height: 1.5; margin: 0 0 22px; }
.hero .meta { color: var(--muted); margin-bottom: 10px; font-size: 14px; }

/* ── Rows ─────────────────────────────────────────── */
.rows { padding: 8px 0 60px; }
.row { margin: 28px 0; }
.row h2 { font-size: 20px; margin: 0 0 12px; font-weight: 700; }
.row-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 180px;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 8px;
}
.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}
.card:hover { transform: scale(1.05); box-shadow: var(--shadow); z-index: 2; }
.card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.card .card-body { padding: 8px 10px; }
.card .card-title { font-size: 14px; font-weight: 600; }
.card .card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,0.7); color: #fff;
  font-size: 11px; padding: 3px 7px; border-radius: 4px; text-transform: uppercase;
}
.card .progress { height: 4px; width: 100%; background: #3a3a45; }
.card .progress span { display: block; height: 100%; background: var(--accent); }

/* ── Auth / Card pages ────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, #20202b, var(--bg));
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: rgba(20,20,28,0.95);
  border: 1px solid #26262f;
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.auth-card h1 { margin: 0 0 6px; font-size: 28px; }
.auth-card .sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px;
  background: #0f0f15; border: 1px solid #2c2c38; border-radius: 8px;
  color: var(--text); font-size: 15px;
}
.field input:focus { outline: none; border-color: var(--accent); }
.form-foot { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; }
.form-foot a { color: var(--text); font-weight: 600; }
.alert {
  display: none;
  background: #2a1416; border: 1px solid #5a1d22; color: #ffb3b8;
  padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px;
}
.alert.show { display: block; }
.alert.ok { background: #11271a; border-color: #1f5b35; color: #9ff0bd; }

/* ── Paywall ──────────────────────────────────────── */
.pay-amount { font-size: 44px; font-weight: 800; margin: 4px 0 2px; }
.pay-list { list-style: none; padding: 0; margin: 18px 0 24px; }
.pay-list li { padding: 8px 0; color: #d4d4dc; border-bottom: 1px solid #20202a; font-size: 15px; }
.pay-list li::before { content: "✓ "; color: #3ddc84; font-weight: 700; }
.status-line { margin-top: 16px; font-size: 14px; color: var(--muted); min-height: 20px; }
.spinner {
  width: 16px; height: 16px; border: 2px solid #555; border-top-color: var(--accent);
  border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 8px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Player ───────────────────────────────────────── */
.player-page { background: #000; min-height: 100vh; }
.player-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px; padding: 16px 24px;
  background: linear-gradient(180deg, rgba(0,0,0,0.8), rgba(0,0,0,0));
}
.player-top .title { font-size: 16px; font-weight: 600; }
.player-controls { margin-left: auto; display: flex; gap: 10px; }
.video-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
video { width: 100%; max-height: 100vh; background: #000; }

/* ── Detail Modal ─────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.7);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop.show { display: flex; }
.modal {
  width: 100%; max-width: 760px; background: var(--bg-elev);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
  max-height: 90vh; overflow-y: auto;
}
.modal-hero { height: 300px; background-size: cover; background-position: center; position: relative; }
.modal-hero::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, transparent, var(--bg-elev)); }
.modal-body { padding: 20px 28px 28px; }
.modal-body h2 { margin: 0 0 8px; font-size: 28px; }
.modal-body .meta { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.modal-body p { color: #d4d4dc; line-height: 1.55; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ep-list { margin-top: 18px; }
.ep {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid #26262f; border-radius: 8px; margin-bottom: 8px;
}
.ep:hover { background: var(--surface); }
.ep .ep-meta { color: var(--muted); font-size: 13px; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 20px; cursor: pointer;
}

/* ── Suchergebnisse ───────────────────────────────── */
.results { padding: 28px 0 60px; }
.results h2 { font-size: 20px; margin: 0 0 16px; font-weight: 700; }
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.center-note { text-align: center; color: var(--muted); padding: 80px 24px; }
.loading { text-align: center; padding: 120px 24px; color: var(--muted); }

/* ── Admin ────────────────────────────────────────── */
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border: 1px solid #26262f; border-radius: 10px; padding: 14px 16px;
}
.admin-row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.admin-tags { color: var(--muted); font-size: 13px; }
.admin-guid { color: #8a8a95; font-size: 12px; font-family: ui-monospace, monospace; word-break: break-all; }
.admin-actions { display: flex; gap: 8px; flex-shrink: 0; }
.admin-actions .btn { padding: 8px 14px; font-size: 14px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field textarea, .field select {
  width: 100%; padding: 12px 14px;
  background: #0f0f15; border: 1px solid #2c2c38; border-radius: 8px;
  color: var(--text); font-size: 15px; font-family: inherit;
}
.field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.checkbox { display: flex; align-items: center; gap: 8px; color: var(--text); padding-top: 8px; }
.checkbox input { width: auto; }
.form-hint {
  background: #16202b; border: 1px solid #24384a; color: #a9c7e0;
  border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.5; margin-bottom: 16px;
}

/* Dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 28px; }
.stat-card { background: var(--surface); border: 1px solid #26262f; border-radius: 12px; padding: 18px 20px; }
.stat-value { font-size: 30px; font-weight: 800; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dash-h { font-size: 18px; margin: 0 0 12px; }
.user-search {
  width: 100%; max-width: 360px; padding: 11px 14px;
  background: #0f0f15; border: 1px solid #2c2c38; border-radius: 8px; color: var(--text); font-size: 15px;
}
.user-search:focus { outline: none; border-color: var(--accent); }
.badge-inline {
  display: inline-block; background: #2a2a33; color: var(--muted);
  font-size: 11px; padding: 2px 6px; border-radius: 4px; vertical-align: middle;
}
@media (max-width: 760px) { .dash-cols { grid-template-columns: 1fr; } }

/* Konto */
.account { max-width: 640px; }
.acc-card { background: var(--surface); border: 1px solid #26262f; border-radius: 12px; padding: 22px 24px; margin-bottom: 16px; }
.acc-card h2 { margin: 0 0 16px; font-size: 18px; }
.acc-card.danger { border-color: #5a1d22; }
.acc-card .muted { color: var(--muted); font-size: 14px; margin: -8px 0 14px; }
.acc-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #20202a; }
.acc-row:last-child { border-bottom: none; }
.acc-key { color: var(--muted); font-size: 14px; }
.acc-status { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: flex-end; }
.status-item { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.green { background: #3ddc84; box-shadow: 0 0 6px rgba(61, 220, 132, 0.6); }
.dot.red { background: #ff4d57; box-shadow: 0 0 6px rgba(255, 77, 87, 0.5); }

@media (max-width: 640px) {
  .hero h1 { font-size: 34px; }
  .row-scroller { grid-auto-columns: 134px; }
  .header-search { flex: 1 1 auto; margin: 0 8px; }
  .nav-right .email { display: none; }
  .results-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
