/* ============================================================
   BGO.live – Landingpage
   Vibe: Twitch-artige Fullscreen-App-Shell, dunkle Basis,
   Liquid Glass, dezente Neon-Akzente, viele Microanimations.
   Reines CSS, kein Build. Farben/Tokens stehen oben in :root.
   ============================================================ */

/* ---------- DESIGN TOKENS (hier zentral anpassen) ---------- */
:root {
  /* Basis (Twitch-nah, dunkel) */
  --bg:        #0a0a0e;
  --bg-soft:   #131318;
  --panel:     rgba(24, 24, 30, 0.62);   /* Liquid-Glass-Panel */
  --panel-2:   rgba(255, 255, 255, 0.045);
  --line:      rgba(255, 255, 255, 0.085);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text:      #efeff5;
  --text-dim:  #9b9bae;

  /* Leitfarbe + dezente Akzente */
  --purple: #a974ff;   /* primär, Twitch-nah */
  --pink:   #ff5fa2;
  --blue:   #56e1ff;
  --green:  #8fe388;
  --yellow: #ffd84d;

  --radius:    8px;
  --radius-lg: 12px;
  --shadow:    0 24px 60px rgba(0, 0, 0, 0.5);
  --glow:      0 0 34px rgba(169, 116, 255, 0.35);

  /* Bouncy / springy Easing */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);

  /* App-Shell-Maße */
  --header-h: 60px;
  --ticker-h: 34px;
  --rail:     250px;
  --chat-w:   360px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Display-Font für fette Headlines */
.logo__text, .facecam__label, .apply-btn__label, .infobar__title,
.chat__title, .modal__title, .sidebar__title {
  font-family: "Archivo Black", "Inter", system-ui, sans-serif;
  letter-spacing: 0.01em;
}

/* ---------- LIQUID GLASS UTILITY ---------- */
.glass {
  background: var(--panel);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--line);
  /* feiner oberer Glanz + Tiefe */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    var(--shadow);
}

/* ---------- ACCESSIBILITY HELPERS ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--purple); color: #11061f; padding: 10px 16px;
  border-radius: 12px; font-weight: 800; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ============================================================
   ANIMIERTER HINTERGRUND – wandernde Blobs (dezent)
   ============================================================ */
.bg-blobs {
  position: fixed; inset: 0; z-index: -2;
  overflow: hidden; pointer-events: none;
  background:
    radial-gradient(120% 120% at 80% -10%, rgba(169, 116, 255, 0.10), transparent 55%),
    var(--bg);
}
.blob {
  position: absolute; width: 50vmax; height: 50vmax;
  border-radius: 50%; filter: blur(110px); opacity: 0.30;
  mix-blend-mode: screen; will-change: transform;
}
.blob--purple { background: var(--purple); top: -14%; left: -8%;  animation: drift1 26s var(--ease) infinite alternate; }
.blob--pink   { background: var(--pink);   bottom: -20%; left: 24%; animation: drift2 30s var(--ease) infinite alternate; }
.blob--blue   { background: var(--blue);   top: 6%; right: -12%;  animation: drift3 28s var(--ease) infinite alternate; }

@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(7vw, 6vh) scale(1.15); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1.1); } to { transform: translate(-6vw, -7vh) scale(0.95); } }
@keyframes drift3 { from { transform: translate(0,0) scale(1); } to { transform: translate(-6vw, 8vh) scale(1.18); } }

/* ============================================================
   HEADER (Topbar, volle Breite)
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(14px, 2.4vw, 28px);
  background: rgba(10, 10, 14, 0.6);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.logo { display: inline-flex; align-items: center; gap: 10px; justify-self: start; min-width: 0; }
/* rotierende Geldfliege statt Play-Button */
.logo__mark {
  font-size: 26px; line-height: 1; flex: 0 0 auto;
  display: inline-block;
  animation: coinSpin 3.6s var(--ease) infinite, coinFloat 3s var(--ease) infinite;
  filter: drop-shadow(0 0 10px rgba(143, 227, 136, 0.5));
}
@keyframes coinSpin  { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@keyframes coinFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -3px; } }

