:root {
  --text: #282828;
  --blue: #4f7cff;
  --phone: clamp(220px, 28vw, 318px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

#loading {
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fff url("../images/spinner-loading.gif") 50% no-repeat;
}

#loading[hidden] {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
}

.site-header-inner {
  max-width: 1350px;
  margin: 0 auto;
  min-height: 75px;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

.site-logo {
  flex: none;
  width: 153px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-logo img {
  width: 135px;
  height: 30px;
  display: block;
}

.site-logo:focus-visible,
.site-nav a:focus-visible,
.site-auth button:focus-visible {
  outline: 2px solid #ff5379;
  outline-offset: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  height: 75px;
  margin: 0 10px 0 18px;
}

.site-nav a {
  position: relative;
  flex: none;
  margin: 0 19px;
  height: 75px;
  line-height: 75px;
  font-size: 20px;
  color: #000;
  text-decoration: none;
  transition: color 0.2s linear;
}

.site-nav a::before {
  content: "";
  box-sizing: border-box;
  position: absolute;
  top: 71px;
  left: 100%;
  width: 0;
  height: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: 0.2s all linear;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ff5379;
}

.site-nav a:hover::before,
.site-nav a.active::before {
  left: 0;
  width: 100%;
  border-color: #ff5379;
  transition-delay: 0.1s;
}

.site-nav a:hover ~ a::before {
  left: 0;
}

.site-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

.site-auth button {
  width: 63px;
  height: 33px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 18px;
  line-height: 33px;
  text-align: center;
  cursor: pointer;
}

.btn-login {
  background: #ff5379;
  color: #fff;
}

.btn-register {
  background: #f6f6f6;
  color: #333;
}

.site-auth button:hover {
  opacity: 0.85;
}

.stage {
  min-height: calc(100vh - 75px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(48px, 8vw, 140px);
  padding: 36px 48px 150px;
  position: relative;
  z-index: 2;
}

.phone {
  width: var(--phone);
  flex: none;
}

.phone-shell {
  position: relative;
  background: #141416;
  border-radius: 42px;
  padding: 10px;
  box-shadow:
    0 0 0 1px #2b2b2e,
    inset 0 0 0 1px #3a3a3e,
    0 28px 60px rgba(48, 24, 90, 0.14);
}

.btn-silent,
.btn-vol,
.btn-power {
  position: absolute;
  width: 3px;
  background: #2a2a2e;
  border-radius: 2px;
}

.btn-silent { left: -2px; top: 92px; height: 22px; }
.btn-vol { left: -2px; top: 128px; height: 48px; }
.btn-power { right: -2px; top: 150px; height: 68px; }

.screen {
  background: #fff;
  border-radius: 32px;
  overflow: hidden;
  height: calc(var(--phone) * 2.08);
  display: flex;
  flex-direction: column;
}

.shot-top,
.shot-foot {
  display: block;
  width: 100%;
  height: auto;
  flex: none;
  position: relative;
  z-index: 2;
}

.shot-window {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  container-type: size;
}

.shot-scroll {
  position: relative;
  width: 100%;
  animation: shot-scroll 16s linear infinite;
}

.shot {
  display: block;
  width: 100%;
  height: auto;
}

.price-layer {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body.is-ready .price-layer {
  display: block;
}

.price {
  position: absolute;
  right: 3%;
  transform: translateY(-50%);
  padding: 0.15em 0.55em;
  border-radius: 999px;
  background: #ffeaee;
  color: #fd7792;
  font-size: calc(var(--phone) * 0.034);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: nowrap;
  animation: price-pulse 1.6s ease-in-out infinite;
}

@keyframes price-pulse {
  0%, 100% {
    color: #fd7792;
    box-shadow: 0 0 0 0 rgba(253, 119, 146, 0.15);
  }
  50% {
    color: #ff5376;
    box-shadow: 0 0 10px 1px rgba(255, 83, 118, 0.45);
  }
}

.copy {
  width: min(480px, 100%);
  flex: none;
}

.copy h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 4.6vw, 68px);
  font-weight: 750;
  letter-spacing: 1px;
  color: #1a1a1a;
  line-height: 1.1;
}

.copy p {
  margin: 0;
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 500;
  line-height: 1.75;
  color: #2a2a2a;
}

.wave {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(78px, 16vh, 168px);
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.wave-layer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 100%;
  animation: wave-drift linear infinite;
}

.wave-layer.back { animation-duration: 14s; opacity: 1; }
.wave-layer.mid { animation-duration: 9s; animation-direction: reverse; }
.wave-layer.front { animation-duration: 11s; }

@keyframes shot-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, calc(-100% + 100cqh), 0); }
}

@keyframes wave-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@media (max-width: 900px) {
  .site-header-inner {
    flex-wrap: wrap;
    min-height: 0;
    padding: 5px 15px 0;
  }

  .site-logo {
    width: auto;
    height: 60px;
  }

  .site-logo img {
    width: 120px;
    height: auto;
  }

  .site-nav {
    order: 3;
    width: calc(100% + 30px);
    height: 55px;
    margin: 0 -15px;
    padding: 0 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar { display: none; }

  .site-nav a {
    height: 55px;
    line-height: 55px;
    margin: 0 15px;
    font-size: 19px;
  }

  .site-nav a::before { top: 51px; }

  .stage {
    flex-direction: column;
    justify-content: flex-start;
    gap: 22px;
    padding: 18px 22px calc(clamp(64px, 12vh, 120px) + 36px + env(safe-area-inset-bottom));
    min-height: calc(100vh - 120px);
    min-height: calc(100dvh - 120px);
  }

  .phone {
    --phone: clamp(168px, min(64vw, calc((100dvh - 360px) / 2.2)), 250px);
  }

  .wave { height: clamp(64px, 12vh, 120px); }

  .copy h1 { margin-bottom: 12px; }
  .copy p {
    max-width: none;
    font-size: clamp(15px, 4.5vw, 18px);
  }
}

@media (min-width: 600px) and (max-width: 900px) {
  .phone { --phone: min(300px, calc((100dvh - 340px) / 2.15)); }
}

@media (max-width: 900px) and (max-height: 700px) {
  .stage { gap: 14px; padding-top: 12px; }
  .copy h1 { font-size: 32px; margin-bottom: 8px; }
  .copy p { font-size: 16px; line-height: 1.6; }
}

@media (min-width: 901px) and (max-height: 820px) {
  :root { --phone: min(260px, 24vw); }
  .stage { padding-top: 24px; padding-bottom: 120px; gap: 56px; }
  .copy h1 { font-size: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .shot-scroll,
  .wave-layer,
  .price { animation: none; }
  .wave-layer { width: 100%; }
}
