:root {
    --bg: #0f1724;
    --card: #0b1220;
    --muted: #94a3b8;
    --accent: #7c3aed;
    --success: #16a34a;
    --danger: #ef4444;
    --glass: rgba(255, 255, 255, 0.03);
    --radius: 14px;
    --gap: 16px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color-scheme: dark;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 36, 1) 0%, rgba(5, 7, 12, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    font-size: 16px;
    color: #e6eef8;
    padding-top: 40px;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 900px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: calc(var(--radius) + 6px);
    padding: 26px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(6px);
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.title {
    display: flex;
    gap: 14px;
    align-items: center;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: white;
    font-size: 18px;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.18);
}

h1 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.2px;
}

p.sub {
    margin: 0;
    color: var(--muted);
    font-size: 13px
}

.progress-wrap {
    margin-top: 10px;
}

.progress {
    height: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    overflow: hidden;
}

.progress>i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #4f46e5);
    width: 0%;
    border-radius: 999px;
    transition: width 380ms cubic-bezier(.2, .9, .2, 1);
}

main {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    margin-top: 22px;
}

.card {
    background: var(--card);
    border-radius: 12px;
    padding: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.01);
}

.question-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.q-number {
    font-size: 13px;
    color: var(--muted);
}

.q-text {
    font-size: 20px;
    line-height: 1.35;
    margin: 12px 0 18px 0;
    min-height: 62px;
    color: #e6eef8;
}

.options {
    display: grid;
    gap: 10px;
}

.option {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease;
    user-select: none;
}

.option:hover {
    transform: translateY(-3px)
}

.option .label {
    min-width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 14px;
}

.option .text {
    color: #e6eef8;
    font-size: 15px
}

.option.disabled {
    opacity: 0.7;
    cursor: default;
    transform: none
}

.option.correct {
    border: 1px solid rgba(22, 163, 74, 0.14);
    background: linear-gradient(90deg, rgba(22, 163, 74, 0.12), rgba(22, 163, 74, 0.06));
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.04);
}

.option.wrong {
    border: 1px solid rgba(239, 68, 68, 0.12);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.03));
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.03);
}

.controls {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    align-items: center;
}

.btn {
    background: transparent;
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.btn.primary {
    background: linear-gradient(90deg, var(--accent), #4f46e5);
    color: white;
    border: none;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.12);
}

.btn.ghost {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.03);
    color: var(--muted);
}

.meta {
    font-size: 13px;
    color: var(--muted);
}

/* right column */
.side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary {
    padding: 14px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.005));
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: var(--muted)
}

.stat-big {
    font-size: 20px;
    font-weight: 700;
    color: #e6eef8
}

.final-screen {
    display: none;
    text-align: center;
    padding: 28px;
}

.final-screen.show {
    display: block
}

footer {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 13px
}

@media (max-width:880px) {
    main {
        grid-template-columns: 1fr;
    }

    .side {
        order: 2
    }
}

@media (max-width: 400px){
    body{padding: 20px;}
    .container{padding: 20px;}
    .question-top > .meta{display: none;}
    .q-text{font-size: 18px;margin-bottom: 12px;}
    aside .card:nth-child(2) div .diff {display: none;}
}

/* small accessibility focus */
.option:focus {
    outline: 3px solid rgba(124, 58, 237, 0.12);
}

.myhidden{
    display: none;
}