/* ============================================================
   THEME: modern (schwarz + türkis/hellblau Gradient)
   ============================================================ */
body[data-theme="modern"] {
  --bg: #05090d;
  --bg-soft: #0a1218;
  --bg-elevated: #0f1a22;
  --panel: rgba(18, 32, 42, 0.72);
  --panel-strong: rgba(22, 40, 52, 0.92);
  --panel-border: rgba(92, 224, 222, 0.14);
  --divider: rgba(255, 255, 255, 0.07);

  --text: #e8f4f6;
  --text-dim: #9fb7c0;
  --text-muted: #6b8290;

  --accent: #00d4d4;
  --accent-2: #4fc3f7;
  --accent-glow: 0 0 0 1px rgba(0, 212, 212, 0.35), 0 8px 28px -10px rgba(0, 212, 212, 0.55);

  --gradient-primary: linear-gradient(135deg, #00d4d4 0%, #4fc3f7 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(0, 212, 212, 0.18), rgba(79, 195, 247, 0.12));
  --gradient-card: linear-gradient(150deg, rgba(0, 212, 212, 0.22) 0%, rgba(79, 195, 247, 0.10) 55%, rgba(10, 20, 24, 0.9) 100%);

  --danger: #ff5c7a;
  --warn: #ffb347;
  --success: #49e0a5;

  --ring: 0 0 0 2px rgba(0, 212, 212, 0.45);

  color: var(--text);
  background:
    radial-gradient(80% 60% at 10% -10%, rgba(0, 212, 212, 0.20) 0%, transparent 60%),
    radial-gradient(70% 60% at 110% 10%, rgba(79, 195, 247, 0.18) 0%, transparent 55%),
    radial-gradient(100% 70% at 50% 120%, rgba(0, 165, 200, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, #03070b 0%, #06101a 100%);
  background-attachment: fixed;
}

body[data-theme="modern"] .app-header {
  background: linear-gradient(180deg, rgba(5, 9, 13, 0.85), rgba(5, 9, 13, 0.55));
  border-bottom: 1px solid var(--panel-border);
}
body[data-theme="modern"] .app-title { color: var(--text); }

body[data-theme="modern"] .icon-btn.ghost { color: var(--text-dim); }
body[data-theme="modern"] .icon-btn.ghost:hover { background: rgba(255,255,255,0.04); color: var(--text); }

body[data-theme="modern"] .hero {
  background:
    linear-gradient(150deg, rgba(0,212,212,0.24) 0%, rgba(79,195,247,0.16) 55%, rgba(7, 18, 24, 0.5) 100%),
    rgba(10, 20, 26, 0.6);
  border: 1px solid var(--panel-border);
  box-shadow: 0 30px 60px -30px rgba(0, 212, 212, 0.35);
}
body[data-theme="modern"] .hero-title {
  background: linear-gradient(135deg, #ffffff 0%, #bde9ff 45%, #7df2ef 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
body[data-theme="modern"] .hero-sub { color: var(--text-dim); }

body[data-theme="modern"] .chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-dim);
}
body[data-theme="modern"] .chip.active {
  background: var(--gradient-primary);
  color: #062022;
  border-color: transparent;
  box-shadow: var(--accent-glow);
}

body[data-theme="modern"] .game-card {
  background:
    linear-gradient(150deg, rgba(0,212,212,0.18) 0%, rgba(79,195,247,0.08) 55%, rgba(10,18,24,0.92) 100%),
    #0c1820;
  border: 1px solid var(--panel-border);
  box-shadow: 0 18px 40px -28px rgba(0, 212, 212, 0.55);
  color: var(--text);
}
body[data-theme="modern"] .game-card:hover {
  box-shadow: 0 22px 44px -24px rgba(0, 212, 212, 0.8);
}
body[data-theme="modern"] .game-card .gc-tag {
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  color: var(--accent-2);
  border: 1px solid rgba(79,195,247,0.25);
}

body[data-theme="modern"] .session-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(14px);
}
body[data-theme="modern"] .session-card .sc-sub { color: var(--text-muted); }
body[data-theme="modern"] .session-card .sc-del { color: var(--danger); }

body[data-theme="modern"] .panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(14px);
}

body[data-theme="modern"] .input,
body[data-theme="modern"] .select {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--text);
}
body[data-theme="modern"] .input:focus,
body[data-theme="modern"] .select:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
body[data-theme="modern"] .input::placeholder { color: var(--text-muted); }

body[data-theme="modern"] .btn.primary {
  background: var(--gradient-primary);
  color: #04181a;
  box-shadow: 0 10px 28px -10px rgba(0, 212, 212, 0.6);
}
body[data-theme="modern"] .btn.primary:hover { filter: brightness(1.06); }

body[data-theme="modern"] .btn.secondary {
  background: rgba(0, 212, 212, 0.10);
  color: var(--accent);
  border: 1px solid rgba(0, 212, 212, 0.28);
}
body[data-theme="modern"] .btn.ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid rgba(255,255,255,0.08);
}
body[data-theme="modern"] .btn.ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }

