body.aplay-homepage {
  overflow: hidden;
}

.aplay-home {
  height: calc(100vh - 45px);
  width: 100vw;
  background: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1rem 2rem;
  padding-top: 10px;
  box-sizing: border-box;
  position: fixed;
  top: 45px;
  left: 0;
  z-index: 1;
  pointer-events: auto;
}

.hero-section {
  flex-shrink: 0;
  margin-bottom: 1.5rem;
  padding: 1.5rem 0 1rem;
  text-align: center;
  position: relative;
}

.hero-section:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(#8a2be226 0%, #0000 70%);
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-title {
  font-size: 5rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-title-retro {
  font-family: "Press Start 2P", cursive;
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .15em;
  display: inline-flex;
  color: #fff;
  text-shadow: 0 0 20px #ff64ffe6, 0 0 40px #ff64ffb3, 0 0 60px #ff64ff80, 0 0 80px #8a2be266, 0 4px 8px #00000080;
  filter: drop-shadow(0 8px 16px #8a2be266);
}

.wave-letter {
  display: inline-block;
  animation: 2s ease-in-out infinite bounce;
}

.wave-letter.space {
  width: .3em;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0)scale(1);
  }

  50% {
    transform: translateY(-20px)scale(1.03);
  }
}

.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  overflow-y: hidden;
}

.featured-section {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 1.5rem;
}

.section-label {
  font-family: "Press Start 2P", cursive;
  font-size: .85rem;
  color: #ffffffe6;
  display: block;
  margin-bottom: 1rem;
  text-align: left;
  text-shadow: 0 2px 8px #ff64ff66;
}

