:root {
    /* Refined Obsidian & Electric Palette */
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #a855f7;
    --accent: #00d2ff;
    --bg-dark: #020617;
    --glass: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-dim: #94a3b8;
    --success: #10b981;
    --error: #f43f5e;
    
    /* Advanced Shadows */
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.6), 
                      inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
}

/* Animated Mesh Gradient Background */
body::before {
    content: "";
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 20% 30%, #1e1b4b 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, #312e81 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, #0f172a 0%, transparent 100%);
    z-index: -1;
    animation: mesh-float 20s ease-in-out infinite alternate;
}

@keyframes mesh-float {
    0% { transform: translate(-10%, -10%) rotate(0deg); }
    100% { transform: translate(0%, 0%) rotate(5deg); }
}

/* Premium Glass Container */
.app {
    width: 92%;
    max-width: 480px;
    padding: 48px;
    border-radius: 32px;
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.app::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 70%);
    pointer-events: none;
}

h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 32px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

/* Sophisticated Inputs */
select, input {
    width: 100%;
    padding: 16px 20px;
    margin: 12px 0;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

select:focus, input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* High-End Interactive Buttons */
button {
    width: 100%;
    margin-top: 24px;
    padding: 18px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px -6px var(--primary-glow);
}

button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px -5px var(--primary-glow);
    filter: brightness(1.1);
}

button:active {
    transform: translateY(0) scale(0.98);
}

/* Quiz Mechanics & Progress */
.progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin: 24px 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#progressBar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary), var(--secondary));
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    border-radius: 20px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Luxurious Option Cards */
.option {
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    margin: 14px 0;
    border-radius: 18px;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.option:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary);
    transform: translateX(8px);
    box-shadow: -5px 5px 20px rgba(0,0,0,0.2);
}

.correct {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: var(--success) !important;
    color: var(--success);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.wrong {
    background: rgba(244, 63, 94, 0.15) !important;
    border-color: var(--error) !important;
    color: var(--error);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.2);
}

/* Results & Leaderboard */
.leaderboard {
    margin-top: 40px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--glass-border);
}

.leaderboard li {
    display: flex;
    justify-content: space-between;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    font-weight: 500;
}

.leaderboard li:last-child { border-bottom: none; }

.hidden { display: none; opacity: 0; pointer-events: none; }
