/* Quiz Game - Player View Styles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&display=swap');

:root {
    --primary-dark: #0f0c29;
    --primary-mid: #302b63;
    --primary-light: #24243e;
    --accent-cyan: #00d4ff;
    --accent-pink: #ff00ff;
    --accent-gold: #fbc02d;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 50%, var(--primary-light) 100%);
    color: white;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
}

.glow-btn {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

.glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.5);
}

.glow-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.screen {
    display: none;
}

.screen.active {
    display: flex;
}

.waiting-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.spin-loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-cyan);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.ans-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.ans-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.ans-btn.correct {
    background: linear-gradient(135deg, #1b5e20, #2e7d32) !important;
    border-color: #4caf50 !important;
}

.ans-btn.wrong {
    background: linear-gradient(135deg, #b71c1c, #c62828) !important;
    border-color: #f44336 !important;
}

.timer-circle {
    transition: stroke-dashoffset 1s linear;
}

input:focus {
    outline: none;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* Countdown overlay */
.countdown-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 12, 41, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 200;
}

.countdown-overlay.active {
    display: flex;
}

.countdown-number {
    font-size: 15rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* Connection Status Badge - Glassmorphism Design */
.connection-badge {
    position: fixed;
    top: 12px;
    right: 12px;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 600;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-10px);
}

.connection-badge.show {
    opacity: 1;
    transform: translateY(0);
}

.connection-badge .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.connection-badge.connected {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.connection-badge.connected .status-dot {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: dot-pulse 2s ease-in-out infinite;
}

.connection-badge.reconnecting {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.3);
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.2);
}

.connection-badge.reconnecting .status-dot {
    background: #eab308;
    box-shadow: 0 0 8px #eab308;
    animation: dot-spin 1s linear infinite;
}

.connection-badge.disconnected {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.connection-badge.disconnected .status-dot {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

@keyframes dot-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

@keyframes dot-spin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(0.8);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}