:root {
  /* Brand palette */
  --brand: #0a59dd; /* Vermilion red */
  --brand-gradient-dark: rgba(47, 91, 215, 0.06);
  --brand-gradient-light: rgba(10, 89, 221, 0.18);
  --ink: #eef1f3; /* Text on dark */
  --muted: #a8afb7;
  --bg: #0c0d10; /* Deep charcoal */
  --bg-2: #14161a; /* Elevated surfaces */
  --line: #23262c;
  --radius: 18px;
  --container: 1100px;

  /* Typography */
  --font-manrope: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-sans: "Spectral", ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --fs-900: clamp(2.2rem, 4vw, 3.1rem);
  --fs-800: clamp(1.6rem, 3vw, 2.2rem);
  --fs-700: clamp(1.25rem, 2.2vw, 1.6rem);
  --fs-600: 1.125rem;
  --fs-500: 1rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-manrope);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: url("/img/Background_Empty.png") no-repeat center center;
  background-attachment: fixed;
  background-size: cover;
}

.cover-container {
  background: radial-gradient(1100px 600px at 90% -10%, var(--brand-gradient-light), transparent 60%), radial-gradient(900px 500px at -10% 10%, var(--brand-gradient-dark), transparent 50%);
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1rem;
}
.pad-block {
  padding-block: 3rem;
}
.mute,
.mute * {
  color: var(--muted);
}