body[data-theme="modern"] .btn.danger {
  background: rgba(255, 92, 122, 0.08);
  color: var(--danger);
  border: 1px solid rgba(255, 92, 122, 0.28);
}

body[data-theme="modern"] .scoreboard-wrap {
  background: var(--panel);
  border: 1px solid var(--panel-border);
}
body[data-theme="modern"] .scoreboard thead th {
  background: rgba(0, 212, 212, 0.08);
  color: var(--text);
  border-bottom: 1px solid rgba(0, 212, 212, 0.22);
}
body[data-theme="modern"] .scoreboard tbody tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
body[data-theme="modern"] .scoreboard tbody tr:hover td { background: rgba(0, 212, 212, 0.06); }
body[data-theme="modern"] .scoreboard tr.total-row td { background: rgba(0, 212, 212, 0.12); color: var(--text); }
body[data-theme="modern"] .scoreboard tr.leader td.leader::after { background: var(--gradient-primary); }
body[data-theme="modern"] .scoreboard .player-badge {
  background: var(--gradient-primary); color: #062022;
}

body[data-theme="modern"] .modal-backdrop { background: rgba(3, 8, 12, 0.6); backdrop-filter: blur(6px); }
body[data-theme="modern"] .modal {
  background: var(--panel-strong);
  border: 1px solid var(--panel-border);
  box-shadow: 0 20px 60px -20px rgba(0, 212, 212, 0.5);
}

body[data-theme="modern"] .toast {
  background: var(--panel-strong);
  border: 1px solid var(--panel-border);
  color: var(--text);
  backdrop-filter: blur(12px);
}

body[data-theme="modern"] .icon-sun { display: inline; }
body[data-theme="modern"] .icon-moon { display: none; }

body[data-theme="modern"] .kniffel-table thead th { background: rgba(0, 212, 212, 0.08); color: var(--text); border-bottom: 1px solid rgba(0,212,212,0.22); }
body[data-theme="modern"] .kniffel-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
body[data-theme="modern"] .kniffel-cell { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); color: var(--text); }
body[data-theme="modern"] .kniffel-cell:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
body[data-theme="modern"] .kniffel-cell.locked { background: rgba(0,212,212,0.10); border-color: rgba(0,212,212,0.25); color: var(--accent); }
body[data-theme="modern"] .kniffel-cell.zero { color: var(--text-muted); }

