:root {
    --card: #2A2A40;
    --text: #F5F5F7;
    --muted: #E4E4E7;
    --accent: #3B82F6;
    --correct: #22c55e;
    --wrong: #ef4444;
    --active: #7354bd;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(0deg,
            #2f265a 0%,
            #6247A3 50%,
            #8f51c5 100%);
    background-size: 100% 100vh;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    color: var(--text);
}

.wrap {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    text-align: center;
    margin: 0;
}

p.lead {
    text-align: center;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-top: 0.5rem;
}

.card {
    background-color: var(--card);
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.qtitle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.qnum {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.8rem;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

label.option {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

label.option:hover {
    background: rgba(255, 255, 255, 0.08);
}

input[type="radio"] {
    display: none;
}

input[type="radio"]:checked+label.option {
    background: var(--active);
    color: var(--text);
    font-weight: 600;
    transition: background 0.3s ease;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 1rem;
}

button {
    padding: 0.8rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 10px;
    width: 28%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), #2563eb);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #2563eb, #466bcf);
}

.result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
    background-color: var(--card);
}

.correct {
    color: var(--correct);
    font-weight: 700;
}

.wrong {
    color: var(--wrong);
    font-weight: 700;
}

.per-question-feedback {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

footer {
    text-align: center;
    font-size: 1.5rem;
    color: var(--muted);
    margin-top: 2rem;
    padding: 0 0 2rem 0;
}

@media (max-width: 768px) {
    .wrap {
        gap: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .controls {
        margin-top: 0.5rem;
        gap: 2rem;
    }

    button {
        width: 100%;
        text-align: center;
    }

    .controls {
        justify-content: center;
    }
}