/* ===============================================
   OderOder - Glass UI v3.0 (Light/Dark)
   =============================================== */

/* Mini-Spinner für Lade-Platzhalter */
.vote-spinner{display:inline-block;width:18px;height:18px;border:2.5px solid var(--muted,#ccc);border-top-color:var(--primary,#6c63ff);border-radius:50%;animation:vote-spin .6s linear infinite;vertical-align:middle}
@keyframes vote-spin{to{transform:rotate(360deg)}}

/* Vote-Ergebnis Layout */
.vote-result-row{flex-direction:column!important;align-items:stretch!important;gap:4px!important;padding:14px 16px!important}
.vote-result-header{display:flex;justify-content:space-between;align-items:center}
.vote-result-label{display:flex;align-items:center;gap:10px;font-size:1rem;font-weight:600}
.vote-result-stat{font-size:1.3rem;font-weight:700;color:var(--text)}
.vote-result-count{font-size:0.8rem;color:var(--muted,#888);margin-top:2px}

/* Vote-Balken */
.vote-bar-track{height:10px;background:var(--panel-border,#e0e0e0);border-radius:6px;overflow:hidden;position:relative}
.dark .vote-bar-track{background:rgba(255,255,255,0.1)}
.vote-bar-fill{height:100%;border-radius:6px;transition:width 0.6s ease-out;width:0}

/* Knight Rider Lauflicht */
.vote-bar-track.loading .vote-bar-fill{width:100%!important;background:transparent!important}
.vote-bar-track.loading::after{content:'';position:absolute;top:0;left:0;height:100%;width:30%;border-radius:6px;animation:knight-rider 1.2s ease-in-out infinite alternate}
.vote-result-row:nth-child(1) .vote-bar-track.loading::after{background:var(--accent,#ff6584)}
.vote-result-row:nth-child(2) .vote-bar-track.loading::after{background:var(--primary,#6c63ff)}
@keyframes knight-rider{0%{left:0;width:30%}50%{width:20%}100%{left:70%;width:30%}}

/* ---- Lokale Fonts (kein externer Google-Request) ---- */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Poppins-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Poppins-SemiBold.woff2') format('woff2');
}

/* ===============================================
   1. THEME SYSTEM - Light Mode (Default)
   =============================================== */

:root {
  /* Background - Light */
  --bg-0: #f5f7fa;
  --bg-1: #ffffff;
  --bg: var(--bg-0);

  /* Text - Light */
  --text: rgba(0,0,0,.87);
  --text-1: rgba(0,0,0,.72);
  --text-2: rgba(0,0,0,.50);
  --muted: var(--text-2);

  /* Glass surfaces - Light */
  --glass: rgba(255,255,255,.85);
  --glass-2: rgba(255,255,255,.92);
  --surface: var(--glass);
  --stroke: rgba(0,0,0,.08);
  --border: var(--stroke);

  /* Panel - Light */
  --panel-bg: rgba(255,255,255,.95);
  --panel-border: rgba(0,0,0,.10);

  /* Shadows - Light */
  --shadow-light: 0 6px 16px rgba(0,0,0,.08);
  --shadow-strong: 0 12px 30px rgba(0,0,0,.12);

  /* Radius */
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 22px;

  /* Accent - Orange */
  --orange-0: #cf6a2b;
  --orange-1: #f3a15b;

  /* Accent - Blue */
  --blue-0: #2f62c6;
  --blue-1: #6fa0ff;

  /* Primary (für Kompatibilität) */
  --primary: var(--blue-0);
  --primary-hover: var(--blue-1);
  --primary-soft: rgba(47, 98, 198, 0.12);
  --accent: var(--orange-0);

  /* Success/Error */
  --success: #28a745;
  --error: #dc3545;
  --error-soft: rgba(220, 53, 69, 0.12);

  /* Layout */
  --pad: 20px;

  /* Card */
  --card: #ffffff;

  /* Chart Grid */
  --grid: rgba(0,0,0,.12);
}

/* ===============================================
   1b. THEME SYSTEM - Dark Mode
   =============================================== */

body.dark {
  /* Background - Dark */
  --bg-0: #0f1014;
  --bg-1: #141520;
  --bg: var(--bg-0);

  /* Text - Dark */
  --text: rgba(255,255,255,.92);
  --text-1: rgba(255,255,255,.78);
  --text-2: rgba(255,255,255,.55);
  --muted: var(--text-2);

  /* Glass surfaces - Dark */
  --glass: rgba(255,255,255,.06);
  --glass-2: rgba(255,255,255,.08);
  --surface: var(--glass);
  --stroke: rgba(255,255,255,.10);
  --border: var(--stroke);

  /* Panel - Dark */
  --panel-bg: rgba(255,255,255,.05);
  --panel-border: rgba(255,255,255,.12);

  /* Shadows - Dark */
  --shadow-light: 0 6px 16px rgba(0,0,0,.35);
  --shadow-strong: 0 12px 30px rgba(0,0,0,.45);

  /* Primary - Dark */
  --primary: var(--blue-1);
  --primary-hover: var(--blue-0);
  --primary-soft: rgba(111, 160, 255, 0.15);
  --accent: var(--orange-1);

  /* Error - Dark */
  --error: #FF6B6B;
  --error-soft: rgba(255, 107, 107, 0.15);

  /* Card - Dark */
  --card: rgba(20, 21, 32, 0.9);

  /* Chart Grid - Dark */
  --grid: rgba(255,255,255,.18);
}

/* ===============================================
   2. GLOBAL RESET & BASE
   =============================================== */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #121212;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  text-align: center;
  padding: 20px;
  padding-top: calc(80px + env(safe-area-inset-top));
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  min-height: 100svh;
  position: relative;

  /* Light Mode Background */
  background:
    radial-gradient(1000px 700px at 50% 35%, rgba(47,98,198,.04), transparent 60%),
    radial-gradient(900px 600px at 30% 85%, rgba(120,140,255,.05), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  background-attachment: fixed;
}

/* Dark Mode Background */
body.dark {
  background:
    radial-gradient(800px 500px at 50% 30%, rgba(60,50,80,.35), transparent 55%),
    radial-gradient(600px 400px at 70% 70%, rgba(40,30,60,.25), transparent 50%),
    linear-gradient(180deg, #12131a 0%, #1a1b26 50%, #0d0e14 100%);
  background-attachment: fixed;
}

/* Subtle grain overlay - nur im Dark Mode */
body.dark::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.03) 0px,
      rgba(255,255,255,.03) 1px,
      transparent 2px,
      transparent 6px
    );
  opacity: .15;
  pointer-events: none;
  z-index: 0;
}

body.no-scroll {
  overflow: hidden;
}

/* ===============================================
   3. TYPOGRAPHY
   =============================================== */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

/* ===============================================
   4. BUTTONS - Glass Style
   =============================================== */

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 14px;
  transition: transform 0.08s ease, filter 0.12s ease;
}

button:active {
  transform: translateY(1px) scale(0.99);
}

/* Option Buttons (Frage-Antworten) */
#optionButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: center;
  width: min(520px, 100%);
  margin: 20px auto 0;
}

/* "Bereits beantwortet" Info-Text */
#optionButtons .already-answered-info {
  flex: 0 0 100%;
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

#optionButtons button {
  flex: 1;
  min-height: 54px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.1);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
  white-space: nowrap;
}

body.dark #optionButtons button {
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}

body.dark #optionButtons button:first-child {
  background: linear-gradient(180deg, #e8945a 0%, #c5622a 100%);
}

body.dark #optionButtons button:last-child {
  background: linear-gradient(180deg, #5a8be8 0%, #3a68c4 100%);
}

#optionButtons button:first-child {
  background: linear-gradient(180deg, var(--orange-1), var(--orange-0));
}

#optionButtons button:last-child {
  background: linear-gradient(180deg, var(--blue-1), var(--blue-0));
}

#optionButtons button:hover {
  filter: brightness(1.1);
}