/* ===== Header/Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(12, 13, 16, 0.85);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 0.75rem;
}
.logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.navbar-collapse ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navbar-collapse a {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  color: var(--ink);
}

.navbar-collapse a.active,
.navbar-collapse a:hover {
  background: var(--bg-2);
}

.sr-only {
  position: absolute;
  left: -9999px;
}

/* ===== Responsive Nav ===== */
@media (max-width: 860px) {
  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
  .site-nav {
    display: none;
    position: absolute;
    inset: 60px 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.open {
    display: block;
  }
  .site-nav ul {
    flex-direction: column;
    padding: 1rem;
  }
  .nav-toggle {
    display: block;
    margin-left: auto;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  background: var(--brand);
  color: white;
  padding: 0.78rem 1rem;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.98rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  letter-spacing: 0.2px;
}
.btn:hover {
  filter: brightness(1.05);
}
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn.small {
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.95rem;
}

/* ===== Grid & Cards ===== */
.grid {
  display: grid;
  gap: 1.25rem;
}
.grid.duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.tri {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .grid.duo,
  .grid.tri {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: saturate(120%) blur(10px);
}
.card h3 {
  margin-top: 0;
  font-family: var(--font-manrope);
  font-size: var(--fs-700);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding-block: 2rem;
  backdrop-filter: saturate(120%) blur(10px);
  background: linear-gradient(0deg, rgba(0,0,0,.2), var(--brand-gradient-dark));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  align-items: center;
}
.footer-nav {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.footer-grid .right {
  text-align: right;
}
@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid .right {
    text-align: left;
  }
}

/* ===== Accessibility ===== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: var(--bg);
  color: var(--ink);
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

#b_avatar_wrapper,
#b_intro_wrapper,
#b_twitch_container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
}

main,
#b_twitch_wrapper,
#b_avatar_wrapper {
  gap: 40px;
}

#b_avatar_background {
  background-color: #004ECF;
  border-radius: 50%;
  padding: 3px;
  transition: ease-in-out .2s;
}

#b_avatar_background:hover {
  transform: scale(1.2,1.2);
}

#b_avatar_image {
  height:150px;
  width:150px;
  border-radius:50%;
  box-shadow: 0 0 250px 25px #004ECF;
}

#b_intro_wrapper {
 gap: 10px;
}

#b_intro_header {
  line-height: 2.4rem;
}

img#b_intro_header {
  max-height: 4rem;
}

#b_intro_header .normal-font {
  font-size: 2.8rem;
  font-weight: bold;
  vertical-align: super;
}

#b_intro_header .special-font {
  font-family: "Permanent Marker", cursive;
  color: #004ECF;
  font-size:4rem;
}

#b_intro_subtext {
  font-size: 1rem;
}

#b_twitch_container {
  position: relative;
  flex-direction: row;
  height: 0;
  width: 50%;
  padding-top: 28%;
}

@media (max-width: 860px) {
  #b_twitch_container {
    position: relative;
    flex-direction: row;
    height: 0;
    width: 100%;
    padding-top: 56.25%;
  }
}

#twitch-embed>iframe {
  border-radius: 7px;
  box-shadow: 0px 0px 20px 0px #000000;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
}

#b_footer_linklist {
  gap: 15px;
}

#b_footer_linklist > a {
  border-radius: 50%;
  text-align: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  display: inline-block;
  margin: 0;
  transition: ease-in-out .2s;
}

#b_footer_linklist > a:hover {
  transform: scale(1.3,1.3);
}

#livecheck-toast {
  animation: pulse 2s infinite;
}

@-webkit-keyframes pulse {
  0% {
    opacity: 0.1;
  }
  50% {
    opacity: 1.0;
  }
  100% {
    opacity: 0.1;
  }
}

#b_mainlink > a {
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  text-transform: uppercase;
  background-color: rgba(145, 71, 255, 0.5);
  border-radius: 5px;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  transition: all ease-in-out .3s;
}

#b_mainlink > a > i {
  margin-right: 5px;
}

#b_mainlink > a:hover {
  background-color: rgb(145, 71, 255);
}

#b_linklist {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 20px;
}

#b_linklist > a {
  font-size: 1rem;
  height: 2.7rem;
  width: 2.7rem;
  border-radius: 50%;
  line-height: 2.5rem;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: rgba(255, 255, 255, 0.75);
  display: inline-block;
  margin: 0;
  transition: ease-in-out .2s;
}

#b_linklist > a:hover {
  color: white;
  background-color: #004ECF;
  border-color: #004ECF;
  transform: scale(1.3,1.3);
}

/* --- Commands Page Enhancements --- */
.marker { font-family: "Permanent Marker", cursive; color: #004ECF; }
.search { border: 1px solid rgba(255,255,255,.15); }

.grid-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card.cmd-card {
  text-align: left;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: 0 0 16px rgba(0,0,0,.25);
  position: relative; /* nötig für zentrierten Toast */
}
.card.cmd-card .h5 { letter-spacing: .5px; }
.card.cmd-card .group-badge {
  border-color: rgba(255,255,255,0.12)!important;
  cursor: pointer;
}

.card.cmd-card ul {
  padding-left: 0.5rem;
}

/* Bessere Lesbarkeit */
.card.cmd-card p { line-height: 1.35; }

/* ===== Streamplan (Schedule) ===== */
#b_schedule {
  scroll-margin-top: 80px; /* falls von Nav verlinkt */
}

#b_schedule .card {
  border-radius: 0.75rem;
  box-shadow: var(--bs-box-shadow-sm, 0 .125rem .25rem rgba(0,0,0,.075));
}

#b_schedule .card-body {
  padding: .75rem 1rem;
}

/* Fixe Bildfläche -> verhindert Layout-Shift bevor das Bild lädt */
#b_schedule .schedule-boxart {
  width: 48px;
  height: 64px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: .5rem;
  flex: 0 0 auto;
}

/* Typografie & Zeilenumbrüche */
#b_schedule .schedule-time {
  font-size: .875rem;
  white-space: nowrap;
  color: var(--bs-secondary-color, #6c757d);
  margin-bottom: .125rem;
}

#b_schedule .schedule-title {
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;          /* 2-Zeilen-Clamp für lange Titel */
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: .125rem;
}

#b_schedule .schedule-category {
  font-size: .8rem;
  color: var(--bs-secondary-color, #6c757d);
}

#b_schedule .day-heading {
  font-weight: 600;
  margin-bottom: .5rem;
}

#b_schedule .offline {
  color: var(--bs-secondary-color, #6c757d);
}

