body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: url(https://i.gifer.com/7dDt.gif);
}

header {
  text-align: center;
  background: linear-gradient(90deg, #4caf50, #2e7d32, #1b5e20);
  color: white;
  padding: 1rem 0;
}

main {
  padding: 1rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  justify-content: center;
  max-width: 1200px; /* Membatasi lebar grid pada tampilan desktop */
  margin: 0 auto; /* Membuat grid berada di tengah */
}

@media (max-width: 768px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.game-card {
  background: linear-gradient(90deg, #1b5e20, #2e7d32, #4caf50);
  border-radius: 5px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.game-card:hover {
  transform: scale(1.05);
}

.game-card img {
  width: 215px;
  height: 145px; /* Tinggi gambar tetap */
  object-fit: contain; /* Memastikan gambar sesuai area tanpa distorsi */
  display: block;
  margin: 0 auto;
}

.game-card h3 {
  color: aliceblue;
  margin: 0;
  padding: 0.5rem;
  font-size: 1rem;
}

.game-card a {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.5rem 1rem;
  color: white;
  font-weight: bold;
  background: linear-gradient(90deg, #ffa500, #ff8c00, #ff7f50);
  border-radius: 5px;
  text-decoration: none;
}

.game-card a:hover {
  background-color: #0056b3;
}

footer {
  text-align: center;
  padding: 10px; /* Kurangi padding vertikal untuk memperkecil tinggi */
  background: linear-gradient(90deg, #4caf50, #2e7d32, #1b5e20);
  color: white;
  font-size: 0.875rem; /* Ukuran font lebih kecil (14px) */
  line-height: 1.2; /* Jarak antar baris lebih rapat */
  min-height: 10px; /* Tetapkan tinggi minimum footer */
}

/* Search and Filter Container */
.search-filter-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Agar elemen bertumpuk di layar kecil */
  gap: 10px;
  margin: 20px 0; /* Jarak atas dan bawah */
}

.search-bar input,
.filter-bar select {
  padding: 10px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  width: 300px;
  max-width: 100%; /* Sesuaikan ukuran dengan lebar layar */
}

/* Responsive Styling */
@media (max-width: 768px) {
  .search-bar input,
  .filter-bar select {
    width: 90%; /* Lebih lebar di layar kecil */
    margin-bottom: 10px; /* Jarak antar elemen */
  }

  .search-filter-container {
    flex-direction: column; /* Bertumpuk vertikal di layar kecil */
  }
}

.banner img {
  width: 100%;
  max-width: 480px;
  height: auto;
  max-height: 105px;
}
#scrollToTopBtn {
  position: fixed; /* Makes it float */
  bottom: 20px; /* Distance from the bottom */
  right: 20px; /* Distance from the left */
  background: linear-gradient(
    90deg,
    #ffa500,
    #ff8c00,
    #ff7f50
  ); /* Gradient background */
  color: white; /* Icon color */
  border: none; /* No border */
  padding: 10px; /* Padding for the button */
  border-radius: 50%; /* Makes the button circular */
  cursor: pointer; /* Pointer cursor on hover */
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2); /* Add some shadow for better visibility */
  font-size: 20px; /* Font size for arrow */
  z-index: 1000; /* Ensure it stays above other elements */
  display: none; /* Initially hidden */
  align-items: center;
  justify-content: center;
}

#scrollToTopBtn:hover {
  background: linear-gradient(
    90deg,
    #ff8c00,
    #ff7f50
  ); /* Darker gradient on hover */
}
/* Banner styling */
.banner img {
  width: 100%;
  max-width: 480px;
  height: auto;
  max-height: 105px;
}

/* Search and Filter Container */
.search-filter-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Agar elemen bertumpuk di layar kecil */
  gap: 10px;
  margin: 20px 0; /* Jarak atas dan bawah */
}

.search-bar input,
.filter-bar select {
  padding: 10px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  width: 300px;
  max-width: 100%; /* Sesuaikan ukuran dengan lebar layar */
}

/* Responsive Styling */
@media (max-width: 768px) {
  .search-bar input,
  .filter-bar select {
    width: 90%; /* Lebih lebar di layar kecil */
    margin-bottom: 10px; /* Jarak antar elemen */
  }

  .search-filter-container {
    flex-direction: column; /* Bertumpuk vertikal di layar kecil */
  }
}
.menu-container {
  position: fixed; /* Floating position */
  top: 50%; /* Center vertically */
  left: 18px; /* Align to the left */
  transform: translateY(-50%); /* Center align vertically */
  z-index: 1000;
}

#menuButton {
  background: linear-gradient(90deg, #4caf50, #2e7d32, #1b5e20);
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px 5px 5px 5px; /* Rounded corners on the right */
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  transform: rotate(90deg); /* Rotate the button */
  transform-origin: left center; /* Rotate around the left edge */
}

#menuButton:hover {
  background: linear-gradient(90deg, #ff8c00, #ff7f50);
}

.menu-popup {
  display: none; /* Initially hidden */
  position: fixed;
  top: 50%; /* Align with button */
  left: 50px; /* Show next to the button */
  transform: translateY(-50%);
  background: linear-gradient(90deg, #1b5e20, #2e7d32, #4caf50);
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  width: 250px; /* Adjusted for icons */
}

.menu-popup a {
  display: flex; /* Flexbox for icon alignment */
  align-items: center; /* Align icon and text vertically */
  color: #ffffff;
  text-decoration: none;
  padding: 10px;
  border-bottom: 1px solid #eee;
  font-weight: bold; /* Menebalkan font */
}

.menu-popup a:last-child {
  border-bottom: none;
}

.menu-popup a:hover {
  background: linear-gradient(90deg, #ff8c00, #ff7f50);
}

.menu-popup a img {
  width: 20px; /* Icon size */
  height: 20px; /* Icon size */
  margin-right: 10px; /* Space between icon and text */
  display: inline-block; /* Ensure inline display */
  vertical-align: middle; /* Align icon with text */
}

/* Fullscreen Modal */
#loginModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center; /* Vertikal tengah */
  justify-content: center; /* Horizontal tengah */
  z-index: 10000;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  width: 300px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
  margin-bottom: 20px;
}

.modal-content input {
  width: 100%; /* Lebar penuh modal */
  padding: 10px; /* Jarak dalam */
  margin: 10px 0; /* Jarak antar elemen */
  border-radius: 5px; /* Sudut membulat */
  border: 1px solid #ccc;
  text-align: center; /* Pusatkan teks di dalam input */
  box-sizing: border-box; /* Pastikan padding tidak menambah lebar */
}

.modal-content button {
  padding: 10px 20px;
  background: linear-gradient(90deg, #4caf50, #2e7d32, #1b5e20);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 100%; /* Lebar penuh tombol */
  font-size: 16px;
  box-sizing: border-box; /* Pastikan padding tidak menambah lebar */
}

.modal-content button:hover {
  background: #4caf50;
}