/* Primary Button */
.btn-primary {
  padding: 12px 24px;
  margin: 10px;
  font-size: 16px;
  background: linear-gradient(180deg, var(--blue-1), var(--blue-0));
  color: #fff;
  border: 1px solid rgba(0,0,0,.1);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

body.dark .btn-primary {
  background: linear-gradient(180deg, #5a8be8 0%, #3a68c4 100%);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

/* Ghost Button */
.btn-ghost {
  background: rgba(0,0,0,.03);
  backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
}

body.dark .btn-ghost {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}

.btn-ghost:hover {
  background: rgba(0,0,0,.06);
}

body.dark .btn-ghost:hover {
  background: rgba(255,255,255,.1);
}

.btn-ghost.sm {
  padding: 6px 10px;
  font-size: 0.85rem;
}

/* Outline Button */
.btn-outline {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 10px 16px;
}

/* Danger Button */
.btn-danger {
  background: rgba(255,107,107,.15);
  border: 1px solid var(--error);
  color: var(--error);
}

/* ===============================================
   5. CONTAINERS & CARDS
   =============================================== */

.container {
  position: relative;
  background: var(--surface);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  margin: 20px auto;
  max-width: 600px;
}

/* Question Container - Centered */
#frageContainer {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-height: 600px) {
  #frageContainer {
    top: auto;
    transform: none;
    margin-top: 20px;
  }
}

/* ===============================================
   6. CHART & RESULTS
   =============================================== */

#auswertungContainer {
  animation: fadeIn 0.4s ease;
}

#auswertungContainer h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  margin-top: 50px; /* Platz für Favoriten/Teilen Buttons */
  text-align: center;
  color: var(--muted);
  font-weight: 500;
}

.frage-unter-titel {
  font-size: 1.6rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  margin: 0 auto 16px;
  padding: 0 60px; /* Seitlicher Abstand für Buttons */
  max-width: 500px;
  line-height: 1.4;
}

#ergebnisChart {
  max-width: 320px;
  width: 100%;
  height: 320px;
  margin: 20px auto;
  display: block;
}

#gesamtAntworten {
  margin: 0 auto 20px;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

#legendCustom {
  margin: 10px auto 6px;
  max-width: 420px;
  text-align: left;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 8px 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.legend-row:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.legend-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  min-width: 0;
  flex: 1;
}

.fav-info {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  padding: 4px 16px 8px;
  margin: 0;
}

.fav-card {
  background: var(--surface);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 8px 0;
}

.fav-card-header {
  margin-bottom: 10px;
}

.fav-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.fav-kategorie {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.fav-results {
  margin: 10px 0;
}

.fav-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.fav-label {
  font-size: 0.8rem;
  color: var(--text-1);
  width: 80px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fav-bar-track {
  flex: 1;
  height: 8px;
  background: var(--stroke);
  border-radius: 4px;
  overflow: hidden;
}

.fav-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.fav-bar-a { background: var(--primary); }
.fav-bar-b { background: var(--accent, #f59e0b); }

.fav-pct {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

.fav-total {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

.fav-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.fav-actions-row .btn-ghost {
  flex: 1;
  text-align: center;
  padding: 6px 12px;
  font-size: 0.85rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Next Button styling */
#nextButton {
  margin-top: 24px;
  font-size: 1.05rem;
  padding: 14px 32px;
  min-width: 180px;
}

#umfrageZaehler {
  text-align: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===============================================
   7. ACTION BUTTONS (Fav & Share) - Glass Style
   =============================================== */

.fav-button,
#shareButton {
  position: absolute;
  top: 10px;
  width: 54px;
  height: 54px;
  padding: 0;
  /* Light Mode */
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  border-radius: 999px;
  box-shadow: var(--shadow-light);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

/* Dark Mode Fav/Share Buttons */
body.dark .fav-button,
body.dark #shareButton {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

.fav-button {
  left: 10px;
}

#shareButton {
  right: 10px;
  display: none;
}

.fav-button:hover,
#shareButton:hover {
  transform: scale(1.05);
  background: rgba(0,0,0,.05);
}

body.dark .fav-button:hover,
body.dark #shareButton:hover {
  background: rgba(255,255,255,.1);
}

.fav-button svg,
#shareButton svg,
#shareButton .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.fav-button.fav-active {
  color: var(--primary);
}

.fav-button.fav-active svg {
  fill: currentColor;
  stroke: currentColor;
}

#shareButton .icon {
  width: 22px;
  height: 22px;
}

#shareButton.enter {
  animation: fadeInUp 0.25s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================================
   8. TOAST NOTIFICATIONS
   =============================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, bottom 0.25s;
  z-index: 1200;
}

.toast.show {
  opacity: 1;
  bottom: calc(110px + env(safe-area-inset-bottom));
}

/* ===============================================
   9. PANELS (Bottom Sheets) - Glass Style
   =============================================== */

.panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  touch-action: pan-y;
  overscroll-behavior: contain;
  transition: background 0.25s ease;
}

.panel-overlay.open {
  display: flex;
}

.panel-overlay.closing {
  background: rgba(0, 0, 0, 0);
}

.panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: calc(100dvh - 90px - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 90px - env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  color: var(--text);
  border-radius: 22px 22px 0 0;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  will-change: transform;

  /* Light Mode - Glass effect */
  background:
    radial-gradient(600px 120px at 70% 30%, rgba(47,98,198,.04), transparent 60%),
    radial-gradient(600px 140px at 25% 80%, rgba(120,160,255,.05), transparent 60%),
    rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-bottom: none;
  box-shadow: var(--shadow-strong);
}

/* Dark Mode Panel */
body.dark .panel {
  background:
    radial-gradient(500px 200px at 70% 20%, rgba(180,140,100,.06), transparent 50%),
    radial-gradient(400px 200px at 30% 80%, rgba(100,120,180,.06), transparent 50%),
    rgba(22, 24, 35, 0.97);
  border: 1px solid rgba(255,255,255,.06);
}

.panel-overlay.open .panel {
  transform: translateY(0);
}

.panel.closing {
  transform: translateY(100%);
}

/* Panel Header */
.panel-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px 8px;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--panel-border);
}

.panel-head::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
}

body.dark .panel-head::before {
  background: rgba(255, 255, 255, 0.28);
}

/* Panel Header Actions */
.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

#clearFilterBtn {
  color: var(--error, #FF6B6B);
  border: 1px solid var(--error, #FF6B6B);
  border-radius: 6px;
}

#clearFilterBtn:hover {
  background: var(--error, #FF6B6B);
  color: white;
}

/* Panel Body & Sections */
.panel-body,
.panel-section {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 10px 8px;
  padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
}

.panel-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.panel-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--panel-bg);
  border-top: 1px solid var(--panel-border);
}

.panel-actions {
  display: flex;
  gap: 8px;
  padding: 8px;
}

/* Panel Close Button */
.panel-close,
.panel .panel-close {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--panel-border);
}

.panel .panel-close:hover {
  background: var(--primary-soft);
}

/* ===============================================
   10. BOTTOM NAVIGATION - Glass Style
   =============================================== */

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(760px, calc(100% - 24px));
  height: 78px;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px;

  /* Light Mode - Glass effect */
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 22px;
  box-shadow: var(--shadow-strong);
}

/* Dark Mode Bottom Nav */
body.dark .bottom-nav {
  background: rgba(30,32,45,.85);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 -4px 30px rgba(0,0,0,.4);
}

.bn-item {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  width: 20%;
  height: 100%;
  transition: color 0.2s ease;
}

.bn-icon {
  font-size: 20px;
  line-height: 1;
  opacity: 0.7;
}

.bn-item[aria-selected="true"] {
  color: var(--text);
}

.bn-item[aria-selected="true"] .bn-icon {
  opacity: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}

.bn-item:active {
  transform: scale(0.95);
}

/* Daily Badge */
.bn-item.has-daily-badge::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(255,255,255,.9);
}

body.dark .bn-item.has-daily-badge::after {
  box-shadow: 0 0 0 2px rgba(20,21,32,.9);
}

/* ===============================================
   11. FORMS & INPUTS
   =============================================== */

.field {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  text-align: left;
}

/* Profile Welcome Box (neues Design) */
.profile-welcome-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(111, 160, 255, 0.12) 0%, rgba(111, 160, 255, 0.06) 100%);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  border: 1px solid rgba(111, 160, 255, 0.15);
}

body.dark .profile-welcome-box {
  background: linear-gradient(135deg, rgba(111, 160, 255, 0.15) 0%, rgba(111, 160, 255, 0.08) 100%);
  border-color: rgba(111, 160, 255, 0.2);
}

