body {
    background: url('sprites/background.jpg') no-repeat center center fixed;
    background-size: cover;
    font-family: 'Sour Gummy', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container, h1, #score, #instructions, #pauseButton, .modal-content, .modal-content h2, #finalScore, #restartButton {
    font-family: 'Sour Gummy', sans-serif !important;
}

.container {
    max-width: 420px;
    margin: 48px auto;
    background: rgba(255,255,255,0.95);
    border-radius: 32px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.10), 0 1.5px 6px 0 rgba(0,128,128,0.08);
    padding: 0 0 32px 0;
    text-align: center;
    border: 3px solid #FF7F50;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px 0 32px;
    box-sizing: border-box;
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    background: transparent;
    gap: 12px;
}

h1 {
    color: #008080 !important;
    text-shadow: 2px 2px 0 #FF7F50, 0 2px 8px rgba(0,0,0,0.04);
}

#gameCanvas {
    background: #fff176;
    border: 3px solid #FF7F50;
    border-radius: 20px;
    display: block;
    margin: 24px auto 0 auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

#score {
    font-size: 1.3em;
    color: #008080;
    font-weight: bold;
    background: #fff;
    border-radius: 16px;
    padding: 6px 18px;
    box-shadow: 0 2px 8px rgba(0,128,128,0.06);
    margin: 0;
}

#instructions {
    color: #008080;
    font-size: 1em;
    margin-top: 18px;
    margin-bottom: 0;
    background: #fff;
    border-radius: 12px;
    padding: 6px 18px;
    box-shadow: 0 2px 8px rgba(0,128,128,0.04);
    display: inline-block;
}

/* Modal de Game Over */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-in;
}

.modal-content {
    background: #FFB6C1;
    background-image: none;
    margin: 10% auto;
    padding: 32px 24px 24px 24px;
    border-radius: 28px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    animation: slideIn 0.3s ease-out;
}

.modal-content h2 {
    color: #ff4e50;
    margin-bottom: 20px;
    font-size: 2em;
    text-shadow: 2px 2px 0 #fff;
}

#finalScore {
    font-size: 1.5em;
    color: #388e3c;
    margin-bottom: 30px;
    font-weight: bold;
}

#restartButton {
    background: #87CEEB;
    color: #FFFFFF !important;
    border: none;
    padding: 14px 36px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Sour Gummy', sans-serif;
    font-weight: bold;
    margin-top: 18px;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
#restartButton:hover {
    background: #5db7d6;
    transform: translateY(-2px);
}

#restartButton:active {
    transform: translateY(0);
}

#pauseButton {
    background: #87CEEB;
    color: #FFFFFF !important;
    border: none;
    padding: 12px 32px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Sour Gummy', sans-serif;
    font-weight: bold;
    margin: 0;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
#pauseButton:hover {
    background: #5db7d6;
    transform: translateY(-2px);
}
#pauseButton:active {
    transform: translateY(0);
}

.gameover-snake-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}
.snake-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.flip-horizontal {
    transform: scaleX(-1);
}

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

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

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 0;
    margin: 0;
    overflow: hidden;
}
.splash-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 1;
}
.splash-btn {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    z-index: 2;
    background: #87CEEB;
    color: #fff;
    font-family: 'Sour Gummy', sans-serif;
    font-size: 1.1em;
    border: none;
    border-radius: 50px;
    padding: 10px 32px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transition: background 0.2s, transform 0.5s cubic-bezier(.68,-0.55,.27,1.55), opacity 0.3s;
    margin-top: 0;
    opacity: 0;
    pointer-events: none;
}
.splash-btn.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
} 

@media (max-width: 600px) {
    .container {
        max-width: 98vw;
        padding: 0 0 18px 0;
        border-radius: 18px;
    }
    .game-header {
        padding: 16px 8px 0 8px;
        border-top-left-radius: 18px;
        border-top-right-radius: 18px;
    }
    #gameCanvas {
        width: 98vw !important;
        height: 98vw !important;
        min-width: 220px;
        min-height: 220px;
        max-width: 98vw;
        max-height: 98vw;
    }
} 