/* ==========================================================================
   Projekt Doku – öffentliche Teilen-Seite (21.10.2026)
   Gleiche Familie wie die Anmeldung (login/assets/login.css): dunkle Bühne, Limette, Barlow/Thasadith, hell/dunkel.
   ========================================================================== */
:root {
  --bg: #0f100e; --bg2: #171815; --buehne: #0a0b09; --flaeche: #151613;
  --linie: rgba(255, 255, 255, .09); --linie2: rgba(255, 255, 255, .18);
  --text: #f5f5f5; --text2: #b4b4b4; --text3: #7d7d7d;
  --limette: #dfe46f; --limette-hi: #e9ed8c; --limette-tinte: #1f201c; --limette-weich: rgba(223, 228, 111, .13); --limette-text: #dfe46f;
  --ok: #8bd17c; --ok-weich: rgba(139, 209, 124, .14);
  --warn: #f2b441; --warn-weich: rgba(242, 180, 65, .14);
  --krit: #ff5d4f; --krit-weich: rgba(255, 93, 79, .14);
  --schatten: 0 24px 70px rgba(0, 0, 0, .45);
  --anzeige: "Thasadith", "Century Gothic", "Avenir Next", sans-serif;
  --koerper: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
:root[data-thema="hell"] {
  --bg: #eff1ea; --bg2: #f6f7f2; --buehne: #e3e5da; --flaeche: #fbfbf8;
  --linie: rgba(17, 24, 12, .1); --linie2: rgba(17, 24, 12, .2);
  --text: #1f201c; --text2: #4a4c44; --text3: #6b6d64;
  --limette-weich: rgba(190, 198, 40, .2); --limette-text: #5f6a12;
  --ok: #2f7d3a; --ok-weich: rgba(47, 125, 58, .12);
  --warn: #8a5d00; --warn-weich: rgba(242, 180, 65, .2);
  --krit: #c8321f; --krit-weich: rgba(255, 93, 79, .1);
  --schatten: 0 18px 50px rgba(30, 40, 20, .18);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.sh {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(223, 228, 111, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(137, 152, 131, .12), transparent 60%),
    var(--bg);
  color: var(--text); font: 400 16px/1.5 var(--koerper); -webkit-font-smoothing: antialiased;
}
a { color: var(--limette-text); }
.sh-seite { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 1360px; margin: 0 auto; padding: 0 clamp(14px, 3vw, 32px); }

/* ---------- Kopf ---------- */
.sh-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 0 18px; }
.sh-logo img { display: block; height: 30px; width: auto; }
.logo-hell { display: none !important; }
:root[data-thema="hell"] .logo-dunkel { display: none !important; }
:root[data-thema="hell"] .logo-hell { display: block !important; }
.sh-kopf-rechts { display: flex; align-items: center; gap: 10px; }
.sh-rund {
  width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--linie2); background: transparent; color: var(--text2); transition: color .15s, border-color .15s, background .15s;
}
.sh-rund:hover { color: var(--text); border-color: var(--limette); }
.sh-rund .ic-sonne { display: none; }
:root[data-thema="hell"] .sh-rund .ic-mond { display: none; }
:root[data-thema="hell"] .sh-rund .ic-sonne { display: block; }
.sh-rund span { display: grid; }
.sh-knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  font: 600 14.5px var(--koerper); text-decoration: none; cursor: pointer; border: 0; transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.sh-knopf:active { transform: scale(.97); }
.sh-knopf--rand { background: transparent; color: var(--text); border: 1px solid var(--linie2); }
.sh-knopf--rand:hover { border-color: var(--limette); }
.sh-knopf--limette { background: var(--limette); color: var(--limette-tinte); height: 46px; padding: 0 22px; }
.sh-knopf--limette:hover { background: var(--limette-hi); }
:focus-visible { outline: 2px solid var(--limette); outline-offset: 2px; }