.profile-welcome-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
}

.profile-welcome-content {
  flex: 1;
}

.profile-welcome-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px 0;
}

body.dark .profile-welcome-title {
  color: rgba(255, 255, 255, 0.95);
}

.profile-welcome-text {
  font-size: 0.85rem;
  color: var(--text-1);
  line-height: 1.5;
  margin: 0;
}

body.dark .profile-welcome-text {
  color: rgba(255, 255, 255, 0.75);
}

/* Menu Title Hint */
.menu-title-hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-2);
}

body.dark .menu-title-hint {
  color: rgba(255, 255, 255, 0.5);
}

/* Legacy Profile Info Box (für Kompatibilität) */
.profile-info-box {
  padding: 12px;
  background: rgba(111, 160, 255, 0.12);
  border-left: 4px solid var(--primary);
  margin-bottom: 16px;
  border-radius: 4px;
}

body.dark .profile-info-box {
  background: rgba(111, 160, 255, 0.15);
}

.profile-info-text {
  font-size: 0.85rem;
  color: var(--text-1);
  line-height: 1.5;
}

body.dark .profile-info-text {
  color: rgba(255, 255, 255, 0.85);
}

.field-label {
  display: block;
  margin: 6px 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.input,
.select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: none;
}

/* Dark Mode: Select & Input Dropdowns */
body.dark .input,
body.dark .select {
  background: rgba(30, 32, 45, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

body.dark .select option {
  background: #1e202d;
  color: rgba(255, 255, 255, 0.92);
}

.input:focus,
.select:focus {
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.25);
}

body.dark .input:focus,
body.dark .select:focus {
  box-shadow: 0 0 0 2px rgba(111, 160, 255, 0.35);
  border-color: rgba(111, 160, 255, 0.5);
}

.input.is-invalid {
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.input-affix {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

textarea.input {
  resize: vertical;
  min-height: 80px;
}

/* Checkbox */
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox input {
  width: 16px;
  height: 16px;
}

/* Search */
.menu-search {
  position: relative;
  display: flex;
  align-items: center;
}

.menu-search .search-icon {
  position: absolute;
  left: 10px;
  font-size: 14px;
  opacity: 0.7;
  pointer-events: none;
}

.menu-search input {
  padding-left: 32px;
  padding-right: 34px;
}

.menu-search .clear-x {
  position: absolute;
  right: 6px;
  height: 28px;
  min-width: 28px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: var(--surface);
  color: var(--text);
}

.menu-search .clear-x:hover {
  background: var(--primary-soft);
}

/* Date of Birth Grid */
.dob-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

@media (max-width: 360px) {
  .dob-grid {
    grid-template-columns: 1fr;
  }
}

/* Form Error */
.form-error {
  background: color-mix(in oklab, var(--surface) 80%, red);
  color: #b00020;
  border: 1px solid color-mix(in oklab, var(--surface) 60%, red);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

/* ===============================================
   12. MENU SECTIONS
   =============================================== */

.menu-body {
  padding: 8px;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
}

.menu-section {
  padding: 10px 8px 14px;
  border-bottom: 1px solid var(--panel-border);
}

.menu-section:last-child {
  border-bottom: 0;
}

.menu-title {
  margin: 6px 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.sticky-title {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 0;
  margin: 0 0 8px;
  background: var(--panel-bg);
}

body.dark .sticky-title {
  background: var(--panel-bg);
}

.menu-row {
  margin: 8px 0;
}

.menu-link {
  display: block;
  padding: 10px 8px;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
}

.menu-link:hover {
  background: var(--primary-soft);
}

.hint {
  margin: 6px 2px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===============================================
   13. DARK MODE TOGGLE
   =============================================== */

/* Games Grid & Cover Cards */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.game-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border: none;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  aspect-ratio: 1 / 1;
}
.game-cover:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.game-cover:active {
  transform: scale(0.96);
}
.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-cover-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 6px 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  line-height: 1.2;
}

/* Theme Grid & Cards (für Meine Statistik etc.) */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.theme-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

.theme-card .stat-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--primary-soft);
  border-radius: 12px;
  border: none;
  box-shadow: none;
}

.theme-card .stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.theme-card .stat-value {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Donut Chart Container */
#msCat {
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
  transition: filter 0.3s ease;
}

body.dark #msCat {
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
}

#msCatLegend {
  margin-top: 12px;
}

#msCatLegend .legend-row {
  padding: 8px 12px;
  margin-bottom: 6px;
  background: var(--surface);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#msCatLegend .legend-row:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-light);
}

#msCatLegend .legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#statsTiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Dark Mode Toggle Switch */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  margin-bottom: 16px;
}

.dark-mode-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.dark-mode-label .icon {
  font-size: 1.2rem;
}

/* Menu Action Cards (gleicher Style wie Toggle, aber klickbar) */
.menu-action { cursor: pointer; transition: background 0.2s ease; }
.menu-action:hover { background: var(--primary-soft); }
.menu-action:active { transform: scale(0.98); }
.menu-action-arrow { font-size: 1.4rem; color: var(--muted); font-weight: 300; }

/* Menu Submit Card (Frage einreichen) */
.menu-submit-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(90,139,232,.15), rgba(168,85,247,.15));
  border: 1px solid rgba(90,139,232,.3);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.menu-submit-card:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(90,139,232,.2); }
.menu-submit-card:active { transform: scale(0.98); }
.menu-submit-emoji { font-size: 2rem; flex-shrink: 0; }
.menu-submit-text { flex: 1; min-width: 0; }
.menu-submit-title { display: block; font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 3px; }
.menu-submit-desc { display: block; font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

/* Notification details (collapsible) */
#notifMainToggle { cursor: pointer; margin-bottom: 0; transition: border-radius 0.3s ease; }
#notifMainToggle.open { border-radius: 12px 12px 0 0; margin-bottom: 0; }
.notif-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: var(--glass);
  border: 1px solid var(--panel-border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  margin-bottom: 16px;
}
.notif-details.open { max-height: 400px; }
.notif-sub-toggle {
  border: none;
  border-radius: 0;
  margin-bottom: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--panel-border);
}
.notif-sub-toggle .dark-mode-label { font-size: 0.88rem; font-weight: 400; }
.notif-sub-toggle .icon { font-size: 1rem; }

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(0,0,0,.15);
  border-radius: 28px;
  transition: background 0.3s ease;
}

body.dark .toggle-slider {
  background: rgba(255,255,255,.15);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,.3);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

/* ===============================================
   14. MULTI-SELECT COMPONENT
   =============================================== */

.ms {
  width: 100%;
}

.ms-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.ms-head:hover {
  background: color-mix(in oklab, var(--surface) 92%, black);
}

.ms-caret {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.ms[aria-expanded="true"] .ms-caret {
  transform: rotate(180deg);
}

.ms-list {
  display: none;
  margin-top: 8px;
  max-height: 40vh;
  overflow: auto;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--surface);
  padding: 6px;
}

.ms[aria-expanded="true"] .ms-list {
  display: block;
}

.ms-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
}

.ms-item:hover {
  background: var(--primary-soft);
}

.ms-item input {
  width: 18px;
  height: 18px;
}

.ms-name {
  color: var(--text);
}

/* ===============================================
   15. STATISTICS & TILES
   =============================================== */

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  min-height: 100px;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-card:active {
  transform: translateY(0);
}

.stat-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-soft);
  border-radius: 14px;
  border: 0;
  box-shadow: none;
}

.stat-label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.3;
}

.stat-value {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Stats Badge */
.stat-card.has-daily-badge .stat-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--panel-bg);
}

/* ===============================================
   16. PROFILE & ORGANIZATION
   =============================================== */

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-title {
  margin: 0;
  font-weight: 700;
}

.profile-save-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.profile-save-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--panel-border);
}

