/* CLIPWERK – dunkles Studio-Design (wie Gleggmire Edit). Pink = Clipwerk, Gelb = Untertitel-Highlight, fette Caps wie gleggmires Shorts */
:root {
  --bg: #0d0a14;
  --bg-2: #15101f;
  --panel: #1a1426;
  --panel-2: #221a33;
  --line: #2f2545;
  --fg: #f1ecfb;
  --muted: #a69cbe;
  --accent: #ff3d6e;
  --accent-2: #ff8fae;
  --yellow: #ffe14d;
  --yellow-fg: #16110a;
  --red: #ff4d6d;
  --green: #3ee08f;
  --orange: #ffa23e;
  --yt: #ff3b3b;
  --radius: 14px;
  --display: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box }
html { background: var(--bg) }
body {
  margin: 0; color: var(--fg); font: 15px/1.5 var(--sans);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(255, 61, 110, .22), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(255, 225, 77, .07), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--accent-2) }
::selection { background: var(--yellow); color: var(--yellow-fg) }

/* ---------- Kopf ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px max(16px, 4vw);
  background: rgba(13, 10, 20, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg) }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #b0164a); box-shadow: 0 0 18px rgba(255, 61, 110, .55);
}
.brand .logo svg { width: 16px; height: 16px; fill: var(--yellow) }
.brand b { font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: .04em }
.brand b span { color: var(--yellow) }
nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 }
nav a {
  padding: 7px 13px; border-radius: 9px; text-decoration: none; color: var(--muted);
  font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 6px;
}
nav a.on { background: var(--panel-2); color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent) }
nav a:hover { color: var(--fg) }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block }
.dot.ok { background: var(--green); box-shadow: 0 0 8px var(--green) }
.dot.bad { background: var(--red) }
.handle { font-weight: 700; font-size: .85rem; color: var(--muted); padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px }

main { max-width: 1240px; margin: 0 auto; padding: 26px max(16px, 4vw) 70px; display: grid; gap: 26px }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; text-wrap: balance }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1 }
h1 em { font-style: normal; color: var(--yellow) }
h2 { font-size: 1.35rem; margin-bottom: 12px }
.muted { color: var(--muted) }
.eyebrow { font-weight: 800; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2) }

.flash {
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--yellow);
  padding: 11px 15px; border-radius: 10px;
}
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px }

/* ---------- Hero ---------- */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap }
.hero .sub { color: var(--muted); margin-top: 8px; font-weight: 600 }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap }

/* ---------- Knöpfe ---------- */
button, .btn {
  font: inherit; font-weight: 700; border: 1px solid var(--line); background: var(--panel-2); color: var(--fg);
  padding: 9px 16px; border-radius: 10px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; transition: transform .08s ease, border-color .15s ease;
}
button:hover, .btn:hover { border-color: var(--accent-2) }
button:active, .btn:active { transform: translateY(1px) }
button.primary, .btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--yellow-fg) }
button.ai, .btn.ai {
  background: linear-gradient(135deg, var(--accent), #c81d56); border-color: transparent; color: #fff;
  box-shadow: 0 0 22px rgba(255, 61, 110, .45);
}
button.small { padding: 5px 11px; font-size: .82rem; border-radius: 8px }
button.ghost { background: transparent }
button svg, .btn svg { width: 16px; height: 16px; fill: currentColor; flex: none }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--yellow); outline-offset: 2px;
}

/* ---------- Status-Kacheln ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; min-width: 0 }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums }
.stat span { color: var(--muted); font-size: .84rem; font-weight: 600 }
.stat.live { border-color: rgba(255, 61, 110, .6); box-shadow: 0 0 0 1px rgba(255, 61, 110, .25), 0 0 26px rgba(255, 61, 110, .18) }
.stat .bar { height: 6px; background: var(--bg-2); border-radius: 6px; overflow: hidden; margin-top: 8px }
.stat .bar i { display: block; height: 100%; background: var(--yellow) }
.live-tag {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-weight: 800; font-size: .7rem;
  letter-spacing: .1em; color: #fff; background: var(--red); padding: 2px 8px; border-radius: 5px; vertical-align: middle;
}
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }
.live-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite }

.progress { background: var(--panel); border: 1px solid rgba(255, 61, 110, .5); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px }
.progress .bar { height: 8px; background: var(--bg-2); border-radius: 8px; overflow: hidden }
.progress .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--yellow)) }

/* ---------- Filter ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap }
.chip {
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 99px;
  padding: 6px 13px; font-weight: 700; font-size: .85rem; cursor: pointer;
}
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg) }
.chip small { font-weight: 600; opacity: .75; margin-left: 4px }

/* ---------- Clip-Karten ---------- */
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px }
.clip { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0 }
.clip .media { position: relative; aspect-ratio: 9 / 16; max-height: 420px; background: #000 center / cover no-repeat }
.clip .media img, .clip .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.clip .media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); pointer-events: none }
.clip .badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2 }
.badge { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff }
.badge.src-twitch { background: var(--accent) }
.badge.src-youtube { background: var(--yt) }
.badge.src-edit { background: var(--yellow); color: var(--yellow-fg) }
.st-neu { box-shadow: inset 0 0 0 1px #6ea3ff; color: #a9c8ff }
.st-fertig { box-shadow: inset 0 0 0 1px var(--orange); color: var(--orange) }
.st-hochgeladen { box-shadow: inset 0 0 0 1px var(--green); color: var(--green) }
.st-fehler { box-shadow: inset 0 0 0 1px var(--red); color: var(--red) }
.st-aussortiert, .st-übersprungen { color: var(--muted) }
.score {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-size: 1.35rem; line-height: 1;
  background: var(--yellow); color: var(--yellow-fg); box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
}
.score.low { background: var(--panel-2); color: var(--muted) }
.score small { font-family: var(--sans); font-size: .55rem; font-weight: 800; display: block; margin-top: -6px }
.clip .play { position: absolute; left: 10px; bottom: 12px; z-index: 2; background: rgba(0, 0, 0, .6); border-color: transparent }
.clip .body { padding: 13px 14px 15px; display: grid; gap: 9px; flex: 1; min-width: 0 }
.clip .title { font-weight: 800; overflow-wrap: anywhere; line-height: 1.3 }
.clip .meta { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; font-weight: 600 }
.clip .reason { font-size: .84rem; color: #d9d0ee; border-left: 3px solid var(--accent); padding-left: 9px }
.clip .err { color: var(--red); font-size: .8rem; overflow-wrap: anywhere }
.clip textarea { min-height: 64px; font-size: .85rem }
.clip .row { gap: 6px }

/* ---------- Formulare ---------- */
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.between { justify-content: space-between }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: start }
label { display: grid; gap: 5px; font-weight: 700; font-size: .88rem }
label small { font-weight: 500; color: var(--muted) }
label.check { display: flex; gap: 9px; align-items: center }
input, select, textarea {
  font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg-2); color: var(--fg); width: 100%; min-width: 0;
}
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--yellow) }
input[type=file] { padding: 7px }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0; display: grid; gap: 16px; background: var(--panel) }
legend { font-family: var(--display); font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; padding: 0 8px; color: var(--yellow) }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; top: 66px; z-index: 5; padding: 8px 0; background: linear-gradient(var(--bg) 70%, transparent) }
.subnav a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: .85rem; padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel) }
.subnav a:hover { color: var(--fg) }
.box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px }

