/* ── Basis ────────────────────────────────────────────────────────────────── */
:root {
  --bg:          #06080f;
  --bg-card:     #0d1120;
  --bg-input:    #111827;
  --bg-hover:    #161d30;
  --accent:      #7c3aed;
  --accent-2:    #6d28d9;
  --accent-soft: #c4b5fd;
  --green:       #10b981;
  --amber:       #f59e0b;
  --red:         #ef4444;
  --text:        #f1f5f9;
  --text-muted:  #94a3b8;
  --border:      #1e293b;
  --radius:      12px;
  --radius-sm:   8px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: 'Rubik', system-ui, sans-serif; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select { font-family: inherit; }
a      { color: inherit; text-decoration: none; }

.dot-bg {
  background-image: radial-gradient(circle, #1e293b 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ── Screens ─────────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }
.nav-user { display: flex; align-items: center; gap: 10px; }
.screen { display: flex; flex-direction: column; min-height: 100vh; }
#screen-game, #screen-voting { min-height: unset; height: 100vh; overflow: hidden; }

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes fadeUp   { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:none; } }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp  { from { opacity:0; transform:translate(-50%, 20px); } to { opacity:1; transform:translate(-50%, 0); } }
@keyframes slideIn  { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }
@keyframes cardIn   { from { opacity:0; transform:translateX(40px) scale(.97); } to { opacity:1; transform:none; } }
@keyframes pulse    { 0%,100% { opacity:1 } 50% { opacity:.5 } }
@keyframes glow     { 0%,100% { box-shadow:0 0 30px rgba(124,58,237,.45); } 50% { box-shadow:0 0 55px rgba(124,58,237,.8); } }
@keyframes float    { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-6px); } }
@keyframes popIn    { 0% { opacity:0; transform:scale(.6); } 70% { transform:scale(1.08); } 100% { opacity:1; transform:scale(1); } }
@keyframes shimmer  { to { background-position: 200% center; } }