.avatar--guest {
  background: var(--primary-soft);
  border: 2px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.auth-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.auth-text {
  font-weight: 600;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
}

.badge.active {
  background: #e9f7ef;
  color: #19a05e;
  border-color: #cfeedd;
}

.badge.planned {
  background: #fff7e6;
  color: #9a6b00;
  border-color: #ffe6b3;
}

.badge.ended {
  background: #f8d7da;
  color: #b13541;
  border-color: #f1aeb5;
}

.badge.draft {
  background: #eef2f6;
  color: #4b5563;
  border-color: #e2e7ee;
}

/* ===============================================
   18. SEARCH RESULTS
   =============================================== */

.search-results {
  margin-top: 10px;
  padding: 6px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: var(--surface);
  max-height: 40vh;
  overflow: auto;
}

/* ===============================================
   19. ACCESSIBILITY
   =============================================== */

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===============================================
   20. ANIMATIONS & MOTION
   =============================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ===============================================
   21. SCROLLBAR STYLING
   =============================================== */

.fav-scroll::-webkit-scrollbar,
.search-scroll::-webkit-scrollbar,
.panel-section::-webkit-scrollbar,
.ms-list::-webkit-scrollbar {
  width: 8px;
}

.fav-scroll::-webkit-scrollbar-thumb,
.search-scroll::-webkit-scrollbar-thumb,
.panel-section::-webkit-scrollbar-thumb,
.ms-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}

body.dark .fav-scroll::-webkit-scrollbar-thumb,
body.dark .search-scroll::-webkit-scrollbar-thumb,
body.dark .panel-section::-webkit-scrollbar-thumb,
body.dark .ms-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
}

/* ===============================================
   22. UTILITY CLASSES
   =============================================== */

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.divider-soft {
  height: 1px;
  background: var(--grid);
  margin: 12px 0;
}

/* ===============================================
   23. EDGE HINT (Optional)
   =============================================== */

.edge-hint {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 100%;
  background: linear-gradient(90deg, rgba(74, 144, 226, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  z-index: 999;
}

.edge-hint.active {
  opacity: 0.6;
  background: linear-gradient(90deg, rgba(74, 144, 226, 0.25), transparent);
}

/* Auto-Save Hinweis */
.autosave-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.autosave-hint.show {
  opacity: 1;
}

.autosave-hint .autosave-icon {
  color: #28a745;
  font-weight: bold;
}

/* ===============================================
   24. ERWEITERTE STATISTIK
   =============================================== */

.extended-stats {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
}

.extended-stats h4 {
  font-size: 0.9rem;
  color: var(--primary);
  margin: 16px 0 8px;
  font-weight: 600;
}

.extended-stats .stats-category {
  margin: 12px 0;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}

.extended-stats .stats-category-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.extended-stats .stats-option {
  margin: 8px 0;
}

.extended-stats .stats-option-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.extended-stats .stats-bar-bg {
  height: 6px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.extended-stats .stats-bar-fill {
  height: 100%;
  background: var(--success);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.extended-stats .stats-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

.extended-stats .profile-prompt,
.profile-prompt {
  margin: 16px 0;
  padding: 12px;
  background: #fff3cd;
  border-radius: 8px;
  border: 1px solid #ffc107;
}

.extended-stats .profile-prompt-text,
.profile-prompt-text {
  font-size: 0.85rem;
  color: #856404;
}

/* Neue gestylte erweiterte Statistik */
.extended-stats-styled {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.extended-stats-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin: 0 0 4px 0;
}

.extended-stats-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin: 0 0 16px 0;
}

.extended-stats-group {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.extended-stats-group-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  text-align: center;
}

.legend-row-ext {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: background 0.2s ease;
}

.legend-row-ext:last-child {
  margin-bottom: 0;
}

.legend-row-ext:hover {
  background: var(--border);
}

.legend-dot-ext {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 12px;
}

.legend-label-ext {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.legend-value-ext {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

/* Accordion für erweiterte Statistik */
.extended-stats-accordion {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.extended-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--card);
  cursor: pointer;
  transition: background 0.2s ease;
}

.extended-stats-header:hover {
  background: var(--bg);
}

.extended-stats-header-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.extended-stats-header-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.extended-stats-header-count {
  font-size: 0.85rem;
  color: var(--muted);
}

.extended-stats-arrow {
  font-size: 0.8rem;
  color: var(--muted);
  transition: transform 0.3s ease;
}

.extended-stats-arrow.open {
  transform: rotate(180deg);
}

.extended-stats-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--card);
}

.extended-stats-content.open {
  max-height: 2000px;
}

.extended-stats-content .extended-stats-group {
  margin: 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--border);
}

.extended-stats-group-highlight {
  background: var(--primary-light, rgba(74, 144, 226, 0.1));
}

/* Profil-Hinweis Box (wenn kein Profil ausgefüllt) */
.profile-hint-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 20px 0 0 0;
  padding: 16px;
  background: var(--primary-soft, rgba(74, 144, 226, 0.1));
  border-radius: 12px;
  border: 1px solid rgba(74, 144, 226, 0.3);
}

.profile-hint-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.profile-hint-content {
  flex: 1;
}

.profile-hint-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.profile-hint-text {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Dark Theme Anpassung */
body.theme-dark .profile-hint-box,
body.dark .profile-hint-box {
  background: rgba(138, 180, 248, 0.12);
  border-color: rgba(138, 180, 248, 0.4);
}

/* ===============================================
   25. MODERNES KATEGORIEN-PANEL
   =============================================== */

/* Panel-Wrapper für Kategorien */
#categoryPanel .panel {
  display: flex;
  flex-direction: column;
}

/* Panel Body für Kategorien - scrollbar machen */
#categoryPanel .panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
  min-height: 0;
}

/* Sections */
.category-section {
  margin-bottom: 20px;
}

.category-section:last-child {
  margin-bottom: 16px;
}

.category-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Moderne Suchbox */
.search-box-modern {
  position: relative;
  margin-bottom: 12px;
}

.search-box-modern input[type="search"] {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  transition: all 0.2s ease;
}

