/* Estilos Gerais */
body {
    margin: 0;
    padding: 0;
    /* Layout centralizado */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    /* Plano de fundo */
    background: linear-gradient(270deg, #f875dc, #7d75f5, #bb71f7);
    background-size: 600% 600%;
    animation: bgAnim 10s ease infinite;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    overflow: hidden;
    transition: background-color 0.3s ease;
}
h1 {
    font-family: 'Orbitron', 'Courier New', monospace;
    font-size: 2.5rem;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    background: linear-gradient(270deg, #ff00cc, #3333ff, #00ffff, #ffcc00, #ff00cc);
    background-size: 1000% 100%;
    -webkit-background-clip: text;
    background-clip: text; /* Compatibilidade */
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
    -webkit-animation: colorCycle 8s ease infinite;
    animation: colorCycle 8s ease infinite;
}
/* Container do Jogo */
#game-container {
    position: relative;
    width: fit-content;
    transition: all 0.3s ease;
}
/* Canvas do Jogo */
#game-canvas {
    display: block;
    border: 2px solid #f875dc;
    box-shadow: 0 0 15px #f875dc, 0 0 30px #7d75f5, 0 0 45px #bb71f7;
}
/* Display de pontuação */
#score-display {
    margin: 10px 0;
    font-size: 34px;
    font-weight: bold;
    color: #eb1599;
    background-size: 300% 300%;
    animation: brilhoScore 5s ease infinite;
    transition: all 0.3s ease;
}
/* Exibição de Mensagens */
#message-display {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background-color: linear-gradient(135deg, #ff00cc, #3333ff, #00ffff);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    text-align: center;
    display: none;
    font-size: 14px;
    color: #fff;
    animation: fadeInScale 0.6s forwards;
}
/* Botão de Início */
.btn-inicio-psicodelico {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(270deg, #ff00cc, #3333ff, #00ffff, #ffcc00, #ff00cc);
    background-size: 600% 600%;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: backgroundFlow 8s ease infinite;
    z-index: 10;
}
.btn-inicio-psicodelico::before {
    content: "";
    position: absolute;
    background: linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0.8), rgba(255,255,255,0.2));
    animation: shine 2.5s infinite;
    pointer-events: none;
}
#start-button {
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(270deg, #ff00cc, #3333ff, #00ffff, #ffcc00, #ff00cc);
    background-size: 600% 600%;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: backgroundFlow 8s ease infinite;
}
#start-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0.8), rgba(255,255,255,0.2));
    transform: skewX(-20deg);
    animation: shine 2.5s infinite;
    pointer-events: none;
}
#start-button:hover {
    transform: scale(1.07);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
}
p {
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(270deg, #ff00cc, #3333ff, #00ffff, #ffcc00, #ff00cc);
    background-size: 600% 600%;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: backgroundFlow 8s ease infinite;
}
/* Botão de Pausa */
#pause-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(6px) brightness(0.7); /* Compatibilidade Safari */
    backdrop-filter: blur(6px) brightness(0.7);
    z-index: 20;
}
#pause-menu .menu-box {
    background: linear-gradient(135deg, #ff00ccaa, #3333ffaa);
    border: 2px solid #fff;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
    animation: popupFade 0.5s ease-out;
}
#pause-menu h2 {
    font-size: 28px;
    color: #fff;
    text-shadow: 0 0 6px #fff;
    margin-bottom: 24px;
}
#pause-menu button {
    display: inline-block;
    margin: 10px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(270deg, #00ffff, #ffcc00, #ff00cc);
    background-size: 400% 400%;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: backgroundFlow 6s ease infinite;
}
#pause-menu button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}
/* Animação de Fundo */
@keyframes bgAnim {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* Animação dos botões */
@keyframes backgroundFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes shine {
    0% { left: -75%; }
    100% { left: 125%; }
}
@keyframes popupFade {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
/* Animação do título */
@keyframes colorCycle {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
}
/* Animação de Fade In e Scale */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.6);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}
@keyframes brilhoScore {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}