/* Premium Glassmorphism Design System - Desktop First */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    /* Core Palette - Deep Space */
    --bg-deep: #050511;
    --bg-surface: rgba(20, 20, 35, 0.4);
    --bg-surface-hover: rgba(30, 30, 50, 0.5);

    /* Neon Accents */
    --neon-primary: #7000ff;
    --neon-secondary: #00f0ff;
    --neon-accent: #ff0055;
    --neon-success: #00ff9d;
    --neon-warning: #ffbd00;
    --neon-error: #ff0055;

    /* Text Colors */
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --text-dim: #606070;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
    --gradient-glow: radial-gradient(circle at center, rgba(112, 0, 255, 0.4) 0%, rgba(0, 0, 0, 0) 70%);

    /* Glassmorphism */
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --backdrop-blur: blur(20px);

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;

    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Courier New', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(112, 0, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 240, 255, 0.1) 0%, transparent 40%),
        linear-gradient(rgba(5, 5, 17, 0.8), rgba(5, 5, 17, 0.8)),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

h1 {
    font-size: 5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(112, 0, 255, 0.3);
    margin-bottom: var(--space-lg);
}

h2 {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

h3 {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

p {
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    font-size: 1.2rem;
}

.container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: var(--space-xl);
    position: relative;
    z-index: 1;
}

.grid-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    min-height: 80vh;
}

.grid-dashboard {
    display: grid;
    grid-template-columns: 350px 1fr 350px;
    gap: var(--space-lg);
    height: calc(100vh - 2 * var(--space-xl));
    min-height: 800px;
}

.grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.card {
    background: var(--bg-surface);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: var(--space-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.card:hover {
    background: var(--bg-surface-hover);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 50px 0 rgba(0, 0, 0, 0.5);
}

.card-header {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(112, 0, 255, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(112, 0, 255, 0.6);
    transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 176, 155, 0.4);
}

.btn-full {
    width: 100%;
}

.btn-xl {
    padding: 1.5rem 3rem;
    font-size: 1.4rem;
}

.btn-lg {
    padding: 1.3rem 2.8rem;
    font-size: 1.3rem;
}

.grid-players {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-md);
}

.player-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.player-btn.selected {
    background: rgba(112, 0, 255, 0.2);
    border-color: var(--neon-primary);
    color: var(--neon-secondary);
    box-shadow: 0 0 25px rgba(112, 0, 255, 0.3);
}

.question-card {
    background: var(--bg-surface);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.question-text {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: var(--space-xl);
    font-weight: 600;
    line-height: 1.3;
}

.answer-btn {
    display: block;
    width: 100%;
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1.3rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.answer-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--neon-secondary);
    transform: translateX(10px);
}

.answer-btn.correct {
    background: rgba(0, 255, 157, 0.2);
    border-color: var(--neon-success);
    color: var(--neon-success);
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.3);
}

.answer-btn.incorrect {
    background: rgba(255, 0, 85, 0.2);
    border-color: var(--neon-error);
    color: var(--neon-error);
}

.timer {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon-warning);
    margin-bottom: var(--space-md);
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.3s linear;
    box-shadow: 0 0 15px var(--neon-primary);
}

.form-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1.2rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--neon-secondary);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.hidden {
    display: none !important;
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-xs {
    margin-bottom: var(--space-xs);
}

.w-full {
    width: 100%;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 17, 0.9);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--neon-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 10px currentColor;
        opacity: 1;
    }

    50% {
        box-shadow: 0 0 20px currentColor;
        opacity: 0.8;
    }
}

.connection-pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}