.search-box-modern input[type="search"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.search-box-modern input[type="search"]::placeholder {
  color: var(--text-muted);
}

.search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: var(--border);
  color: var(--text-secondary);
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.search-box-modern input[type="search"]:not(:placeholder-shown) + .search-clear-btn {
  opacity: 1;
  pointer-events: all;
}

.search-clear-btn:hover {
  background: var(--text-muted);
  color: var(--surface);
}

.search-clear-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Kategorie-Buttons */
.category-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-chip {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.category-chip:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.category-chip:active {
  transform: scale(0.99);
}

.category-chip.active {
  border-color: #28a745;
  background: rgba(40, 167, 69, 0.1);
}

.category-chip.excluded {
  background: var(--error-soft);
  border-color: var(--error);
  color: var(--error);
  text-decoration: line-through;
  opacity: 0.7;
}

.category-chip-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-chip-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-chip-icon {
  font-size: 1.1em;
}

.category-chip-count {
  font-size: 0.8rem;
  opacity: 0.6;
  font-weight: 600;
}

.category-chip-check {
  color: #28a745;
  font-weight: bold;
  font-size: 1.4rem;
}

/* Aktive Filter */
.active-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.active-filter-tag {
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
}

.active-filter-remove {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--error-soft, rgba(255, 107, 107, 0.15));
  color: var(--error, #FF6B6B);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  transition: all 0.15s ease;
}

.active-filter-remove:hover {
  background: var(--error, #FF6B6B);
  color: white;
}

.active-filter-remove:active {
  transform: scale(0.95);
}

/* Alle Filter löschen Button */
.clear-all-filters {
  margin-top: 8px;
  padding: 10px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.clear-all-filters:hover {
  border-color: var(--error, #FF6B6B);
  color: var(--error, #FF6B6B);
  background: var(--error-soft, rgba(255, 107, 107, 0.1));
}

/* Search Results */
.search-results {
  margin-top: 12px;
}

.search-result-item {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-result-item:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateX(2px);
}

.search-result-item:active {
  transform: translateX(0) scale(0.99);
}

.search-result-question {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.search-result-category {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-no-results {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===============================================
   SUBMIT INFO BOX
   =============================================== */

.submit-info-box {
  padding: 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(111, 160, 255, 0.08) 0%, rgba(155, 89, 182, 0.06) 100%);
  border: 1px solid rgba(111, 160, 255, 0.2);
  border-radius: var(--radius-sm);
  text-align: left;
}

body.dark .submit-info-box {
  background: linear-gradient(135deg, rgba(111, 160, 255, 0.1) 0%, rgba(155, 89, 182, 0.08) 100%);
  border-color: rgba(111, 160, 255, 0.25);
}

.submit-info-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.submit-info-icon {
  font-size: 1.2rem;
}

.submit-info-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.submit-info-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-2);
}

/* ===============================================
   SUBMIT QUESTION BUTTON
   =============================================== */

.submit-question-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--primary-soft) 0%, rgba(111, 160, 255, 0.08) 100%);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.dark .submit-question-btn {
  background: linear-gradient(135deg, rgba(111, 160, 255, 0.12) 0%, rgba(180, 140, 255, 0.08) 100%);
  border-color: rgba(111, 160, 255, 0.4);
}

.submit-question-btn:hover {
  background: linear-gradient(135deg, var(--primary-soft) 0%, rgba(111, 160, 255, 0.15) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark .submit-question-btn:hover {
  background: linear-gradient(135deg, rgba(111, 160, 255, 0.2) 0%, rgba(180, 140, 255, 0.15) 100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.submit-question-btn:active {
  transform: scale(0.98);
}

.submit-icon {
  font-size: 1.3em;
}

.submit-text {
  flex: 1;
  text-align: left;
}

.submit-arrow {
  font-size: 1.1em;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.submit-question-btn:hover .submit-arrow {
  transform: translateX(3px);
  opacity: 1;
}

/* ===============================================
   SUBMIT QUESTION MODAL
   =============================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  padding-top: calc(70px + env(safe-area-inset-top));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
}

body.dark .modal-overlay {
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 90px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.25s ease;
}

body.dark .modal-content {
  background: rgba(22, 24, 35, 0.98);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-overlay.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--panel-border);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 20px;
  border-top: 1px solid var(--panel-border);
}

.submit-info {
  font-size: 0.9rem;
  color: var(--text-2);
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.submit-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.submit-options .field {
  margin: 0;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Dark Mode: Modal Field Inputs & Selects */
body.dark .field input,
body.dark .field select {
  background: rgba(30, 32, 45, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

body.dark .field select option {
  background: #1e202d;
  color: rgba(255, 255, 255, 0.92);
}

body.dark .field input:focus,
body.dark .field select:focus {
  box-shadow: 0 0 0 3px rgba(111, 160, 255, 0.25);
  border-color: rgba(111, 160, 255, 0.5);
}

.field input::placeholder {
  color: var(--text-2);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-2);
  margin-top: 4px;
}

/* ===============================================
   SUCCESS TOAST
   =============================================== */

.toast-notification {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--success);
  color: white;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
  font-weight: 600;
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  font-size: 1.2em;
}

/* Responsive */
@media (max-width: 480px) {
  .submit-options {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-height: calc(100dvh - 100px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}

/* Responsive */
@media (max-width: 480px) {
  .category-chip {
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .category-section-title {
    font-size: 0.85rem;
  }
}

/* ===============================================
   Beste Ergebnisse Panel
   =============================================== */

.best-category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}

.best-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.best-category-card:hover {
  background: var(--glass-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

.best-category-card:active {
  transform: translateY(0);
}

.best-category-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.best-category-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.best-category-desc {
  font-size: 0.75rem;
  color: var(--text-2);
}

.best-results-view {
  padding: 16px;
}

.best-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.best-back-btn:hover {
  background: var(--glass-2);
}

.best-results-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.best-results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.best-result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.best-result-card:hover {
  background: var(--glass-2);
  transform: translateX(4px);
}

.best-result-rank {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange-0), var(--orange-1));
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
}

.best-result-rank.gold { background: linear-gradient(135deg, #ffd700, #ffb700); color: #7a5c00; }
.best-result-rank.silver { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #404040; }
.best-result-rank.bronze { background: linear-gradient(135deg, #cd7f32, #b87333); color: #5a3510; }

.best-result-content {
  flex: 1;
  min-width: 0;
}

.best-result-question {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.best-result-stats {
  font-size: 0.8rem;
  color: var(--text-2);
  display: flex;
  gap: 12px;
}

.best-result-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.best-result-arrow {
  color: var(--text-2);
  font-size: 1.2rem;
}

/* Mobile Responsive */
@media (max-width: 360px) {
  .best-category-grid {
    grid-template-columns: 1fr;
  }
}

/* ===============================================
   SPIELE: Gemeinsam
   =============================================== */

.game-soon {
  opacity: 0.45;
  cursor: not-allowed !important;
}

/* ===============================================
   SPIEL: Mehrheit denkt
   =============================================== */

.mehrheit-center {
  text-align: center;
  padding: 32px 16px;
}

.mehrheit-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.mehrheit-center h3 {
  margin: 0 0 8px;
}

.mehrheit-start-btn {
  margin-top: 20px;
  font-size: 1rem;
  padding: 12px 32px;
}

/* Spielfeld */
.mehrheit-game {
  padding: 8px 0;
}

.mehrheit-progress {
  margin-bottom: 16px;
}

.mehrheit-progress-bar {
  height: 6px;
  background: var(--stroke);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.mehrheit-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.mehrheit-round-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.mehrheit-prompt {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 8px;
}

.mehrheit-question {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.4;
}

.mehrheit-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mehrheit-option-btn {
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.mehrheit-option-btn:hover {
  border-color: var(--primary);
  background: rgba(74, 144, 226, 0.08);
  transform: translateY(-1px);
}

.mehrheit-option-btn:active {
  transform: scale(0.98);
}

.mehrheit-score-bar {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 16px;
}

/* Auflösung */
.mehrheit-reveal {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
}

.mehrheit-reveal.correct {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.mehrheit-reveal.wrong {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.mehrheit-results {
  margin: 16px 0;
}

.mehrheit-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.mehrheit-label {
  font-size: 0.85rem;
  color: var(--text-1);
  width: 90px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mehrheit-label.majority {
  font-weight: 700;
  color: var(--primary);
}

.mehrheit-pct {
  font-size: 0.85rem;
  font-weight: 600;
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

.mehrheit-choice-info {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-2);
  margin-top: 8px;
}

.mehrheit-next-btn {
  display: block;
  width: 100%;
  margin: 16px auto 0;
  padding: 12px;
  font-size: 1rem;
}

/* Endauswertung */
.mehrheit-end {
  text-align: center;
  padding: 16px 0;
}

.mehrheit-end-title {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.mehrheit-end-score {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.mehrheit-end-pct {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.mehrheit-end-desc {
  font-size: 1rem;
  color: var(--text-1);
  margin-bottom: 20px;
}

.mehrheit-details {
  text-align: left;
  margin: 16px 0;
}

.mehrheit-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  margin: 6px 0;
}

.mehrheit-detail-row.detail-correct {
  background: rgba(34, 197, 94, 0.06);
}

.mehrheit-detail-row.detail-wrong {
  background: rgba(239, 68, 68, 0.06);
}

.mehrheit-detail-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.mehrheit-detail-text {
  min-width: 0;
}

.mehrheit-detail-q {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.mehrheit-detail-info {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ===============================================
   SPIEL: Wie tickst du?
   =============================================== */

.tickst-kat {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.tickst-game {
  padding: 8px 0;
}

/* Endauswertung */
.tickst-end {
  text-align: center;
  padding: 16px 0;
}

.tickst-end-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.tickst-mainstream-score {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.tickst-mainstream-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.tickst-mainstream-desc {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 20px;
}

.tickst-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text);
}

.tickst-dimensions {
  text-align: left;
}

.tickst-dim-row {
  margin-bottom: 16px;
}

.tickst-dim-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}

.tickst-dim-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--stroke);
}

.tickst-dim-fill-left {
  height: 100%;
  background: var(--primary);
  border-radius: 5px 0 0 5px;
  transition: width 0.5s ease;
}

.tickst-dim-fill-right {
  height: 100%;
  background: var(--accent, #f59e0b);
  border-radius: 0 5px 5px 0;
  transition: width 0.5s ease;
}

.tickst-dim-pct {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ===============================================
   SPIEL: Speed-Runde
   =============================================== */

.speed-game {
  padding: 8px 0;
}

.speed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.speed-timer {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.speed-timer-icon {
  font-size: 1.2rem;
}

.speed-timer-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 36px;
  text-align: center;
}

.speed-timer-s {
  font-size: 0.9rem;
  color: var(--muted);
}

.speed-score {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.speed-score-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.speed-score-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.speed-timer-track {
  height: 6px;
  background: var(--stroke);
  border-radius: 3px;
  overflow: hidden;
}

.speed-timer-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 1s linear;
}

.speed-timer-fill.speed-urgent {
  background: #ef4444;
}

.speed-btn {
  padding: 14px 16px !important;
}

/* Speed End */
.speed-end {
  text-align: center;
  padding: 16px 0;
}

.speed-end-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.speed-end-score {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.speed-end-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.speed-new-record {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f59e0b;
  margin: 8px 0;
  animation: speed-pulse 0.6s ease-in-out 3;
}

@keyframes speed-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.speed-record {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 4px;
}

.speed-record-start {
  font-size: 0.9rem;
  color: var(--text-1);
  margin-top: 12px;
}

.speed-end-desc {
  font-size: 1rem;
  color: var(--text-1);
  margin-bottom: 16px;
}

/* Speed History */
.speed-history {
  text-align: left;
  margin-top: 20px;
  width: 100%;
}

.speed-history-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 8px;
  text-align: center;
}

.speed-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 4px 0;
  background: var(--surface);
  border: 1px solid var(--stroke);
}

.speed-history-row.speed-history-best {
  border-color: var(--primary);
  background: rgba(74, 144, 226, 0.06);
}

.speed-history-rank {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  width: 28px;
  flex-shrink: 0;
}

.speed-history-best .speed-history-rank {
  color: var(--primary);
}

.speed-history-score {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.speed-history-date {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ===============================================
   SPIEL: Wer kennt wen?
   =============================================== */

/* Lobby */
.party-lobby {
  padding: 8px 0;
}

.party-lobby h3 {
  margin: 0 0 4px;
}

.party-player-list {
  margin: 16px 0;
}

.party-player-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.party-player-num {
  font-weight: 600;
  color: var(--muted);
  width: 24px;
  flex-shrink: 0;
}

.party-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.party-input:focus {
  outline: none;
  border-color: var(--primary);
}

.party-remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
}

.party-add-btn {
  width: 100%;
  margin-bottom: 8px;
}

/* Handoff Screen */
.party-handoff {
  text-align: center;
  padding: 24px 0;
}

.party-handoff-round {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.party-handoff-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.party-handoff-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.party-handoff-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin: 4px 0 12px;
}

/* Question */
.party-question {
  padding: 8px 0;
}

.party-who {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 8px;
}

/* Reveal */
.party-reveal {
  padding: 8px 0;
}

.party-hotseat-answer {
  text-align: center;
  font-size: 1rem;
  padding: 12px;
  background: rgba(74, 144, 226, 0.08);
  border-radius: 10px;
  margin: 12px 0;
  color: var(--text);
}

.party-reveal-list {
  margin: 12px 0;
}

.party-reveal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 4px 0;
}

.party-reveal-row.detail-correct {
  background: rgba(34, 197, 94, 0.08);
}

.party-reveal-row.detail-wrong {
  background: rgba(239, 68, 68, 0.08);
}

.party-reveal-name {
  flex: 1;
  font-weight: 600;
}

.party-reveal-choice {
  font-size: 0.85rem;
  color: var(--muted);
}

.party-bonus {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent, #f59e0b);
  padding: 8px;
  margin: 8px 0;
}

.party-standings {
  margin: 16px 0;
}

.party-standings h4 {
  font-size: 0.9rem;
  margin: 0 0 8px;
  color: var(--text-1);
}

.party-standing-row {
  font-size: 0.9rem;
  padding: 6px 0;
  color: var(--text);
}

/* End Screen */
.party-end {
  text-align: center;
  padding: 16px 0;
}

.party-end-crown {
  font-size: 3rem;
  margin-bottom: 4px;
}

.party-end-winner-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

.party-end-winner-label {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.party-end-ranking {
  margin: 16px 0;
  text-align: left;
}

.party-end-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  margin: 6px 0;
  background: var(--surface);
  border: 1px solid var(--stroke);
}

.party-end-row.party-end-winner {
  border-color: var(--primary);
  background: rgba(74, 144, 226, 0.06);
}

.party-end-medal {
  font-size: 1.2rem;
  width: 28px;
  flex-shrink: 0;
  text-align: center;
}

.party-end-info {
  flex: 1;
}

.party-end-name {
  font-weight: 600;
  color: var(--text);
}

.party-end-titel {
  font-size: 0.75rem;
  color: var(--muted);
}

.party-end-score {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}

/* ===============================================
   ONLINE: WER KENNT WEN?
   =============================================== */

.online-mode-select { text-align: center; padding: 16px 0; }
.online-mode-btn {
  width: 100%; margin: 8px 0; padding: 14px 16px;
  border-radius: 12px; font-size: 0.95rem; font-weight: 600;
}
.online-mode-divider {
  color: var(--muted); margin: 14px 0; font-size: 0.85rem; text-align: center;
}

.form-group-online { margin-bottom: 14px; text-align: left; }
.form-group-online label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--muted); margin-bottom: 4px;
}
.online-input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--panel-border); background: var(--surface, var(--card));
  color: var(--text); font-size: 1rem; outline: none;
}
.online-input:focus { border-color: var(--primary); }
.online-code-input { font-size: 1.3rem; font-weight: 700; }

@keyframes shakeInput {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* Lobby */
.online-lobby { padding: 8px 0; text-align: center; }
.online-room-code-display {
  font-size: 2.4rem; font-weight: 800; letter-spacing: 8px;
  text-align: center; color: var(--primary); margin: 8px 0;
  font-family: 'Courier New', monospace;
}
.online-room-code-copy {
  font-size: 0.82rem; color: var(--muted); cursor: pointer;
  text-decoration: underline; text-align: center; margin-bottom: 12px;
}
.online-qr-container {
  text-align: center;
  margin: 12px auto 16px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: inline-block;
  width: auto;
}
.online-qr-container img,
.online-qr-container canvas {
  display: block;
  margin: 0 auto;
}
.online-player-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 4px; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem;
}
.online-player-count { color: var(--muted); font-size: 0.85rem; }
.online-player-list { margin: 0; text-align: left; }
.online-player-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--surface, var(--card)); margin: 4px 0;
}
.online-player-row.is-me { background: rgba(90, 139, 232, 0.1); }
.online-player-name { flex: 1; font-weight: 600; font-size: 0.92rem; }
.online-player-host { font-size: 0.78rem; color: #f59e0b; font-weight: 600; }
.online-player-status {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; flex-shrink: 0;
}
.online-player-status.disconnected { background: #ef4444; }

/* Waiting Spinner */
.online-waiting { text-align: center; padding: 24px 0; }
.online-waiting-spinner {
  display: inline-block; width: 28px; height: 28px;
  border: 3px solid var(--panel-border, rgba(255,255,255,0.1));
  border-top-color: var(--primary);
  border-radius: 50%; animation: onlineSpin 0.8s linear infinite;
}
@keyframes onlineSpin { to { transform: rotate(360deg); } }

/* Progress */
.online-progress { margin: 12px 0; }
.online-progress-bar {
  height: 6px; background: var(--panel-border, rgba(255,255,255,0.1));
  border-radius: 3px; overflow: hidden; margin: 8px 0;
}
.online-progress-fill {
  height: 100%; background: var(--primary); border-radius: 3px;
  transition: width 0.3s ease;
}
.online-answer-submitted {
  text-align: center; padding: 20px 0;
  color: var(--primary); font-weight: 700; font-size: 1.1rem;
}

/* Game Screens */
.online-game-screen { padding: 8px 0; text-align: center; }
.online-round-badge {
  display: inline-block; padding: 4px 14px; border-radius: 20px;
  background: rgba(90, 139, 232, 0.15); color: var(--primary);
  font-size: 0.8rem; font-weight: 600; margin-bottom: 12px;
}
.online-hotseat-badge {
  font-size: 1.2rem; font-weight: 700; color: #f59e0b; margin-bottom: 12px;
}
.online-rater-badge {
  font-size: 1rem; margin-bottom: 16px; color: var(--text);
}
.online-question-text {
  font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; line-height: 1.4;
}
.online-options { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.online-or { color: var(--muted); font-size: 0.85rem; font-weight: 600; }

/* Rounds Selection */
.online-rounds-select {
  margin-top: 16px; padding: 14px;
  background: var(--surface, var(--card)); border-radius: 12px;
  text-align: left;
}
.online-rounds-select label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--muted); margin-bottom: 6px;
}
.online-rounds-select select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--panel-border); background: var(--bg, #0f1014);
  color: var(--text); font-size: 0.95rem; font-weight: 600;
  outline: none; appearance: auto;
}
.online-rounds-info {
  display: block; margin-top: 6px;
  font-size: 0.8rem; color: var(--primary); font-weight: 500;
}

/* Reveal */
.online-reveal-card {
  background: var(--surface, var(--card)); border-radius: 14px;
  padding: 20px; margin-bottom: 16px; text-align: center;
}
.online-reveal-answer {
  font-size: 1.3rem; font-weight: 800; color: var(--primary);
  margin-top: 8px;
}
.online-reveal-list { margin-bottom: 16px; }
.online-reveal-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-radius: 8px;
  background: var(--surface, var(--card)); margin: 4px 0;
}
.online-reveal-name { font-weight: 600; font-size: 0.9rem; }
.online-reveal-result { font-size: 0.85rem; font-weight: 600; }
.online-reveal-result.correct { color: #22c55e; }
.online-reveal-result.wrong { color: #ef4444; }

/* Standings */
.online-standings {
  background: var(--surface, var(--card)); border-radius: 14px;
  padding: 14px; text-align: left;
}
.online-standing-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 4px; font-size: 0.9rem;
}
.online-standing-rank { font-weight: 700; width: 24px; color: var(--muted); }
.online-standing-name { flex: 1; font-weight: 600; }
.online-standing-score { font-weight: 700; color: var(--primary); }

/* Podium / Game End */
.online-podium { margin: 16px 0; }
.online-podium-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface, var(--card)); margin: 6px 0;
}
.online-podium-row.winner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.online-podium-row.is-me { box-shadow: inset 0 0 0 1px var(--primary); }
.online-podium-medal { font-size: 1.3rem; width: 32px; text-align: center; }
.online-podium-name { flex: 1; font-weight: 600; font-size: 0.95rem; }
.online-podium-score { font-weight: 700; color: var(--primary); }

/* ===============================================
   SPIEL: Zeitreise
   =============================================== */

.zeitreise-intro {
  text-align: center;
  padding: 32px 16px;
}

.zeitreise-intro-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.zeitreise-game {
  padding: 8px 0;
}

/* Endauswertung */
.zeitreise-end {
  text-align: center;
  padding: 16px 0;
}

.zeitreise-end-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.zeitreise-end-score {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.zeitreise-end-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.zeitreise-end-desc {
  font-size: 1rem;
  color: var(--text-1);
  margin-bottom: 20px;
}

/* Detail-Vergleich */
.zeitreise-details {
  text-align: left;
  margin: 16px 0;
}

.zeitreise-detail-row {
  padding: 12px;
  border-radius: 10px;
  margin: 8px 0;
}

.zeitreise-detail-row.zeitreise-changed {
  background: rgba(239, 68, 68, 0.06);
}

.zeitreise-detail-row.zeitreise-same {
  background: rgba(34, 197, 94, 0.06);
}

.zeitreise-detail-q {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.zeitreise-detail-compare {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.zeitreise-detail-col {
  flex: 1;
  text-align: center;
}

.zeitreise-detail-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.zeitreise-detail-answer {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.zeitreise-detail-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ===============================================
   SPIEL: Kettenreaktion
   =============================================== */

.kette-game {
  padding: 8px 0;
}

.kette-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 16px;
}

.kette-chain-display {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.kette-hearts-display {
  font-size: 1.1rem;
  min-height: 1.4em;
}

.kette-progress-hint {
  text-align: center;
  min-height: 1.2em;
  margin-bottom: 8px;
}

.kette-hint-heart {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  animation: kettePulse 1s ease infinite;
}

@keyframes kettePulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.kette-question {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.4;
}

.kette-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kette-option-btn {
  width: 100%;
  padding: 18px 16px;
  border: 2px solid var(--panel-border);
  border-radius: 14px;
  background: var(--surface);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.kette-option-btn:hover {
  border-color: var(--primary);
  background: rgba(74, 144, 226, 0.06);
  transform: translateY(-2px);
}

.kette-option-btn:active {
  transform: scale(0.97);
}

/* Ergebnis */
.kette-result {
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.kette-result.kette-correct {
  background: rgba(34, 197, 94, 0.08);
}

.kette-result.kette-saved {
  background: rgba(251, 191, 36, 0.1);
}

.kette-result.kette-wrong {
  background: rgba(239, 68, 68, 0.08);
}

.kette-result-icon {
  font-size: 2rem;
  margin-bottom: 4px;
}

.kette-result-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* Ergebnis-Balken */
.kette-result-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.kette-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kette-bar-row.kette-bar-winner .kette-bar-label {
  font-weight: 700;
  color: var(--text);
}

.kette-bar-label {
  font-size: 0.85rem;
  color: var(--muted);
  width: 90px;
  flex-shrink: 0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kette-bar-track {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: var(--stroke);
  overflow: hidden;
}

.kette-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s ease;
}

.kette-bar-a {
  background: var(--primary);
}

.kette-bar-b {
  background: #f59e0b;
}

.kette-bar-pct {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  width: 36px;
  text-align: left;
}

/* End Screen */
.kette-end {
  text-align: center;
  padding: 20px 0;
}

.kette-end-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.kette-end-score {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.kette-end-record {
  font-size: 1rem;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 4px;
}

.kette-end-best {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.kette-end-hearts {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.kette-end-stats {
  margin-bottom: 16px;
}

/* Record-Display auf Startscreen */
.kette-record-display {
  font-size: 1rem;
  font-weight: 600;
  color: #f59e0b;
  margin: 8px 0 16px;
}

/* History */
.kette-history {
  margin-top: 16px;
  text-align: left;
}

.kette-history h4 {
  font-size: 0.9rem;
  margin: 0 0 8px;
  color: var(--text-1);
}

.kette-history-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  margin: 3px 0;
  background: var(--surface);
  font-size: 0.85rem;
}

.kette-history-rank {
  font-weight: 700;
  color: var(--muted);
  width: 20px;
}

.kette-history-chain {
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.kette-history-date {
  color: var(--muted);
  font-size: 0.75rem;
}

/* Rewarded Ad Button im Spiel */
.kette-rewarded {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  text-align: center;
}

.kette-rewarded-text {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.kette-rewarded-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.kette-rewarded-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.kette-rewarded-btn:active {
  transform: scale(0.97);
}

.kette-rewarded-icon {
  font-size: 1.2rem;
}

/* Rewarded Spot Overlay */
.rewarded-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rewardedFadeIn 0.3s ease;
}

@keyframes rewardedFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.rewarded-modal {
  width: min(400px, calc(100% - 32px));
  background: var(--card-bg, #fff);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
}

body.dark .rewarded-modal {
  background: #1e2030;
}

.rewarded-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.rewarded-video {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.rewarded-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.rewarded-play-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
}

.rewarded-sponsor {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.5px;
}

.rewarded-countdown {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.rewarded-countdown span {
  font-weight: 700;
  color: var(--primary);
}

.rewarded-progress {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--stroke, #eee);
  overflow: hidden;
}

.rewarded-progress-bar {
  width: 0;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

/* Fertig-Screen */
.rewarded-done {
  padding: 20px 0;
}

.rewarded-done-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  animation: rewardedBounce 0.5s ease;
}

@keyframes rewardedBounce {
  0% { transform: scale(0.5); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.rewarded-done-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

/* ===============================================
   SPIEL: Gegenteil
   =============================================== */

.gegen-game {
  padding: 8px 0;
}

.gegen-hint {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #f59e0b;
  margin-bottom: 12px;
}

/* ===============================================
   SPIEL: Doppelt oder Nichts
   =============================================== */

.doppelt-game {
  padding: 8px 0;
}

.doppelt-stakes {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.doppelt-points-display,
.doppelt-bank-display {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
}

.doppelt-points-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.doppelt-points-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  transition: all 0.3s ease;
}

.doppelt-points-value.doppelt-high {
  color: #ef4444;
}

.doppelt-points-value.doppelt-grow {
  animation: doppeltGrow 0.4s ease;
}

.doppelt-points-value.doppelt-lost {
  color: var(--muted);
}

@keyframes doppeltGrow {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.doppelt-bank-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #22c55e;
}

.doppelt-info {
  text-align: center;
  font-size: 0.8rem;
  color: #f59e0b;
  font-weight: 600;
  margin-bottom: 12px;
}

.doppelt-bank-btn {
  width: 100%;
  padding: 14px;
  border: 2px solid #22c55e;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
  color: #22c55e;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s ease;
}

.doppelt-bank-btn:hover {
  background: rgba(34, 197, 94, 0.15);
}

.doppelt-choice {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doppelt-net-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.08);
  font-size: 1.4rem;
}

.doppelt-net-label {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 2px;
}

.doppelt-rewarded {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

/* ===============================================
   SPIEL: Trendradar
   =============================================== */

.trend-game {
  padding: 8px 0;
}

.trend-slider-area {
  margin: 16px 0 20px;
}

.trend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.trend-label-a {
  color: var(--primary);
}

.trend-label-b {
  color: #f59e0b;
}

.trend-slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 4px;
  background: linear-gradient(to right, var(--primary) 0%, #f59e0b 100%);
  outline: none;
}

.trend-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.trend-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.trend-preview {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.trend-preview-a {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.trend-preview-b {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f59e0b;
}

/* Reveal */
.trend-reveal {
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 16px;
}

.trend-accuracy {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.trend-diff {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 4px;
}

/* Vergleichsbalken */
.trend-compare {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.trend-compare-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trend-compare-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.trend-compare-bars {
  height: 28px;
  border-radius: 8px;
  background: var(--stroke);
  overflow: hidden;
}

.trend-compare-bar {
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  min-width: 40px;
  transition: width 0.6s ease;
}

.trend-compare-bar span {
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
}

.trend-bar-guess {
  background: rgba(74, 144, 226, 0.5);
}

.trend-bar-real {
  background: var(--primary);
}

.trend-option-names {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ===============================================
   CONSENT-DIALOG (DSGVO)
   =============================================== */

.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 16px;
  backdrop-filter: blur(4px);
}

.consent-dialog {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  animation: consentSlideUp 0.35s ease;
}

body.dark .consent-dialog {
  background: #1e1e2e;
  color: #e0e0e0;
}

@keyframes consentSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.consent-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.consent-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 10px;
}

.consent-text {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.5;
  margin: 0 0 18px;
}

body.dark .consent-text {
  color: #aaa;
}

.consent-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.consent-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f5f5f5;
  border-radius: 12px;
}

body.dark .consent-option {
  background: #2a2a3e;
}

.consent-option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 500;
}

.consent-option-icon {
  font-size: 1.2rem;
}

.consent-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.consent-btn {
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, opacity 0.15s;
}

.consent-btn:active {
  transform: scale(0.97);
}

.consent-btn-accept {
  background: var(--primary, #6c63ff);
  color: #fff;
}

.consent-btn-save {
  background: #e8e8e8;
  color: #333;
}

body.dark .consent-btn-save {
  background: #3a3a50;
  color: #e0e0e0;
}

.consent-btn-decline {
  background: transparent;
  color: #888;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 8px;
}

.consent-link {
  font-size: 0.82rem;
  color: var(--primary, #6c63ff);
  text-decoration: none;
}

.consent-link:hover {
  text-decoration: underline;
}

/* ===============================================
   WERBEBANNER
   =============================================== */

.ad-banner {
  position: fixed;
  bottom: 102px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 24px));
  z-index: 1200;
  pointer-events: auto;
  display: none;
}

.ad-banner-inner {
  position: relative;
  width: 100%;
  height: 60px;
  border-radius: 12px;
  background: var(--card-bg, #fff);
  border: 2px dashed rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: background 0.6s ease, color 0.6s ease, border 0.3s ease;
}

.ad-badge {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--muted, #999);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

.ad-placeholder {
  font-size: 0.95rem;
  font-weight: 700;
  color: inherit;
  letter-spacing: 0.5px;
  transition: color 0.6s ease;
}

/* Banner in Spiel-Panels (fixiert am unteren Rand des Panels) */
.ad-banner-panel {
  position: absolute;
  bottom: 100px;
  left: 12px;
  right: 12px;
  width: auto;
  transform: none;
  z-index: 10;
}

/* Mehr Scroll-Platz in Panels mit Werbebanner */
.ad-banner-panel ~ .panel-section,
.panel-section:has(~ .ad-banner-panel),
.ad-banner-panel + .panel-section {
  padding-bottom: 180px;
}

/* Fallback: Alle Game-Panel Sections bekommen mehr Padding */
[id$="Content"] {
  padding-bottom: 180px !important;
}

/* ===============================================
   PUSH NOTIFICATION TOAST
   =============================================== */
.push-toast {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 99999;
  cursor: pointer;
  transition: top 0.4s cubic-bezier(.4,0,.2,1);
}
.push-toast.visible { top: 16px; }
.push-toast-icon { font-size: 1.6rem; flex-shrink: 0; }
.push-toast-content { flex: 1; min-width: 0; }
.push-toast-title { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.push-toast-body { font-size: 0.82rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.push-toast-close { background: none; border: none; color: var(--muted); font-size: 1.1rem; padding: 4px; cursor: pointer; flex-shrink: 0; }

/* ===============================================
   LEGAL TEXTS
   =============================================== */
.legal-text { padding: 20px 16px; overflow-y: auto; }
.legal-content h4 { font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.legal-content h5 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin: 18px 0 6px; }
.legal-content p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; margin-bottom: 8px; }
.legal-content ul { font-size: 0.88rem; color: var(--muted); line-height: 1.6; padding-left: 20px; margin-bottom: 8px; }
.legal-content li { margin-bottom: 4px; }
.legal-content em { font-style: italic; opacity: 0.7; }

/* ===============================================
   SEELEN-ZWILLING (Soul Twin)
   =============================================== */
.soul-question-counter {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.soul-timer {
  position: relative;
  height: 6px;
  background: var(--stroke);
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}
.soul-timer-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 1s linear;
}
.soul-timer-label {
  position: absolute;
  right: 0;
  top: -20px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.soul-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.soul-highlight-card {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.soul-highlight-card.soul-twin {
  background: linear-gradient(135deg, rgba(233,30,99,.08), rgba(156,39,176,.08));
  border-color: rgba(233,30,99,.25);
}
.soul-highlight-card.soul-opposite {
  background: linear-gradient(135deg, rgba(255,152,0,.08), rgba(244,67,54,.08));
  border-color: rgba(255,152,0,.25);
}
.soul-highlight-card.soul-loner {
  background: linear-gradient(135deg, rgba(33,150,243,.08), rgba(0,188,212,.08));
  border-color: rgba(33,150,243,.25);
}
.soul-highlight-icon {
  font-size: 1.8rem;
  margin-bottom: 4px;
}
.soul-highlight-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 4px;
}
.soul-highlight-names {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.soul-highlight-score {
  font-size: 0.82rem;
  color: var(--muted);
}
.soul-question-highlights {
  margin-bottom: 16px;
}
.soul-question-highlight {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-1);
  margin-bottom: 8px;
  line-height: 1.4;
}
.soul-matrix-section {
  margin-bottom: 8px;
}
.soul-match-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.soul-match-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.soul-match-names {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 45%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-1);
  font-size: 0.82rem;
}
.soul-match-bar {
  flex: 1;
  height: 8px;
  background: var(--stroke);
  border-radius: 4px;
  overflow: hidden;
}
.soul-match-bar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.soul-match-bar-fill.high { background: #4caf50; }
.soul-match-bar-fill.mid  { background: #ff9800; }
.soul-match-bar-fill.low  { background: #f44336; }
.soul-match-pct {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  min-width: 36px;
  text-align: right;
}
.soul-setting-group {
  margin-bottom: 14px;
}
.soul-setting-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
}
.soul-setting-btns {
  display: flex;
  gap: 8px;
}
.soul-rounds-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.soul-setting-btn {
  flex: 1;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1.5px solid var(--stroke);
  background: var(--glass);
  color: var(--text-1);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.soul-setting-btn.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb, 99,102,241), 0.12);
  color: var(--primary);
  font-weight: 600;
}