.logo__text {
  font-size: clamp(13px, 1.5vw, 19px); font-weight: 900; line-height: 1.05;
  background: linear-gradient(90deg, #fff, var(--purple), #fff);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: sheen 6s linear infinite;
}
.logo__hl { -webkit-text-fill-color: var(--green); color: var(--green); }
@keyframes sheen { to { background-position: 220% 0; } }

/* FAQ-Button – mittig */
.faq-btn {
  justify-self: center;
  border: 1px solid var(--line);
  background: var(--panel-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 9px 30px; border-radius: 10px;
  min-width: clamp(110px, 22vw, 320px);
  transition: transform 0.25s var(--spring), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.faq-btn:hover { transform: translateY(-2px) scale(1.04); border-color: var(--purple); box-shadow: var(--glow); }

/* LIVE-Badge */
.live-pill {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700;
}
.live-pill__label { color: var(--blue); letter-spacing: 0.12em; }
.live-pill__sep { color: var(--text-dim); }
.live-pill__count { color: var(--text); font-variant-numeric: tabular-nums; }
.live-pill__unit { color: var(--text-dim); font-weight: 600; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pink); box-shadow: 0 0 0 0 rgba(255, 95, 162, 0.7);
  animation: livePulse 1.6s var(--ease) infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 95, 162, 0.6); }
  70%  { box-shadow: 0 0 0 11px rgba(255, 95, 162, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 95, 162, 0); }
}

/* ============================================================
   HYPETRAIN (Twitch-Optik): Badge + Lauftext + Fortschrittsbalken
   ============================================================ */
.hypetrain {
  position: sticky; top: var(--header-h); z-index: 40;
  height: var(--ticker-h); overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px 0 0;
  color: #fff;
  /* animierter Hype-Verlauf (Twitch-Pink/Violett) */
  background: linear-gradient(90deg, #7a2bd6, #c0218f, #7a2bd6);
  background-size: 200% 100%;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 0 26px rgba(192, 33, 143, 0.35);
  animation: hypeShift 6s linear infinite;
}
@keyframes hypeShift { to { background-position: 200% 0; } }

.hypetrain__badge {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  height: 100%; padding: 0 14px;
  background: rgba(0, 0, 0, 0.28);
  font-family: "Archivo Black", sans-serif; font-size: 12px; letter-spacing: 0.14em;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.hypetrain__loco { font-size: 17px; animation: locoBob 0.9s var(--ease) infinite; }
@keyframes locoBob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-2px) rotate(3deg); } }

.hypetrain__viewport { flex: 1; min-width: 0; overflow: hidden; }
.hypetrain__track {
  display: inline-flex; gap: 60px; white-space: nowrap; padding-left: 100%;
  animation: marquee 22s linear infinite;
  font-size: 13px; font-weight: 800; letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* dünner Fortschrittsbalken am unteren Rand (füllt sich wiederholt) */
.hypetrain__bar {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: rgba(0,0,0,0.25);
}
.hypetrain__bar span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--yellow), #fff);
  transform-origin: left; transform: scaleX(0);
  animation: hypeFill 8s var(--ease) infinite;
}
@keyframes hypeFill { 0% { transform: scaleX(0); } 80%,100% { transform: scaleX(1); } }

/* ============================================================
   APP-SHELL (Fullscreen-Grid)
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--chat-w);
  gap: 14px;
  padding: 14px;
  /* füllt den restlichen Viewport unter Header + Ticker */
  min-height: calc(100vh - var(--header-h) - var(--ticker-h));
  align-items: stretch;
}

/* ============================================================
   SIDEBAR – TOP GÖNNER (Twitch-Rail)
   ============================================================ */
