:root {
  --panel-bg:#d9d9d9;--text:#222;
  --accent:#0078ff;--border:#ccc;
}
body.dark {
  --panel-bg:#1c1f26;--text:#eee;
  --accent:#55aaff;--border:#333;
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(30, 30, 35, 0.9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.5s, box-shadow 0.5s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 🌙✨ Einheitliches Styling für Header-Navigation */
header .center a {
  color: var(--text);
  text-decoration: none;
  margin: 0 6px;
  font-size: 16px;
  transition: color 0.3s ease, opacity 0.3s ease;
}

/* Hover-Effekt – sanftes Aufleuchten wie beim Brand */
header .center a:hover {
  color: var(--accent);
  opacity: 0.9;
}

/* Lightmode Variante */
body:not(.dark) header {
  background: var(--panel-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

header .center a {
  color: var(--text);
  text-decoration: none;
  margin: 0 6px;
}

header .right {
  display: flex;
  gap: 10px;
}

/* 🌗✨ Harmonische Buttons im Header */
header .right button,
header .right #langBtn {
  background: #e0e0e0;
  color: #222;
  border: 1px solid #aaa;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

header .right button:hover,
header .right #langBtn:hover {
  background: #d0d0d0;
}

/* 🌙 Darkmode – gleiches Schema */
body.dark header .right button,
body.dark header .right #langBtn {
  background: #2a2d33;
  color: #eee;
  border: 1px solid #555;
}

body.dark header .right button:hover,
body.dark header .right #langBtn:hover {
  background: #35383f;
}

/* 🩶 Navigation & Brand */
.center a {
  color: var(--text);
  text-decoration: none;
  margin: 0 4px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.center a:hover {
  color: var(--accent);
}

/* Brand-Link */
.brand-link {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.brand-link:hover {
  color: var(--accent);
  text-shadow: 0 0 6px rgba(85,170,255,0.6);
}

.brand-link:active {
  text-shadow: 0 0 10px rgba(85,170,255,0.9);
  transform: scale(0.98);
}

body.dark .brand-link {
  color: #eaeaea;
}
body.dark .brand-link:hover {
  color: #55aaff;
}

body.dark .center .divider {
  color: rgba(255, 255, 255, 0.4);
}

/* ═══ 🌙✨ FLAGGENSTIL ═══ */
.flag-icon {
  width: 20px;
  height: 14px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#langMenu li:hover .flag-icon {
  transform: scale(1.1) rotate(5deg);
  opacity: 0.9;
}

#langBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.3s ease;
}

#langBtn:hover {
  background: #0070e0;
}

#langMenu {
  position: absolute;
  margin-top: 4px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  list-style: none;
  padding: 6px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  z-index: 100;
}

#langMenu.hidden {
  display: none;
}

#langMenu li {
  padding: 4px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s ease;
}

#langMenu li:hover {
  background: rgba(0, 0, 0, 0.05);
}

#langBtn.fade-flag .flag-icon {
  opacity: 0;
  transform: scale(0.8);
}
/* ☀️ Lightmode – Sprachmenü Lesbarkeit fixen */
body:not(.dark) #langMenu li {
  color: #111 !important; /* kräftiges Schwarz für klaren Kontrast */
  font-weight: 500;
  text-shadow: 0 0 2px rgba(255,255,255,0.4); /* sanfte Kante */
}

body:not(.dark) #langBtn span {
  color: #222 !important; /* sichtbarer Text im Button */
  font-weight: 500;
}
/* 🌗✨ Astra Harmonie Hintergrund */
body {
  background:
    url('../assets/bg-astra.png') no-repeat center center fixed,
    radial-gradient(circle at center, rgba(10, 15, 24, 0.6) 0%, rgba(5, 6, 8, 0.9) 100%);
  background-size: cover, auto;
  background-attachment: fixed;
  background-blend-mode: normal;
  color: var(--text);
  font-family: Arial, sans-serif;
  margin: 0;
  transition: background-image 1s ease-in-out, background-color 1s ease-in-out, color 0.6s ease;
}

