/* Song-Guess – Neon-Dark-Design */

/* Farbvariablen: hier lassen sich die Farben zentral ändern */
:root {
  --bg: #0b0b14;            /* Hintergrund */
  --bg-glow-1: #2a0f4a;     /* Hintergrund-Leuchten oben links */
  --bg-glow-2: #062a3d;     /* Hintergrund-Leuchten unten rechts */
  --card: #14142299;        /* Karte (leicht transparent) */
  --card-border: #2a2a45;
  --text: #f2f2fa;
  --text-dim: #9a9ab8;
  --neon-pink: #ff2bd6;
  --neon-cyan: #19e6ff;
  --neon-lime: #b6ff3c;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --footerbar-h: 54px;      /* Höhe der unteren Leiste (Sprache/Über mich/Rechtliches) */
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, var(--bg-glow-1), transparent 50%),
    radial-gradient(circle at 85% 90%, var(--bg-glow-2), transparent 50%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.5;
}

/* Bildschirm-Container, zentriert, Handy-tauglich */
.screen {
  min-height: 100vh;
  max-width: 460px;
  margin: 0 auto;
  padding: 32px 16px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

/* Logo */
.logo { text-align: center; }

.logo-icon {
  font-size: 3rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 12px var(--neon-cyan), 0 0 32px var(--neon-cyan);
}

h1 {
  margin: 4px 0 8px;
  font-size: clamp(2.2rem, 9vw, 3rem);
  letter-spacing: 1px;
  text-shadow: 0 0 10px var(--neon-pink), 0 0 30px var(--neon-pink);
}

h1 span { color: var(--neon-pink); }

.tagline { margin: 0; color: var(--text-dim); }

/* Karte */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 24px #19e6ff14;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text);
  background: #0d0d1a;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px #19e6ff33, 0 0 16px #19e6ff44;
}

