:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #f472b6;
    --bg-dark: #0f172a;
    --bg-dark-soft: #1e293b;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
}

.bg-dark-premium {
    background: radial-gradient(circle at 0% 0%, #1e1b4b 0%, #0f172a 50%, #020617 100%);
    background-attachment: fixed;
}

.bg-glass {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
}

.bg-dark-soft {
    background: var(--bg-dark-soft);
}

.border-bottom-glass {
    border-bottom: 1px solid var(--glass-border);
}

.border-start-glass {
    border-left: 1px solid var(--glass-border);
}

.text-gradient {
    background: linear-gradient(135deg, #a5b4fc 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-gradient-primary {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.glass.bg-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.bg-glass-dark {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.border-top-glass {
    border-top: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 768px) {
    .glass-card {
        padding: 1.5rem !important;
        border-radius: 16px;
    }
}

.btn-premium {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
}

.timer-display {
    background: rgba(244, 114, 182, 0.15);
    color: var(--accent);
    padding: 8px 20px;
    border-radius: 12px;
    font-family: monospace;
    font-size: 1.25rem;
    font-weight: 700;
    border: 1px solid rgba(244, 114, 182, 0.3);
}

.option-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 12px !important;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.type-badge {
    background: var(--primary-gradient);
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
}

@media (max-width: 768px) {
    .option-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    #question-text {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
}

.option-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateX(8px);
    border-color: var(--primary-light) !important;
}

.option-item.selected {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: var(--primary) !important;
    box-shadow: inset 0 0 0 1px var(--primary);
}

.option-item input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.result-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle at center, var(--primary-dark), var(--bg-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--primary);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

.score-display {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
}

.summary-item {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    transition: background 0.2s;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.correct { border-left: 5px solid var(--success); }
.summary-item.wrong { border-left: 5px solid var(--error); }

.correct-badge {
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.wrong-badge {
    color: var(--error);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.bg-success-glass {
    background: rgba(16, 185, 129, 0.2) !important;
}

.bg-danger-glass {
    background: rgba(239, 68, 68, 0.2) !important;
}

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.shadow-inner {
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-dark-soft);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

@media (max-width: 768px) {
    .navbar {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    .timer-display {
        padding: 6px 15px !important;
        font-size: 0.85rem !important;
    }
    .progress-info {
        font-size: 0.8rem !important;
    }
}

.preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0a0c;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.preloader-content {
    margin: 0;
    padding: 0;
}

.btn-outline-premium-soft {
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    font-weight: 500;
}

.btn-outline-premium-soft:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-check:checked + .btn-outline-premium-soft {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(244, 114, 182, 0.2) 100%);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.hover-white:hover {
    color: white !important;
    transition: color 0.2s ease;
}

.summary-item, .summary-item *, .result-circle, .result-circle *, #summary-container, #summary-container * {
    color: white !important;
}

.correct-badge { color: var(--success) !important; }
.wrong-badge { color: var(--error) !important; }

.hover-white:hover {
    color: white !important;
}

.custom-switch {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.custom-switch:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.border-glass-light {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tiny {
    font-size: 0.6rem;
    font-weight: 800;
}

.bg-dark-soft-dark {
    background: rgba(0, 0, 0, 0.2);
}

.bg-success-dark-soft {
    background: rgba(16, 185, 129, 0.1);
}

.text-success-light {
    color: #34d399;
}

.border-success-glass {
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.shuffle-slot-large {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: white;
    font-size: 2rem;
    transition: all 0.1s ease;
    box-shadow: 0 0 20px rgba(165, 180, 252, 0.1);
}

.shuffle-slot-large.bump {
    transform: scale(1.1);
    background: rgba(165, 180, 252, 0.2);
    border-color: var(--premium-start);
    color: var(--premium-start);
    box-shadow: 0 0 30px rgba(165, 180, 252, 0.3);
}

.fade-out {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tracking-wider { letter-spacing: 2px; }