.featured-games {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.other-games-section {
  width: 100%;
  max-width: 1200px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 1200px;
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1e1e3c99;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 2px solid #0000;
  padding: 1.2rem 1rem;
  text-decoration: none;
  color: #fff;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 120px;
}

.game-card:hover {
  transform: translateY(-6px)scale(1.02);
  background: #282850cc;
  box-shadow: 0 12px 48px #64c8ff4d;
}

.game-card.featured {
  min-height: 160px;
  padding: 1.8rem 1.5rem;
}

.game-card.featured .game-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.game-card.featured .game-title {
  font-size: 1rem;
}

.game-card > * {
  position: relative;
  z-index: 1;
}

.game-blockfit:hover {
  border-color: #ff6b6b;
}

.game-bounce:hover {
  border-color: #4ecdc4;
}

.game-citydef:hover {
  border-color: #ffe66d;
}

.game-dodge:hover {
  border-color: #a8e6cf;
}

.game-gboard:hover {
  border-color: #ff8b94;
}

.game-keytest:hover {
  border-color: #c7ceea;
}

.game-plantex:hover {
  border-color: #7bed9f;
}

.game-soundx:hover {
  border-color: #ffa502;
}

.game-squarex:hover {
  border-color: #ff6348;
}

.game-stacker:hover {
  border-color: #70a1ff;
}

.game-sudoku:hover {
  border-color: #eccc68;
}

.game-tiletog:hover {
  border-color: #ff7979;
}

.game-tilemerge:hover {
  border-color: #badc58;
}

.game-wordsearch:hover {
  border-color: #f368e0;
}

.game-icon {
  font-size: 2.5rem;
  margin-bottom: .6rem;
  line-height: 1;
  transition: transform .3s;
  filter: drop-shadow(0 2px 8px #64c8ff4d);
}

.game-card:hover .game-icon {
  transform: scale(1.15);
}

.game-title {
  font-family: "Press Start 2P", cursive;
  font-size: .65rem;
  font-weight: 400;
  color: #fff;
  margin: 0;
  text-align: center;
  letter-spacing: .05em;
}

.game-description {
  display: none;
}

@media (width <= 1400px) {
  .games-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .featured-section, .games-grid {
    max-width: 1000px;
  }
}

@media (width <= 1200px) {
  .hero-title {
    font-size: 4rem;
  }

  .hero-title-retro {
    font-size: 2.5rem;
  }

  .games-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .featured-section, .games-grid {
    max-width: 900px;
  }
}

@media (width <= 1000px) {
  .games-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-title-retro {
    font-size: 2rem;
  }
}

@media (width <= 800px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .featured-games {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-title-retro {
    font-size: 1.6rem;
  }

  .hero-section {
    padding: 2rem 0 1.5rem;
    margin-bottom: 2rem;
  }
}

@media (width <= 1100px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 1rem;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .game-icon {
    font-size: 2.5rem;
  }

  .game-title {
    font-size: 1rem;
  }
}

@media (width <= 800px) {
  .aplay-home {
    padding: 1.25rem;
  }

  .hero-section {
    margin-bottom: 1rem;
  }

  .hero-title {
    font-size: 2rem;
    letter-spacing: .05em;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: .875rem;
    padding: 0 .5rem;
  }

  .game-card {
    padding: 1rem .75rem;
    border-radius: 1rem;
  }

  .game-icon {
    font-size: 2.25rem;
    margin-bottom: .375rem;
  }

  .game-title {
    font-size: .9rem;
  }
}

@media (width <= 768px) {
  .aplay-home {
    top: 40px;
    height: calc(100vh - 40px);
  }
}

@media (width <= 500px) {
  .aplay-home {
    padding: .875rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .games-grid {
    gap: .625rem;
    padding: 0 .25rem;
  }

  .game-card {
    padding: .75rem .5rem;
  }

  .game-icon {
    font-size: 2rem;
  }

  .game-title {
    font-size: .8rem;
  }
}

.search-container {
  display: flex;
  align-items: center;
  position: relative;
  margin-left: .5rem;
  margin-right: .5rem;
  transition: all .3s;
}

.search-icon {
  background: none;
  border: 2px solid #8a2be24d;
  color: #ffffffb3;
  font-size: .9rem;
  padding: .4rem .6rem;
  border-radius: .3rem;
  cursor: pointer;
  transition: all .3s;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  width: 32px;
}

.search-icon:hover {
  background: #8a2be226;
  border-color: #8a2be299;
  color: #fff;
  transform: translateY(-1px);
}

.search-icon:active {
  transform: translateY(0);
}

.search-input-wrapper {
  position: absolute;
  right: 0;
  top: 0;
  width: 0;
  height: 32px;
  overflow: hidden;
  opacity: 0;
  transition: all .3s;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.search-container.expanded .search-input-wrapper {
  width: 250px;
  opacity: 1;
  pointer-events: auto;
}

.search-container.expanded .search-icon {
  opacity: 0;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 100%;
  background: #1b2735e6;
  border: 2px solid #8a2be266;
  border-radius: .3rem;
  color: #fff;
  font-family: "Press Start 2P", cursive;
  font-size: .5rem;
  padding: .4rem .6rem .4rem 2rem;
  outline: none;
  transition: all .3s;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.search-input::placeholder {
  color: #fff6;
}

.search-input:focus {
  border-color: #8a2be2cc;
  box-shadow: 0 0 15px #8a2be24d;
}

.search-input-icon {
  position: absolute;
  left: .5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .8rem;
  color: #ffffff80;
  pointer-events: none;
}

.no-results-message {
  text-align: center;
  padding: 3rem 2rem;
  color: #ffffffb3;
  font-family: "Press Start 2P", cursive;
}

.no-results-message p {
  font-size: .9rem;
  margin: .5rem 0;
  text-shadow: 0 2px 8px #8a2be266;
}

.no-results-hint {
  font-size: .7rem !important;
  color: #ffffff80 !important;
  margin-top: 1rem !important;
}

@media (width <= 768px) {
  .search-container {
    margin-left: .25rem;
    margin-right: .25rem;
  }

  .search-icon {
    font-size: .75rem;
    padding: .3rem .5rem;
    height: 28px;
    width: 28px;
  }

  .search-container.expanded .search-input-wrapper {
    width: 180px;
  }

  .search-input {
    font-size: .45rem;
    padding: .3rem .5rem .3rem 1.8rem;
  }

  .search-input-icon {
    font-size: .7rem;
    left: .4rem;
  }

  .no-results-message p {
    font-size: .7rem;
  }

  .no-results-hint {
    font-size: .55rem !important;
  }
}
