body {
    font-family: 'VT323', monospace;
    text-align: center;
    background-color: black;
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

h2 {
    margin-top: 5px;
    margin-bottom: 30px;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 60px;
    flex-grow: 1;
}

#game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#game {
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    gap: 2px;
    width: clamp(280px, 90vw, 800px);
    max-width: 95vw;
    aspect-ratio: 20/11;
    margin: 0 auto;
}

.cell {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: black;
}

.wall {
    background-color: darkblue;
}

.dot {
    background-color: white;
    border-radius: 50%;
}

.player {
    background-color: yellow;
    border-radius: 50%;
}

.ghost {
    background-color: red;
    border-radius: 50%;
}

.hidden {
    display: none;
}

.message {
    font-size: 48px;
    font-weight: bold;
    margin: 25px 0;
}

.red {
    color: red;
}

.green {
    color: lime;
}

#start-screen h1 {
    font-size: 60px;
    margin-bottom: 80px;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
}

#start-btn,
#restart-btn {
    padding: 20px;
    font-size: 50px;
    background-color: limegreen;
    color: black;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 40px;
}


#start-btn:hover,
#restart-btn:hover {
    background-color: lime;
    transform: scale(1.05);
}

#music-toggle {
    background: none;
    border: none;
    font-size: 36px;
    cursor: pointer;
    color: white;
    margin: 10px;
    transition: transform 0.2s;
    position: absolute;
    top: 20px;
    right: 20px;
}

#music-toggle:hover {
    transform: scale(1.2);
    color: limegreen;
}

#social-networks {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

#social-networks li a {
    color: white;
    font-size: 24px;
    transition: transform 0.2s, color 0.2s;
}

#social-networks li a:hover {
    color: limegreen;
    transform: scale(1.2);
}

#touch-controls {
    display: none;
    align-items: center;
    gap: 10px;
    flex-direction: column;
    margin: 20px 0;
}

#touch-controls.hidden {
    display: none;
}

footer {
    margin-top: auto;
}

/* Page 404 Error */
.error {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #00ff00;
    font-family: 'VT323', monospace;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
}
  
  .error h1 {
    font-size: 150px;
    margin: 0;
  }
  .error p {
    font-size: 100px;
    margin: 20px 0;
  }
  
  .error a {
    color: yellow;
    text-decoration: none;
    font-size: 28px;
    border: 2px solid yellow;
    padding: 10px 20px;
    margin-top: 20px;
    display: inline-block;
    border-radius: 20px;
    transition: all 0.2s ease;
  }

  .error dot {
    font-size: 75px;
    animation: blink 1s infinite;
  }
  
  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
  }




@media screen and (max-width: 768px) {
    .cell {
        width: 100%;
        aspect-ratio: 1/1;
    }

    #touch-controls.visible {
        display: flex;
        padding: 100px;
    }

    #touch-controls div {
        display: flex;
        gap: 10px;
        justify-content: center;
    }

    #touch-controls button {
        width: 60px;
        height: 60px;
        background-color: #222;
        color: #fff;
        border: 2px solid #fff;
        font-size: 24px;
        border-radius: 10px;
        margin: 5px;
        padding: 10px 20px;
        font-family: 'VT323', monospace;
        cursor: pointer;
    }

    #touch-controls button:active {
        background-color: #444;
    }
}
