[hidden] { display: none !important; }
.muted { color: var(--muted); font-weight: 600; }
.h2 { margin: 4px 0 16px; font: 800 20px/1.25 var(--font); letter-spacing: -0.025em; }
.row { display: flex; align-items: center; gap: 8px; }
.row.gap { gap: 10px; margin-top: 16px; }
.wrapr { flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 10px 0 0; }
.err { color: var(--bad); margin: 12px 0 0; font-size: 14px; }
.input {
  width: 100%; padding: 11px 13px; border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: rgba(6, 12, 34, 0.6); color: var(--text); outline: none;
}
.input:focus { border-color: var(--gold-line); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.input option { background: #0d1a40; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.logincard { width: 100%; max-width: 420px; text-align: center; display: flex; flex-direction: column; gap: 14px; padding: 34px 28px; }
.loginmark { width: 64px; height: 64px; margin: 0 auto 4px; object-fit: contain; }
.logincard .lead { margin: 0; }

/* App */
.appbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-bottom: 1px solid var(--line); background: var(--bg-2); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.appwrap { padding-top: 24px; }
.rec { margin-bottom: 30px; }
.rec .st { display: none; }
.rec[data-state="idle"] .st-idle,
.rec[data-state="prep"] .st-prep,
.rec[data-state="countdown"] .st-recording,
.rec[data-state="recording"] .st-recording,
.rec[data-state="paused"] .st-recording,
.rec[data-state="result"] .st-result { display: block; }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mode { position: relative; cursor: pointer; }
.mode input { position: absolute; opacity: 0; pointer-events: none; }
.mode > span { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface-2); height: 100%; }
.mode small { color: var(--muted); font-size: 13px; }
.mode input:checked + span { border-color: var(--gold-ink); background: var(--gold-soft); }
.mode input:focus-visible + span { outline: 2px solid var(--gold-ink); outline-offset: 2px; }

.prepgrid { display: grid; grid-template-columns: 280px 1fr; gap: 26px; margin-top: 10px; }
.campreview { position: relative; width: 220px; height: 220px; border-radius: 50%; overflow: hidden; background: #050a1c; border: 2px solid var(--gold-line); margin: 0 auto 14px; }
.campreview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.campreview.wide { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--r-md); }
.nocam, .noscreen { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 14px; text-align: center; padding: 10px; }
.meter { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #ffe58a 0%, #f2c94c 30%, var(--gold-2) 55%, var(--gold-light) 80%, #fff0b3 100%); transition: width 0.08s linear; }
.screenprev { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: #050a1c; border: 1px solid var(--line-strong); }
.screenprev video { width: 100%; height: 100%; object-fit: contain; }
#screenBlock .btn { margin-top: 12px; }

.recrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.recinfo { display: flex; align-items: center; gap: 14px; }
.recdot { width: 16px; height: 16px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 6px var(--bad-soft); animation: blink 1.2s ease-in-out infinite; }
.rec[data-state="paused"] .recdot, .rec[data-state="countdown"] .recdot { animation: none; background: var(--warn); box-shadow: 0 0 0 6px var(--warn-soft); }
@keyframes blink { 50% { opacity: 0.35; } }
.timer { font: 800 34px/1.1 var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.countdown { font: 900 64px/1 var(--font); color: var(--gold-ink); font-variant-numeric: tabular-nums; }
.camlive { display: block; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); margin: 18px auto 0; background: #050a1c; transform: scaleX(-1); }

.progress { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #ffe58a 0%, #f2c94c 30%, var(--gold-2) 55%, var(--gold-light) 80%, #fff0b3 100%); transition: width 0.3s ease; }
.linkrow { display: flex; gap: 10px; margin-top: 18px; }
.linkrow .input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }

/* Bibliothek */
.libhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.searchin { max-width: 260px; margin-bottom: 16px; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card); cursor: pointer; text-align: left; padding: 0; color: inherit; display: flex; flex-direction: column; }
.vcard:hover { border-color: var(--gold-line); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #050a1c; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(5, 10, 28, 0.85); padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vbody { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 8px; }
.vtitle { font: 700 15px/1.3 var(--font); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vmeta { font-size: 12.5px; color: var(--muted); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font: 600 12px/1.4 var(--font); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { color: var(--good); background: var(--good-soft); border-color: transparent; }
.pill.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.pill.bad { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.pill.gold { color: var(--gold-ink); background: var(--gold-soft); border-color: transparent; }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(3, 7, 20, 0.72); z-index: 20; display: grid; place-items: start center; overflow-y: auto; padding: 5vh 16px; }
.modalbox { position: relative; width: 100%; max-width: 520px; background: #0d1a40; border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-card); }
.modalbox.wide { max-width: 1040px; }
.x { position: absolute; right: 12px; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 26px; cursor: pointer; line-height: 1; }
.x:hover { color: var(--text); }
.dgrid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; }
.dgrid .player { aspect-ratio: 16 / 9; }
.dside .field:first-child { margin-top: 0; }
.dside .linkrow { margin-top: 6px; }
.section { margin-top: 26px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.stat b { display: block; font: 800 24px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); }
table.views { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
table.views th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.views td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.wbar { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.wbar .meter { flex: 1; }
.wbar span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tablewrap { overflow-x: auto; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #13224f; border: 1px solid var(--gold-line); color: var(--text); padding: 11px 18px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 50; max-width: 92vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 820px) {
  .modes { grid-template-columns: 1fr; }
  .grid2, .prepgrid, .dgrid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .linkrow { flex-wrap: wrap; }
  .libhead { flex-direction: column; align-items: stretch; }
  .searchin { max-width: none; }
}
