/*
  汽水音乐 APP 落地页样式（移动端，仅 HTML+CSS）
  - 主题色尽量贴合品牌（可在 :root 中便捷调整）
  - 纯 CSS 交互：图片点击放大，:target 控制轻盒
  - 音乐均衡器动画、卡片式布局、移动端优化
*/

:root {
  --brand: #00c2a8;          /* 主色（清新薄荷青） */
  --brand-2: #5eecff;        /* 辅助高光青 */
  --accent: #ff5c93;         /* 跳色点缀（粉） */
  --bg: #0b1114;             /* 深色背景 */
  --card: rgba(255,255,255,0.06);
  --card-stroke: rgba(255,255,255,0.08);
  --text: #e9f7f5;           /* 主文本 */
  --muted: #a8c5c1;          /* 次要文本 */
  --shadow: 0 10px 24px rgba(0,0,0,.35);
  --radius: 16px;
}

/* 全局 Reset 精简版 */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Inter, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 1400px 1000px at 50% 0%, rgba(94,236,255,.12), transparent 70%),
    radial-gradient(ellipse 1200px 800px at 20% 100%, rgba(0,194,168,.18), transparent 65%),
    radial-gradient(ellipse 800px 600px at 80% 50%, rgba(255,92,147,.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
img { max-width: 100%; display: block; }

.page { padding: 16px; padding-bottom: 32px; }

/* 各个section之间的间距 */
.header { margin-bottom: 16px; }
.intro { margin-bottom: 16px; }
.features { margin-bottom: 16px; }
.download { margin-bottom: 16px; }
.gallery { margin-bottom: 16px; }

/* 卡片基类 */
.card {
  background: var(--card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.header {
  padding: 16px;
  position: relative;
  display: grid;
  gap: 12px;
}
.brand { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; }
.brand__logo { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); }
.brand__title { margin: 0; font-size: 20px; letter-spacing: .5px; }
.brand__subtitle { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

/* 音乐均衡器（装饰，右侧） */
.eq {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  gap: 4px;
  height: 18px;
  align-items: flex-end;
  z-index: 1;
}
.eq span {
  width: 6px; border-radius: 3px; background: linear-gradient(180deg, var(--brand-2), var(--brand));
  animation: bar 1.2s ease-in-out infinite;
}
.eq span:nth-child(2){ animation-delay: .1s }
.eq span:nth-child(3){ animation-delay: .2s }
.eq span:nth-child(4){ animation-delay: .3s }
.eq span:nth-child(5){ animation-delay: .4s }
@keyframes bar {
  0%,100%{ height: 18px }
  50%{ height: 3px }
}

.section-title { font-size: 18px; margin: 0 0 10px; }

.intro { padding: 16px; display: grid; gap: 12px; }
.intro__text { margin: 0; line-height: 1.6; color: var(--muted); }

/* 按钮 */
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  padding: 12px 16px; border-radius: 999px; font-weight: 600; letter-spacing: .2px;
  transform: translateZ(0); transition: transform .15s ease, opacity .2s ease, background .3s ease;
}
.btn:active { transform: scale(.98); }
.btn--primary {
  color: #042825;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 8px 20px rgba(0,194,168,.35);
}
.btn--ghost {
  color: var(--text);
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
}

/* 呼吸效果按钮 */
.btn--breathing {
  animation: breathing 2s ease-in-out infinite;
}
@keyframes breathing {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(0,194,168,.35);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0,194,168,.5);
  }
}

/* 功能卡片列表（2x2网格，居中对齐） */
.features { display: grid; gap: 12px; margin-top: 14px; grid-template-columns: repeat(2, 1fr); }
.feature {
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0,0,0,.3);
}
.feature__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #052b27;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 6px 16px rgba(0,194,168,.35);
  transition: transform .3s ease;
}
.feature:hover .feature__icon {
  transform: scale(1.1) rotate(5deg);
}
.feature__title { margin: 0; font-size: 14px; }
.feature__desc { margin: 0; font-size: 11px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 画廊（截图卡片） */
.gallery { margin-top: 16px; }
.gallery__grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.image-card {
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.image-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0,0,0,.4);
}
.image-card img {
  border-radius: calc(var(--radius) - 2px);
  transition: transform .35s ease;
}
.image-card:active img { transform: scale(1.02); }