/* ==== Allgemeine Button-Varianten & Utilities ==== */
.btn.secondary {
  background-color: var(--bs-secondary-bg, #f2f4f7);
  color: var(--bs-body-color, #212529);
  border: 1px solid var(--bs-border-color, #d0d5dd);
}
.btn.secondary:hover {
  background-color: var(--bs-tertiary-bg, #e9edf3);
  color: var(--bs-body-color, #212529);
  border-color: var(--bs-border-color, #c5cbd3);
}
.btn.secondary:active {
  background-color: var(--bs-tertiary-bg, #e3e8ee);
}
.btn.secondary:focus-visible {
  outline: 2px solid rgba(0,0,0,0.12);
  outline-offset: 2px;
}
.btn.ghost {
  background-color: transparent;
  color: var(--bs-body-color, #212529);
  border: 1px solid var(--bs-border-color, #d0d5dd);
}
.btn.ghost:hover {
  background-color: rgba(0,0,0,0.03);
}
.btn.ghost:active {
  background-color: rgba(0,0,0,0.05);
}
.btn.ghost:focus-visible {
  outline: 2px solid rgba(0,0,0,0.12);
  outline-offset: 2px;
}
.btn.stretch {
  display: block;
  width: 100%;
  text-align: center;
}
@media (prefers-color-scheme: dark) {
  .btn.secondary {
    background-color: #2b2f31;
    color: #e6e6e6;
    border-color: #3a3f44;
  }
  .btn.secondary:hover { background-color: #32373a; }
  .btn.ghost {
    color: #e6e6e6;
    border-color: #3a3f44;
  }
  .btn.ghost:hover { background-color: rgba(255,255,255,0.06); }
}

/* ======= Ergänzungen: Schedule/Next-Stream ======= */

/* Cover (100px hoch, proportional) */
#b_nextstream .schedule-cover,
#b_schedule   .schedule-cover {
  height: 100px;
  width: auto;
  object-fit: cover;
  border-radius: .5rem;
}

/* Datum/Uhrzeit prominenter + passende Titelgröße in Karten */
.schedule-datetime {
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: .2px;
  font-size: 1rem;
}
#b_nextstream .card.cmd-card .h5,
#b_schedule   .card.cmd-card .h5 {
  font-size: 1rem;
}

/* Twitch-lila Links NUR in Titeln der Schedule-/Next-Stream-Karten */
#b_nextstream .card.cmd-card .h5 a,
#b_schedule   .card.cmd-card .h5 a {
  color: #9146FF; /* Twitch Purple */
  text-decoration-color: rgba(145, 70, 255, 0.45);
}
#b_nextstream .card.cmd-card .h5 a:hover,
#b_schedule   .card.cmd-card .h5 a:hover {
  text-decoration: underline;
}

/* Offline-Tage dezent */
#b_schedule .offline-card {
  border: 1px dashed var(--line);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
}
#b_schedule .offline-card .offline-dot {
  display: inline-block;
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  background-color: rgba(255,255,255,.18);
}
#b_schedule .offline-card .card-body {
  padding: .625rem .875rem;
}

/* Keine Bewegungen/Transforms bei Schedule-Karten */
#b_schedule .card:hover { transform: none; }

/* ===== Hinweis + Hover nur für Commands-Seite ===== */

/* Hinweis oberhalb der Karten */
.cmd-copy-hint {
  margin: 0 0 .35rem 0;
  padding: 6px 10px;
  font-weight: 700;
  font-size: .9rem;
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.02);
}

/* Dezenter Hover-Effekt NUR auf /commands */
.is-commands .grid-cards .card.cmd-card {
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.is-commands .grid-cards .card.cmd-card:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.25);
  box-shadow: 0 0 18px rgba(0,0,0,.28);
}

/* ===== Toast für Commands-Karten ===== */
.cmd-copy-toast {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(16, 185, 129, 0.95); /* grünlich (emerald) */
  color: #eafff4;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.1;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  z-index: 5; /* über Karteninhalt */
}
.cmd-copy-toast.show { opacity: 1; }
