:root {
    --bg-color: #08080c;
    --card-bg: #11111a;
    --card-border: #1e1e2f;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --danger: #ef4444;
    --success: #10b981;
}

* {
    box-sizing: border-box; margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color); color: var(--text-main);
    min-height: 100vh; display: flex; justify-content: center; align-items: center; 
    padding: 1rem; overflow: hidden;
}

.game-container {
    width: 100%; max-width: 420px; background-color: var(--card-bg);
    border: 1px solid var(--card-border); border-radius: 32px;
    padding: 2rem; height: 85vh; max-height: 700px;
    display: flex; flex-direction: column; position: relative; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.screen {
    display: none; flex-direction: column; justify-content: space-between;
    height: 100%; opacity: 0; transition: opacity 0.3s ease;
}

.screen.active { display: flex; opacity: 1; }

.main-logo { 
    width: 110px; height: 110px; object-fit: contain; 
    border-radius: 22px; margin: 0 auto 1rem auto; display: block;
}

h1 span { color: var(--primary); text-shadow: 0 0 15px var(--primary-glow); }
.subtitle { text-align: center; color: var(--text-muted); font-size: 0.8rem; margin-bottom: 1rem; }

.btn {
    background: var(--primary); color: white; border: none; padding: 1rem;
    border-radius: 16px; font-weight: 700; cursor: pointer; width: 100%; 
    margin-bottom: 0.5rem; transition: all 0.2s;
}

.btn-secondary { background: rgba(255,255,255,0.03); border: 1px solid var(--card-border); color: var(--text-muted); padding: 1rem; border-radius: 16px; width: 100%; cursor: pointer; }

.btn-text {
    background: none; border: none; color: var(--primary); 
    font-weight: bold; cursor: pointer; width: 100%; padding: 10px;
}

.footer-info {
    text-align: center; padding-top: 1rem; margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.7rem; color: #333; letter-spacing: 1px;
}

.alert-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); display: none; justify-content: center;
    align-items: center; z-index: 10000; backdrop-filter: blur(5px);
}
.alert-box {
    background: var(--card-bg); border: 2px solid var(--primary);
    padding: 2rem; border-radius: 24px; width: 85%; max-width: 300px; text-align: center;
}

.timer-display { font-size: 4rem; font-weight: 900; text-align: center; color: var(--primary); margin: 0.5rem 0; }
.timer-controls { display: flex; justify-content: center; gap: 10px; margin-bottom: 1rem; }

.room-badge { background: #1a1a2e; padding: 10px; border-radius: 12px; text-align: center; font-size: 1.5rem; font-weight: bold; color: var(--primary); border: 1px dashed var(--primary); margin: 10px 0; letter-spacing: 4px; }

.setup-group { background: rgba(255,255,255,0.02); border: 1px solid var(--card-border); border-radius: 18px; padding: 1rem; margin-bottom: 1rem; }
.label-purple { color: var(--primary); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; display: block; margin-bottom: 8px; }

.num-selector { display: flex; justify-content: space-between; align-items: center; }
.btn-small { width: 45px; height: 45px; background: var(--card-border); border: none; color: white; border-radius: 12px; cursor: pointer; font-size: 0.9rem; }

.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1rem; }
.option-card { background: rgba(255,255,255,0.01); border: 1px solid var(--card-border); border-radius: 12px; padding: 0.8rem; text-align: center; cursor: pointer; font-size: 0.8rem; }
.option-card.selected { border-color: var(--primary); background: rgba(139, 92, 246, 0.1); }

.press-pad { width: 130px; height: 130px; border-radius: 50%; border: 4px dashed var(--primary); margin: 1rem auto; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; }
.press-pad.locked { border-color: #333; opacity: 0.4; cursor: not-allowed; }

.word-box { background: rgba(139, 92, 246, 0.03); border: 1px solid var(--card-border); border-radius: 18px; min-height: 90px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px; }

.scroll-area { max-height: 250px; overflow-y: auto; }
.vote-item { background: rgba(255,255,255,0.02); border: 1px solid var(--card-border); padding: 1rem; border-radius: 14px; margin-bottom: 0.5rem; cursor: pointer; display: flex; justify-content: space-between; }
.vote-item.selected { border-color: var(--danger); background: rgba(239, 68, 68, 0.05); }

.name-input-field { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--card-border); background: #0c0c14; color: white; text-align: center; margin-bottom: 8px; }
.code-input-field { width: 50%; padding: 12px; border-radius: 10px; border: 1px solid var(--card-border); background: #0c0c14; color: white; text-align: center; }