/* Buttons */
.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  width: 100%;
  min-height: 48px;               /* große Touch-Fläche fürs Handy */
  padding: 12px 18px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s, background 0.2s;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  color: #07070d;
  background: var(--neon-pink);
  box-shadow: 0 0 18px #ff2bd688;
}
.btn-primary:hover { box-shadow: 0 0 28px #ff2bd6cc; }

.btn-secondary {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 12px #19e6ff44, inset 0 0 12px #19e6ff22;
}
.btn-secondary:hover { box-shadow: 0 0 22px #19e6ff88, inset 0 0 16px #19e6ff33; }

.btn-ghost {
  border-color: var(--card-border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--neon-lime); color: var(--neon-lime); }

.footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---------- Schritt 2: Künstlersuche und -auswahl ---------- */

/* "hidden" soll auch bei Elementen mit display:flex wirklich verstecken */
[hidden] { display: none !important; }

/* Bildschirm mit wachsendem Inhalt: oben beginnen statt mittig */
.screen-top {
  justify-content: flex-start;
  gap: 20px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-back {
  width: auto;
  flex: none;
  padding: 8px 14px;
  font-size: 0.95rem;
}

h2 {
  margin: 0;
  font-size: 1.5rem;
  text-shadow: 0 0 10px var(--neon-cyan);
}

.card-title {
  display: flex;
  justify-content: space-between;
  margin: 0 0 12px;
  font-size: 1rem;
}
.card-title span { color: var(--neon-cyan); }

.message {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.message:empty { display: none; }
.message.error { color: #ff6b8a; }

/* Vorschlagsliste */
.suggestions {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
  scrollbar-color: var(--neon-cyan) #0d0d1a;   /* dunkle Scrollleiste statt weißer */
  background: #0d0d1a;
  border: 1px solid var(--card-border);
  border-radius: 12px;
}
.suggestions li + li { border-top: 1px solid var(--card-border); }

.suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;               /* große Touch-Fläche */
  padding: 8px 12px;
  font: inherit;
  color: var(--text);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.suggestion:hover, .suggestion.active { background: #19e6ff1a; }
.suggestion:disabled { opacity: 0.5; cursor: default; }
.suggestion .name { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.suggestion .meta { flex: none; font-size: 0.8rem; color: var(--text-dim); }

.avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--card-border);
}

/* Gewählte Künstler als Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 4px 4px 4px 6px;
  border: 1px solid var(--neon-cyan);
  border-radius: 999px;
  background: #19e6ff14;
  box-shadow: 0 0 10px #19e6ff33;
}
.chip .avatar { width: 32px; height: 32px; }
.chip-name { font-weight: 600; overflow-wrap: anywhere; }

.chip-remove {
  flex: none;
  width: 40px;                    /* gut mit dem Daumen treffbar */
  height: 40px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.chip-remove:hover { color: var(--neon-pink); background: #ff2bd626; }

/* ---------- Schritt 3: Hörprobe ---------- */

select {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  color-scheme: dark;              /* dunkles Aufklappmenü */
  background: #0d0d1a;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  outline: none;
}
select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px #19e6ff33, 0 0 16px #19e6ff44;
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.progress {
  height: 12px;
  margin-top: 20px;
  overflow: hidden;
  background: #0d0d1a;
  border: 1px solid var(--card-border);
  border-radius: 999px;
}
.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  box-shadow: 0 0 12px var(--neon-cyan);
}
.progress-time {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: right;
}

/* ---------- Schritt 6: Lobby und Raum-Code ---------- */

/* Inhalt des Host-Bereichs liegt direkt im Bildschirm (gleiche Abstände wie die anderen Karten) */
.host-view { display: contents; }

.join-block {
  padding: 16px;
  border: 1px dashed var(--card-border);
  border-radius: 12px;
}
.join-block .btn { margin-top: 12px; }

.code-input {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-indent: 0.4em;              /* gleicht den Abstand hinter dem letzten Buchstaben aus */
  text-transform: uppercase;
}

.room-code-label { margin: 0; font-size: 0.9rem; color: var(--text-dim); text-align: center; }
.room-code {
  margin: 2px 0 0;
  font-size: clamp(2.6rem, 14vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  line-height: 1.2;
  text-align: center;
  color: var(--neon-cyan);
  text-shadow: 0 0 14px var(--neon-cyan), 0 0 36px #19e6ff88;
}

.invite-row { display: flex; gap: 10px; }
.invite-row input { flex: 1; min-width: 0; font-size: 0.9rem; }
.btn-copy { width: auto; flex: none; padding: 10px 16px; font-size: 0.95rem; }

.players-title { margin-top: 20px; }
.players { list-style: none; margin: 0; padding: 0; }
.players li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
}
.players li + li { margin-top: 6px; }
.pname { flex: 1; font-weight: 600; overflow-wrap: anywhere; }

.badge {
  flex: none;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
}
.badge-host { color: #07070d; background: var(--neon-pink); }
.badge-me { color: var(--neon-cyan); border: 1px solid var(--neon-cyan); }

.chip-static { padding-right: 14px; }
.guest-settings { margin: 14px 0 6px; font-weight: 600; }

/* ---------- Schritt 5: Spiel ---------- */

.settings-gap { margin-top: 14px; }

.game-head { justify-content: space-between; }
.game-head .btn-back { min-width: 44px; }
.round-label { font-weight: 700; text-align: center; flex: 1; }
.score-label { font-weight: 700; color: var(--neon-lime); white-space: nowrap; }

.message.notice { color: var(--neon-cyan); margin: 0; }

.game-status {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.countdown {
  margin: 8px 0 4px;
  font-size: clamp(4rem, 22vw, 6.5rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  color: var(--neon-cyan);
  text-shadow: 0 0 14px var(--neon-cyan), 0 0 40px var(--neon-cyan);
}

.points-hint { text-align: center; min-height: 1.4em; }
#btn-sound { margin-top: 12px; }

.reveal-result { margin: 16px 0 0; font-size: 1.2rem; font-weight: 700; }
.reveal-result.ok { color: var(--neon-lime); }
.reveal-result.miss { color: var(--text-dim); }

.ranking {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.ranking li {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
}
.ranking li + li { margin-top: 6px; }
.ranking li.me { border-color: var(--neon-cyan); background: #19e6ff14; }
.ranking .rank { flex: none; width: 2em; color: var(--text-dim); }
.ranking .rname { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.ranking .rscore { flex: none; color: var(--neon-lime); font-weight: 700; }

/* Schritt 7: Mehrspieler */
.ranking li.offline { opacity: 0.55; }
.ranking .rname { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ranking .tick { flex: none; color: var(--neon-lime); font-weight: 800; }
.ranking .rround { flex: none; min-width: 3.6em; text-align: right; color: var(--neon-lime); font-size: 0.9rem; font-weight: 700; }
.ranking .rround.none { color: var(--text-dim); }
.badge-off { color: var(--text-dim); border: 1px solid var(--card-border); }

.solved-feed { list-style: none; margin: 12px 0 0; padding: 0; color: var(--neon-lime); font-size: 0.9rem; font-weight: 600; }
.solved-feed:empty { display: none; }
.solved-feed li + li { margin-top: 2px; opacity: 0.8; }
.live-title { margin: 16px 0 0; }
.live-ranking { margin-top: 8px; }
.end-wait { text-align: center; margin: 0; }

.end-card { text-align: center; }
.big-score {
  margin: 4px 0 0;
  font-size: clamp(3.4rem, 18vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--neon-lime);
  text-shadow: 0 0 14px #b6ff3c99, 0 0 36px #b6ff3c66;
}
.end-label { margin-top: 2px; font-size: 1rem; }
.end-card .ranking { text-align: left; }

/* Tipp-Feld (Schritt 4) */
.guess-label { margin-top: 20px; }

input:disabled { opacity: 0.5; cursor: not-allowed; }

.message.ok { color: var(--neon-lime); }

/* Falsch getippter Titel in der Liste: durchgestrichen und nicht mehr wählbar */
.suggestion.wrong .name { text-decoration: line-through; }

/* Richtig: grüner Rahmen */
input[type="text"].guess-ok {
  opacity: 1;
  border-color: var(--neon-lime);
  box-shadow: 0 0 0 3px #b6ff3c33, 0 0 16px #b6ff3c66;
}

/* Falsch: kurzes Schütteln mit rotem Rahmen */
input[type="text"].shake {
  animation: shake 0.4s;
  border-color: #ff6b8a;
  box-shadow: 0 0 0 3px #ff6b8a33;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.reveal {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--neon-lime);
  border-radius: 12px;
  box-shadow: 0 0 14px #b6ff3c33;
}
.reveal img { flex: none; border-radius: 8px; object-fit: cover; }
.reveal strong { overflow-wrap: anywhere; }
.reveal .message { margin-top: 2px; }

/* ================================================================
   Schritt 8: Politur (Animationen, Handy, Verbindung, Lautstärke)
   ================================================================ */

html { -webkit-tap-highlight-color: transparent; }
button, select, input, .suggestion { touch-action: manipulation; }   /* kein Doppeltipp-Zoom, keine Verzögerung */

/* Auf dem Handy zählt die sichtbare Höhe (Adressleiste!) */
.screen { min-height: 100vh; min-height: 100dvh; animation: screen-in 0.35s ease-out both; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Das Feld mit dem Einladungslink ist nur zum Kopieren; 16 px verhindern den Zoom auf dem iPhone */
.invite-row input { font-size: 1rem; }

/* Logo-Note pulsiert leicht */
.logo-icon { animation: glow-pulse 2.6s ease-in-out infinite; }
@keyframes glow-pulse {
  0%, 100% { text-shadow: 0 0 12px var(--neon-cyan), 0 0 28px var(--neon-cyan); }
  50% { text-shadow: 0 0 18px var(--neon-cyan), 0 0 46px var(--neon-cyan), 0 0 70px #19e6ff66; }
}

/* ---------- Verbindungs-Hinweis ---------- */
.conn-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: #c2185b;
  box-shadow: 0 4px 20px #00000088;
  animation: banner-in 0.3s ease-out;
}
.conn-banner.ok { background: #1b7f4b; }
@keyframes banner-in { from { transform: translateY(-100%); } to { transform: none; } }

/* ---------- Lautstärke ---------- */
.audio-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: -6px;
}
.mute-btn {
  flex: none;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text);
  background: #14142299;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  cursor: pointer;
}
.mute-btn:hover { border-color: var(--neon-cyan); }
.audio-bar input[type="range"] {
  flex: 1;
  min-width: 0;
  height: 48px;                         /* große Fläche zum Ziehen */
  accent-color: var(--neon-cyan);
  background: transparent;
  cursor: pointer;
}

/* ---------- Runde: festes Kopfteil, Lade-Anzeige, Countdown, Zeitbalken ---------- */
.play-top {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -20px -20px 14px;
  padding: 16px 20px 6px;
  background: #101020;
  border-bottom: 1px solid var(--card-border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.play-top .progress { margin-top: 12px; }
#guess-input { scroll-margin-top: 150px; }        /* beim Fokus unter dem festen Kopfteil einrasten */

/* Bewegte Balken: "es wird geladen" */
.eq {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 30px;
  margin: 6px 0 2px;
}
.eq span {
  width: 6px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(var(--neon-cyan), var(--neon-pink));
  animation: eq 1s ease-in-out infinite;
}
.eq span:nth-child(2) { animation-delay: 0.15s; }
.eq span:nth-child(3) { animation-delay: 0.3s; }
.eq span:nth-child(4) { animation-delay: 0.45s; }
.eq span:nth-child(5) { animation-delay: 0.6s; }
@keyframes eq { 0%, 100% { height: 8px; } 50% { height: 28px; } }

.countdown.pop { animation: pop 0.45s ease-out; }
@keyframes pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); }
}

/* Letzte 3 Sekunden: Balken wird rot und pulsiert */
.progress-bar.urgent {
  background: linear-gradient(90deg, #ff2b55, var(--neon-pink));
  box-shadow: 0 0 14px #ff2b55;
  animation: urgent-pulse 0.5s ease-in-out infinite alternate;
}
.progress-time.urgent { color: #ff6b8a; font-weight: 700; }
@keyframes urgent-pulse { from { opacity: 1; } to { opacity: 0.6; } }

/* ---------- Auflösung, Rangliste, Endstand ---------- */
.reveal { animation: screen-in 0.4s ease-out both; }
.reveal img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  box-shadow: 0 0 20px #b6ff3c55;
  animation: pop-in 0.5s ease-out both;
}
.reveal strong { font-size: 1.15rem; }
@keyframes pop-in {
  from { transform: scale(0.6) rotate(-6deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.reveal-result.ok { animation: pop 0.5s ease-out; text-shadow: 0 0 14px #b6ff3c88; }

/* Rangliste: Zeilen fahren nacheinander ein. Die Live-Rangliste nicht, sie aktualisiert sich ständig. */
.ranking li { animation: slide-in 0.4s ease-out both; }
.ranking li:nth-child(2) { animation-delay: 0.06s; }
.ranking li:nth-child(3) { animation-delay: 0.12s; }
.ranking li:nth-child(4) { animation-delay: 0.18s; }
.ranking li:nth-child(5) { animation-delay: 0.24s; }
.ranking li:nth-child(n+6) { animation-delay: 0.3s; }
.live-ranking li { animation: none; }
@keyframes slide-in { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

/* Gold, Silber, Bronze */
.ranking li.r1 { border-color: #ffd54a; box-shadow: 0 0 14px #ffd54a44; }
.ranking li.r1 .rank { color: #ffd54a; font-weight: 800; }
.ranking li.r2 { border-color: #c9d1dd; }
.ranking li.r2 .rank { color: #c9d1dd; font-weight: 800; }
.ranking li.r3 { border-color: #d28a4c; }
.ranking li.r3 .rank { color: #d28a4c; font-weight: 800; }

.winner {
  margin: 0 0 4px;
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffd54a;
  text-shadow: 0 0 14px #ffd54a88;
  animation: pop 0.6s ease-out;
}

/* ---------- Niedrige Bildschirme (z. B. Handy mit offener Tastatur) ---------- */
@media (max-height: 620px) {
  .screen-top { padding-top: 12px; gap: 12px; }
  .points-hint { display: none; }
  .play-top { padding-top: 10px; }
  .game-status { font-size: 1rem; margin-bottom: 0; }
  .eq, .countdown { display: none; }
  .audio-bar { display: none; }
  .suggestion { min-height: 52px; }
}

/* Wer Bewegung am Gerät reduziert haben möchte, bekommt keine Animationen */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Nachratezeit (Ton ist aus): orangener Balken statt Cyan/Pink */
.progress-bar.extra {
  background: linear-gradient(90deg, #ffb020, #ff7a1a);
  box-shadow: 0 0 12px #ffb020aa;
}
.progress-bar.extra.urgent {
  background: linear-gradient(90deg, #ff2b55, #ff7a1a);
  box-shadow: 0 0 14px #ff2b55;
}

/* ---------- Untere Leiste (Sprache, Über mich, Rechtliches) ---------- */
.footerbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  height: calc(var(--footerbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #0d0d1af0;
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--card-border);
}

.footerbar-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 4px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: 0;
  border-top: 2px solid transparent;   /* Platz für die Markierung, ohne dass die Höhe springt */
  text-decoration: none;               /* "Über mich" ist ein <a>, soll aber wie die Buttons daneben aussehen */
  cursor: pointer;
}
.footerbar-btn .fb-icon { font-size: 1.05rem; line-height: 1; }
.footerbar-btn:hover, .footerbar-btn:focus-visible { color: var(--text); }
.footerbar-btn:active { border-top-color: var(--neon-cyan); }

/* Damit die Leiste keinen Inhalt verdeckt, in der Runde und bei offener Tastatur ausgeblendet */
body[data-screen="screen-game"] .footerbar { display: none; }
@media (max-height: 560px) { .footerbar { display: none; } }

/* ---------- Unterstützen-Button (fest unten rechts, über der Leiste) ---------- */
.support {
  position: fixed;
  right: calc(14px + env(safe-area-inset-right));
  bottom: calc(var(--footerbar-h) + 10px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.support-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;                 /* gut mit dem Daumen zu treffen */
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--neon-pink);
  text-decoration: none;
  background: #0d0d1acc;
  backdrop-filter: blur(6px);
  border: 1px solid var(--neon-pink);
  border-radius: 999px;
  box-shadow: 0 0 14px #ff2bd644;
  transition: box-shadow 0.2s, transform 0.1s, background 0.2s;
}
.support-btn:hover { box-shadow: 0 0 22px #ff2bd699; background: #ff2bd61f; transform: translateY(-1px); }
.support-btn:active { transform: translateY(1px); }

/* Damit Button und Leiste keinen Inhalt verdecken: Platz unter den Bildschirmen, in der Runde und bei offener Tastatur beide ausgeblendet */
.screen { padding-bottom: calc(var(--footerbar-h) + 60px); }
body[data-screen="screen-game"] .support { display: none; }
@media (max-height: 560px) { .support { display: none; } }

/* ---------- Fenster "Unterstützen" ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;                     /* über allem, auch über dem Verbindungs-Hinweis */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  background: #05050bcc;
  backdrop-filter: blur(5px);
  animation: modal-fade 0.2s ease-out;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: auto;
  padding: 32px 24px 24px;
  text-align: center;
  background: #12122a;
  border: 1px solid var(--neon-pink);
  border-radius: var(--radius);
  box-shadow: 0 0 30px #ff2bd655, 0 10px 40px #000000aa;
  animation: pop-in 0.35s ease-out both;
}
.modal-card h2 {
  margin: 8px 0 0;
  font-size: 1.3rem;
  line-height: 1.3;
  text-shadow: 0 0 10px var(--neon-pink);
}

.modal-heart {
  font-size: 2.6rem;
  line-height: 1;
  color: var(--neon-pink);
  text-shadow: 0 0 14px var(--neon-pink), 0 0 34px var(--neon-pink);
  animation: glow-pulse 2.6s ease-in-out infinite;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;                      /* große Fläche fürs Schließen */
  height: 44px;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-dim);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); background: #ffffff14; }

.cost-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 22px 0;
  padding: 16px 12px;
  background: #0d0d1a;
  border: 1px solid var(--card-border);
  border-radius: 12px;
}
.cost-label { font-size: 0.9rem; color: var(--text-dim); }
.cost-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--neon-cyan);
  text-shadow: 0 0 12px #19e6ff99;
  overflow-wrap: anywhere;
}
.cost-value.uncovered { color: #ff6b8a; text-shadow: 0 0 12px #ff2b5588; }

/* "Jetzt unterstützen" ist ein Link im Aussehen eines Knopfs */
#support-donate, #about-link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
#support-donate.disabled, #about-link.disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; transform: none; }
.modal-card .message { text-align: center; }

/* ---------- Fenster der unteren Leiste (Sprache, Über mich, Rechtliches) ---------- */
/* Cyan statt Pink, und linksbündiger Text (das Herz-Design ist nur fürs Unterstützen-Fenster) */
.modal-card.info {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 30px #19e6ff44, 0 10px 40px #000000aa;
  text-align: left;
}
.modal-card.info h2 { text-shadow: 0 0 10px var(--neon-cyan); text-align: center; }
.modal-card.info .modal-icon {
  display: block;
  margin: 0 auto 4px;
  font-size: 2.2rem;
  line-height: 1;
  text-align: center;
  color: var(--neon-cyan);
  text-shadow: 0 0 12px var(--neon-cyan);
}

/* Sprachliste */
.lang-list { list-style: none; margin: 4px 0 0; padding: 0; }
.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--card-border);
}
.lang-item:last-child { border-bottom: 0; }
.lang-name { flex: 1; font-weight: 600; }
.lang-item.unavailable .lang-name { color: var(--text-dim); }
.lang-tag {
  flex: none;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--text-dim);
  border: 1px solid var(--card-border);
}
.lang-tag.active { color: #07070d; background: var(--neon-lime); border-color: var(--neon-lime); font-weight: 700; }

/* Rechtliches: Liste von Links/Platzhaltern */
.legal-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.legal-item {
  display: block;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
  background: #0d0d1a;
  border: 1px solid var(--card-border);
  border-radius: 12px;
}
.legal-item strong { display: block; margin-bottom: 2px; }
.legal-item span { font-size: 0.85rem; color: var(--text-dim); }
a.legal-item:hover { border-color: var(--neon-cyan); }

/* "Über mich" */
.about-text { margin: 0 0 4px; white-space: pre-wrap; }
