/* 
 * style.css - 汽水音乐官网 (qishuiky.com.cn) 全局共享样式
 * 风格：午夜蓝 + 暖橙强调 | 现代潮流 | 流体排版
 */

/* ================= 设计变量 ================= */
:root {
  /* 核心色盘 */
  --color-bg-dark: #0B1120;
  --color-bg-light: #172033;
  --color-text-primary: #F8FAFC;
  --color-text-secondary: #94A3B8;
  --color-accent: #FF6A00; /* 暖橙 */
  --color-accent-hover: #FF8533;
  --color-border-subtle: rgba(255, 255, 255, 0.1);
  
  /* 字体栈 */
  --font-sans: 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* 间距与布局 */
  --space-section-y: clamp(4rem, 8vw, 8rem);
  --container-max-width: 1200px;
  --border-radius-lg: 16px;
  --border-radius-md: 8px;
}

/* ================= 基础重置与排版 ================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--color-bg-dark);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* 流体字号 */
h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }

p {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  max-width: 70ch;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul { list-style: none; }

/* ================= 通用工具类 ================= */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--space-section-y) 0;
  position: relative;
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* 按钮组件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-wrap: nowrap;
  border: none;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 106, 0, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 106, 0, 0.4);
}

.btn-primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--color-text-primary);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* 卡片组件 */
.card {
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 106, 0, 0.3);
}

/* ================= 页头与页脚 ================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.brand-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.main-nav ul {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--color-accent);
}

/* 移动端菜单简易适配 */
@media (max-width: 768px) {
  .main-nav { display: none; } /* 实际项目中可加 JS 切换，此处为静态纯展示简化处理 */
}

.site-footer {
  border-top: 1px solid var(--color-border-subtle);
  padding: 4rem 0 2rem;
  background-color: var(--color-bg-dark);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-text-secondary);
}

.footer-col a:hover {
  color: var(--color-text-primary);
  text-decoration: underline;
}

.copyright {
  text-align: center;
  opacity: 0.6;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-subtle);
}

/* ================= 首页 Hero 区块 ================= */
.hero-section {
  padding-top: 8rem;
  padding-bottom: 6rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 70% 30%, #1e293b 0%, var(--color-bg-dark) 60%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* SVG 动效容器 */
.hero-svg-container {
  width: 100%;
  height: 100%;
  min-height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ================= 功能网格 ================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.feature-desc {
  flex-grow: 1;
}

/* ================= 界面示意区 ================= */
.interface-mockup {
  background-color: #0F172A;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  max-width: 900px;
  margin: 3rem auto 0;
}

.mockup-header {
  background: #1E293B;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #475569;
}

.mockup-body {
  padding: 2rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  height: 400px;
}

.sidebar {
  background: rgba(255,255,255,0.03);
  border-radius: var(--border-radius-md);
  padding: 1rem;
}

.sidebar-item {
  height: 12px;
  background: #334155;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.main-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.5rem;
}

.track-card {
  background: #1E293B;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  position: relative;
}

.track-cover {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #334155 0%, #1E293B 100%);
}

/* ================= 场景列表 ================= */
.scenario-list {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.scenario-card h4 {
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.step-list {
  margin-left: 1.25rem;
  list-style-type: decimal;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.step-list li {
  margin-bottom: 0.5rem;
}

/* ================= 版本与平台表格 ================= */
.version-table-wrapper {
  margin-top: 2rem;
  overflow-x: auto;
}

.platform-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.platform-table th,
.platform-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border-subtle);
}

.platform-table th {
  background-color: rgba(255,255,255,0.05);
  color: var(--color-text-primary);
  font-weight: 600;
}

.platform-table tr:last-child td {
  border-bottom: none;
}

.platform-table tr:hover td {
  background-color: rgba(255,255,255,0.02);
}

/* ================= FAQ ================= */
.faq-list {
  max-width: 800px;
  margin: 3rem auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--color-border-subtle);
}

.faq-item summary {
  padding: 1.5rem 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text-primary);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--color-accent);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding-bottom: 1.5rem;
  color: var(--color-text-secondary);
  margin-top: 0;
}

/* ================= 文章卡片 ================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
}

.tag {
  background-color: rgba(255, 106, 0, 0.15);
  color: var(--color-accent);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ================= 下载区块特殊样式 ================= */
.download-block {
  background: linear-gradient(180deg, var(--color-bg-light) 0%, var(--color-bg-dark) 100%);
  border-top: 1px solid var(--color-border-subtle);
}

.file-info {
  background: rgba(255,255,255,0.05);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
  font-family: monospace;
  color: var(--color-accent);
  display: inline-block;
}

/* ================= SVG 动画定义 ================= */
@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbit-spin-reverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes pulse-breathe {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes draw-path {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

svg.animated-orbit {
  animation: orbit-spin 24s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

svg.animated-orbit-reverse {
  animation: orbit-spin-reverse 18s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

svg.animated-pulse {
  animation: pulse-breathe 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

svg.animated-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-path 6s ease-in-out infinite;
  pathLength: 1;
}

/* 无障碍：尊重减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  svg.animated-orbit,
  svg.animated-orbit-reverse,
  svg.animated-pulse,
  svg.animated-draw {
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ================= 响应式微调 ================= */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content { order: 2; }
  .hero-svg-container { order: 1; min-height: 300px; margin-bottom: 2rem; }
  .hero-actions { justify-content: center; }
  
  .mockup-body { grid-template-columns: 1fr; height: auto; }
  .sidebar { display: none; }
}

@media (max-width: 600px) {
  h1 { font-size: 2.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .scenario-list { grid-template-columns: 1fr; }
}
