.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-in;
}

.death-popup {
    background: linear-gradient(to bottom, #1a1a1a, #2d2d2d);
    border: 3px solid #8b0000;
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    color: #fff;
    text-align: center;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
    position: relative;
    animation: slideIn 0.5s ease-out;
}

.death-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="90">💀</text></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 150px;
    opacity: 0.1;
    pointer-events: none;
}

.death-popup h2 {
    color: #ff3333;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Creepster', cursive;
}

.new-record {
    color: #ffcc00;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    margin: 10px 0;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.death-popup p {
    margin: 15px 0;
    font-size: 1.2em;
    line-height: 1.4;
    color: #cccccc;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.leaderboard {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #8b0000;
    border-radius: 5px;
}

.leaderboard h3 {
    color: #ff6666;
    font-size: 1.5em;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    margin: 5px 0;
    background: rgba(139, 0, 0, 0.2);
    border-radius: 3px;
}

.leaderboard-entry:nth-child(1) {
    background: rgba(255, 215, 0, 0.2);
}

.leaderboard-entry span {
    color: #cccccc;
}

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

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@font-face {
    font-family: 'Creepster';
    src: url('https://fonts.googleapis.com/css2?family=Creepster&display=swap');
}

/* Estilo do botão para continuar após a morte */
.death-popup .death-continue {
    background-image: linear-gradient(to right, #9b4a4a 0%, #6b2a2a 51%, #9b4a4a 100%);
    border: 2px solid #8b3d3d;
    width: 90%;
    max-width: 300px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.death-popup .death-continue:hover {
    background-position: right center;
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(155, 74, 74, 0.4);
}

.death-popup .death-continue:active {
    transform: scale(0.98) translateY(2px);    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);}

/* Anúncio interno exibido em popups */
.popup-ad {
    margin-top: 20px;
    text-align: center;
}

.popup-ad iframe {
    width: 160px;
    height: 600px;
}
