/* PWA Client — AntiGravity Quiz */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0a0a0a;
    --surface: #1a1a2e;
    --accent: #ff6b35;
    --accent-glow: rgba(255, 107, 53, 0.3);
    --text: #e0e0e0;
    --text-dim: #888;
    --success: #00c853;
    --danger: #ff1744;
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

h1 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 24px;
    text-align: center;
}

/* Screens */
.pwa-screen {
    display: none;
    width: 100%;
    max-width: 400px;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pwa-screen.active { display: flex; }

/* Timer */
.pwa-timer {
    position: fixed;
    top: 40px;
    right: 16px;
    background: var(--surface);
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    padding: 8px 16px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    z-index: 99;
}

.pwa-timer.hidden { display: none; }

/* Test steps */
.test-step { width: 100%; text-align: center; }
.test-step.hidden { display: none; }
.btn-large { font-size: 1.3rem; padding: 20px; }

/* Forms */
.form-group {
    width: 100%;
}

.form-group label {
    display: block;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid #333;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent);
}

textarea { resize: vertical; min-height: 60px; }

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { transform: scale(0.98); }

.btn-buzzer {
    background: var(--danger);
    color: #fff;
    font-size: 1.5rem;
    padding: 40px;
    border-radius: 50%;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(255, 23, 68, 0.4);
    animation: pulse 1.5s infinite;
}

.btn-buzzer:active {
    transform: scale(0.95);
    box-shadow: 0 0 60px rgba(255, 23, 68, 0.8);
}

.btn-buzzer.disabled {
    opacity: 0.3;
    pointer-events: none;
    animation: none;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 23, 68, 0.4); }
    50% { box-shadow: 0 0 50px rgba(255, 23, 68, 0.6); }
}

/* Vote options */
.vote-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.btn-vote {
    padding: 20px;
    background: var(--surface);
    border: 2px solid #333;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-vote:hover { border-color: var(--accent); }
.btn-vote.selected {
    border-color: var(--accent);
    background: var(--accent-glow);
}

/* Score display */
.score-display {
    text-align: center;
    padding: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    width: 100%;
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
}

.score-rank {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Status */
.status-msg {
    text-align: center;
    color: var(--text-dim);
    font-size: 1.1rem;
    padding: 40px 20px;
}

.connection-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    margin-right: 6px;
}

.connection-dot.connected { background: var(--success); }

.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 8px 16px;
    background: var(--surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    z-index: 100;
}
