* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 72, 150, 0.22), transparent 32rem),
    #0d0208;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: transparent;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  user-select: none;
}

.page {
  position: relative;
  width: min(100%, 750px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(87, 27, 58, 0.94), rgba(33, 8, 25, 0.98) 48%, #180512),
    #371627;
  box-shadow: 0 0 36px rgba(0, 0, 0, 0.45);
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: clamp(58px, 17.333vw, 130px);
  padding: clamp(6px, 2vw, 15px) clamp(10px, 3.5vw, 26px);
  background: #4a1932;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: rgba(24, 6, 18, 0.9);
  box-shadow: 0 1px 0 rgba(255, 112, 178, 0.12);
  pointer-events: none;
}

.logo {
  width: clamp(72px, 22vw, 118px);
}

.logo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: clamp(12px, 3vw, 20px);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: clamp(16px, 4.2vw, 32px);
}

.icon-link {
  width: clamp(32px, 9.5vw, 72px);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.icon-link:active,
.download-link:active {
  transform: scale(0.96);
}

.hero {
  position: relative;
  padding: clamp(8px, 2vw, 16px) clamp(10px, 2.667vw, 20px) 0;
}

.hero-stage {
  position: relative;
  height: min(80vw, 600px);
  min-height: 232px;
  max-height: 600px;
}

.hero-girls {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: min(64vw, 480px);
  aspect-ratio: 600 / 800;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
}

.hero-girls img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.hero-girls img.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-tag {
  position: absolute;
  top: clamp(12px, 4.8vw, 36px);
  right: clamp(72px, 19vw, 142px);
  width: min(28vw, 204px);
  z-index: 3;
}

.hero-badges {
  position: absolute;
  left: 50%;
  top: clamp(38px, 13vw, 98px);
  width: min(95vw, 710px);
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}

.hero-title {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(95.733vw, 718px);
  transform: translateX(-50%);
  z-index: 5;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.38));
}

.content-block {
  position: relative;
  z-index: 4;
  width: min(93.333vw, 700px);
  margin: clamp(18px, 4.8vw, 36px) auto 0;
}

.content-block img {
  width: 100%;
  border-radius: clamp(8px, 2.133vw, 16px);
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.32));
}

.content-block .goal-badge {
  position: absolute;
  top: clamp(-18px, -4.8vw, -10px);
  right: clamp(-6px, -1.6vw, -2px);
  z-index: 8;
  width: clamp(50px, 19vw, 112px);
  border-radius: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.42));
  pointer-events: none;
}

.featured {
  margin-top: 2px;
}

.content-block:not(.featured) {
  margin-top: 8px;
}

.promo {
  position: relative;
  z-index: 4;
  width: min(86.667vw, 650px);
  margin: 8px auto clamp(14px, 3.733vw, 28px);
}

.bottom-glow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  width: 100%;
  opacity: 0.72;
  pointer-events: none;
}

.bottom-pad {
  height: calc(clamp(92px, 21.333vw, 160px) + env(safe-area-inset-bottom));
}

.download-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: min(100%, 750px);
  transform: translateX(-50%);
  background: rgba(23, 4, 17, 0.75);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.28);
}

.download-link {
  display: block;
  padding-bottom: env(safe-area-inset-bottom);
  transition: transform 0.18s ease;
}

.download-link img {
  width: 100%;
}

@media (min-width: 751px) {
  body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
      radial-gradient(ellipse at 50% 100%, rgba(250, 68, 41, 0.82) 0%, rgba(177, 14, 20, 0.58) 28%, rgba(46, 0, 6, 0.98) 76%),
      linear-gradient(180deg, #4a0007 0%, #8f050c 55%, #d73520 100%);
  }

  body::before {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.45), transparent 27%, transparent 73%, rgba(0, 0, 0, 0.45)),
      url("./images/5.bin") center bottom / 1900px 980px no-repeat;
    opacity: 0.78;
  }

  .page {
    min-height: 1200px;
    background:
      linear-gradient(180deg, rgba(94, 20, 45, 0.45) 0%, rgba(94, 20, 45, 0.2) 45%, rgba(24, 5, 18, 0.9) 100%),
      transparent;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }

  .topbar {
    min-height: 120px;
    padding: 14px 22px 10px;
    background: rgba(74, 25, 50, 0.58);
  }

  .logo {
    width: 265px;
  }

  .top-actions {
    gap: 36px;
  }

  .icon-link {
    width: 80px;
  }

  .hero {
    padding: 20px 10px 0;
  }

  .hero-stage {
    height: 540px;
    min-height: 540px;
    max-height: 540px;
  }

  .hero-girls {
    bottom: 10px;
    width: 500px;
  }

  .hero-tag {
    top: 30px;
    right: 144px;
    width: 204px;
  }

  .hero-badges {
    top: 105px;
    width: 710px;
  }

  .hero-title {
    width: 718px;
  }

  .featured {
    margin-top: 32px;
  }

  .content-block:not(.featured) {
    margin-top: 36px;
  }

  .promo {
    margin: 40px auto 28px;
  }

  .content-block .goal-badge {
    top: -31px;
    right: 5px;
    width: 112px;
  }
}
