:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --success: #22c55e;
    --error: #ef4444;
    --success-bg: rgba(34, 197, 94, 0.2);
    --error-bg: rgba(239, 68, 68, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0, transparent 50%), 
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.1) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container { width: 100%; max-width: 800px; }

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 48px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: cardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardAppear {
    from { opacity: 0; transform: scale(0.98) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

header { text-align: center; margin-bottom: 40px; }

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a5b4fc 0%, #d8b4fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.subtitle { color: var(--text-dim); font-size: 1.1rem; }

.view { display: none; }
.view.active { display: block; animation: viewIn 0.4s ease-out; }

@keyframes viewIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.progress-bar-bg {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 0 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 15px var(--primary-glow);
}

.counter { font-size: 0.9rem; font-weight: 600; color: var(--text-dim); }

.question-text {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 40px;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.options-grid { display: grid; gap: 16px; }

.option-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 20px 24px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    position: relative;
}

.option-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(8px);
}

.option-item.correct {
    background: var(--success-bg);
    border-color: var(--success);
    color: #4ade80;
}

.option-item.wrong {
    background: var(--error-bg);
    border-color: var(--error);
    color: #f87171;
}

.option-item.disabled {
    pointer-events: none;
    opacity: 0.8;
}

.score-display {
    font-size: 6rem;
    font-weight: 800;
    margin: 20px 0;
    color: var(--primary);
    text-shadow: 0 0 40px var(--primary-glow);
    text-align: center;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px 48px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px var(--primary-glow);
    margin-top: 20px;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 30px -10px var(--primary-glow);
    background: #4f46e5;
}

.empty-state { text-align: center; padding: 40px; color: var(--text-dim); }

@media (max-width: 640px) {
    .glass-card { padding: 32px 24px; }
    h1 { font-size: 1.8rem; }
    .question-text { font-size: 1.3rem; }
    .option-item { font-size: 1rem; padding: 16px; }
}