body {
    background-color: #000226;
}

body {
	background: linear-gradient(20deg, #020b6e, #0c0668, #1f076d, #021c4b, #365168);
	background-size: 200% 800%;
	animation: gradient-animation 25s ease infinite;
}


@keyframes gradient-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

      @font-face {
  font-family: 'Damion';
  src: url('/resource/Damion-8gnD.ttf') format('truetype');
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  height: 2000px;

  color: white;
}

/* Transparent navbar container */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: flex-start;  /* logo on left */
  align-items: center;          /* vertical center */
  padding: 1vw 40px;
  background: transparent;      /* invisible */
  z-index: 1000;
  font-family: 'Damion', sans-serif;
  font-size: 30px;
}

/* Logo */
.logo img {
  height: 6vw;
  width: auto;
  margin-right: 1vw;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  transition: transform .4s;
}

.logo img:hover {
    transform: scale(1.05);
}

/* Nav buttons centered with logo */
.nav-links {
  display: flex;
  gap: 0.8vw;
  align-items: center;
}

/* Glass buttons */
.nav-btn {
  padding: 3px 14px;
  border-radius: 8px;
  background: rgba(166, 185, 238,0.15);  /* semi-transparent */
  border: 1px solid rgba(166, 185, 238,0.3);
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  color: rgb(166, 185, 238);
  font-size: 2vw;
}

.nav-btn:hover {
  background: rgba(106, 104, 224, 0.3);
  border-color: rgba(0, 39, 122, 0.6);
  color: #0b00a1;
  transform: scale(0.95);
}


/* Center container */
.center-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.caption {
  margin-top: -1vw;
  font-size: 40px;
  color: rgb(68, 90, 184);
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  font-family: 'Damion', sans-serif;
  src: url('/resource/Damion-8gnD.ttf') format('truetype');
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.top-logo {
  margin-top: 2vw;
  margin-bottom: -0.5vw;
  font-size: 50px;
  color: rgba(166, 185, 238);
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  font-family: 'Damion', sans-serif;
  src: url('/resource/Damion-8gnD.ttf') format('truetype');
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}


/* Games grid */
#games {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1vw;
}
.game-card {
  position: relative;
  margin: .5vw;
}
.game-card img {
  height: 11.6vw;
  width: 11.6vw;
  border-radius: 1vw;
  transition: transform .4s;
}
.game-card:hover img {
  transform: scale(1.08);
}
.game-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .3vw;
  border-radius: 0 0 1vw 1vw;
  opacity: 0;
  transition: opacity .3s;
  text-align: center;
}
.game-card:hover .overlay {
  opacity: 1;
}
.overlay .title {
  padding: 0.3vw;
  font-family: 'Damion', sans-serif;
  letter-spacing: 0.6px;
  font-size: 1.5vw;
  color: rgb(166, 185, 238);
  background: rgba(34, 33, 70, 0.6);
  border-color: rgba(0, 39, 122, 0.1);
  border-radius: 1vw;
  max-width: 100%;
  font-size: clamp(10px, 2vw, 16px);
  white-space: nowrap;       /* Prevent wrapping */
  overflow: hidden;          /* Hide overflow text */
  text-overflow: ellipsis;   /* Show "..." if too long */
  display: block;            /* Makes max-width apply cleanly */
}
.overlay .genre {
  font-family: 'Damion', sans-serif;
  letter-spacing: 0.6px;
  font-size: 1vw;
  color: rgb(166, 185, 238);
  background: rgba(78, 77, 116, 0.6);
  border-color: rgba(0, 39, 122, 0.1);
  padding: 0.2vw;
  border-radius: 1vw;
  padding-top: -0.1vw;
  padding-bottom: -0.1vw;
}

.genre-nav {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 1vw;
      gap: 1vw;
      flex-wrap: wrap;
    }
    .genre-list {
      display: flex;
      gap: 0.5vw;
      flex-wrap: wrap;
    }
    .genre-btn {
      padding: 6px 12px;
      border-radius: 6px;
      background: rgba(166, 185, 238,0.15);
      border: 1px solid rgba(166, 185, 238,0.3);
      color: rgb(166, 185, 238);
      font-family: 'Damion', sans-serif;
      letter-spacing: 0.6px;
      font-size: 1.3vw;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    .genre-btn:hover { background: rgba(106, 104, 224,0.3); border-color: rgba(0,39,122,0.6); color: #0b00a1; transform: scale(0.95); }
    .genre-btn.active { background: rgba(106,104,224,0.3); color: white; }

    #gameSearch {
      padding: 6px 12px;
      font-size: 1.3vw;
      border-radius: 6px;
      border: 1px solid rgba(166,185,238,0.3);
      background: rgba(166,185,238,0.15);
      color: white;
      outline: none;
      transition: 0.2s;
      font-family: 'Damion', sans-serif;
      letter-spacing: 0.6px;
    }
    #gameSearch::placeholder { color: rgb(166, 185, 238);; }
    #gameSearch:focus { background: rgba(166,185,238,0.25); border-color: rgba(106,104,224,0.6); }





/* Grid Layout for Featured Games */
.featured-grid {
  display: grid;
  gap: 1vw;
  margin: 2vw auto;
  max-width: 95%;
}

/* Layouts change with number of featured */
.featured-grid.layout-1 {
  grid-template-columns: 1fr;
  height: 50vh;
}
.featured-grid.layout-2 {
  grid-template-columns: 1fr 1fr;
  height: 50vh;
}
.featured-grid.layout-3 {
  grid-template-columns: 1fr 1fr 1fr;
  height: 45vh;
}
.featured-grid.layout-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: 60vh;
}

/* Featured Item */
.featured-item {
  position: relative;
  border-radius: 1vw;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.featured-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .5vw;
  padding: 1vw;
  z-index: 2;
}

.featured-icon {
  width: 8vw;
  height: 8vw;
  border-radius: .8vw;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

.featured-text h1 {
  font-size: 2vw;
  margin: .3vw 0;
  font-family: 'Damion', sans-serif;
}
.featured-text h3 {
  font-size: 1.2vw;
  margin: .2vw 0;
}
.featured-text p {
  font-size: 1vw;
  line-height: 1.3;
  max-width: 400px;
}

/* Play Button */
.play-btn {
  margin-top: .6vw;
  padding: .4vw 1vw;
  border-radius: .5vw;
  background: rgba(166,185,238,0.2);
  border: 1px solid rgba(166,185,238,0.4);
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all .3s ease;
}
.play-btn:hover {
  background: rgba(106,104,224,0.4);
  border-color: rgba(0,39,122,0.7);
  transform: scale(0.95);
}

/* Adaptive Text Colors */
.featured-item.light-text {
  color: white;
}
.featured-item.dark-text {
  color: #111;
}