/* ---------- Titel + Status ---------- */
.sh-haupt { flex: 1; display: flex; flex-direction: column; }
.sh-titelzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin: 6px 0 18px; }
.sh-kicker { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 6px; color: var(--limette-text); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.sh h1 { margin: 0; font: 700 clamp(28px, 4.2vw, 46px)/1.06 var(--anzeige); letter-spacing: .005em; }
.sh-zustand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sh-status { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 12px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--flaeche); border: 1px solid var(--linie); }
.sh-status i { width: 9px; height: 9px; border-radius: 50%; background: var(--text3); }
.sh-status--live { color: var(--ok); background: var(--ok-weich); border-color: transparent; }
.sh-status--live i { background: var(--ok); animation: sh-puls 2s ease-out infinite; }
.sh-status--pause { color: var(--warn); background: var(--warn-weich); border-color: transparent; }
.sh-status--pause i { background: var(--warn); }
.sh-status--aus { color: var(--krit); background: var(--krit-weich); border-color: transparent; }
.sh-status--aus i { background: var(--krit); }
.sh-status--laden i { animation: sh-blink 1.2s ease-in-out infinite; }
@keyframes sh-puls { 0% { box-shadow: 0 0 0 0 rgba(139, 209, 124, .55); } 70% { box-shadow: 0 0 0 8px rgba(139, 209, 124, 0); } 100% { box-shadow: 0 0 0 0 rgba(139, 209, 124, 0); } }
@keyframes sh-blink { 50% { opacity: .3; } }
.sh-alter { color: var(--text2); font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- Bühne (Livebild) ---------- */
.sh-buehne {
  position: relative; margin: 0; overflow: hidden; border-radius: 22px; background: var(--buehne); box-shadow: var(--schatten);
  aspect-ratio: 16 / 9; max-height: calc(100vh - 230px); border: 1px solid var(--linie);
}
.sh-buehne img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .35s ease; }
.sh-buehne img.da { opacity: 1; }
.sh-buehne:fullscreen { border-radius: 0; max-height: none; border: 0; background: #000; }
.sh-buehne:-webkit-full-screen { border-radius: 0; max-height: none; border: 0; background: #000; }
.sh-lader { position: absolute; inset: 0; display: grid; place-items: center; }
.sh-lader span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--limette); animation: sh-dreh .8s linear infinite; }
.sh-lader.weg { display: none; }
@keyframes sh-dreh { to { transform: rotate(360deg); } }
.sh-rund--bild { position: absolute; top: 14px; right: 14px; z-index: 3; background: rgba(10, 11, 9, .55); border-color: rgba(255, 255, 255, .2); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sh-takt { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--limette); transform-origin: left; transform: scaleX(0); opacity: .9; z-index: 3; }
.sh-takt.laeuft { animation: sh-takt 4s linear forwards; }
@keyframes sh-takt { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.sh-hinweis {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; color: #fff;
  background: linear-gradient(to top, rgba(10, 11, 9, .82), rgba(10, 11, 9, .55)); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.sh-hinweis[hidden] { display: none; }
.sh-hinweis-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; background: rgba(242, 180, 65, .16); color: #f2b441; margin-bottom: 4px; }
.sh-hinweis.aus .sh-hinweis-icon { background: rgba(255, 93, 79, .16); color: #ff8a7f; }
.sh-hinweis strong { font: 700 clamp(22px, 2.6vw, 30px)/1.15 var(--anzeige); }
.sh-hinweis span:last-child { color: rgba(255, 255, 255, .8); font-size: 15px; }
.sh-fuss-info { margin: 14px 2px 0; color: var(--text3); font-size: 13.5px; }

/* ---------- Abgeschlossen / startet bald ---------- */
.sh-ende {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; margin-top: 6px;
  min-height: min(68vh, 640px); border-radius: 24px; color: #fff; box-shadow: var(--schatten);
  background: radial-gradient(120% 95% at 88% 8%, #66745f 0%, #343c31 52%, #1b201a 100%);
}
.sh-ende-bild { position: absolute; inset: -3%; z-index: -3; background-size: cover; background-position: center; filter: saturate(.8); transform-origin: 62% 38%; animation: sh-zoom 36s ease-in-out infinite alternate; }
@keyframes sh-zoom { from { transform: scale(1.02); } to { transform: scale(1.13) translate(-1.5%, -1%); } }
.sh-ende::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(102deg, rgba(15, 16, 14, .92) 0%, rgba(15, 16, 14, .66) 42%, rgba(15, 16, 14, .12) 76%), linear-gradient(to top, rgba(15, 16, 14, .75), rgba(15, 16, 14, 0) 58%);
}
.sh-ende-muster {
  position: absolute; inset: 0; z-index: -1; opacity: .15; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px); background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 100% 0%, #000 0%, transparent 58%); mask-image: radial-gradient(circle at 100% 0%, #000 0%, transparent 58%);
}
.sh-ende--ohne .sh-ende-muster { opacity: .22; -webkit-mask-image: radial-gradient(circle at 80% 20%, #000, transparent 75%); mask-image: radial-gradient(circle at 80% 20%, #000, transparent 75%); }
.sh-ende-inhalt { max-width: 680px; padding: clamp(24px, 5vw, 56px); }
.sh-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 11px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #dfe46f; font-size: 13.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sh-ende h1 { margin: 16px 0 12px; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.sh-ende-zahlen { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; font-size: 17px; font-weight: 600; color: #dfe46f; }
.sh-ende-zahlen span + span::before { content: "·"; margin-right: 18px; color: rgba(255, 255, 255, .45); }
.sh-ende-text { margin: 0 0 26px; max-width: 560px; color: rgba(255, 255, 255, .84); font-size: 16px; }

/* ---------- Unbekannt ---------- */
.sh-leer { margin: 8vh auto 0; max-width: 560px; text-align: center; padding: 40px 28px; border-radius: 24px; background: var(--flaeche); border: 1px solid var(--linie); }
.sh-leer-icon { display: inline-grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--krit-weich); color: var(--krit); margin-bottom: 14px; }
.sh-leer h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 10px; }
.sh-leer p { color: var(--text2); margin: 0 0 22px; }

/* ---------- Fuss, Meldung ---------- */
.sh-fuss { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding: 28px 0 24px; margin-top: 28px; border-top: 1px solid var(--linie); color: var(--text3); font-size: 13px; }
.sh-fuss a { color: var(--text2); text-decoration: none; }
.sh-fuss a:hover { color: var(--limette-text); }
.sh-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 999px; background: var(--limette); color: var(--limette-tinte); font-weight: 600; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transition: opacity .2s, transform .2s;
}
.sh-toast.sichtbar { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .sh-kopf { padding: 16px 0 12px; }
  .sh-logo img { height: 24px; }
  .sh-knopf--rand span { display: none; }
  .sh-knopf--rand { width: 40px; padding: 0; }
  .sh-titelzeile { margin-bottom: 14px; }
  .sh-buehne { border-radius: 16px; margin: 0 -4px; }
  .sh-ende { min-height: 520px; border-radius: 18px; }
  .sh-ende::before { background: linear-gradient(to top, rgba(15, 16, 14, .94) 0%, rgba(15, 16, 14, .7) 55%, rgba(15, 16, 14, .25) 100%); }
  .sh-fuss { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .sh-ende-bild, .sh-status--live i, .sh-takt.laeuft { animation: none; }
}