table { width: 100%; border-collapse: collapse; font-size: .88rem }
td, th { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top }
th { color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase }
td.lvl { font-weight: 800; white-space: nowrap }
.FEHLER { color: var(--red) } .WARNUNG { color: var(--orange) } .INFO { color: var(--accent-2) }
.scroll { overflow-x: auto }
code { background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; font-size: .85em; overflow-wrap: anywhere }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 7px }
details summary { cursor: pointer; font-weight: 700 }
.stage { position: relative; max-width: 860px; overflow: hidden; border-radius: 12px; touch-action: none; cursor: crosshair }
.stage img { width: 100%; display: block }
.stage .box-sel { position: absolute; border: 3px solid var(--yellow); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); border-radius: 4px }
.login { max-width: 380px; margin: 14vh auto; padding: 0 16px }
.empty { text-align: center; padding: 40px 20px; color: var(--muted) }
.foot { color: var(--muted); font-size: .78rem; text-align: center }

@media (max-width: 720px) {
  .top { gap: 10px }
  nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap }
  nav a { white-space: nowrap }
  .handle { margin-left: auto }
  .clips { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px }
  .clip .body { padding: 10px }
  .subnav { top: 104px }
}
@media (prefers-reduced-motion: reduce) { .live-tag::before { animation: none } * { transition: none !important } }

/* ---------- Clipwerk-Ergänzungen ---------- */
.badge.ser { color: #fff }
.st-geplant { color: var(--muted) }
.st-in_arbeit { box-shadow: inset 0 0 0 1px #6ea3ff; color: #a9c8ff }
.st-wartet_freigabe { box-shadow: inset 0 0 0 1px var(--yellow); color: var(--yellow) }
.st-bereit { box-shadow: inset 0 0 0 1px var(--orange); color: var(--orange) }
.st-veroeffentlicht { box-shadow: inset 0 0 0 1px var(--green); color: var(--green) }
.st-verworfen { color: var(--muted) }
.views { position: absolute; right: 10px; bottom: 12px; z-index: 2; font-weight: 800; font-size: .8rem; background: rgba(0,0,0,.6); padding: 3px 8px; border-radius: 6px; font-variant-numeric: tabular-nums }
.ok-txt { color: var(--green); font-weight: 700 }
.warn-txt { color: var(--orange); font-weight: 700 }
.look { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 22px; align-items: start }
.phone { position: relative; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #000 center / cover; border: 6px solid #000; box-shadow: 0 10px 40px rgba(0,0,0,.6) }
.phone .sub-prev { position: absolute; left: 6%; right: 6%; text-align: center; font-family: var(--display); color: #fff; text-transform: uppercase;
  -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 2px 2px 0 #000; line-height: 1.05 }
.phone .sub-prev b { color: var(--accent); font-weight: 400 }
.phone .badge-prev { position: absolute; left: 4.4%; top: 7.3%; background: var(--accent); color: #fff; font-family: var(--display); font-size: .8rem; padding: 4px 8px; border-radius: 6px; line-height: 1.1 }
.phone .ki-prev { position: absolute; right: 3.7%; bottom: 5%; background: rgba(0,0,0,.55); color: #fff; font-size: .55rem; font-weight: 800; padding: 2px 6px; border-radius: 4px }
.shot { margin-top: 10px; border-radius: 8px; border: 1px solid var(--line); max-width: 100% }
@media (max-width: 720px) { .look { grid-template-columns: 1fr } .phone { max-width: 260px } }
.slot-time { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px }
.slot-time b { font-family: var(--display); font-weight: 400; font-size: 3rem; line-height: 1; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.4) }
.slot-time span { color: rgba(255,255,255,.75); font-weight: 700; font-size: .85rem }
.clip .media:not(:has(img)) { max-height: 260px }
input[type=range] { accent-color: var(--accent); padding: 0 }
[hidden] { display: none !important }
