@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

*{
    padding: 0;
    margin: 0;
    font-family: 'Poppins',sans-serif;
    box-sizing: border-box;
}

body{
    background-color: #081b29;
    color: white;
}

.header{
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 10%;
    background: transparent;
    display: flex;
    justify-content: space-between;
}

.logo{
    font-size: 30px;
    text-decoration: none;
    font-weight: 500;
    color: white;
}

.navbar{
    padding-top: 10px;
}

.menu-toggle,
.overlay,
.close-icon{
    display: none;
}

.navbar a {
    font-size: 20px;
    text-decoration: none;
    font-weight: 400;
    color: white;
    margin-left: 40px;
    transition: .3s;
}

.navbar a.normal-buttons:hover,
.navbar a.active{
    color: rgb(14, 148, 226);
    transform: translateY(10px);
}

.menu-buttons{
    color: white;
    text-decoration: none;
    font-size: 25px;
    margin: 15px 40px 15px 40px;
}

#canvas-container {
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    height: 100vh; /* Make the container take the full viewport height */
    background-color: #081b29; /* Background color for the container */
}

/* Responsive styles for the Pacman canvas and related elements */
#canvas {
    width: 100%; /* Make the canvas take the full width of the container */
    max-width: 500px; /* Set a maximum width to prevent it from becoming too large */
    height: auto; /* Maintain the aspect ratio */
    /* Center the canvas horizontally */
    margin: 0 auto;
    display: block;
}

/* Styles for the images used in the game */
#animation, #ghosts {
    max-width: 100%; /* Ensure the images are responsive */
    height: auto; /* Maintain aspect ratio */
    display: block;
    margin: 0 auto; /* Center the images horizontally */
}

/* Media query for small screens (e.g., mobile devices) */
@media screen and (max-width: 768px) {
    /* Reset header padding for mobile view */
    .header {
        padding: 10px 5%;
    }

    /* Hide the navbar by default on mobile screens */
    .navbar {
        display: none;
    }

    /* Show the menu toggle icon */
    .menu-toggle {
        display: block;
        font-size: 24px;
        cursor: pointer;
        color: white; /* Make it visible on the dark background */
    }

    /* Styling for the overlay */
    #overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(8, 27, 41, 0.9); /* Slightly transparent dark background */
        z-index: 2;
    }

    /* Styling for the close icon in the overlay */
    #close-icon {
        position: fixed;
        top: 20px;
        right: 20px;
        font-size: 24px;
        cursor: pointer;
        z-index: 3;
        color: white; /* Make it visible on the dark background */
    }

    /* Styles for the navigation menu within the overlay */
    .overlay .nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: absolute;
        background: #081b29;
        padding: 10px;
        border-radius: 10px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 4;
        font-size: 20px;
        margin-bottom: 10px;
    }
}