.result-screen.overlay-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(
        135deg,
        #cfd8e7,
        #a3b8dc
    );
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Poppins", sans-serif;
    z-index: 999999;
    padding: 3px;
    overflow-y: auto;

    background-color: #09103f;
    background-image: url("/client/assets/images/bg/result_bg_portrait.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (orientation: landscape) {
    .result-screen.overlay-screen {
        background-image: url("/client/assets/images/bg/result_bg_landscape.jpg");
    }
}

.result-card {
    background: #ffffff;
    color: #0a2a43;
    padding: 5px;
    border-radius: 16px;
    max-width: 650px;
    width: 100%;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);

    /*
     * Same smooth entrance animation
     * used by ReviewScene.
     */
    animation: cardEnter 420ms ease-out forwards;
}

.result-card h2 {
    font-family: "Sora", sans-serif;
    text-align: center;
    margin-bottom: 20px;
}

.meta-row {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 15px;
    font-size: 16px;
}

.meta-row .meta {
    width: 33.33%;
}

.meta-row .meta .label {
    font-family: "Inter", sans-serif;
    font-size: 0.95rem;
    color: #666;
    text-align: center;
    margin-bottom: 4px;
}

.meta-row .meta .meta-value {
    font-family: "Chakra", sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: #0a2a43;
    text-align: center;
}

.summary-grid {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.summary-item {
    text-align: center;
}

.summary-item .label {
    font-family: "Inter", sans-serif;
    font-size: 0.95rem;
    color: #666;
}

.summary-item .value {
    font-family: "Chakra", sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
}

.summary-item .value.correct {
    color: #0b6bd6;
}

.summary-item .value.wrong {
    color: #d64545;
}

.summary-item .value.skipped {
    color: #888;
}

.summary-item .value.score {
    color: #0b6bd6;
}

.result-score {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.score-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #0b6bd6;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 12px;
}

.result-grade .letter {
    font-family: "Chakra", sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.result-grade .message {
    color: #555;
    margin-top: 6px;
}

/* ============================================================
   RESULT BUTTONS
   ============================================================ */

.result-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.result-buttons button {
    width: 100%;
    min-height: 56px;
    box-sizing: border-box;

    padding: 10px 12px;

    font-family: "Sora", sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.2px;

    border-radius: 12px;
    border: none;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        filter 0.15s ease;

    -webkit-tap-highlight-color: transparent;
}

.result-buttons button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.result-buttons button:active {
    transform: translateY(0);
}

.result-buttons .btn-retry {
    background: #0a2a43;
    color: #ffffff;
}

.result-buttons .btn-review {
    background: #00d590;
    color: #ffffff;
}

.result-buttons .btn-secondary {
    background: #ffffff;
    color: #0a2a43;
    border: 2px solid #0a2a43;
}

/* ============================================================
   SMALL SCREENS
   ============================================================ */

@media (max-width: 600px) {
    .result-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 7px;
    }

    .result-buttons button {
        min-height: 54px;
        padding: 9px 6px;
        font-size: 12px;
        line-height: 1.2;
        letter-spacing: 0;
    }
}

@media (max-width: 380px) {
    .result-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    .result-buttons button {
        min-height: 52px;
        padding: 8px 4px;
        font-size: 11px;
        line-height: 1.15;
    }
}

/* ============================================================
   ANIMATION
   ============================================================ */

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}