body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    background: linear-gradient(#0e1d31, #1a2b48);
    color: #f5f5f5;
  }

  /* Updated Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    transition: background-color 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

header.scrolled {
    background-color: rgba(240, 240, 240, 1);
}

nav {
    display: flex;
    justify-content: center; /* Centre the navigation elements */
    align-items: center;
    padding: 15px 0;
    margin: 0;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav li {
    display: inline-block;
    margin: 0;
    padding: 0;
}

nav #backbutton {
    background-color: #557b57;
    color: white;
    border: none;
    padding: 10px 20px; /* Increased padding */
    border-radius: 5px;
    font-size: 16px; /* Increased font size */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

nav #backbutton:hover {
    background-color: #466648;/* Darker green on hover */
}



  h1 {
    margin: 30px 10px;
    font-family: "Press Start 2P", sans-serif;
    color: #e4ff6b;
  }
  
  main {
    margin-top: 10%; /* Adjusted margin to accommodate fixed header */
  }

  #collection {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap */
    justify-content: center; /* Centre the items */
    gap: 20px;
    padding: 20px;
    margin: 0 auto;
    max-width: 1200px;
  }
 
  .game-item {
    background: #222;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    color: #f5f5f5;
    text-align: left;
    width: 250px; /* Fixed width for consistent sizing */
  }

  
  /* Add additional hover effects */
  .game-item:hover {
    transform: scale(1.05);
    transition: all 0.3s ease;
  }

  .game-item img {
    width: 100%; /* Default image width */
    height: auto; /* Maintain aspect ratio */
    transition: transform 0.3s ease;
}

.game-item:hover img {
    transform: scale(1); /* Initial state */
    transition-delay: 0.5s;
    transform: scale(1.1); /* Scale the image slightly */
}

  
  @media (max-width: 768px) {
    #collection {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Centre the items */
    }

    .game-item {
        width: 100%; /* Full-width for small screens */
        max-width: 300px; /* Optional: Limit width if needed */
        margin-bottom: 20px; /* Add spacing between items */
    }

    .game-item img {
        width: 100%; /* Ensure images scale properly */
        height: auto; /* Maintain aspect ratio */
    }
}