.sidebar {
  background: var(--panel);
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), var(--shadow);
  padding: 18px 14px;
  align-self: start;
  position: sticky; top: calc(var(--header-h) + var(--ticker-h) + 14px);
}
.sidebar__title {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-dim); margin-bottom: 14px;
}
.sidebar__title--friends { margin-top: 22px; }
.sponsor-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.sponsor {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid transparent;
  transition: transform 0.2s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
  transform-style: preserve-3d;
}
.sponsor:hover { border-color: var(--line); background: rgba(255,255,255,0.07); }
/* Link füllt den ganzen Eintrag */
.sponsor__link { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; }
.sponsor__avatar {
  position: relative; flex: 0 0 auto; overflow: hidden;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 900; font-size: 13px; color: #0a0a0e;
  background: var(--blue); /* Fallback; per JS aus data-color */
}
/* Logo-Bild deckt den Avatar; fehlt es, greift onerror -> Initialen */
.sponsor__logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #fff; }
.sponsor__fallback { font-weight: 900; }
.sponsor__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sponsor__name { font-weight: 800; font-size: 14px; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sponsor__sub { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }
.sponsor__live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: livePulse 1.8s var(--ease) infinite; }

/* Freier Platz – ausgegraut, nicht klickbar */
.sponsor--ghost { opacity: 0.45; filter: grayscale(1); }
.sponsor--ghost .sponsor__avatar { background: #3a3a44; color: var(--text-dim); border: 1px dashed var(--line); }
.sponsor--ghost:hover { transform: none; background: var(--panel-2); border-color: transparent; }

/* ============================================================
   CENTER – Bühne + Infobar
   ============================================================ */
.center { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.stage {
  position: relative; overflow: hidden; flex: 1;
  min-height: clamp(360px, 60vh, 760px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  /* Animierter Gradient als Fallback hinter dem Video */
  background: linear-gradient(120deg, #15101f, #0c1620, #110a1a);
  background-size: 300% 300%;
  animation: stageShift 20s var(--ease) infinite alternate;
}
@keyframes stageShift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.stage__video { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.stage__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(75% 60% at 35% 35%, transparent, rgba(0,0,0,0.35)),
    linear-gradient(to top, rgba(0,0,0,0.72), transparent 55%);
}
/* Overlay-Elemente liegen über Video (z0) + Scrim (z1); jeweils
   eigene position/z-index, damit nichts überschrieben wird. */
.stage { display: block; }
.stage__livetag {
  position: absolute; top: 16px; left: 16px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 8px;
  background: rgba(86, 225, 255, 0.16); border: 1px solid rgba(86,225,255,0.45);
  font-size: 12px; font-weight: 900; letter-spacing: 0.12em; color: #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.stage__livetag .live-dot { background: var(--blue); }
.stage__livetag { cursor: pointer; transition: transform 0.2s var(--spring), box-shadow 0.25s var(--ease), background 0.25s var(--ease); }
.stage__livetag:hover { transform: translateY(-2px); background: rgba(86,225,255,0.28); box-shadow: 0 0 26px rgba(86,225,255,0.35); }

/* Ton an/aus – unten rechts über dem Video */
.stage__sound {
  position: absolute; bottom: 16px; right: 16px; z-index: 4;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(10,10,14,0.6); color: #fff;
  border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-weight: 800; font-size: 12px;
  transition: transform 0.2s var(--spring), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.stage__sound:hover { transform: translateY(-2px); border-color: var(--purple); box-shadow: var(--glow); }
.stage__sound-icon { font-size: 15px; line-height: 1; }
.stage__sound[aria-pressed="true"] { border-color: var(--green); }

/* CAMGROUP – Webcam + Bewerben-Button, rechts mittig im Video */
.camgroup {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%); z-index: 3;
  display: flex; flex-direction: column; gap: 14px;
  width: clamp(160px, 20vw, 260px);
}

/* WEBCAM-Fenster (bekommt Video von der Redaktion) */
.facecam {
  position: relative; margin: 0; width: 100%; aspect-ratio: 4 / 3;
  border-radius: 8px; overflow: hidden;
  display: grid; place-content: center; text-align: center; gap: 4px;
  background:
    radial-gradient(120% 120% at 50% 20%, rgba(255,255,255,0.06), transparent 60%),
    var(--panel);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1.5px dashed rgba(255, 216, 77, 0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), var(--shadow);
  transform-style: preserve-3d;
  transition: box-shadow 0.3s var(--ease);
}
.facecam:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 0 38px rgba(255,216,77,0.22); }
.facecam__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
/* "das könntest du sein" – oben links mit rotem Punkt (wie das alte CAM-Badge) */
.facecam__rec {
  position: absolute; top: 8px; left: 10px; z-index: 2; margin: 0;
  display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 20px);
  font-size: 11px; font-weight: 900; line-height: 1.1;
  color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.85);
}
.facecam__rec .live-dot { flex: 0 0 auto; background: #ff4d4d; }
/* Bewerben-Button unter der Webcam: volle Camgroup-Breite */
.camgroup .apply-btn { width: 100%; justify-content: center; }

/* LOWER-THIRD – Accountname + Streamtitel unten links im Video */
.streaminfo {
  position: absolute; left: 16px; bottom: 16px; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  max-width: min(60%, 560px);
  padding: 10px 14px; border-radius: 8px;
  background: rgba(10,10,14,0.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
}
.streaminfo__avatar {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: var(--glow);
}
.streaminfo__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.streaminfo__name { font-weight: 900; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.streaminfo__verified { color: var(--blue); font-size: 13px; }
.streaminfo__title { font-size: 13px; color: var(--text-dim); line-height: 1.3; }

/* Bewerben-Button – pulsiert als CTA, mit Shimmer */
.apply-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 17px 36px; border-radius: 10px;
  background: linear-gradient(120deg, var(--purple), var(--pink));
  color: #fff; font-weight: 900; font-size: clamp(17px, 1.8vw, 22px);
  box-shadow: var(--glow), var(--shadow);
  transition: transform 0.25s var(--spring), box-shadow 0.25s var(--ease);
  animation: ctaPulse 2.6s var(--ease) infinite;
}
.apply-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 0 55px rgba(169, 116, 255, 0.6), var(--shadow); }
.apply-btn__arrow { transition: transform 0.25s var(--spring); }
.apply-btn:hover .apply-btn__arrow { transform: translateX(6px); }
.apply-btn__shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
  transform: translateX(-120%); animation: shimmer 3.4s var(--ease) infinite;
}
@keyframes shimmer { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes ctaPulse {
  0%, 100% { box-shadow: var(--glow), var(--shadow); }
  50%      { box-shadow: 0 0 60px rgba(169, 116, 255, 0.65), var(--shadow); }
}

/* ============================================================
   INFOBAR (Streamer-Info unter dem Player)
   ============================================================ */
.infobar {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px; border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), var(--shadow);
}
/* About-Fließtext unter dem Player */
.infobar--about { display: block; }
.about__text {
  font-size: clamp(15px, 1.15vw, 17px); font-weight: 600; line-height: 1.6;
  color: var(--text);
}
.about__text strong { font-weight: 900; }
.about__cta {
  color: var(--purple); font-weight: 900; text-decoration: underline;
  text-underline-offset: 2px;
}
.about__cta:hover { color: var(--text); }

/* ============================================================
   CHAT (volle Höhe rechts)
   ============================================================ */
.chat {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel);
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), var(--shadow);
  padding: 16px;
  align-self: stretch;
  position: sticky; top: calc(var(--header-h) + var(--ticker-h) + 14px);
  max-height: calc(100vh - var(--header-h) - var(--ticker-h) - 28px);
}
.chat__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.chat__title { font-size: 16px; text-transform: uppercase; letter-spacing: 0.1em; }

