:root {
  /* Background */
  --bg: #1a1a1b;

  /* Text */
  --text: #eef0f4;
  --text-2: #c7ccd6;
  --muted: #aab1bd;
  --heading: #9c9ea2;

  /* Twitch Brand */
  --twitch: #9146FF;
  --twitch-2: #B69CFF;
  --twitch-rgb: 145, 70, 255;
  --twitch-2-rgb: 182, 156, 255;

  /* Focus ring */
  --focus: rgba(255,123,144,0.46);

  --sidebar-w: 280px;
  --sidebar-w-collapsed: 80px;
}

/* -------- Base -------- */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background: #101011;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* -------- App Layout (Sidebar + Content) -------- */
.tbp {
  min-height: 100vh;
  position: relative;
  display: flex;          /* <- wichtig: nebeneinander */
  padding: 0;
  isolation: isolate;
}


/* Rechter Bereich: Content + Footer untereinander */
.tbp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: var(--sidebar-w);
}

.tbp-sidebar--collapsed ~ .tbp-main {
  margin-left: var(--sidebar-w-collapsed);
}

/* Content nimmt den Rest rechts */
.tbp-content {
  flex: 1;                /* <- wichtig */
  min-width: 0;           /* <- verhindert „komische“ Breiten/Overflow */
  padding: 24px;
}

/* Optional: Wenn du „Content nicht zu breit“ willst, nutz einen inner wrapper */
.tbp-content > .wrap,
.tbp-content > .container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Footer immer unten im Content-Bereich */
.tbp-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 13px;
}

/* -------- Background / Effects -------- */
.tbp__bg {
  position: fixed !important;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 18% 22%, rgba(var(--twitch-rgb), 0.26), transparent 55%),
    radial-gradient(900px 600px at 82% 28%, rgba(255,147,164,0.12), transparent 60%),
    radial-gradient(800px 520px at 50% 100%, rgba(74,184,226,0.08), transparent 55%),
    linear-gradient(180deg, #141415, var(--bg) 55%, #101011);
}

.tbp__grid {
  position: fixed !important;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  background:
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(520px 420px at 50% 36%, #000 58%, transparent 100%);
  pointer-events: none;
}

.tbp__noise {
  position: fixed !important;
  inset: 0;
  z-index: -1;
  opacity: 0.08;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}

.tbp__orb {
  position: fixed !important;
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.55;
  z-index: -1;
  pointer-events: none;
  transform: translate3d(0,0,0);
  animation: tbpFloat 8s ease-in-out infinite;
}

.tbp__orb--a {
  width: 360px; height: 360px;
  left: -120px; top: 14%;
  background: radial-gradient(circle at 35% 35%, rgba(var(--twitch-rgb), 0.95), rgba(var(--twitch-rgb), 0.08) 60%, transparent 68%);
  animation-duration: 9s;
}

.tbp__orb--b {
  width: 320px; height: 320px;
  right: -140px; top: 18%;
  background: radial-gradient(circle at 45% 45%, rgba(var(--twitch-2-rgb), 0.55), rgba(var(--twitch-2-rgb), 0.06) 60%, transparent 70%);
  animation-duration: 11s;
  animation-delay: -2s;
}

.tbp__orb--c {
  width: 420px; height: 420px;
  left: 50%; bottom: -220px;
  translate: -50% 0;
  background: radial-gradient(circle at 50% 40%, rgba(74,184,226,0.25), rgba(74,184,226,0.04) 62%, transparent 72%);
  animation-duration: 10s;
  animation-delay: -4s;
}

@keyframes tbpFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .tbp__orb { animation: none; }
}

/* ===== Seiten ohne Sidebar (Login / 400 etc.) ===== */
.tbp--no-nav .tbp-main {
  margin-left: 0 !important;   /* <- Fix: wieder zentriert */
}

/* optional: wenn du Content wirklich mittig willst */
.tbp--no-nav .tbp-content {
  display: grid;
  place-items: center;
  padding: 24px;
}

/* Fix: kein "leerer" Scroll durch FX/Blur auf kleinen Seiten */
.tbp--no-nav {
  height: 100vh;
  overflow: hidden;
}

/* falls der Content doch mal höher ist: dann nur Content scrollen */
.tbp--no-nav .tbp-content {
  max-height: 100vh;
  overflow: auto;
}