/* Casino Lokal – gemeinsame Grundgestaltung */
:root {
  --bg: #0c0a16;
  --bg-2: #15112a;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4eee1;
  --muted: #a9a2bd;
  --gold: #f2c14e;
  --gold-2: #c8891a;
  --gold-3: #fff0b8;
  --accent: #8b6cff;
  --ok: #3ad29f;
  --bad: #ff5d6c;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Georgia", "Times New Roman", serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold); }
img { -webkit-user-drag: none; user-select: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.gold-text {
  background: linear-gradient(180deg, var(--gold-3) 0%, var(--gold) 45%, var(--gold-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2);
  font-weight: 600; letter-spacing: 0.02em;
  transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
  text-decoration: none; color: var(--text);
}
.btn:hover { background: rgba(255, 255, 255, 0.13); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; }

.btn-gold {
  border: 0;
  color: #2b1a00;
  background: linear-gradient(180deg, #ffe08a 0%, var(--gold) 48%, var(--gold-2) 100%);
  box-shadow: 0 6px 18px rgba(242, 193, 78, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-gold:hover { background: linear-gradient(180deg, #ffe9a8 0%, #f6cb63 48%, #d4951f 100%); }

.btn-ghost { background: transparent; }
.btn-danger { background: rgba(255, 93, 108, 0.15); border-color: rgba(255, 93, 108, 0.45); color: #ffc2c8; }
.btn-danger:hover { background: rgba(255, 93, 108, 0.28); }

.btn-icon {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); color: var(--text);
  transition: background 0.2s;
}
.btn-icon:hover { background: var(--panel-2); }
.btn-icon svg { width: 20px; height: 20px; }

/* Vollbild-Knopf (Casino.Vollbild.knopf, js/core/vollbild.js): Startseite und Anmeldeseite */
.vb-knopf {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; padding: 0;
  border-radius: 50%; border: 1px solid rgba(255, 214, 140, 0.55);
  background: rgba(14, 9, 30, 0.5); color: #ffe7a3;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  cursor: pointer; transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.vb-knopf:hover { background: rgba(255, 214, 140, 0.13); border-color: #ffe7a3; transform: translateY(-2px); }
.vb-knopf:active { transform: scale(0.96); }
.vb-knopf:focus-visible { border-radius: 50%; }
.vb-knopf svg { display: block; width: 19px; height: 19px; }

/* Formulare */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.input {
  width: 100%; height: 46px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.18); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.form-error { min-height: 20px; color: #ff9aa5; font-size: 14px; margin: 4px 0 10px; }

/* Avatar */
.avatar {
  --av-size: 36px;
  display: inline-grid; place-items: center; flex: none;
  width: var(--av-size); height: var(--av-size); border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.55), transparent 55%), var(--av);
  color: #1a1206; font-weight: 800; font-size: calc(var(--av-size) * 0.45);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

/* Dialoge */
.modal-back {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 16px;
  background: rgba(5, 3, 12, 0.72); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.2s;
}
.modal-back.show { opacity: 1; }
.modal {
  width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #1e1838, #141026);
  box-shadow: var(--shadow);
  transform: translateY(12px) scale(0.98); transition: transform 0.2s;
}
.modal.wide { width: min(860px, 100%); }
.modal-back.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-body { padding: 8px 20px 16px; }
.modal-body p { color: var(--muted); }
.modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 0 20px 20px; }

/* Hinweise */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast {
  padding: 12px 16px; border-radius: 12px;
  background: #241d42; border: 1px solid var(--line); box-shadow: var(--shadow);
  font-weight: 600; text-align: center;
  opacity: 0; transform: translateY(10px); transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: none; }
.toast.ok { border-color: rgba(58, 210, 159, 0.5); }
.toast.error { border-color: rgba(255, 93, 108, 0.6); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--panel-2); border: 1px solid var(--line);
}
.badge.gold { background: linear-gradient(180deg, #ffe08a, var(--gold)); color: #2b1a00; border: 0; }

.coin-ico { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.18em; }

/* Seite direkt als Datei geöffnet (file://): Hinweis statt App (Casino.startHinweis in ui.js) */
.start-hinweis {
  flex: 1; width: 100%; min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(70% 45% at 50% 0%, rgba(255, 60, 170, 0.18), transparent 72%),
    radial-gradient(60% 45% at 50% 100%, rgba(80, 64, 255, 0.18), transparent 72%),
    var(--bg);
}
.start-hinweis-karte {
  width: min(540px, 100%); padding: 28px 26px 22px; border-radius: 22px;
  border: 1px solid rgba(242, 193, 78, 0.5);
  background: linear-gradient(180deg, #1f1839 0%, #120e23 100%);
  box-shadow: var(--shadow), 0 0 70px rgba(255, 79, 216, 0.14);
}
.start-hinweis-ico { display: block; width: 54px; height: 54px; margin: 0 auto 12px; filter: drop-shadow(0 4px 14px rgba(242, 193, 78, 0.45)); }
.start-hinweis-ico svg { display: block; width: 100%; height: 100%; }
.start-hinweis h1 { margin: 0 0 12px; font-size: clamp(20px, 5vw, 25px); line-height: 1.25; text-align: center; color: var(--gold-3); }
.start-hinweis p { margin: 0 0 12px; color: #d9d1ee; }
.start-hinweis ol { margin: 0 0 14px; padding-left: 1.4em; color: var(--text); }
.start-hinweis li { margin: 6px 0; }
.start-hinweis b { color: var(--gold-3); }
.start-hinweis-klein { font-size: 13px; color: var(--muted) !important; margin: 0 !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* System „Bewegung reduzieren“: fast alle Animationen aus. Ausgenommen ist der Teilbaum eines Automaten, dessen Spieler
   „Weniger Bewegung: aus“ gewählt hat (Klasse a2-bewegt am Wurzelelement, A2.bewegung in automat2.js) – dort laufen Symbole
   und Kulissen wie gewohnt. :where() hält die Spezifität bei 0 wie zuvor mit *; :not() mit Selektorliste können
   Chrome/Edge ab 88, Firefox ab 84 und Safari ab 9. */
@media (prefers-reduced-motion: reduce) {
  :where(:not(.a2-bewegt, .a2-bewegt *)), :where(:not(.a2-bewegt, .a2-bewegt *))::before, :where(:not(.a2-bewegt, .a2-bewegt *))::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important;
  }
}
