/* Main menu (Learn / Test hub) */
.main-menu {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 24px;
    overflow: hidden;
}

.main-menu__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.main-menu__blob--1 {
    width: 320px;
    height: 320px;
    top: -80px;
    inset-inline-start: -100px;
    background: radial-gradient(circle, var(--color-accent), transparent 70%);
}

.main-menu__blob--2 {
    width: 260px;
    height: 260px;
    bottom: -60px;
    inset-inline-end: -80px;
    background: radial-gradient(circle, var(--color-primary), transparent 70%);
}

.main-menu__title {
    position: relative;
    z-index: 1;
    font-size: 28px;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.main-menu__cards {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.main-menu__card {
    width: 160px;
    height: 160px;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.main-menu__card:hover {
    box-shadow: var(--shadow-lifted);
    transform: translateY(-3px);
}

.main-menu__icon {
    font-size: 48px;
    display: inline-block;
    animation: icon-float 3s ease-in-out infinite;
}

.main-menu__card:nth-child(2) .main-menu__icon {
    animation-delay: 0.4s;
}

@keyframes icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
    .main-menu__icon {
        animation: none;
    }
}

.main-menu__label {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary-dark);
}

/* Test run screen */
.test-run__stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin: 0 20px 20px;
    padding: 32px 20px;
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow);
    min-height: 420px;
}

.test-run__prompt-icon,
.test-run__prompt-count {
    position: relative;
    display: inline-block;
}

.test-run__prompt-icon {
    font-size: 72px;
}

.test-run__prompt-count {
    font-size: 40px;
    letter-spacing: 8px;
}

.test-run__replay-badge {
    position: absolute;
    bottom: -4px;
    right: -8px;
    font-size: 22px;
    background: var(--color-surface);
    border-radius: 50%;
    box-shadow: var(--shadow);
    padding: 4px;
    line-height: 1;
    pointer-events: none;
}

.test-run__choices {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.test-choice {
    min-width: 96px;
    min-height: 96px;
    padding: 12px 20px;
    background: var(--color-bg);
    border: 2px solid transparent;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.test-choice:hover:not(:disabled) {
    background: #fff;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.test-choice__icon {
    font-size: 36px;
}

.test-choice--correct {
    border-color: var(--color-success);
    background: #eef4ef;
    animation: choice-correct 0.3s ease-out;
}

.test-choice--wrong {
    border-color: #b5544a;
    background: #f6e9e7;
    animation: choice-wrong 0.3s ease-out;
}

@keyframes choice-correct {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes choice-wrong {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

@media (prefers-reduced-motion: reduce) {
    .test-choice--correct, .test-choice--wrong {
        animation: none;
    }
}

/* Test results */
.test-results {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 32px 20px;
}

.test-results__card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    text-align: center;
    min-width: 260px;
    animation: results-in 0.35s ease-out;
}

.test-results__title {
    font-size: 18px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.test-results__fraction {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary-dark);
}

.test-results__percent {
    font-size: 22px;
    font-weight: 600;
    margin: 4px 0 16px;
}

.test-results__breakdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.test-results__performance {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.test-results__return {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 22px;
    box-shadow: var(--shadow);
}

.test-results__return:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-lifted);
}

@keyframes results-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.test-results__weak {
    max-width: 360px;
    width: 100%;
}

.test-results__weak-title {
    font-size: 16px;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 12px;
}

@media (max-width: 360px) {
    .main-menu__card {
        width: 140px;
        height: 140px;
    }

    .test-run__prompt-count {
        letter-spacing: 4px;
    }

    .test-results__card {
        padding: 28px 20px;
    }
}

.test-results__weak-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.weak-item {
    background: var(--color-surface);
    border-radius: 999px;
    padding: 10px 18px;
    box-shadow: var(--shadow);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.weak-item:hover {
    background: var(--color-accent);
    color: #fff;
    box-shadow: var(--shadow-lifted);
}
