/* MelodyFlow · 全站样式 · 深空银河 + 玻璃质感设计系统 */

@font-face {
  font-family: 'CinzelDecorative';
  src: url('../fonts/CinzelDecorative-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-deep: #020306;
  --bg-mid: #050608;
  --accent-cyan: #00F5D4;
  --accent-purple: #6C5CE7;
  --glass-bg: rgba(10, 12, 18, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --nav-h: 64px;
  --maxw: 1120px;
}

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

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

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
ul { list-style: none; }

#galaxy-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  background: var(--bg-deep);
}

/* 品牌字体 */
.brand-font {
  font-family: 'CinzelDecorative', -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* 渐变文字（复刻歌词 shader） */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 玻璃卡片（复刻 mf_glass_card） */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 32px;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1), border-color 0.4s, background 0.4s, box-shadow 0.4s;
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 245, 212, 0.22);
  background: rgba(10, 12, 18, 0.68);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

/* 按钮 */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  color: var(--text-primary);
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.btn-primary {
  /* 玻璃底 + 渐变边框：双层 background，padding-box 填玻璃色，border-box 露渐变 */
  background:
    linear-gradient(rgba(10, 12, 18, 0.7), rgba(10, 12, 18, 0.7)) padding-box,
    linear-gradient(135deg, var(--accent-cyan), var(--accent-purple)) border-box;
  border: 1px solid transparent;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 245, 212, 0.28), 0 0 56px rgba(108, 92, 231, 0.18);
}
.btn-ghost {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(10, 12, 18, 0.72);
}

