:root {
    --bg: #0f0a1a;
    --card: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.12);
    --text: #f4f0ff;
    --muted: #a89bc4;
    --accent: #7c3aed;
    --accent2: #06b6d4;
    --success: #22c55e;
    --danger: #ef4444;
    --radius: 20px;
    --font: 'Outfit', system-ui, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124, 58, 237, 0.35), transparent),
        radial-gradient(ellipse 60% 40% at 90% 20%, rgba(6, 182, 212, 0.2), transparent),
        radial-gradient(ellipse 50% 30% at 50% 100%, rgba(236, 72, 153, 0.15), transparent);
    z-index: 0;
}

.top-bar {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 960px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.logo-icon { font-size: 1.5rem; }

.live-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-card, .players-card, .quiz-teaser {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    backdrop-filter: blur(12px);
}

.tag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent2);
    margin-bottom: 0.75rem;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.gradient-text {
    background: linear-gradient(135deg, #a78bfa, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.stat-box {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-box.accent {
    border-color: rgba(124, 58, 237, 0.5);
    background: rgba(124, 58, 237, 0.12);
}

.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-display);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted);
}

.players-card h2, .quiz-teaser h2 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.player-cloud {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 48px;
}

.player-cloud li {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(6, 182, 212, 0.2));
    border: 1px solid var(--border);
    font-size: 0.9rem;
    animation: popIn 0.35s ease;
}

.player-cloud li.admin {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}

.player-cloud li.admin::before { content: '👑 '; }

.empty-hint { color: var(--muted); font-style: italic; border: none !important; background: none !important; }

@keyframes popIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.fake-question {
    margin-top: 1rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
}

.q-label {
    font-size: 0.7rem;
    color: var(--accent2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.fake-question p { margin: 0.5rem 0 1rem; font-weight: 600; }

.options { display: flex; flex-direction: column; gap: 0.5rem; }

.opt {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    text-align: left;
    cursor: not-allowed;
}

.opt-correct { border-color: var(--success); color: var(--success); }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 89%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal-overlay.hidden { display: none; }

.modal {
    background: #1a1228;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.modal h2 { margin-bottom: 0.5rem; }
.modal p { color: var(--muted); margin-bottom: 1rem; font-size: 0.95rem; }

.modal input {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.modal input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
}

.btn-primary {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #5b21b6);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

.btn-primary:hover { filter: brightness(1.1); }

.admin-modal .warn {
    color: #fbbf24;
    font-size: 0.85rem;
}

.admin-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn-danger {
    padding: 0.9rem;
    border: none;
    border-radius: 12px;
    background: var(--danger);
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.btn-ghost {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.btn-link {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
}

.admin-floating-bar {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--danger);
    border-radius: 12px;
    font-size: 0.85rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.admin-floating-bar.hidden { display: none; }

.admin-floating-bar button {
    padding: 0.5rem 0.9rem;
    border: none;
    border-radius: 8px;
    background: var(--danger);
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.8rem;
}

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 600px) {
    .stats-row { grid-template-columns: 1fr; }
}
