:root {
    --bg: #0f172a;
    /* slate-900 */
    --panel: #111827;
    /* gray-900 */
    --card: #0b1222;
    /* custom */
    --muted: #94a3b8;
    /* slate-400 */
    --text: #e5e7eb;
    /* gray-200 */
    --accent: #22d3ee;
    /* cyan-400 */
    --accent-2: #a78bfa;
    /* violet-400 */
    --danger: #ef4444;
    /* red-500 */
    --success: #22c55e;
    /* green-500 */
    --warning: #f59e0b;
    /* amber-500 */
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    background: radial-gradient(1200px 600px at 80% -10%, rgba(167, 139, 250, .25), transparent 60%),
        radial-gradient(800px 400px at -10% 20%, rgba(34, 211, 238, .20), transparent 60%),
        var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.app {
    width: min(940px, 100%);
}

.panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden
}

header {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(17, 24, 39, .6);
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center
}

.brand .logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #001018;
    font-weight: 800;
    background: conic-gradient(from 120deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 16px rgba(34, 211, 238, .35)
}

.brand h1 {
    font-size: 18px;
    letter-spacing: .5px;
    margin: 0
}

.toolbar {
    display: flex;
    gap: 10px;
    align-items: center
}

.pill {
    border: 1px solid rgba(255, 255, 255, .08);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
}


.content {
    padding: 28px;
    display: grid;
    gap: 22px;
}


.start {
    display: grid;
    gap: 22px;
    text-align: center;
    padding: 18px 10px 8px;
}

.start h2 {
    margin: 0;
    font-size: 28px
}

.start p {
    margin: 0;
    color: var(--muted)
}

.lengths {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px
}

.chip {
    cursor: pointer;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .03);
    transition: transform .08s ease, background .2s ease, border .2s ease;
}

.chip:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .2)
}

.chip[data-selected="true"] {
    background: linear-gradient(180deg, rgba(34, 211, 238, .14), rgba(167, 139, 250, .12));
    border-color: rgba(167, 139, 250, .35)
}


.btn {
    cursor: pointer;
    border: none;
    padding: 14px 18px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #08111a;
    font-weight: 700;
    letter-spacing: .4px;
    box-shadow: 0 10px 18px rgba(167, 139, 250, .25);
}

.btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
    box-shadow: none
}


.question-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    padding: 20px
}

.q-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px
}

.q-index {
    font-size: 13px;
    color: var(--muted)
}

.q-body {
    margin-top: 10px;
    font-size: 18px;
    line-height: 1.5
}


.options {
    display: grid;
    gap: 12px;
    margin-top: 14px
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .02);
    cursor: pointer;
    transition: transform .06s ease, background .2s ease, border .2s ease
}

.option:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .2)
}

.option input {
    margin-top: 3px
}

.option.correct {
    border-color: rgba(34, 197, 94, .6);
    background: rgba(34, 197, 94, .12)
}

.option.wrong {
    border-color: rgba(239, 68, 68, .6);
    background: rgba(239, 68, 68, .12)
}


.explain {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px
}


.progress {
    height: 10px;
    background: rgba(255, 255, 255, .06);
    border-radius: 999px;
    overflow: hidden
}

.progress>div {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    width: 0%
}


.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 4px
}


.score-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    font-size: 12px;
    color: var(--muted)
}


.result {
    display: grid;
    gap: 16px;
    text-align: center
}

.big-score {
    font-size: 42px;
    font-weight: 800
}

.grid {
    display: grid;
    gap: 12px
}

@media(min-width:720px) {
    .grid {
        grid-template-columns: 1fr 1fr
    }
}


.review {
    margin-top: 8px;
    text-align: left
}

details {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 12px
}

summary {
    cursor: pointer;
    font-weight: 600
}


.kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .06)
}