html,
body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  width: 100%;
  min-height: 100%;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow-x: hidden;
}

.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(8px + env(safe-area-inset-top)) 10px calc(14px + env(safe-area-inset-bottom));
  background: #000;
}

.top-bar {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.back-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  line-height: 1;
  font-weight: 700;
}

.back-btn:active {
  transform: scale(0.96);
}

.main-logo {
  display: block;
  max-width: 178px;
  width: 58%;
  height: auto;
  margin: 0 auto;
}

.top-spacer {
  width: 34px;
  height: 34px;
}

.games-wrap {
  width: 100%;
}

.page-title {
  text-align: center;
  margin: 2px 0 8px;
}

.page-title h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

.page-title p {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255,255,255,0.7);
}

.game-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.game-btn {
  width: 100%;
  display: block;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.025);
  overflow: hidden;
  text-decoration: none;
  line-height: 0;
}

.game-btn img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 17px;
}

.game-btn:active {
  transform: scale(0.985);
}

.float-card {
  animation: floatCard 4.5s ease-in-out infinite;
}

.delay-1 {
  animation-delay: 0.35s;
}

.delay-2 {
  animation-delay: 0.7s;
}

@keyframes floatCard {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }

  100% {
    transform: translateY(0);
  }
}

@media (max-height: 690px) {
  .app-shell {
    padding-top: calc(5px + env(safe-area-inset-top));
  }

  .top-bar {
    margin-bottom: 3px;
  }

  .main-logo {
    max-width: 158px;
  }

  .page-title {
    margin-bottom: 6px;
  }

  .page-title h1 {
    font-size: 16px;
  }

  .page-title p {
    font-size: 11px;
  }

  .game-grid {
    gap: 5px;
  }

  .game-btn {
    border-radius: 16px;
  }

  .game-btn img {
    border-radius: 15px;
  }
}

@media (min-width: 430px) {
  .game-grid {
    gap: 8px;
  }
}