
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.body {
    background: url("./image/snakkebgg3.jpg") no-repeat center center/cover;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

/* Game board styled like a cartoon box */
#board {
    width: 87vmin;
    height: 87vmin;
    background-color: rgba(255, 255, 255, 0.6);
    border: 6px dashed #4caf50;
    border-radius: 20px;
    display: grid;
    grid-template-rows: repeat(18, 1fr);
    grid-template-columns: repeat(18, 1fr);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
    padding: 5px;
    backdrop-filter: blur(6px);
    position: relative;
    overflow: hidden;
}

/* Snake head: cartoony bubble look */
.head {
    background-color: #ffcc00;
    border: 2px solid #ff9800;
    border-radius: 10px;
    box-shadow: 0 0 10px #ffeb3b;
    transition: transform 0.1s ease;
}

/* Snake bodyyyyyyyyyy */
.snake {
    background-color: #4caf50;
    border: 1px solid #388e3c;
    border-radius: 8px;
}

/* Food as pulsing cartoon candy */
.food {
    background-color: #e91e63;
    border: 2px dashed white;
    border-radius: 50%;
    animation: pulse 1s infinite ease-in-out;
    box-shadow: 0 0 10px #f06292;
}

/* Animation for food pulse */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.game-controls {
    position: absolute;
    top: 20px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
/* scorebox */
#scoreBox {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    font-size: 5rem;
    border-radius: 50px;
    border: 5px solid limegreen;
}

.buttons button {
    margin: 0 10px;
    padding: 10px 20px;
    font-size: 5rem;
    background-color: #1f1f1f;
    color: limegreen;
    border: 4px solid limegreen;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.2s ease;
}

.buttons button:hover {
    background-color: limegreen;
    color: black;
}

#controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.arrow {
    width: 60px;
    height: 60px;
    font-size: 24px;
    margin: 8px;
    border: none;
    border-radius: 10px;
    background: #ffffffcc;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: background 0.2s;
}

.arrow:hover {
    background: #dddddd;
}

#game-over-message{ 
    display: none;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 8rem;
    padding: 20px 40px;
    border-radius: 10px;
    border: 4px solid limegreen;
    border-radius: 50px;
    z-index: 10;
}

footer {
  text-align: center;
  padding: 1rem;
  background: #eee;
  position: fixed;
  width: 100%;
  bottom: 0;
}