/* ── HERO / Startseite ───────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: #06080f; }
#hero-sv { position: absolute; inset: 0; z-index: 0; pointer-events: none; filter: saturate(.8) contrast(1.05); opacity: 0; transition: opacity 1.4s ease; }
#hero-sv.ready { opacity: 1; }
#hero-sv .gm-style-cc, #hero-sv .gmnoprint, #hero-sv a[href^="https://maps.google.com"] { opacity: 0 !important; }
.hero-fallback {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 78% 42%, rgba(124,58,237,.28), transparent 55%),
    radial-gradient(ellipse at 18% 88%, rgba(59,130,246,.14), transparent 50%),
    radial-gradient(circle, #1e293b 1px, transparent 1px);
  background-size: auto, auto, 30px 30px;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6,8,15,.97) 0%, rgba(6,8,15,.88) 35%, rgba(6,8,15,.55) 70%, rgba(6,8,15,.7) 100%),
    linear-gradient(180deg, rgba(6,8,15,.75) 0%, transparent 25%, transparent 70%, rgba(6,8,15,.95) 100%),
    radial-gradient(ellipse at 70% 50%, rgba(124,58,237,.18), transparent 60%);
}
.hero-nav {
  position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  padding: 22px 44px; animation: fadeIn .8s ease both;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 1.45rem; font-weight: 800; font-style: italic; letter-spacing: -.02em; }
.nav-logo .pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; background: linear-gradient(135deg,#a78bfa,#7c3aed); transform: rotate(-45deg); position: relative; box-shadow: 0 4px 14px rgba(124,58,237,.5); animation: float 3s ease-in-out infinite; }
.nav-logo .pin::after { content:''; position:absolute; inset:8px; background:#06080f; border-radius:50%; }
.nav-logo span { color: var(--accent-soft); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang-btn { padding: 6px 10px; border-radius: 8px; background: rgba(13,17,32,.7); border: 1px solid var(--border); color: var(--text-muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; transition: all .15s; }
.lang-btn:hover { border-color: var(--accent); color: var(--text); }
.hero-body {
  position: relative; z-index: 2; flex: 1; width: 100%; max-width: 1380px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
  padding: 20px 64px 70px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 20px;
  background: rgba(124,58,237,.16); border: 1px solid rgba(124,58,237,.4); color: var(--accent-soft);
  font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 22px;
  animation: fadeUp .7s ease .15s both;
}
.hero-badge .live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 1.6s infinite; }
.hero-h1 {
  font-size: clamp(2.8rem, 5.6vw, 5rem); font-weight: 900; font-style: italic; text-transform: uppercase;
  letter-spacing: -.02em; line-height: .96; margin-bottom: 22px;
  text-shadow: 0 6px 40px rgba(0,0,0,.6), 0 2px 0 rgba(0,0,0,.35);
}
.hero-h1 .line { display: block; animation: fadeUp .7s cubic-bezier(.2,.8,.2,1) both; }
.hero-h1 .line:nth-child(1) { animation-delay: .25s; }
.hero-h1 .line:nth-child(2) { animation-delay: .38s; }
.hero-h1 .line:nth-child(3) { animation-delay: .51s; }
.hero-h1 .grad {
  background: linear-gradient(90deg, #c4b5fd, #a78bfa, #7c3aed, #c4b5fd); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 4s linear infinite;
}
.hero-sub { font-size: 1.15rem; color: #cbd5e1; max-width: 540px; line-height: 1.55; margin-bottom: 30px; animation: fadeUp .7s ease .6s both; }
.hero-cta { animation: fadeUp .7s ease .72s both; }
.btn-hero {
  padding: 18px 46px; font-size: 1.3rem; font-weight: 900; font-style: italic; text-transform: uppercase;
  letter-spacing: .04em; border-radius: 14px; background: var(--accent); color: #fff;
  animation: glow 2.6s ease-in-out infinite; transition: transform .15s;
}
.btn-hero:hover { transform: translateY(-3px) scale(1.02); background: #8b5cf6; }
.btn-hero:active { transform: scale(.98); }
.hero-secondary { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; animation: fadeUp .7s ease .85s both; }
.btn-hero-ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 10px;
  background: rgba(13,17,32,.72); border: 1px solid rgba(255,255,255,.1); color: var(--text);
  font-weight: 600; font-size: .9rem; backdrop-filter: blur(10px); transition: border-color .15s, transform .15s;
}
.btn-hero-ghost:hover { border-color: var(--accent); transform: translateY(-1px); }
.hero-note { margin-top: 22px; font-size: .82rem; color: var(--text-muted); animation: fadeUp .7s ease .95s both; }
.hero-note strong { color: var(--text); }

.hero-card {
  background: rgba(13,17,32,.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.09); border-radius: 22px; padding: 28px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05);
  animation: cardIn .8s cubic-bezier(.2,.8,.2,1) .4s both;
}
.hero-card-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.hero-card-sub { font-size: .82rem; color: var(--text-muted); margin-bottom: 16px; }
.hero-footer {
  position: relative; z-index: 2; display: flex; justify-content: center; gap: 18px;
  padding: 14px; font-size: .78rem; color: var(--text-muted);
}
.hero-footer a:hover { color: var(--text); text-decoration: underline; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 300;
  padding: 12px 20px; border-radius: 10px; background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.4);
  color: #fca5a5; font-size: .9rem; font-weight: 600; animation: slideUp .3s ease;
}
.toast.ok { background: rgba(16,185,129,.15); border-color: rgba(16,185,129,.4); color: #6ee7b7; }

/* ── Cookie Banner ───────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 200;
  width: calc(100% - 32px); max-width: 660px;
  background: rgba(13,17,32,.96); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: slideUp .5s cubic-bezier(.2,.8,.2,1) 1.2s both;
}
.cookie-banner[hidden] { display: none !important; }
.cookie-icon { font-size: 1.6rem; flex-shrink: 0; }
.cookie-text { flex: 1; font-size: .84rem; color: #cbd5e1; line-height: 1.45; }
.cookie-text a { color: var(--accent-soft); text-decoration: underline; }

/* ── Auth Modal ──────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; backdrop-filter: blur(6px); animation: fadeIn .2s ease;
}
.modal-overlay[hidden] { display: none !important; }
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 18px; padding: 32px; width: 100%; max-width: 410px;
  position: relative; animation: popIn .35s cubic-bezier(.2,.8,.2,1);
}
.modal-close { position: absolute; top: 16px; right: 16px; background: none; color: var(--text-muted); font-size: 20px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-title { font-size: 1.4rem; font-weight: 800; font-style: italic; margin-bottom: 20px; text-align: center; }

.social-row { display: flex; flex-direction: column; gap: 8px; }
.social-row[hidden] { display: none !important; }
.btn-social {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px;
  border-radius: var(--radius-sm); font-weight: 700; font-size: .92rem; color: #fff;
  transition: filter .15s, transform .1s;
}
.btn-social:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-social svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-twitch  { background: #9146ff; }
.btn-discord { background: #5865f2; }
.btn-google  { background: #fff; color: #1f2937; }
.auth-divider {
  display: flex; align-items: center; gap: 10px; color: var(--text-muted);
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; margin: 16px 0;
}
.auth-divider[hidden] { display: none !important; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Account Modal ───────────────────────────────────────────────────────── */
.acc-head { display: flex; align-items: center; gap: 14px; }
.acc-head img, .avatar-fallback.big { width: 52px; height: 52px; border-radius: 50%; font-size: 1.3rem; }
.avatar-fallback.big { background: linear-gradient(135deg,#a78bfa,#7c3aed); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.acc-name { font-size: 1.2rem; font-weight: 800; }
.acc-sub { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }
.acc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.acc-stats div { background: var(--bg-input); border-radius: var(--radius-sm); padding: 10px 6px; text-align: center; font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.acc-stats b { display: block; font-size: 1.15rem; color: var(--text); margin-bottom: 2px; }
.acc-section { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 8px; }
.link-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg-input); border-radius: var(--radius-sm); margin-bottom: 6px; font-size: .9rem; }
.link-ico { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.link-ico svg { width: 16px; height: 16px; }
.link-name { flex: 1; font-weight: 600; }
.link-ok { color: var(--green); font-size: .82rem; font-weight: 700; }
.link-na { color: var(--text-muted); font-size: .78rem; }
.acc-hint { font-size: .76rem; color: var(--text-muted); margin-top: 10px; }
.link-acc { display: block; font-size: .74rem; color: var(--text-muted); font-weight: 500; }
.acc-name-row { display: flex; align-items: center; gap: 8px; }
.acc-name-row[hidden] { display: none; }
.acc-name-row input { flex: 1; min-width: 0; padding: 7px 10px; background: var(--bg-input); border: 1px solid var(--accent); border-radius: var(--radius-sm); color: var(--text); font-size: 1rem; font-weight: 700; }
.acc-edit { background: none; color: var(--text-muted); font-size: 1rem; padding: 2px 6px; border-radius: 6px; }
.acc-edit:hover { color: var(--text); background: var(--bg-input); }
.av-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-bottom: 18px; }
.av-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; padding: 8px 4px 6px; border-radius: 10px; border: 2px solid transparent; color: var(--text-muted); font-size: .7rem; font-weight: 600; transition: border-color .15s, background .15s; }
.av-opt small { font-size: .64rem; color: var(--text-muted); font-weight: 500; }
.av-opt:hover { background: var(--bg-input); }
.av-opt.sel { border-color: var(--accent); color: var(--text); background: rgba(124,58,237,.12); }
.av-opt.locked .av { opacity: .45; filter: grayscale(.6); }
.av-opt.locked small { color: var(--amber); font-weight: 700; }
.acc-coins { float: right; color: #fbbf24; text-transform: none; letter-spacing: 0; font-size: .8rem; }
.coins { color: #fbbf24; }
.coin { display: inline-block; width: .85em; height: .85em; border-radius: 50%; vertical-align: -.06em; margin-right: .22em;
  background: radial-gradient(circle at 35% 35%, #fde68a, #f59e0b 60%, #b45309); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), 0 0 4px rgba(245,158,11,.5); }

/* ── Avatar + Rahmen ─────────────────────────────────────────────────────── */
.av { --s: 32px; position: relative; display: inline-flex; width: var(--s); height: var(--s); border-radius: 50%; flex-shrink: 0; vertical-align: middle; }
.av > * { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.av img { object-fit: cover; }
.av-emoji { font-size: calc(var(--s) * .56); line-height: 1; }
.av-init { background: linear-gradient(135deg, #a78bfa, #7c3aed); font-weight: 800; font-size: calc(var(--s) * .42); color: #fff; }
.av[class*="fr-"]::before { content: ''; position: absolute; inset: calc(var(--s) * -.1); border-radius: 50%; z-index: 0; }
.av.fr-bronze::before  { background: linear-gradient(135deg, #b45309, #f59e0b, #78350f); }
.av.fr-silver::before  { background: linear-gradient(135deg, #94a3b8, #f8fafc, #64748b); }
.av.fr-gold::before    { background: linear-gradient(135deg, #ca8a04, #fde68a, #a16207); box-shadow: 0 0 calc(var(--s) * .3) rgba(251,191,36,.6); }
.av.fr-neon::before    { background: #7c3aed; box-shadow: 0 0 calc(var(--s) * .35) #a855f7, 0 0 calc(var(--s) * .7) rgba(168,85,247,.5); animation: pulse 1.6s infinite; }
.av.fr-fire::before    { background: conic-gradient(from 0deg, #f97316, #fde047, #ef4444, #f97316); animation: spin 2.2s linear infinite; box-shadow: 0 0 calc(var(--s) * .3) rgba(249,115,22,.6); }
.av.fr-ice::before     { background: conic-gradient(from 0deg, #67e8f9, #e0f2fe, #38bdf8, #67e8f9); animation: spin 4s linear infinite; box-shadow: 0 0 calc(var(--s) * .3) rgba(103,232,249,.5); }
.av.fr-toxic::before   { background: conic-gradient(from 0deg, #84cc16, #052e16, #4ade80, #84cc16); animation: spin 3s linear infinite; box-shadow: 0 0 calc(var(--s) * .3) rgba(132,204,22,.6); }
.av.fr-rainbow::before { background: conic-gradient(#ef4444, #f59e0b, #eab308, #22c55e, #3b82f6, #8b5cf6, #ef4444); animation: spin 3s linear infinite; }
.av.fr-galaxy::before  { background: conic-gradient(from 90deg, #1e1b4b, #7c3aed, #0ea5e9, #1e1b4b); animation: spin 5s linear infinite; box-shadow: 0 0 calc(var(--s) * .4) rgba(124,58,237,.7); }
.av.fr-emerald::before { background: linear-gradient(135deg, #065f46, #34d399, #047857); box-shadow: 0 0 calc(var(--s) * .3) rgba(52,211,153,.5); }
.av.fr-diamond::before { background: conic-gradient(#e0f2fe, #38bdf8, #f0f9ff, #0ea5e9, #e0f2fe); animation: spin 2.5s linear infinite; box-shadow: 0 0 calc(var(--s) * .4) rgba(56,189,248,.7); }
.av.fr-legend::before  { background: conic-gradient(#fde047, #f97316, #ec4899, #8b5cf6, #fde047); animation: spin 1.6s linear infinite; box-shadow: 0 0 calc(var(--s) * .5) rgba(253,224,71,.8); }
@keyframes spin { to { transform: rotate(360deg); } }
.player-item .av, .score-row .av { margin-right: 2px; }
.modal-box { max-height: 92vh; overflow-y: auto; }

/* ── Tab Bar ─────────────────────────────────────────────────────────────── */
.tab-bar { display: flex; background: var(--bg-input); border-radius: var(--radius-sm); padding: 4px; gap: 4px; margin-bottom: 18px; }
.tab-btn { flex: 1; padding: 9px; border-radius: 6px; font-size: .875rem; font-weight: 600; background: none; color: var(--text-muted); transition: all .15s; }
.tab-btn.active { background: var(--accent); color: #fff; }
.tab-btn:not(.active):hover { background: var(--bg-hover); color: var(--text); }

/* ── Form elements ───────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.form-group label { font-size: .74rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.form-group input {
  padding: 11px 14px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: .95rem; transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,.18); }
.form-group input::placeholder { color: #64748b; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-error { color: var(--red); font-size: .82rem; margin-top: -6px; margin-bottom: 6px; min-height: 18px; }

.btn-primary { width: 100%; padding: 13px; background: var(--accent); border-radius: var(--radius-sm); color: #fff; font-size: 1rem; font-weight: 700; transition: background .15s, transform .1s; }
.btn-primary:hover { background: #8b5cf6; }
.btn-primary:active { transform: scale(.98); }
.btn-ghost { padding: 8px 16px; background: rgba(13,17,32,.7); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); font-size: .875rem; font-weight: 600; transition: all .15s; }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-danger { padding: 8px 16px; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); border-radius: var(--radius-sm); color: var(--red); font-size: .875rem; font-weight: 600; transition: all .15s; }
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-sm { padding: 7px 13px; font-size: .8rem; }

.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; white-space: nowrap;
  background: rgba(13,17,32,.75); border: 1px solid var(--border); border-radius: 20px;
  font-size: .85rem; font-weight: 600; backdrop-filter: blur(10px);
}
.user-chip img, .user-chip .avatar-fallback { width: 24px; height: 24px; border-radius: 50%; }
.user-chip .avatar-fallback { background: linear-gradient(135deg,#a78bfa,#7c3aed); display:flex; align-items:center; justify-content:center; font-size:.7rem; font-weight:800; }
.user-chip .stats { color: var(--text-muted); font-weight: 500; font-size: .78rem; }

/* ── Select wrapper ──────────────────────────────────────────────────────── */
.sel-wrap { position: relative; display: flex; }
.sel-wrap select {
  width: 100%; padding: 11px 36px 11px 14px; appearance: none; -webkit-appearance: none;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: .95rem; cursor: pointer; transition: border-color .15s;
}
.sel-wrap select:focus { outline: none; border-color: var(--accent); }
.sel-wrap::after {
  content: ''; pointer-events: none; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--text-muted);
}

/* ── Lobby List ──────────────────────────────────────────────────────────── */
.lobby-list { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.lobby-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s; animation: slideIn .25s ease both; }
.lobby-item:hover { border-color: var(--accent); }
.lobby-info { font-size: .85rem; }
.lobby-name { font-weight: 600; margin-bottom: 2px; }
.lobby-meta { color: var(--text-muted); font-size: .78rem; }
.lobby-empty { text-align: center; color: var(--text-muted); padding: 24px; font-size: .9rem; }

/* ── Waiting Screen ──────────────────────────────────────────────────────── */
#screen-waiting { align-items: center; padding: 32px 24px; gap: 24px; }
.waiting-header { text-align: center; animation: fadeUp .5s ease both; }
.waiting-title { font-size: 1.6rem; font-weight: 800; font-style: italic; margin-bottom: 4px; }
.room-code-big { font-size: 3rem; font-weight: 900; letter-spacing: .18em; color: var(--accent-soft); font-variant-numeric: tabular-nums; cursor: pointer; }
.room-code-big:hover { color: #fff; }
.room-code-hint { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.waiting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; max-width: 780px; }
.waiting-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; animation: fadeUp .5s ease .1s both; }
.waiting-card-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 12px; }
.player-list { display: flex; flex-direction: column; gap: 8px; }
.player-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: var(--bg-input); border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600; animation: popIn .3s ease both; }
.player-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.player-host-badge { margin-left: auto; font-size: .68rem; background: rgba(124,58,237,.2); color: var(--accent-soft); padding: 2px 8px; border-radius: 10px; font-weight: 700; }
.settings-list { display: flex; flex-direction: column; gap: 10px; }
.setting-row { display: flex; flex-direction: column; gap: 4px; }
.setting-label { font-size: .72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.waiting-start { width: 100%; max-width: 780px; }
.btn-start { width: 100%; padding: 15px; background: var(--accent); border-radius: var(--radius-sm); color: #fff; font-size: 1.1rem; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .04em; animation: glow 2.6s ease-in-out infinite; transition: transform .15s; }
.btn-start:hover { transform: translateY(-2px); background: #8b5cf6; }
.btn-start:disabled { background: var(--bg-input); color: var(--text-muted); animation: none; transform: none; cursor: default; border: 1px solid var(--border); }
.btn-ready { width: 100%; padding: 15px; border-radius: var(--radius-sm); font-size: 1.05rem; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .04em; background: var(--green); color: #fff; transition: transform .15s, background .15s; }
.btn-ready:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-ready.is-ready { background: var(--bg-input); color: var(--green); border: 1px solid rgba(16,185,129,.4); text-transform: none; font-style: normal; font-weight: 600; font-size: .95rem; }
.ready-badge { margin-left: auto; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.ready-badge.on { background: rgba(16,185,129,.15); color: var(--green); border-color: rgba(16,185,129,.35); }
.kick-btn { background: none; color: var(--text-muted); font-size: .85rem; padding: 2px 6px; border-radius: 6px; margin-left: 4px; }
.kick-btn:hover { color: var(--red); background: rgba(239,68,68,.12); }
.player-item .player-host-badge + .off, .player-item .ready-badge + .off { margin-left: 6px; }

/* Countdown */
.countdown { position: fixed; inset: 0; z-index: 150; background: rgba(6,8,15,.86); backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; animation: fadeIn .25s ease; }
.cd-label { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--text-muted); }
.cd-num { font-size: clamp(6rem, 22vw, 12rem); font-weight: 900; font-style: italic; line-height: 1; color: #fff; text-shadow: 0 0 60px rgba(124,58,237,.9); }
.cd-num.pop { animation: cdPop .6s cubic-bezier(.2,.8,.2,1); }
@keyframes cdPop { 0% { transform: scale(1.6); opacity: 0; color: var(--accent-soft); } 100% { transform: scale(1); opacity: 1; } }
#cd-cancel { margin-top: 20px; }

/* ── Chat ────────────────────────────────────────────────────────────────── */
.chat-card { width: 100%; max-width: 780px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; animation: fadeUp .5s ease .2s both; }
.chat-box { height: 170px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: .86rem; padding-right: 4px; }
.chat-msg { line-height: 1.4; word-break: break-word; animation: slideIn .2s ease; }
.chat-name { font-weight: 700; margin-right: 6px; }
.chat-sys { color: var(--text-muted); font-style: italic; font-size: .78rem; }
.chat-row { display: flex; gap: 8px; }
.chat-row input { flex: 1; min-width: 0; padding: 9px 12px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: .9rem; }
.chat-row input:focus { outline: none; border-color: var(--accent); }
.vote-chat { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 140px; border-top: 1px solid var(--border); padding-top: 12px; }
.vote-chat .chat-box { flex: 1; height: auto; min-height: 90px; }
.player-item.offline { opacity: .45; }
.player-item .off { margin-left: auto; font-size: .68rem; color: var(--text-muted); font-weight: 500; }
.vote-voters { text-align: center; font-size: .8rem; color: var(--text-muted); }
.vote-secs { font-variant-numeric: tabular-nums; color: var(--accent-soft); }
#v-secs.urgent { color: var(--red); }

/* ── Game Screen ─────────────────────────────────────────────────────────── */
.game-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; background: var(--bg-card); border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 12px; }
.game-timer { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent-soft); min-width: 64px; }
.game-timer.urgent { color: var(--red); animation: pulse 1s infinite; }
.game-location { font-size: .85rem; color: var(--text-muted); text-align: center; flex: 1; }
.game-location strong { color: var(--text); }
.game-body { flex: 1; display: grid; grid-template-columns: 230px 1fr 230px; overflow: hidden; }
.panel-left, .panel-right { background: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.panel-right { border-right: none; border-left: 1px solid var(--border); }
.panel-title { padding: 12px 14px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.panel-scroll { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; }

/* Bühne: Weltkarte ↔ Street View */
.stage { position: relative; overflow: hidden; background: #111; }
#map-container, #sv-container { position: absolute; inset: 0; }
#map-container[hidden], #sv-container[hidden] { display: none; }
#shutter { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 5; }
#shutter.flash { animation: shutterFlash .5s ease-out; }
@keyframes shutterFlash { 0% { opacity: 0; } 10% { opacity: .95; } 100% { opacity: 0; } }
.stage-btn {
  position: absolute; top: 12px; left: 12px; z-index: 4; padding: 9px 14px; border-radius: 10px;
  background: rgba(13,17,32,.88); border: 1px solid rgba(255,255,255,.12); color: #fff;
  font-weight: 700; font-size: .85rem; backdrop-filter: blur(8px); transition: border-color .15s;
}
.stage-btn:hover { border-color: var(--accent); }
.stage-btn[hidden] { display: none; }
.stage-hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 4;
  padding: 8px 14px; border-radius: 20px; background: rgba(13,17,32,.88); border: 1px solid rgba(255,255,255,.1);
  font-size: .8rem; color: #cbd5e1; white-space: nowrap; pointer-events: none; max-width: 90%; overflow: hidden; text-overflow: ellipsis;
}
.stage-hint[hidden] { display: none; }
.solo-badge { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 12px; background: rgba(245,158,11,.15); color: var(--amber); border: 1px solid rgba(245,158,11,.3); white-space: nowrap; }
.solo-badge[hidden] { display: none; }

/* Level / XP */
.level-pill { font-size: .68rem; font-weight: 800; padding: 2px 7px; border-radius: 8px; background: var(--accent); color: #fff; margin-right: 4px; }
.xp-gain { font-size: .78rem; color: var(--accent-soft); font-weight: 700; white-space: nowrap; }
.xp-bar { width: 100%; max-width: 480px; height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.xp-bar > div { height: 100%; background: linear-gradient(90deg, #7c3aed, #c4b5fd); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.xp-label { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-muted); margin-bottom: 6px; }
.levelup { font-size: 1.1rem; font-weight: 900; font-style: italic; color: #fbbf24; text-align: center; animation: popIn .6s ease; }
.end-solo { color: var(--amber); font-size: .9rem; font-weight: 600; text-align: center; }

.word-card {
  padding: 10px 12px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: .86rem; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  cursor: pointer; transition: border-color .15s, background .15s, transform .1s; user-select: none;
}
.word-card:hover:not(.submitted):not(.found):not(.rejected) { border-color: var(--accent); background: var(--bg-hover); transform: translateX(2px); }
.word-card.submitted { border-color: var(--amber); background: rgba(245,158,11,.08); color: var(--amber); }
.word-card.submitted:hover { border-color: #fbbf24; background: rgba(245,158,11,.16); }
.word-card.snap { animation: popIn .35s ease; }
.word-card.found     { border-color: var(--green); background: rgba(16,185,129,.08); color: var(--green); cursor: default; }
.word-card.rejected  { border-color: var(--border); background: var(--bg); color: var(--text-muted); cursor: default; text-decoration: line-through; }
.word-check { font-size: .9rem; flex-shrink: 0; }

.sub-entry { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--bg-input); border-radius: var(--radius-sm); font-size: .82rem; animation: slideIn .25s ease; }
.sub-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sub-name { font-weight: 600; flex-shrink: 0; }
.sub-word { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Voting Screen ───────────────────────────────────────────────────────── */
.vote-header { display: flex; flex-direction: column; align-items: center; padding: 14px 24px 10px; background: var(--bg-card); border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 4px; }
.vote-progress { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.vote-word-big { font-size: 1.8rem; font-weight: 900; font-style: italic; letter-spacing: -.01em; animation: popIn .4s ease; }
.vote-player-line { font-size: .85rem; color: var(--text-muted); }
.vote-player-line strong { color: var(--text); }
.vote-countdown-wrap { width: 100%; max-width: 480px; height: 4px; background: var(--bg-input); border-radius: 2px; margin-top: 6px; }
.vote-countdown-bar { height: 100%; background: var(--accent); border-radius: 2px; width: 100%; }
.vote-main { flex: 1; display: grid; grid-template-columns: 1fr 280px; overflow: hidden; }
#vote-sv-container { background: #111; }
.vote-no-sv { display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: .9rem; text-align: center; padding: 24px; height: 100%; }
.vote-sidebar { display: flex; flex-direction: column; gap: 16px; padding: 24px 20px; background: var(--bg-card); border-left: 1px solid var(--border); overflow-y: auto; }
.vote-score-row { display: flex; gap: 10px; }
.vs-pill { flex: 1; padding: 10px; border-radius: var(--radius-sm); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.vs-pill.yes { background: rgba(16,185,129,.12); color: var(--green); border: 1px solid rgba(16,185,129,.2); }
.vs-pill.no  { background: rgba(239,68,68,.12);  color: var(--red);   border: 1px solid rgba(239,68,68,.2); }
.vs-pill .vs-count { font-size: 1.6rem; font-weight: 900; line-height: 1; }
.vote-own-msg { text-align: center; padding: 12px; background: var(--bg-input); border-radius: var(--radius-sm); color: var(--text-muted); font-size: .85rem; font-style: italic; }
.vote-btns { display: flex; flex-direction: column; gap: 10px; }
.vote-btn-big { padding: 16px; border-radius: var(--radius-sm); font-size: 1.05rem; font-weight: 800; transition: opacity .15s, transform .1s; }
.vote-btn-big:active { transform: scale(.97); }
.vote-btn-yes { background: var(--green); color: #fff; }
.vote-btn-no  { background: var(--red);   color: #fff; }
.vote-btn-big:hover { filter: brightness(1.1); }
.vote-btn-big:disabled { opacity: .4; cursor: default; transform: none; filter: none; }
.vote-result-banner { padding: 14px; border-radius: var(--radius-sm); text-align: center; font-size: 1rem; font-weight: 800; animation: popIn .35s ease; }
.vote-result-banner.approved { background: rgba(16,185,129,.15); color: var(--green); border: 1px solid rgba(16,185,129,.3); }
.vote-result-banner.rejected { background: rgba(239,68,68,.15);  color: var(--red);   border: 1px solid rgba(239,68,68,.3); }

/* ── End Screen ──────────────────────────────────────────────────────────── */
#screen-end { align-items: center; padding: 48px 24px; gap: 32px; }
.end-title { font-size: 2.4rem; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.02em; animation: popIn .5s ease; }
.ranking-list { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 480px; }
.score-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); animation: fadeUp .5s ease both; }
.score-row:nth-child(1){animation-delay:.1s} .score-row:nth-child(2){animation-delay:.2s} .score-row:nth-child(3){animation-delay:.3s} .score-row:nth-child(n+4){animation-delay:.4s}
.score-row:first-child { border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.06); }
.rank-medal { font-size: 1.4rem; width: 32px; text-align: center; flex-shrink: 0; }
.score-name { flex: 1; font-weight: 700; font-size: .95rem; }
.score-found { color: var(--text-muted); font-size: .8rem; }
.score-pts { font-weight: 800; font-size: 1.05rem; color: var(--accent-soft); }
.word-cloud { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 600px; }
.word-tag { padding: 5px 12px; border-radius: 20px; font-size: .8rem; font-weight: 600; background: var(--bg-input); color: var(--text-muted); border: 1px solid var(--border); }
.end-actions { display: flex; gap: 12px; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero-body { grid-template-columns: 1fr; gap: 32px; padding: 20px 28px 60px; }
  .hero-nav { padding: 18px 24px; }
  .game-body { grid-template-columns: 180px 1fr; }
  .panel-right { display: none; }
  .vote-main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .vote-sidebar { max-height: 240px; }
}
@media (max-width: 600px) {
  .hero-nav { padding: 14px 16px; }
  .nav-logo { font-size: 1.15rem; gap: 7px; }
  .nav-logo .pin { width: 24px; height: 24px; }
  .nav-logout, .user-chip .wins { display: none; }
  .user-chip { padding: 4px 10px 4px 4px; font-size: .8rem; max-width: 52vw; }
  .user-chip #nav-username { overflow: hidden; text-overflow: ellipsis; }
  .user-chip .stats { font-size: .7rem; }
  #nav-guest .btn-sm { padding: 6px 10px; font-size: .75rem; }
  .hero-body { padding: 10px 20px 50px; }
  .game-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .panel-left { max-height: 160px; }
  .waiting-grid { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
}
