@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;600&display=swap");

/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body.light {
  background: #fff;
  color: #333;
}
body.dark {
  background: #222;
  color: #eee;
}

/* Navbar container */
.navbar {
  width: 90%;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Logo */
.logo {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2.5rem;
  font-weight: bold;
  background: linear-gradient(90deg, #ff4e50, #f9d423);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  letter-spacing: 2px;
  transition: transform 0.3s;
}
.logo:hover {
  transform: translateY(-5px);
  opacity: 0.8;
}

/* Nav links */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 25px;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  animation: fadeIn 1s ease forwards;
}

.nav-links li a {
  text-decoration: none;
  color: inherit;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.4s ease, background 0.4s ease, transform 0.3s ease;
}

.nav-links li a:hover {
  background: linear-gradient(90deg, #ff4e50, #f9d423);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Theme toggle button styling */
.theme-toggle {
  background: linear-gradient(90deg, #f9d423, #ff4e50);
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 50%;
  color: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Optional active link style
.nav-links li a.active {
  background: linear-gradient(90deg, #ff4e50, #f9d423);
} */

/* Fade in animation on load */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hamburger menu icon (hidden on desktop) */
.menu-icon {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* Games Section */

.games-section {
  width: 90%;
  margin: 4rem auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px; /* better spacing */
  padding: 20px;
  border-radius: 25px;
  /* background: linear-gradient(145deg, #f0f0f0, #e0e0e0); soft background */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.games-section > * {
  width: 380px;
  height: 300px;
  margin: 20px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.games-section > * img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

/* On hover: move up, image bloom */
.games-section > *:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}
.games-section > *:hover img {
  transform: scale(1.1);
  filter: brightness(1.2) saturate(1.2);
}

/* ::after overlay text from data-text */
.games-section > *::after {
  content: attr(data-text);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* show overlay on hover */
.games-section > *:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 938px) {
  .nav-links {
    position: absolute;
    top: 60px;
    right: 5%;
    background: inherit;
    flex-direction: column;
    width: 200px;
    gap: 15px;
    padding: 10px;
    border-radius: 8px;
    display: none;
  }
  .nav-links.active {
    display: flex;
    background: linear-gradient(90deg, #ff4e50, #f9d423);
  }
  .menu-icon {
    display: block;
  }
}
