#game-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 235, 238, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Nunito', sans-serif;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 90%;
    width: 500px;
    border: 4px solid transparent;
}

.result-title {
    font-family: 'Lobster', cursive;
    font-size: 3em;
    color: #B71C1C;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.result-score {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
}

.badges-container {
    margin: 20px 0;
    min-height: 80px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.badge-item {
    font-size: 3em;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.buttons-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.result-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 150px;
    text-decoration: none;
    display: inline-block;
}

.result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-restart {
    background-color: #4CAF50;
}

.btn-stop {
    background-color: #F44336;
}

@media (max-width: 600px) {
    .result-title {
        font-size: 2em;
    }
    .result-score {
        font-size: 1.2em;
    }
    .result-card {
        padding: 20px;
        width: 90%;
    }
    .buttons-container {
        flex-direction: column;
        gap: 10px;
    }
    .result-btn {
        width: 100%;
    }
}