body[data-theme="modern"] .phase-cell { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); color: var(--text-muted); }
body[data-theme="modern"] .phase-cell.done { background: var(--gradient-primary); color: #062022; border-color: transparent; box-shadow: var(--accent-glow); }

body[data-theme="modern"] .lives-row { background: var(--panel); border: 1px solid var(--panel-border); }
body[data-theme="modern"] .life-dot { background: var(--gradient-primary); box-shadow: 0 0 12px rgba(0,212,212,0.55); }
body[data-theme="modern"] .life-dot.lost { background: rgba(255,255,255,0.08); box-shadow: none; }

body[data-theme="modern"] .winner-badge { background: var(--gradient-primary); color: #062022; }

body[data-theme="modern"] .player-row .rm { background: rgba(255,92,122,0.08); color: var(--danger); border: 1px solid rgba(255,92,122,0.22); }

/* ============================================================
   THEME: classic (klassisch weiß)
   ============================================================ */
body[data-theme="classic"] {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-elevated: #ffffff;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --panel-border: #e6e8ec;
  --divider: #eef0f3;

  --text: #0f1a24;
  --text-dim: #4b5b6b;
  --text-muted: #8496a5;

  --accent: #0f1a24;
  --accent-2: #3b4a5a;
  --accent-glow: 0 0 0 1px rgba(15, 26, 36, 0.06), 0 6px 18px -6px rgba(15, 26, 36, 0.16);

  --gradient-primary: linear-gradient(135deg, #1a2633 0%, #3b4a5a 100%);
  --gradient-subtle: linear-gradient(135deg, #f4f6f9, #eef1f5);
  --gradient-card: linear-gradient(150deg, #ffffff 0%, #f4f6f9 100%);

  --danger: #d12d4a;
  --warn: #c77500;
  --success: #137a4a;

  --ring: 0 0 0 3px rgba(15, 26, 36, 0.14);

  color: var(--text);
  background:
    radial-gradient(80% 60% at 10% -10%, rgba(15, 26, 36, 0.04) 0%, transparent 60%),
    linear-gradient(180deg, #fbfbfc 0%, #f3f5f8 100%);
  background-attachment: fixed;
}

body[data-theme="classic"] .app-header {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--panel-border);
}
body[data-theme="classic"] .app-title { color: var(--text); }
body[data-theme="classic"] .icon-btn.ghost { color: var(--text-dim); }
body[data-theme="classic"] .icon-btn.ghost:hover { background: rgba(0,0,0,0.04); color: var(--text); }

body[data-theme="classic"] .hero {
  background: linear-gradient(150deg, #ffffff, #f2f4f8);
  border: 1px solid var(--panel-border);
  box-shadow: 0 12px 40px -18px rgba(15, 26, 36, 0.18);
}
body[data-theme="classic"] .hero-glow { opacity: .35; filter: blur(40px); }
body[data-theme="classic"] .hero-title { color: var(--text); }
body[data-theme="classic"] .hero-sub { color: var(--text-dim); }

body[data-theme="classic"] .chip {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
}
body[data-theme="classic"] .chip.active {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
}

body[data-theme="classic"] .game-card {
  background: var(--gradient-card);
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 24px -14px rgba(15, 26, 36, 0.18);
  color: var(--text);
}
body[data-theme="classic"] .game-card .gc-tag {
  background: #f2f4f8;
  color: var(--text-dim);
  border: 1px solid var(--panel-border);
}

body[data-theme="classic"] .session-card {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  box-shadow: 0 4px 14px -10px rgba(15,26,36,0.12);
}
body[data-theme="classic"] .session-card .sc-sub { color: var(--text-muted); }
body[data-theme="classic"] .session-card .sc-del { color: var(--danger); }

body[data-theme="classic"] .panel {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  box-shadow: 0 2px 8px -6px rgba(15,26,36,0.12);
}

body[data-theme="classic"] .input,
body[data-theme="classic"] .select {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  color: var(--text);
}
body[data-theme="classic"] .input:focus,
body[data-theme="classic"] .select:focus {
  border-color: var(--text);
  box-shadow: var(--ring);
}
body[data-theme="classic"] .input::placeholder { color: var(--text-muted); }

body[data-theme="classic"] .btn.primary {
  background: var(--text);
  color: #ffffff;
  box-shadow: 0 6px 18px -8px rgba(15, 26, 36, 0.4);
}
body[data-theme="classic"] .btn.primary:hover { filter: brightness(1.08); }

body[data-theme="classic"] .btn.secondary {
  background: #f2f4f8;
  color: var(--text);
  border: 1px solid var(--panel-border);
}
body[data-theme="classic"] .btn.ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--panel-border);
}
body[data-theme="classic"] .btn.ghost:hover { color: var(--text); background: #f7f8fa; }
body[data-theme="classic"] .btn.danger {
  background: #fff5f7;
  color: var(--danger);
  border: 1px solid #f5d6dc;
}

body[data-theme="classic"] .scoreboard-wrap {
  background: #ffffff;
  border: 1px solid var(--panel-border);
}
body[data-theme="classic"] .scoreboard thead th {
  background: #f6f7f9;
  color: var(--text);
  border-bottom: 1px solid var(--panel-border);
}
body[data-theme="classic"] .scoreboard tbody tr:nth-child(even) td { background: #fafbfc; }
body[data-theme="classic"] .scoreboard tbody tr:hover td { background: #f2f4f8; }
body[data-theme="classic"] .scoreboard tr.total-row td { background: #eef1f5; color: var(--text); }
body[data-theme="classic"] .scoreboard tr.leader td.leader::after { background: var(--text); }
body[data-theme="classic"] .scoreboard .player-badge {
  background: var(--text); color: #ffffff;
}

body[data-theme="classic"] .modal-backdrop { background: rgba(15, 26, 36, 0.32); }
body[data-theme="classic"] .modal {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  box-shadow: 0 20px 60px -20px rgba(15, 26, 36, 0.28);
}

body[data-theme="classic"] .toast {
  background: var(--text);
  color: #ffffff;
}

body[data-theme="classic"] .icon-sun { display: none; }
body[data-theme="classic"] .icon-moon { display: inline; }

body[data-theme="classic"] .kniffel-table thead th { background: #f6f7f9; color: var(--text); border-bottom: 1px solid var(--panel-border); }
body[data-theme="classic"] .kniffel-table tbody tr:nth-child(even) { background: #fafbfc; }
body[data-theme="classic"] .kniffel-cell { background: #ffffff; border: 1px solid var(--panel-border); color: var(--text); }
body[data-theme="classic"] .kniffel-cell:focus { outline: none; border-color: var(--text); box-shadow: var(--ring); }
body[data-theme="classic"] .kniffel-cell.locked { background: #f2f4f8; border-color: var(--panel-border); color: var(--text); }
body[data-theme="classic"] .kniffel-cell.zero { color: var(--text-muted); }

body[data-theme="classic"] .phase-cell { background: #f6f7f9; border: 1px solid var(--panel-border); color: var(--text-muted); }
body[data-theme="classic"] .phase-cell.done { background: var(--text); color: #ffffff; border-color: var(--text); }

body[data-theme="classic"] .lives-row { background: #ffffff; border: 1px solid var(--panel-border); }
body[data-theme="classic"] .life-dot { background: var(--text); }
body[data-theme="classic"] .life-dot.lost { background: #e6e8ec; }

body[data-theme="classic"] .winner-badge { background: var(--text); color: #ffffff; }

body[data-theme="classic"] .player-row .rm { background: #fff5f7; color: var(--danger); border: 1px solid #f5d6dc; }