/* 信息展示区 */
.download { margin-top: 16px; padding: 16px; display: grid; gap: 12px; }
.info-content { display: grid; gap: 8px; }
.info-text { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }

.footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
.footer__text { opacity: .8; }

/* 轻盒（点击图片放大，无 JS） */
.lightbox {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 18px;
  background: rgba(3, 8, 10, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 999;
}
.lightbox:target { display: flex; animation: fadeIn .2s ease; }
.lightbox__img { max-width: 100%; max-height: 86vh; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.1); }
.lightbox__close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.1)); border: 1px solid rgba(255,255,255,.2);
}
.lightbox__close::before {
  content: "\00d7"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--text); font-size: 22px;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

/* 无障碍：减少动画 */
@media (prefers-reduced-motion: reduce) {
  .eq span { animation: none; height: 10px; }
  .image-card img { transition: none; }
  .btn--breathing { animation: none; }
  .feature { transition: none; }
  .image-card { transition: none; }
  .feature__icon { transition: none; }
}

/* 安全留白：iOS 底部手势区 */
@supports (padding: max(0px)) {
  .page { padding-bottom: max(32px, env(safe-area-inset-bottom)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}

/* === 更多交互动画效果 === */

/* 页面加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 页面元素依次进入动画 */
.header { animation: fadeInUp 0.8s ease 0.1s both; }
.intro { animation: fadeInUp 0.8s ease 0.2s both; }
.gallery { animation: fadeInUp 0.8s ease 0.3s both; }
.features { animation: fadeInUp 0.8s ease 0.4s both; }
.download { animation: fadeInUp 0.8s ease 0.5s both; }
.footer { animation: fadeInUp 0.8s ease 0.6s both; }

/* 标题样式（去掉打字机效果） */
.brand__title {
  /* 打字机效果已移除 */
}

/* 按钮点击波纹效果 */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

/* 卡片悬浮阴影增强 */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
}

/* 图片卡片3D翻转效果 */
.image-card {
  perspective: 1000px;
}

.image-card img {
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.image-card:hover img {
  transform: rotateY(10deg) rotateX(5deg);
}

/* 功能图标脉冲效果 */
.feature__icon {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 6px 16px rgba(0,194,168,.35);
  }
  50% {
    box-shadow: 0 6px 16px rgba(0,194,168,.35), 0 0 0 10px rgba(0,194,168,.1);
  }
  100% {
    box-shadow: 0 6px 16px rgba(0,194,168,.35);
  }
}

/* 文字渐变动画 */
.section-title {
  background: linear-gradient(45deg, var(--brand), var(--brand-2), var(--accent));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 滚动触发动画（简化版，使用CSS） */
@media (prefers-reduced-motion: no-preference) {
  .feature:nth-child(1) { animation-delay: 0.1s; }
  .feature:nth-child(2) { animation-delay: 0.2s; }
  .feature:nth-child(3) { animation-delay: 0.3s; }
  .feature:nth-child(4) { animation-delay: 0.4s; }
}

/* 轻盒增强动画 */
.lightbox {
  animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(6px);
  }
}

.lightbox__img {
  animation: lightboxZoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes lightboxZoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* 关闭按钮旋转效果 */
.lightbox__close {
  transition: transform 0.3s ease;
}

.lightbox__close:hover {
  transform: rotate(90deg);
}

/* 减少动画（无障碍） */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .eq span { animation: none; height: 10px; }
  .brand__title { animation: none; border: none; }
}



/* === 布局与密度调整（用户反馈修正） === */
/* 调整展示顺序：应用预览在功能卡片上面 */
.header { order: 0; }
.intro { order: 1; }
.gallery { order: 2; }
.features { order: 3; }
.download { order: 4; }
.footer { order: 5; }

/* 功能卡片已在上面设置为2x2网格 */

/* 详情预览：一排三个，间距更紧凑 */
.gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
/* 裁剪为手机竖屏比例，避免过长导致“太大” */
.image-card img { aspect-ratio: 9/16; object-fit: cover; }