/* 顶部导航 */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(5, 6, 8, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}
.nav-logo img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.nav-logo .brand-font { font-size: 19px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.04); }
.nav-links a.active {
  /* 当前页高亮：纯色底，非渐变 */
  color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.14);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* 通用区块 */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px 24px;
}
.section-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.section-sub {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 52px;
  font-size: 15px;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 48px) 24px 64px;
  position: relative;
}
.hero-brand {
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1.04;
  margin-bottom: 18px;
}
.hero-sub {
  font-size: clamp(20px, 3vw, 30px);
  margin-bottom: 16px;
  font-weight: 600;
}
.hero-desc {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 36px;
  letter-spacing: 0.02em;
}
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-meta {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 44px;
  letter-spacing: 0.06em;
}
/* Hero 入场编排：单次顺次浮现，比散点微动更克制 */
.hero > * {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-in 0.9s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero > *:nth-child(1) { animation-delay: 0.10s; }
.hero > *:nth-child(2) { animation-delay: 0.25s; }
.hero > *:nth-child(3) { animation-delay: 0.40s; }
.hero > *:nth-child(4) { animation-delay: 0.55s; }
.hero > *:nth-child(5) { animation-delay: 0.70s; }
@keyframes hero-in { to { opacity: 1; transform: translateY(0); } }

/* 特性卡 */
.feature-icon {
  width: 48px; height: 48px;
  margin-bottom: 22px;
}
.feature-title { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.feature-desc { color: var(--text-secondary); font-size: 15px; }

/* 响应式栅格 */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* 黑胶 + 频谱 视觉锚点 */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.showcase-vinyl { display: flex; justify-content: center; }

/* 黑胶：多层径向渐变模拟纹路（深灰底 + 同心圆纹理 + 中心紫色标签） */
.vinyl {
  width: 280px; height: 280px;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, var(--accent-purple) 0 16%, rgba(108, 92, 231, 0) 16.2%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    radial-gradient(circle at 50% 50%, #26262e 0%, #07070b 78%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), inset 0 0 50px rgba(0, 0, 0, 0.7);
  animation: vinyl-spin 8s linear infinite;
}
.vinyl::before {
  /* 中心主轴孔 */
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-deep);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.vinyl::after {
  /* 左上高光，增加质感 */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.08), transparent 42%);
  pointer-events: none;
}
@keyframes vinyl-spin { to { transform: rotate(360deg); } }

/* 频谱条：28 根竖条，错峰脉动 */
.spectrum {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 96px;
  margin-bottom: 28px;
}
.spectrum-bar {
  width: 4px;
  background: linear-gradient(var(--accent-cyan), var(--accent-purple));
  border-radius: 2px 2px 0 0;
  height: 20%;
  animation: spectrum-pulse 1.1s ease-in-out infinite;
}
.spectrum-bar:nth-child(4n+1) { animation-delay: -0.10s; animation-duration: 1.30s; }
.spectrum-bar:nth-child(4n+2) { animation-delay: -0.45s; animation-duration: 0.90s; }
.spectrum-bar:nth-child(4n+3) { animation-delay: -0.75s; animation-duration: 1.50s; }
.spectrum-bar:nth-child(4n+4) { animation-delay: -0.25s; animation-duration: 1.10s; }
@keyframes spectrum-pulse {
  0%, 100% { height: 18%; }
  50% { height: 100%; }
}
.lyric-meta { font-size: 14px; letter-spacing: 0.12em; opacity: 0.9; margin-bottom: 10px; }
.lyric-line { font-size: clamp(20px, 3vw, 28px); font-weight: 600; }

/* 数据亮点 */
.data-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.data-item { text-align: center; padding: 24px; }
.data-value { font-size: clamp(34px, 6vw, 54px); font-weight: 700; margin-bottom: 8px; line-height: 1.1; }
.data-label { color: var(--text-secondary); font-size: 14px; letter-spacing: 0.05em; }

/* 页脚 */
.footer {
  background: rgba(5, 6, 8, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  padding: 56px 32px 28px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-col h4 {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-col a {
  display: inline-block;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent-cyan); }
.footer-bottom {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* 滚动入场 */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s cubic-bezier(.2,.7,.2,1), transform 0.85s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* 截图占位回退 */
.screenshot-placeholder {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--glass-border);
  border-radius: 16px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  min-height: 200px;
  font-size: 14px;
}

/* 响应式：平板 */
@media (max-width: 1024px) {
  .section { padding: 72px 22px; }
  .showcase { gap: 40px; }
}

/* 响应式：手机 */
@media (max-width: 768px) {
  .nav { padding: 0 18px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(5, 6, 8, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 18px;
    gap: 4px;
    border-bottom: 1px solid var(--glass-border);
    transform: translateY(-130%);
    transition: transform 0.32s cubic-bezier(.2,.7,.2,1);
    pointer-events: none;
  }
  .nav-links.open { transform: translateY(0); pointer-events: auto; }
  .nav-links a { width: 100%; padding: 12px 14px; }
  .grid-2, .grid-3, .data-grid, .showcase, .footer-grid { grid-template-columns: 1fr; }
  .showcase { gap: 36px; }
  .section { padding: 64px 20px; }
  .footer { padding: 44px 20px 24px; }
  .vinyl { width: 220px; height: 220px; }
}

/* 降级：减少动效 */
@media (prefers-reduced-motion: reduce) {
  .hero > * { opacity: 1; transform: none; animation: none; }
  .vinyl, .spectrum-bar { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* 画廊页 · 页头 + 手机框 mockup */
.gallery-section { padding-top: calc(var(--nav-h) + 56px); text-align: center; }
.gallery-title { font-size: clamp(34px, 6vw, 56px); line-height: 1.1; margin-bottom: 14px; }
.gallery-section .section-sub { margin-bottom: 8px; }
.gallery-note { color: var(--text-secondary); font-size: 13px; opacity: 0.7; margin-bottom: 52px; letter-spacing: 0.04em; }

/* 手机外框：圆角 36px、深色 8px 边、9:18 现代比例，底部投影 + 悬浮感 */
.phone-frame {
  width: 280px;
  height: 560px;
  margin: 0 auto;
  border: 8px solid #0a0a0e;
  border-radius: 36px;
  background: #000;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1), box-shadow 0.4s;
}
.phone-frame:hover {
  transform: translateY(-6px);
  box-shadow: 0 36px 84px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 245, 212, 0.18);
}
/* 顶部打孔前置摄像头 */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 2;
}
.phone-screen {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-deep);
}
.phone-screen .screenshot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 手机框内占位：撑满屏幕区，覆盖通用 .screenshot-placeholder 的 padding/min-height */
.phone-screen .screenshot-placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 24px 18px;
  flex-direction: column;
  gap: 10px;
  border-radius: 28px;
}
.phone-screen .screenshot-placeholder small {
  color: var(--text-secondary);
  font-size: 12px;
  opacity: 0.85;
}
.phone-caption {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 18px;
  letter-spacing: 0.02em;
}

/* 画廊栅格：平板两列；桌面三列沿用全局 .grid-3，手机单列沿用全局 768 断点 */
@media (max-width: 1024px) and (min-width: 769px) {
  .gallery-section .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
