.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
    backdrop-filter: blur(5px);
    perspective: 1000px;
}

.start-popup {
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border: 3px solid #8b0000;
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    color: #fff;
    text-align: center;
    box-shadow: 0 0 30px rgba(139, 0, 0, 0.7), 0 0 60px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: cardFlip 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto auto;
    grid-gap: 25px;
}

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

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



.start-popup::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0.6;
    pointer-events: none;
    animation: rotateGradient 15s linear infinite;
}

.start-popup h2 {
    font-size: 2.8em;
    margin-bottom: 25px;
    position: relative;
    animation: textGlow 2s infinite alternate;
    letter-spacing: 2px;
}

.zombway-logo {
    font-family: 'Creepster', cursive;
    color: #ccff00; /* Um verde radioativo */
    text-shadow: 0 0 5px rgba(204, 255, 0, 0.5), 0 0 15px rgba(204, 255, 0, 0.8), 0 0 25px rgba(204, 255, 0, 0.6);
    /* Outros estilos se necessário */
}

.start-popup h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, rgba(139, 0, 0, 0) 0%, rgba(139, 0, 0, 0.8) 50%, rgba(139, 0, 0, 0) 100%);
}

.start-popup p {
    margin: 18px 0;
    font-size: 1.2em;
    line-height: 1.5;
    color: #dddddd;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    opacity: 0;
    animation: fadeInText 0.5s forwards;
    animation-delay: 0.5s;
}

.popup-content {
    display: flex;
    flex-direction: row;
    gap: 30px;
    margin: 20px 0;
    perspective: 1000px;
    opacity: 0;
    animation: fadeInContent 0.5s forwards;
    animation-delay: 0.8s;
}

@keyframes fadeInContent {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.button-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 220px;
}

.button-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 10px 0;
    perspective: 1000px;
    opacity: 0;
    animation: fadeInButtons 0.5s forwards;
    animation-delay: 0.8s;
    justify-items: center;
    align-items: center;
}

.start-button {
    padding: 16px 32px;
    font-size: 1.2em;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    width: 100%;
    max-width: 220px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: 200% auto;
    background-position: left center;
}

.start-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 80%);
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: rotate(30deg);
    pointer-events: none;
}

.start-button:hover::before {
    opacity: 1;
}

.new-game {
    background-image: linear-gradient(to right, #4a9b4a 0%, #2a6b2a 51%, #4a9b4a 100%);
    border: 2px solid #3d8b3d;
}

.new-game: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(74, 155, 74, 0.4);
}

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

.hardcore {
    background-image: linear-gradient(to right, #9b4a4a 0%, #6b2a2a 51%, #9b4a4a 100%);
    border: 2px solid #8b3d3d;
}

.hardcore: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);
}

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

.login {
    background-image: linear-gradient(to right, #4a6b9b 0%, #2a4b6b 51%, #4a6b9b 100%);
    border: 2px solid #3d5d8b;
}

.login: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(74, 107, 155, 0.4);
}

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

.instructions {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    animation: fadeInInstructions 0.5s forwards;
    animation-delay: 1s;
}

.instructions p {
    margin: 8px 0;
    font-size: 1.1em;
    color: #aaaaaa;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.popup-footer {
    margin-top: 20px;
    border-top: 1px solid rgba(139, 0, 0, 0.3);
    padding-top: 10px;
    font-size: 0.85em;
    color: #888888;
    text-align: center;
    opacity: 0;
    animation: fadeInFooter 0.5s forwards;
    animation-delay: 1.2s;
}

@keyframes fadeInFooter {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.instructions p::before {
    content: '🧟';
    position: relative;
    margin-right: 10px;
    font-size: 1.5em;
    line-height: 1;
    display: inline-block;
    animation: zombieWiggle 3s infinite alternate;
}

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

@keyframes fadeInText {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInButtons {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInInstructions {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cardFlip {
    0% {
        transform: rotateY(90deg) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: rotateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes pulseGlow {
    from { opacity: 0.05; transform: scale(0.95); }
    to { opacity: 0.12; transform: scale(1.05); }
}

@keyframes textGlow {
    from { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 0, 0, 0.3); }
    to { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 0, 0, 0.6); }
}

@keyframes rotateGradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes zombieWiggle {
    0% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
    100% { transform: rotate(-5deg); }
}

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

/* Estilos para os botões com efeitos de card game */
.button-text {
    position: relative;
    z-index: 2;
}

.button-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 8px;
}

.button-hover .button-glow {
    opacity: 0.2;
    animation: buttonGlowPulse 1.5s infinite alternate;
}

.button-active {
    transform: scale(0.95) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

/* Animação para o brilho do botão */
@keyframes buttonGlowPulse {
    from { opacity: 0.1; }
    to { opacity: 0.3; }
}

/* Estilos para as partículas */
.particle {
    position: absolute;
    background: rgba(139, 0, 0, 0.2);
    border-radius: 50%;
    pointer-events: none;
}

/* Efeito de carta para o popup */
.start-popup {
    backface-visibility: hidden;
}

/* Efeito de borda brilhante */
.start-popup::before {
    border-radius: 12px;
}

/* Efeito de textura de carta */
.start-popup {
    background-image: 
        linear-gradient(145deg, #1a1a1a, #2d2d2d),
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%238b0000' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-blend-mode: overlay;}
