:root {
    --bg-color: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --option-bg: rgba(51, 65, 85, 0.5);
    --option-hover: rgba(51, 65, 85, 0.9);
    --option-selected: rgba(59, 130, 246, 0.2);
}

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

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

/* Background gradient blobs */
.glass-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15), transparent 60%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1), transparent 40%);
    z-index: -1;
    animation: blob-float 20s infinite alternate;
}

@keyframes blob-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    z-index: 10;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timer {
    font-weight: 500;
    color: var(--text-muted);
}
#time { color: var(--text-main); }

main {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

.hidden {
    display: none !important;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.q-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.q-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.question-body {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.option {
    background: var(--option-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.option:hover {
    background: var(--option-hover);
    transform: translateY(-2px);
}

.option.selected {
    background: var(--option-selected);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.option-prefix {
    font-weight: 600;
    margin-right: 1rem;
    color: var(--primary);
}

.navigation {
    display: flex;
    justify-content: space-between;
}

.nav-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
}

.nav-btn.primary:hover {
    background: var(--primary-hover);
}

/* Result Screen */
.result-card {
    text-align: center;
}
.result-card h2 { margin-bottom: 2rem; font-size: 2rem; }
.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    font-weight: 700;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}
.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.explanation-box {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: left;
}
.explanation-box h3 {
    color: #c4b5fd;
    margin-bottom: 0.5rem;
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    main {
        padding: 1.25rem;
    }
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    #q-tag {
        font-size: 0.75rem;
    }
    .option {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    .result-card h2 {
        font-size: 1.5rem;
    }
    .score-circle {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }
    .stats {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    .nav-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
