@import url("https://fonts.googleapis.com/css2?family=Rowdies:wght@400;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background-color: #012511;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 500px;
  min-height: 100vh;
  background-color: #012511;
  background-image: url("../images/bg.png");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% auto;
  position: relative;
  padding-bottom: 100px;
}

/* Header Section */
.header {
  width: 100%;
}

.header img {
  width: 100%;
  display: block;
}

/* Download Button - Middle */
.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  height: 70px;
  margin: 0 auto 20px;
  background-image: url("../images/btn.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-color: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-download:active {
  transform: scale(0.98);
}

.btn-text {
  font-family: "Rowdies", sans-serif;
  font-size: 22px;
  color: #674b00;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
}

.btn-download.loading .btn-text,
.btn-bottom-wrapper.loading .btn-text {
  display: none;
}

.btn-download.loading .loading-spinner,
.btn-bottom-wrapper.loading .loading-spinner {
  display: block;
}

.loading-spinner {
  display: none;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(103, 75, 0, 0.3);
  border-top-color: #674b00;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -150% center;
  }
  100% {
    background-position: 150% center;
  }
}

.btn-download::after,
.btn-bottom-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: shimmer 2s infinite;
  pointer-events: none;
  border-radius: 50px;
}

.btn-download::after {
  height: unset;
  bottom: 10%;
}

/* HOT GAMES Section */
.hot-games {
  padding: 0 13px;
}

.hot-games-title {
  width: 100%;
  margin-bottom: 15px;
}

.hot-games-title img {
  width: 100%;
  display: block;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  overflow: hidden;
}

.game-item {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(180deg, #076309 0%, #062301 100%);
  border: 1px solid #28b14f;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  transition: transform 0.2s;
  overflow: hidden;
  min-width: 0;
}

.game-item:active {
  transform: scale(0.95);
}

.game-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* Bottom Float */
.bottom-float {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  height: 70px;
  background-color: #033f2a;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 10px;
}

.bottom-float-logo {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.bottom-float-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.bottom-float-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bottom-float-title {
  font-family: "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(180deg, #fef0ba 30%, #dea232 75%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.7px;
}

.bottom-float-divider {
  height: 1px;
  background-color: #fae7aa;
}

.bottom-float-subtitle {
  font-family: "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(180deg, #fff0ba 30%, #dea233 75%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.6px;
  text-transform: capitalize;
}

.btn-bottom-wrapper {
  width: 96px;
  height: 36px;
  background-image: url("../images/btn-bottom.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.btn-bottom-wrapper:active {
  transform: scale(0.95);
}

.btn-bottom-wrapper .btn-text {
  font-family: Arial, sans-serif;
  font-size: 10px;
  color: #ffffff;
  text-transform: uppercase;
  font-weight: bold;
  line-height: 16px;
  text-shadow:
    1px 0 0 #aa7d00,
    -1px 0 0 #aa7d00,
    0 1px 0 #aa7d00,
    0 -1px 0 #aa7d00;
}

.btn-bottom-wrapper .loading-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

/* RWD */
@media screen and (max-width: 374px) {
  .btn-download {
    width: 220px;
    height: 55px;
  }

  .btn-download .btn-text {
    font-size: 18px;
  }

  .btn-download .loading-spinner {
    width: 20px;
    height: 20px;
  }

  .bottom-float {
    height: 60px;
    padding: 0 8px;
    gap: 8px;
  }

  .bottom-float-logo {
    width: 46px;
    height: 46px;
  }

  .bottom-float-title {
    font-size: 12px;
    letter-spacing: 0.5px;
  }

  .bottom-float-subtitle {
    font-size: 10px;
    letter-spacing: 0.4px;
  }

  .btn-bottom-wrapper {
    width: 80px;
    height: 30px;
  }

  .btn-bottom-wrapper .btn-text {
    font-size: 8px;
  }

  .btn-bottom-wrapper .loading-spinner {
    width: 14px;
    height: 14px;
  }
}

@media screen and (max-width: 320px) {
  .btn-download {
    width: 180px;
    height: 45px;
  }

  .btn-download .btn-text {
    font-size: 14px;
  }

  .bottom-float {
    height: 54px;
    padding: 0 6px;
    gap: 6px;
  }

  .bottom-float-logo {
    width: 40px;
    height: 40px;
  }

  .bottom-float-info {
    gap: 2px;
  }

  .bottom-float-title {
    font-size: 10px;
  }

  .bottom-float-subtitle {
    font-size: 9px;
  }

  .btn-bottom-wrapper {
    width: 70px;
    height: 26px;
  }

  .btn-bottom-wrapper .btn-text {
    font-size: 7px;
  }
}
