:root { --bg:#12131a; --card:#1e2030; --fg:#e8e8f0; --accent:#7c5cff; --danger:#ff4d6d; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, sans-serif; background:var(--bg); color:var(--fg); }
.topbar { display:flex; justify-content:space-between; align-items:center; padding:.8rem 1.2rem; background:#0c0d12; }
.logo { font-weight:800; letter-spacing:.2em; color:var(--accent); text-decoration:none; }
.welcome { display:flex; align-items:center; gap:1rem; }
.welcome img { height:100px; width:auto; border-radius:8px; }
.welcome h1 { margin:0; }
main { max-width:640px; margin:2rem auto; padding:0 1rem; }
.card { background:var(--card); padding:1.5rem; border-radius:14px; display:flex; flex-direction:column; gap:.7rem; }
input { padding:.7rem; border-radius:8px; border:1px solid #444; background:#14151f; color:var(--fg); font-size:1rem; }
button { padding:.7rem 1rem; border:0; border-radius:8px; background:var(--accent); color:#fff; font-size:1rem; cursor:pointer; }
button:disabled { opacity:.5; cursor:default; }
button.secondary { background:#3a3d55; }
button.link { background:none; text-decoration:underline; padding:0 .3rem; }
.error { color:var(--danger); }
.code { letter-spacing:.3em; color:var(--accent); }
.players { list-style:none; padding:0; margin:0; }
.players li { padding:.4rem 0; border-bottom:1px solid #2c2f45; }
.big { font-size:2rem; text-align:center; margin:.3rem 0; }
.reveal { text-align:center; }
.reveal h1 { font-size:3rem; }
.impostor { color:var(--danger); }
.chat { min-height:200px; max-height:50vh; overflow-y:auto; background:#14151f; border-radius:8px; padding:.7rem; }
.chat .sys { opacity:.6; font-style:italic; }
.guess { display:flex; flex-direction:column; gap:.4rem; margin-top:.8rem; padding-top:.8rem; border-top:1px dashed #444; }
button.danger { background:var(--danger); }
.topbar nav { margin-left:auto; margin-right:1rem; display:flex; gap:1rem; }
.topbar nav a { color:var(--fg); text-decoration:none; }
.rank { width:100%; border-collapse:collapse; }
.rank th, .rank td { text-align:left; padding:.4rem .3rem; border-bottom:1px solid #2c2f45; }
.rank tr.me { color:var(--accent); font-weight:700; }
.tabs { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.tabs button { padding:.4rem .8rem; font-size:.9rem; }

.row { display:flex; justify-content:space-between; align-items:center; gap:.5rem; }
.row input { flex:1; }
.state { float:right; opacity:.8; font-size:.9rem; }
.invite { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; padding:.6rem; border:1px solid var(--accent); border-radius:8px; }
button.mini { padding:.2rem .5rem; font-size:.8rem; }
a { color:var(--accent); }

.cam { display:flex; flex-direction:column; gap:.5rem; }
.cam-video { width:100%; max-height:240px; border-radius:10px; background:#000; object-fit:cover; }
.cam-video.hidden { display:none; }
#cam-local { transform:scaleX(-1); }

/* Schwebender Chat */
.gchat-fab { position:fixed; left:1rem; bottom:1rem; z-index:1000; width:56px; height:56px; border-radius:50%; font-size:1.5rem; padding:0; box-shadow:0 4px 14px #0008; }
.gchat-badge { position:absolute; top:-4px; right:-4px; min-width:20px; height:20px; border-radius:10px; background:var(--danger); color:#fff; font-size:.75rem; line-height:20px; padding:0 5px; text-align:center; }
.gchat-badge.inline { position:static; display:inline-block; margin-left:.3rem; }
.gchat-panel { position:fixed; left:1rem; bottom:1rem; z-index:1000; width:min(380px, calc(100vw - 2rem)); height:min(520px, calc(100vh - 2rem)); display:flex; flex-direction:column; gap:.5rem; padding:.7rem; background:var(--card); border-radius:14px; box-shadow:0 8px 30px #000a; }
.gchat-head { display:flex; justify-content:space-between; align-items:center; gap:.5rem; }
.gchat-tabs { display:flex; gap:.4rem; flex-wrap:wrap; }
.gchat-tabs button { padding:.35rem .7rem; font-size:.85rem; }
.gchat-list { flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column-reverse; background:#14151f; border-radius:8px; padding:.6rem; }
.gchat-msg { margin-bottom:.5rem; word-break:break-word; }
.gchat-msg.mine strong { color:var(--accent); }
.gchat-time { opacity:.5; font-size:.75rem; margin-left:.3rem; }

/* Lobby-Einstellungen */
.settings { display:flex; flex-direction:column; gap:.4rem; padding:.7rem; background:#14151f; border-radius:8px; }
.cat { display:flex; align-items:center; gap:.5rem; cursor:pointer; }
.cat input { width:auto; }
.gchat-sys { margin-bottom:.5rem; text-align:center; font-style:italic; opacity:.7; font-size:.85rem; }

/* Profil-Icons */
.avatar { display:inline-block; position:relative; vertical-align:middle; text-align:center; overflow:hidden; flex:none; }
.avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.avatar.no-icon { width:64px; height:64px; line-height:64px; font-size:48px; }
.stats { display:flex; gap:1rem; flex-wrap:wrap; }
.stats div { flex:1; min-width:140px; background:#14151f; border-radius:8px; padding:.6rem; display:flex; flex-direction:column; }
.stats strong { font-size:1.6rem; }
.achv { display:flex; align-items:center; gap:.7rem; padding:.5rem; border-radius:8px; background:#14151f; }
.achv.locked { opacity:.5; filter:grayscale(1); }
.achv-text { flex:1; display:flex; flex-direction:column; }
.topbar .who { color:var(--fg); text-decoration:none; display:inline-flex; align-items:center; gap:.3rem; }

/* Online-Status */
.dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:.25rem; vertical-align:middle; background:#6b6f85; }
.dot.online { background:#3ddc84; box-shadow:0 0 5px #3ddc84aa; }
.dot.away { background:#f5b73b; }
