/* =========================================================
   星河号卡 · 应用下载页
   目录：设计令牌 → 基础 → 背景气泡 → 主视觉 → 操作按钮
        → 页脚 → 动画降级 → 响应式
   ========================================================= */

/* ---------- 设计令牌 ---------- */
:root {
  --grad-1: #ee7752;
  --grad-2: #e73c7e;
  --grad-3: #23a6d5;
  --grad-4: #23d5ab;

  --text: #fff;
  --text-soft: rgba(255, 255, 255, .86);
  --glass: rgba(255, 255, 255, .15);
  --glass-border: rgba(255, 255, 255, .3);
  --line-soft: rgba(255, 255, 255, .12);

  --accent-android: #0f9b6c;
  --accent-ios: #0a63c8;
  --accent-join: #6c46c9;

  --radius-logo: 28px;
  --radius-btn: 18px;

  --shadow-logo: 0 15px 30px rgba(0, 0, 0, .15);
  --shadow-btn: 0 10px 24px rgba(0, 0, 0, .18);
  --shadow-btn-hover: 0 18px 34px rgba(0, 0, 0, .24);

  --font-sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .68, .36, 1);
  --bubble-duration: 20s;
}

/* ---------- 基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: var(--font-sans);
  color: var(--text);
  text-align: center;
  background: linear-gradient(-45deg, var(--grad-1), var(--grad-2), var(--grad-3), var(--grad-4));
  background-size: 400% 400%;
  animation: gradient-shift 24s ease infinite;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* ---------- 背景气泡 ---------- */
.bubbles {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bubble {
  position: absolute;
  bottom: -140px;
  display: block;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  animation: bubble-rise var(--bubble-duration) linear infinite;
}

.bubble:nth-child(1) { width: 40px; height: 40px; left: 10%; animation-duration: 16s; }
.bubble:nth-child(2) { width: 60px; height: 60px; left: 20%; animation-duration: 21s; animation-delay: 2s; }
.bubble:nth-child(3) { width: 30px; height: 30px; left: 35%; animation-duration: 18s; animation-delay: 4s; }
.bubble:nth-child(4) { width: 50px; height: 50px; left: 50%; animation-duration: 23s; animation-delay: 1s; }
.bubble:nth-child(5) { width: 70px; height: 70px; left: 65%; animation-duration: 17s; animation-delay: 3s; }
.bubble:nth-child(6) { width: 45px; height: 45px; left: 80%; animation-duration: 19s; animation-delay: 5s; }

/* ---------- 主视觉 ---------- */
.hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 44px;
}

.hero__inner {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  margin-bottom: 26px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-logo);
  background: rgba(255, 255, 255, .2);
  box-shadow: var(--shadow-logo);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: scale .45s var(--ease);
  animation: fade-in-down .9s var(--ease) both;
}

/* 入场动画占用了 transform，缩放改用独立的 scale 属性，避免动画结束后 hover 失效 */
.logo-mark:hover {
  scale: 1.04;
}

/* 掠过卡片的斜向高光 */
.logo-mark::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, .22), transparent);
  transform: rotate(45deg) translate(-30%, -30%);
  transition: transform .8s var(--ease);
  pointer-events: none;
}

.logo-mark:hover::before {
  transform: rotate(45deg) translate(30%, 30%);
}

.logo-mark__text {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .12em;
  text-indent: .12em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.hero__title {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  font-weight: 700;
  letter-spacing: .02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .2);
  animation: fade-in-down .9s var(--ease) .1s both;
}

.hero__tagline {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  line-height: 1.5;
  color: var(--text-soft);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  animation: fade-in-down .9s var(--ease) .2s both;
}

/* ---------- 操作按钮 ---------- */
.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 240px));
  gap: 22px;
  justify-content: center;
  width: 100%;
  max-width: 880px;
  margin-top: 46px;
  animation: fade-in-up .9s var(--ease) .35s both;
}

.action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 84px;
  padding: 18px 22px;
  overflow: hidden;
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-btn);
  background: var(--glass);
  box-shadow: var(--shadow-btn);
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
  transition:
    transform .35s var(--ease),
    background-color .35s var(--ease),
    border-color .35s var(--ease),
    box-shadow .35s var(--ease);
}

/* 按钮表面的扫光 */
.action::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, .32) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
  pointer-events: none;
}

.action:hover::before,
.action:focus-visible::before {
  transform: translateX(120%);
}

.action:hover,
.action:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, .55);
  box-shadow: var(--shadow-btn-hover);
}

.action:active {
  transform: translateY(-2px) scale(.985);
}

.action:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.action--android:hover,
.action--android:focus-visible { background-color: var(--accent-android); }

.action--ios:hover,
.action--ios:focus-visible { background-color: var(--accent-ios); }

.action--join:hover,
.action--join:focus-visible { background-color: var(--accent-join); }

.action__icon {
  flex: none;
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .2));
}

.action__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  text-align: left;
}

.action__title {
  font-size: 1.35rem;
}

.action__note {
  margin-top: 3px;
  font-size: .86rem;
  font-weight: 400;
  opacity: .9;
}

/* ---------- 页脚 ---------- */
.footer {
  position: relative;
  z-index: 1;
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, .18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: .88rem;
  color: var(--text-soft);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
}

.footer__copy {
  margin: 0;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
}

.footer__links--legal {
  font-size: .82rem;
}

.footer a {
  color: var(--text-soft);
  text-decoration: none;
  transition: color .25s var(--ease);
}

.footer a:hover,
.footer a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 动画与降级 ---------- */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes bubble-rise {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  12% { opacity: .55; }
  100% {
    transform: translate3d(24px, -115vh, 0) rotate(540deg);
    opacity: 0;
  }
}

@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
    background-position: 0% 50%;
  }

  .bubbles {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .actions {
    gap: 18px;
  }

  .action {
    padding: 16px 18px;
    min-height: 80px;
  }

  .action__title {
    font-size: 1.2rem;
  }
}

@media (max-width: 820px) {
  .hero {
    padding: 40px 18px 36px;
  }

  .actions {
    grid-template-columns: minmax(0, 340px);
    gap: 14px;
    margin-top: 38px;
  }

  .action {
    min-height: 76px;
  }
}

@media (max-width: 480px) {
  .logo-mark {
    width: 112px;
    height: 112px;
    margin-bottom: 22px;
    border-radius: 24px;
  }

  .logo-mark__text {
    font-size: 1.35rem;
  }

  .hero__title {
    margin-bottom: 8px;
  }

  .hero__tagline {
    padding: 0 6px;
    font-size: 1rem;
  }

  .actions {
    margin-top: 32px;
    gap: 12px;
  }

  .action {
    min-height: 72px;
    padding: 14px 18px;
  }

  .action__icon {
    width: 32px;
    height: 32px;
  }

  .action__title {
    font-size: 1.1rem;
  }

  .action__note {
    font-size: .8rem;
  }

  .footer {
    font-size: .8rem;
    padding: 14px 16px;
  }

  .footer__links {
    gap: 4px 14px;
  }

  .footer__links--legal {
    font-size: .78rem;
  }
}

@media (max-width: 360px) {
  .hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .action {
    padding: 12px 14px;
  }

  .action__title {
    font-size: 1rem;
  }

  .footer__links {
    gap: 4px 10px;
  }
}
