* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #111; color: #eee; font-family: 'Segoe UI', Arial, sans-serif; height: 100vh; display: flex; align-items: center; justify-content: center; }
.auth-wrap { width: 380px; background: #1a1a2e; border: 1px solid #333; border-radius: 10px; padding: 36px 32px; box-shadow: 0 8px 32px rgba(0,0,0,0.6); }
.auth-wrap h1 { text-align: center; font-size: 2rem; letter-spacing: 2px; margin-bottom: 4px; }
.auth-wrap .tagline { text-align: center; font-size: 0.8rem; color: #888; margin-bottom: 28px; }
.tab-bar { display: flex; gap: 8px; margin-bottom: 22px; }
.tab-btn { flex: 1; padding: 8px; background: #252540; border: 1px solid #444; border-radius: 6px; color: #aaa; cursor: pointer; font-size: 0.9rem; transition: all 0.2s; }
.tab-btn.active { background: #3a3a7a; border-color: #6666cc; color: #fff; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.78rem; color: #aaa; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
.form-group input { width: 100%; padding: 10px 12px; background: #252540; border: 1px solid #444; border-radius: 6px; color: #fff; font-size: 0.95rem; outline: none; transition: border-color 0.2s; }
.form-group input:focus { border-color: #6666cc; }
.team-select { display: flex; gap: 10px; }
.team-btn { flex: 1; padding: 10px; border: 2px solid #444; border-radius: 6px; cursor: pointer; font-size: 0.9rem; font-weight: bold; transition: all 0.2s; background: #252540; color: #aaa; }
.team-btn.rep { border-color: #993333; color: #ff6666; }
.team-btn.dem { border-color: #334499; color: #6699ff; }
.team-btn.rep.active { background: #441111; color: #ff4444; border-color: #ff4444; }
.team-btn.dem.active { background: #111444; color: #4488ff; border-color: #4488ff; }
.submit-btn { width: 100%; padding: 12px; margin-top: 8px; background: #4444aa; border: none; border-radius: 6px; color: #fff; font-size: 1rem; font-weight: bold; cursor: pointer; letter-spacing: 1px; transition: background 0.2s; }
.submit-btn:hover { background: #5555cc; }
.err-msg { color: #ff6666; font-size: 0.85rem; margin-top: 12px; text-align: center; min-height: 20px; }

#game-root { width: 100vw; height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: #0a0a14; }
#hud { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; background: #111122; border-bottom: 1px solid #333; flex-shrink: 0; gap: 12px; }
.hud-score { font-size: 1.1rem; font-weight: bold; min-width: 140px; }
.hud-score.rep { color: #ff5555; }
.hud-score.dem { color: #5588ff; }
#hud-timer { font-size: 1.3rem; font-weight: bold; color: #ffdd44; letter-spacing: 2px; text-align: center; flex: 1; }
#hud-phase { font-size: 0.75rem; color: #888; text-align: center; }
.hud-right { display: flex; gap: 8px; align-items: center; }
.hud-btn { padding: 5px 10px; background: #252540; border: 1px solid #555; border-radius: 5px; color: #ccc; cursor: pointer; font-size: 0.78rem; transition: background 0.2s; }
.hud-btn:hover { background: #333360; }
.hud-btn.voice-on { background: #114411; border-color: #44aa44; color: #66dd66; }

#canvas-wrap { flex: 1; overflow: hidden; position: relative; }
#canvas-wrap canvas { display: block; }

#chat-panel { position: absolute; bottom: 12px; left: 12px; width: 300px; background: rgba(10,10,20,0.85); border: 1px solid #333; border-radius: 8px; display: flex; flex-direction: column; max-height: 220px; z-index: 10; }
#chat-messages { flex: 1; overflow-y: auto; padding: 8px; font-size: 0.78rem; max-height: 160px; }
#chat-messages .msg { margin-bottom: 4px; line-height: 1.3; }
#chat-messages .msg .who { font-weight: bold; }
#chat-messages .msg.rep .who { color: #ff7777; }
#chat-messages .msg.dem .who { color: #7799ff; }
#chat-messages .msg.system { color: #aaa; font-style: italic; }
#chat-input-row { display: flex; border-top: 1px solid #333; }
#chat-input { flex: 1; background: transparent; border: none; color: #eee; padding: 6px 8px; font-size: 0.82rem; outline: none; }
#chat-scope { background: #1a1a2e; border: none; border-left: 1px solid #333; color: #aaa; padding: 4px 6px; font-size: 0.75rem; cursor: pointer; outline: none; }

#overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); display: flex; align-items: center; justify-content: center; z-index: 100; }
#overlay.hidden { display: none; }
.overlay-box { background: #1a1a2e; border: 1px solid #555; border-radius: 12px; padding: 40px 50px; text-align: center; max-width: 420px; }
.overlay-box h2 { font-size: 2rem; margin-bottom: 12px; }
.overlay-box .sub { color: #aaa; font-size: 0.9rem; margin-bottom: 20px; }
.overlay-box .scores { font-size: 1.1rem; margin-bottom: 16px; }
.overlay-box .win-rep { color: #ff5555; }
.overlay-box .win-dem { color: #5588ff; }
