:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #17202b;
  --muted: #5d6b7a;
  --accent: #0e6e80;
  --accent-ink: #ffffff;
  --danger: #dc2626;
  --error: #dc2626;
  --panel: rgba(255, 255, 255, .88);
  --line: #dde3ea;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.4 system-ui, "Segoe UI", sans-serif; }
.hidden { display: none !important; }
.invisible { visibility: hidden; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 10px; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.secondary { background: #e8edf3; color: var(--text); }
button.danger { background: var(--danger); }
button.big { width: 100%; font-size: 18px; padding: 14px; margin: 8px 0; }
button.link { background: none; color: var(--muted); padding: 4px; font-weight: 400; text-decoration: underline; }
input { font: inherit; width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); margin: 4px 0 12px; }
label { font-size: 13px; color: var(--muted); }

.card-screen { min-height: 100%; display: grid; place-items: center; padding: 16px; position: relative; overflow: hidden; background: #2b1410; }
/* Das Tor von Mudaris als Hintergrund, leicht vergrößert, damit der helle Bildrand nicht zu sehen ist */
.card-screen::before { content: ''; position: absolute; inset: 0; background: url('photos/tor.jpg') center / cover no-repeat; transform: scale(1.12); }
.card-screen .card { position: relative; }
.card { width: 100%; max-width: 400px; background: var(--card); padding: 28px; border-radius: 18px; box-shadow: 0 20px 60px rgba(20, 40, 80, .12); }
.card form button[type=submit] { width: 100%; }
.logo { font-size: 48px; color: var(--accent); }
.brand-logo { font: 700 46px/1 Georgia, "Times New Roman", serif; letter-spacing: 2px; text-align: center; color: #b8892b;
  background: linear-gradient(180deg, #e9c46a, #a8741a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-sub { text-align: center; color: #0e5f73; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; font-size: 13px; margin: 6px 0 14px; }
.card { border-top: 6px solid #b91c1c; border-bottom: 6px solid #15803d; }
h1 { margin: 4px 0; }
.muted { color: var(--muted); }
.error { color: var(--error); min-height: 1em; }
.dev { background: #ecfdf3; color: #166534; padding: 8px 10px; border-radius: 8px; font-size: 13px; }

#hall { position: fixed; inset: 0; overflow: hidden; }
#scene { width: 100%; height: 100%; display: block; touch-action: none; }
.hud { position: absolute; }
.hud.top { top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; }
.pill { background: var(--panel); color: var(--text); backdrop-filter: blur(6px); border-radius: 999px; padding: 9px 16px; font-weight: 600; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.status { flex: 1; text-align: center; }
.mic { min-width: 52px; }
.miclevel { width: 10px; height: 36px; border-radius: 6px; background: var(--panel); position: relative; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.miclevel i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: #22c55e; transition: height .08s; }
.leave { background: #dc2626; color: #fff; }
.joy { left: 24px; bottom: 150px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.55); border: 2px solid rgba(37,99,235,.5); touch-action: none; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
#joyKnob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: #2563eb; box-shadow: 0 2px 8px rgba(0,0,0,.3); pointer-events: none; }
.mic.off { background: #fee2e2; color: var(--danger); }
.panel { background: var(--panel); backdrop-filter: blur(6px); border-radius: 12px; padding: 10px 12px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.seats { top: 62px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 24px); }
.seat { background: var(--panel); border-radius: 10px; padding: 5px 10px; font-size: 13px; }
.seat.turn { outline: 2px solid var(--accent); }
.seat.def { outline: 2px solid #f59e0b; }
.seat.out { opacity: .55; }
.hint { top: 104px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--muted); background: var(--panel); padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
.bottom-left { left: 12px; bottom: 12px; max-width: 250px; font-size: 13px; max-height: 40vh; overflow: auto; }
#members div { padding: 1px 0; }
#members .talk { color: #16a34a; font-weight: 600; }
.chat { right: 12px; bottom: 12px; width: min(300px, calc(100% - 24px)); }
#chatLog { max-height: 130px; overflow-y: auto; font-size: 13px; margin-bottom: 6px; }
#chatLog b { color: var(--accent); }
.chat input { margin: 0; padding: 8px 10px; }
.actions { bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.actions button { font-size: 16px; padding: 12px 18px; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.modal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--card); padding: 18px 20px; border-radius: 14px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.25); max-width: calc(100% - 32px); }
.modal .rule { text-align: left; margin: 6px 0; font-size: 14px; }
#colorPick button { color: #fff; }
.modal .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
#promo button, #suitPick button { font-size: 30px; width: 60px; }
#suitPick button { background: #fff; color: #111; border: 2px solid var(--line); }
#suitPick button.red { color: #d11a2a; }
.toast { position: absolute; top: 140px; left: 50%; transform: translateX(-50%); background: rgba(23, 32, 43, .9); color: #fff; padding: 8px 16px; border-radius: 10px; opacity: 0; transition: opacity .3s; pointer-events: none; text-align: center; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; }
.fun { top: 64px; right: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.fun .pill { font-size: 14px; padding: 7px 12px; }
.fun button.on { background: #f97316; color: #fff; }

@media (max-width: 700px) {
  .bottom-left, .hint { display: none; }
  .chat { width: calc(100% - 24px); }
  #chatLog { max-height: 70px; }
  .actions { bottom: 120px; }
  .fun { top: 92px; right: 8px; }
  .fun .pill { font-size: 12px; padding: 5px 9px; opacity: .9; }
}

/* Handy: oben passen Status, Aufstehen, zwei Menüs und Mikrofon nicht in eine Zeile */
@media (max-width: 700px) {
  .hud.top { flex-wrap: wrap; justify-content: flex-end; }
  .hud.top .status { flex: 1 1 100%; order: -1; }
  .hud.top .status.invisible { display: none; }
  .hud.top .pill { padding: 7px 12px; }
  #gamesMenu { top: 112px !important; }
  .hud.fun { top: 112px; }
}