body:not(.dark) {
  background:
    url('../assets/1bg-astra.png') no-repeat center center fixed,
    radial-gradient(circle at center, rgba(250, 247, 242, 0.6) 0%, rgba(245, 242, 238, 0.9) 100%);
  background-size: cover, auto;
  background-attachment: fixed;
}

body.dark {
  background:
    url('../assets/bg-astra.png') no-repeat center center fixed,
    radial-gradient(circle at center, rgba(10, 15, 24, 0.6) 0%, rgba(5, 6, 8, 0.9) 100%);
  background-size: cover, auto;
  background-attachment: fixed;
}

/* Panels */
section.panel, header, footer {
  background-color: rgba(20, 24, 30, 0.88);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

main {padding:90px 20px 60px;max-width:950px;margin:auto;}
section.panel {
  background:var(--panel-bg);
  border:1px solid var(--border);
  border-radius:10px;
  padding:15px;
  margin-top:20px;
  box-shadow:0 2px 6px rgba(0,0,0,.1);
  transition:background .1s,border .1s;
  text-align:center;
}
h1,h2,h3,p,label{text-align:center;margin:6px 0;}

/* Split Panel */
.split-panel {display:flex;gap:20px;flex-wrap:wrap;justify-content:center;}
.split-half {
  flex:1;
  min-width:300px;
  background:var(--panel-bg);
  border:1px solid var(--border);
  border-radius:10px;padding:15px;
  transition:background .1s,border .1s;
}
/* 🩶 Astra & Commander Fix – Kein Nachglühen bei Theme-Wechsel */
body.light .split-half,
body.dark .split-half {
  transition: none !important;
}

.field {
  margin:8px 0;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.field input[type="text"] {flex:1;margin-left:10px;}
.slidefade {display:none;opacity:0;transition:opacity .5s ease;}
.slidefade.active {display:block;opacity:1;}

/* FOOTER */
footer.site-footer {
  text-align:center;
  padding:10px 20px;
  background:var(--panel-bg);
  color:var(--text);
  border-top:1px solid var(--border);
  transition:background .5s,color .5s;
  /* 🔧 Erweiterung für Vollbild-Harmonie */
  width:100vw;                     /* volle Browserbreite */
  margin-left:calc(50% - 50vw);    /* gleicht zentriertes main aus */
  box-sizing:border-box;           /* sicheres Layoutverhalten */
}
footer {
    display: block;
    unicode-bidi: isolate;
}
body {
    margin: 0;
}
/* ═══ 🌙✨ TRUE HARMONY – HYBRID FOOTER FIX ═══ */
footer.site-footer {
  position: auto;
  bottom: 0;
  left: 0;
  width: 100vw; /* volle Browserbreite */
  margin-left: calc(50% - 50vw); /* gleicht main-Zentrierung aus */
  display: flex;
  justify-content: space-between; /* verteilt links / mitte / rechts */
  align-items: center;
  background-color: rgba(30, 33, 40, 0.85);
  color: var(--text);
  font-size: 13px;
  padding: 8px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  transition: background 0.5s ease, color 0.5s ease;
}

/* Platzhalter links (Balance-Hilfe) */
.footer-left {
  flex: 1;
  line-height: 1.4;
}

/* Mittig ausgerichteter Text */
.footer-center {
  display: center;
  flex-direction: column;  /* Zeilen untereinander */
  align-items: center;     /* Horizontal zentrieren */
  justify-content: center; /* Vertikal ausbalancieren */
  flex: 1;
  line-height: 1.4;
  text-align: center;      /* Sicherheit für Inline-Text */
}

/* Uhrzeit rechts */
.footer-right {
  flex: 1;
  font-family: "Consolas", "Courier New", monospace;
  opacity: 0.85;
  letter-spacing: 0.5px;
  text-align: right;
  width: 100px;
}
/* ☀️ Lightmode Footer */
body:not(.dark) footer.site-footer {
  background-color:rgba(245,245,245,0.95);
  color:#222;
  border-top:1px solid rgba(0,0,0,0.1);
}

/* Footer-Abstandsausgleich */
main { padding-bottom:0px; }
section.panel:last-of-type { margin-bottom:60px; }
@media (max-width:768px){ section.panel:last-of-type{margin-bottom:40px;} }
@media (max-width:480px){ section.panel:last-of-type{margin-bottom:25px;} }

/* ═══ 🌙✨ FILTER EINSTELLUNGEN BALANCE ═══ */
#filterGroup .field {
  border-bottom:1px solid rgba(0,0,0,0.1);
  padding:6px 0;
  transition:border-color 0.3s ease;
}
#filterGroup .field:last-of-type { border-bottom:none; }
#filterGroup .field span {
  font-weight:700;
  letter-spacing:.2px;
}
#filterGroup input[type="text"] {
  background:rgba(255,255,255,0.85);
  border:1px solid rgba(0,0,0,0.15);
  border-radius:5px;
  padding:4px 6px;
  font-size:13px;
  text-align:center;
  color:#333;
  transition:all 0.3s ease;
}
#filterGroup input[type="text"]:focus {
  border-color:#66aaff;
  box-shadow:0 0 4px rgba(102,170,255,0.4);
  outline:none;
}

