/* =========================================================
   RESULT SCREEN
   WIN / LOSS
   Background artwork is supplied by the game.
   ========================================================= */

.result-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    min-height: 100vh;
    background: #080909;
}

.result-background {
    position: absolute;
    inset: 0;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.result-content {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.result-stats-panel {
    position: absolute;
    left: 50%;
    top: 58%;
    transform: translate(-50%, -50%);

    width: min(680px, 38vw);
    min-width: 0;

    padding: 28px 52px 26px;

    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 9px;

    background: rgba(8, 9, 9, 0.80);
    box-shadow:
        0 18px 55px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    color: #f5f5f5;
}

.result-stat-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;

    min-height: 44px;

    font-family:
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    font-size: 20px;
    font-weight: 650;
    letter-spacing: 1.5px;
}

.result-stat-row span {
    color: rgba(245, 245, 245, 0.88);
}

.result-stat-row strong {
    color: #ffffff;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 1px;
    text-align: right;
}

.result-score-row {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.result-actions {
    position: absolute;
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%);

    width: min(1290px, 67vw);

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 42px;

    pointer-events: auto;
}

.result-button {
    min-height: 51px;
    padding: 0 18px;

    border-radius: 6px;

    font-family:
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    font-size: 14px;
    font-weight: 850;
    letter-spacing: 1.5px;

    cursor: pointer;

    transition:
        transform 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease,
        color 160ms ease;
}

.result-button:hover {
    transform: translateY(-2px);
}

.result-button:active {
    transform: translateY(1px) scale(0.985);
}

.result-primary {
    background: #f5f5f5;
    color: #080909;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35);
}

.result-primary:hover {
    background: #ffffff;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.42);
}

.result-secondary {
    background: rgba(10, 11, 12, 0.48);
    color: #f5f5f5;

    border: 1px solid rgba(255, 255, 255, 0.62);
}

.result-secondary:hover {
    background: rgba(255, 255, 255, 0.10);
}

/* Keep the result composition usable on smaller screens. */
@media (max-width: 900px) {

    .result-stats-panel {
        top: 60%;
        width: min(630px, 70vw);
    }

    .result-actions {
        width: min(1100px, 88vw);
        gap: 12px;
        bottom: 8%;
    }

}

@media (max-width: 650px) {

    .result-stats-panel {
        top: 50%;
        width: min(330px, 82vw);
        min-width: 0;
        padding: 14px 20px;
    }

    .result-stat-row {
        min-height: 28px;
        font-size: 11px;
    }

    .result-stat-row strong {
        font-size: 12px;
    }

    .result-actions {
        width: 82vw;
        grid-template-columns: 1fr;
        gap: 7px;
        bottom: 3.5%;
    }

    .result-button {
        min-height: 42px;
        font-size: 12px;
    }

}