.react-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  font-weight: 800; font-size: 13px;
  transition: transform 0.2s var(--spring), border-color 0.2s var(--ease);
}
.react-btn:hover { transform: scale(1.08); border-color: var(--pink); }
.react-btn:active { transform: scale(0.9); }
.react-btn__count { font-variant-numeric: tabular-nums; color: var(--text-dim); }

/* Feed */
.chat__feed {
  list-style: none; padding: 6px; margin: 0 -6px 12px;
  display: flex; flex-direction: column; gap: 9px;
  flex: 1; overflow-y: auto;
}
.chat__feed::-webkit-scrollbar { width: 8px; }
.chat__feed::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

/* Twitch-Style: flache Zeilen, KEINE Bubble/runde Ecken */
.msg {
  padding: 3px 2px;
  font-size: 14px; line-height: 1.45;
  animation: msgIn 0.45s var(--spring) both;
}
.msg__user { font-weight: 800; margin-right: 4px; }
.msg--me .msg__user { color: var(--purple); }
@keyframes msgIn {
  from { opacity: 0; transform: translateX(20px) scale(0.97); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* Hyperlink im Chat – blau & hinterlegt */
.msg__link {
  color: var(--blue); font-weight: 700;
  background: rgba(86, 225, 255, 0.14);
  border: 1px solid rgba(86, 225, 255, 0.30);
  border-radius: 5px; padding: 0 5px;
  text-decoration: none; word-break: break-all;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.msg__link:hover { background: rgba(86, 225, 255, 0.26); border-color: rgba(86,225,255,0.5); text-decoration: underline; }

/* Inline-Emote (htpino) im Chattext */
.emote {
  display: inline-block; height: 26px; width: auto;
  vertical-align: middle; margin: -2px 1px;
}

/* Video-Vorschau (Thumbnail) im Chat */
.msg__thumb {
  position: relative; display: block; margin: 6px 0 2px;
  width: clamp(120px, 55%, 180px); aspect-ratio: 9 / 16;
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: #000;
  transition: transform 0.2s var(--spring), border-color 0.2s var(--ease);
}
.msg__thumb:hover { transform: scale(1.02); border-color: var(--purple); }
.msg__thumb img { width: 100%; height: 100%; object-fit: cover; }
.msg__thumb-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; color: #fff;
  background: rgba(10,10,14,0.6); border: 1px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  padding-left: 2px;
}

/* Form */
.chat__form { display: flex; gap: 8px; align-items: center; }

/* ---------- EMOTE-PICKER (htpino neben dem Eingabefeld) ---------- */
.emote-picker { position: relative; flex: 0 0 auto; }
.emote-toggle {
  width: 42px; height: 42px; padding: 4px; border-radius: 8px;
  background: rgba(0,0,0,0.35); border: 1px solid var(--line);
  display: grid; place-items: center;
  transition: transform 0.2s var(--spring), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.emote-toggle img { width: 100%; height: 100%; object-fit: contain; }
.emote-toggle:hover { transform: translateY(-2px) scale(1.06); border-color: var(--purple); box-shadow: var(--glow); }
.emote-toggle[aria-expanded="true"] { border-color: var(--purple); box-shadow: var(--glow); }
.emote-tray {
  position: absolute; bottom: calc(100% + 10px); left: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  padding: 8px; border-radius: 12px;
  background: var(--bg-soft); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), var(--shadow);
  animation: popIn 0.22s var(--spring) both;
}
.emote-tray[hidden] { display: none; }
.emote-pick {
  width: 44px; height: 44px; padding: 5px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid transparent;
  transition: transform 0.15s var(--spring), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.emote-pick img { width: 100%; height: 100%; object-fit: contain; }
.emote-pick:hover { transform: scale(1.12); border-color: var(--purple); background: rgba(169,116,255,0.12); }
.chat__input {
  flex: 1; min-width: 0;
  padding: 12px 14px; border-radius: 8px;
  background: rgba(0,0,0,0.35); color: var(--text);
  border: 1px solid var(--line); font-size: 14px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.chat__input:focus { border-color: var(--purple); outline: none; box-shadow: 0 0 0 3px rgba(169,116,255,0.18); }
.chat__input::placeholder { color: var(--text-dim); }

.chat__send {
  padding: 12px 18px; border-radius: 8px; border: none;
  background: linear-gradient(120deg, var(--purple), var(--pink));
  color: #fff; font-weight: 900;
  transition: transform 0.2s var(--spring), filter 0.2s var(--ease);
}
.chat__send:hover { transform: translateY(-2px) scale(1.04); filter: brightness(1.1); }
.chat__send:active { transform: scale(0.94); }

.chat__disclaimer { margin-top: 8px; font-size: 11px; color: var(--text-dim); text-align: center; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin: 14px; padding: 22px clamp(16px, 3vw, 32px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.social {
  padding: 9px 16px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  font-weight: 800; font-size: 13px;
  transition: transform 0.25s var(--spring), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.social:hover { transform: translateY(-4px); border-color: var(--purple); box-shadow: var(--glow); }
.footer__legal { font-size: 13px; color: var(--text-dim); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.footer__link:hover { color: var(--text); text-decoration: underline; }

/* ============================================================
   FAQ MODAL
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  animation: fadeIn 0.25s var(--ease) both;
}
.modal__panel {
  position: relative; width: min(560px, 100%); max-height: 85vh; overflow-y: auto;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), var(--shadow);
  padding: 26px;
  animation: popIn 0.35s var(--spring) both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal__title { font-size: 28px; }
.modal__close {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  font-size: 16px; transition: transform 0.2s var(--spring), border-color 0.2s var(--ease);
}
.modal__close:hover { transform: rotate(90deg); border-color: var(--pink); }

.accordion { display: grid; gap: 10px; }
.acc-item { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); overflow: hidden; }
.acc-item summary {
  list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 800;
  display: flex; justify-content: space-between; align-items: center;
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary::after { content: "+"; color: var(--purple); font-size: 22px; transition: transform 0.25s var(--spring); }
.acc-item[open] summary::after { transform: rotate(45deg); }
.acc-item p { padding: 0 16px 16px; color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.acc-link { color: var(--purple); font-weight: 800; text-decoration: underline; }
.acc-link:hover { color: var(--text); }

/* ============================================================
   FX-LAYER – aufsteigende Emoji-Reaktionen
   ============================================================ */
.fx-layer { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.fx-emoji { position: fixed; font-size: 26px; animation: floatUp 1.6s var(--ease) forwards; will-change: transform, opacity; }
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(0) scale(0.6); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-220px) scale(1.3) translateX(var(--drift, 0)); }
}

/* ============================================================
   SCROLL-ENTRANCE
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.6s var(--ease), transform 0.6s var(--spring); }
.reveal.is-visible { opacity: 1; transform: none; }

/* JS-BUTTON PRESS-EFFEKT */
.js-btn.is-press { transform: scale(0.92) !important; }

/* ============================================================
   RESPONSIVE – TABLET
   ============================================================ */
@media (max-width: 1100px) {
  :root { --rail: 210px; --chat-w: 320px; }
}

/* ============================================================
   RESPONSIVE – MOBILE: vertikaler Feed mit Scroll-Snap
   ============================================================ */
@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
    min-height: 0;
    scroll-snap-type: y proximity;
  }
  /* Reihenfolge mobil: Bühne -> About -> Chat -> Top Supporter & Freunde */
  .center   { order: 1; }
  .chat     { order: 2; position: static; max-height: none; min-height: 60vh; }
  .sidebar  { order: 3; position: static; }

  .app > * { scroll-snap-align: start; scroll-margin-top: calc(var(--header-h) + var(--ticker-h) + 8px); }
  .center { scroll-snap-align: start; }

  /* FAQ rechtsbündig (das "wartend"-Element ist weg) */
  .site-header { gap: 10px; }
  .faq-btn { min-width: 0; padding: 9px 18px; justify-self: end; }

  /* Video im Querformat statt Hochformat -> nimmt weniger Platz ein */
  .stage { min-height: 0; aspect-ratio: 16 / 9; }

  /* Mobile-Layout der Bühne, damit sich nichts überlagert:
     camgroup auflösen -> Cam oben rechts, Bewerben-Leiste unten, Lower-Third aus. */
  .camgroup { display: contents; }
  .facecam {
    position: absolute; top: 10px; right: 10px; z-index: 3;
    width: clamp(120px, 34vw, 168px); aspect-ratio: 16 / 9;
  }
  .camgroup .apply-btn {
    position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 4;
    width: auto; padding: 11px 16px; font-size: 15px;
  }
  .streaminfo { display: none; }
  /* Ton-Button knapp über die Bewerben-Leiste heben */
  .stage__sound { bottom: 62px; right: 10px; padding: 6px 11px; font-size: 11px; }
}

@media (max-width: 480px) {
  .logo__text { font-size: 12px; max-width: 46vw; line-height: 1.05; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .facecam { width: clamp(104px, 38vw, 140px); }
  .camgroup .apply-btn { padding: 10px 14px; font-size: 14px; }
}

/* ============================================================
   REDUCED MOTION – alle Animationen aus
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .blob { animation: none; }
}
