:root {
    --bg: #0f172a; --card: #1e293b; --text: #f1f5f9; --muted: #94a3b8;
    --primary: #3b82f6; --accent: #0ea5e9; --danger: #ef4444; --ok: #22c55e;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; }

.hidden { display: none !important; }
.view { height: 100%; width: 100%; display: flex; flex-direction: column; }
.container-center { margin: auto; padding: 20px; width: 100%; max-width: 400px; text-align: center; }

/* Layout */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; background: rgba(0,0,0,0.2); }
.brand { font-weight: 800; letter-spacing: 1px; }

.game-container { flex: 1; display: flex; flex-direction: column; padding: 15px; max-width: 600px; margin: 0 auto; width: 100%; }

/* Scoreboard */
.score-board { display: flex; gap: 10px; background: rgba(255,255,255,0.1); padding: 5px; border-radius: 20px; }
.team { padding: 5px 12px; font-weight: bold; cursor: pointer; user-select: none; }
.team:active { opacity: 0.7; }

/* Controls */
.controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.timer-display { font-size: 40px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text); }
.timer-display.warn { color: var(--danger); animation: pulse 0.5s infinite; }

/* Card Area */
.card-area { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: center; overflow-y: auto; }
.card-row { background: var(--card); padding: 15px; border-radius: 12px; display: flex; align-items: center; border: 1px solid rgba(255,255,255,0.05); }
.cat-label { width: 80px; font-size: 11px; text-transform: uppercase; color: var(--accent); font-weight: bold; }
.word-text { font-size: 20px; font-weight: 500; }
.placeholder { text-align: center; color: var(--muted); padding: 40px; border: 2px dashed rgba(255,255,255,0.1); border-radius: 20px; }

/* Inputs */
.input { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: white; padding: 12px; border-radius: 10px; font-size: 16px; margin-bottom: 10px; outline: none; }
.input:focus { border-color: var(--primary); }
.btn { border: none; padding: 12px 20px; border-radius: 12px; font-weight: bold; cursor: pointer; font-size: 16px; transition: 0.2s; background: rgba(255,255,255,0.1); color: white; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-xl { flex: 2; padding: 18px; font-size: 18px; text-transform: uppercase; letter-spacing: 1px; }
.btn-secondary { flex: 1; }
.action-bar { display: flex; gap: 10px; margin-top: auto; padding-top: 15px; }
.btn-full { width: 100%; }

/* FAB */
.fab { position: fixed; bottom: 90px; right: 20px; width: 56px; height: 56px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 10px 20px rgba(0,0,0,0.3); cursor: pointer; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(5px); }
.modal-content { width: 90%; max-width: 400px; background: var(--card); padding: 20px; border-radius: 20px; }
.check-label { display: flex; gap: 10px; align-items: center; margin: 15px 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

@keyframes pulse { 50% { opacity: 0.5; } }