/* Slidefade-Effekt */
.slidefade {
  transition:opacity 0.4s ease,transform 0.4s ease;
  transform:translateY(-5px);
  opacity:0;
}
.slidefade.active { opacity:1; transform:translateY(0); }

/* Moderatoren-Block */
.mod-filter {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
}
.mod-filter label {
  display:flex;
  align-items:center;
  gap:6px;
  width:100%;
}
.mod-filter input[type="checkbox"] { margin:0; vertical-align:middle; }

/* 🌙 Darkmode-Anpassungen */
body.dark #filterGroup .field { border-bottom-color:rgba(255,255,255,0.15); }
body.dark #filterGroup input[type="text"] {
  background:rgba(30,30,30,0.8);
  color:#eee;
  border-color:rgba(255,255,255,0.2);
}
body.dark #filterGroup input[type="text"]:focus {
  border-color:#88bbff;
  box-shadow:0 0 5px rgba(136,187,255,0.35);
}
body.dark .mod-filter label { color:#d8d8d8; font-weight:500; }
body.dark .mod-filter input[type="checkbox"] { accent-color:#88bbff; }

/* ☀️ Lightmode-Feinschliff */
body:not(.dark) #filterGroup .field { border-bottom-color:rgba(0,0,0,0.08); }
body:not(.dark) .mod-filter label { color:#2b2b2b; font-weight:500; }
body:not(.dark) .mod-filter input[type="checkbox"] { accent-color:#3388ff; }

/* ═══ 🌙✨ PANEL & HEADER SEPARATION ═══ */
header, section.panel, .split-panel {
  border-bottom:1px solid rgba(0,0,0,0.1);
  transition:border-color 0.4s ease;
}
body.dark header, body.dark section.panel, body.dark .split-panel {
  border-bottom-color:rgba(255,255,255,0.25);
}
body:not(.dark) header, body:not(.dark) section.panel, body:not(.dark) .split-panel {
  border-bottom-color:rgba(0,0,0,0.08);
}
section.panel:last-of-type { border-top:1px solid rgba(0,0,0,0.1); }
body.dark section.panel:last-of-type { border-top-color:rgba(255,255,255,0.25); }

/* 🌙✨ Harmonische Textstruktur im Intro-Panel */
.panel.intro-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.panel.intro-panel .intro-box {
  max-width: 820px;
  background-color: rgba(224, 227, 233, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 24px 32px;
  box-shadow:
    inset 0 0 6px rgba(255, 255, 255, 0.06),
    0 0 8px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* 🌙 Darkmode-Korrektur für das Begrüßungspanel */
body.dark .panel.intro-panel .intro-box {
  background-color: rgba(35, 38, 45, 0.85); /* etwas dunkler, aber gleich transparent */
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 0 6px rgba(255, 255, 255, 0.05),
    0 0 10px rgba(0, 0, 0, 0.3);
  color: var(--text);
}

/* Textausrichtung – bündig wie grüne Linie */
.panel.intro-panel .intro-box p {
  text-align: left;
  margin-left: 40px;
  margin-right: 10px;
  line-height: 1.65;
  font-size: 15.5px;
}

/* ═══ 🌙✨ TWITCH CHAT PANEL ═══ */
section.panel textarea {
  background:rgba(255,255,255,0.9);
  border:1px solid rgba(0,0,0,0.1);
  border-radius:2px;
  padding:0px;
  font-family:"Consolas","Courier New",monospace;
  font-size:13px;
  color:#222;
  resize:vertical;
  box-shadow:inset 0 0 6px rgba(0,0,0,0.05);
  transition:all 0.3s ease;
}
body.dark section.panel textarea {
  background:rgba(30,30,30,0.85);
  color:#ddd;
  border-color:rgba(255,255,255,0.2);
  box-shadow:inset 0 0 6px rgba(255,255,255,0.08);
}
body:not(.dark) section.panel textarea {
  background:rgba(255,255,255,0.95);
  color:#111;
  border-color:rgba(0,0,0,0.08);
}

/* ═══ 🌙✨ SPLIT-PANEL TRANSPARENZ & BALANCE ═══ */
body.dark .split-panel {
  background-color:rgba(28,31,38,0.85);
  backdrop-filter:blur(6px);
  border:1px solid rgba(255,255,255,0.15);
  transition:background-color 0.6s ease;
}
body:not(.dark) .split-panel {
  background-color:var(--panel-bg);
  border:1px solid var(--border);
}

/* Split-Panel Rundungen */
section.panel:has(.split-panel) {
  border-radius:10px !important;
  overflow:visible !important;
}
.split-half { border-radius:10px !important; }
.split-panel { gap:20px !important; border:none !important; }

/* ═══ 🌙✨ Darkmode Toggle & Speak Button ═══ */
#themeToggle {
  background:linear-gradient(145deg,#f0f0f0,#dcdcdc);
  color:#222;
  border:1px solid #aaa;
  border-radius:6px;
  padding:6px 12px;
  cursor:pointer;
  font-weight:500;
  transition:all 0.3s ease;
  box-shadow:0 2px 4px rgba(0,0,0,0.1);
}
#themeToggle:hover {
  background:linear-gradient(145deg,#e5e5e5,#d0d0d0);
  transform:translateY(-1px);
  box-shadow:0 3px 6px rgba(0,0,0,0.15);
}
body.dark #themeToggle {
  background:linear-gradient(145deg,#2a2e36,#1f2228);
  color:#eee;
  border:1px solid rgba(255,255,255,0.2);
  box-shadow:0 0 10px rgba(85,170,255,0.3),inset 0 0 4px rgba(255,255,255,0.08);
}
body.dark #themeToggle:hover {
  background:linear-gradient(145deg,#333741,#25282f);
  box-shadow:0 0 14px rgba(85,170,255,0.45),inset 0 0 5px rgba(255,255,255,0.1);
  transform:translateY(-1px);
}

/* Speak-Button Aktivzustand */
#speakBtn.speaking {
  box-shadow:0 0 20px rgba(85,170,255,0.6);
  background-color:rgba(85,170,255,0.15);
  transition:box-shadow 0.3s ease,background-color 0.3s ease;
}
/* 🌙 Einheitliches Header-Login-Button-Styling */
header .left .disconnected,
header .left .connected {
  background: #e0e0e0;
  border: 1px solid #999;
  color: #111;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.9em;
  cursor: default;
  transition: background 0.3s ease, color 0.3s ease;
}

header .left .connected {
  background: #4caf50;
  color: #fff;
  border-color: #3e8e41;
}

header .left button:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}
