/* ==========================================
   股事ICU 官方网站 — 样式表
   设计系统：暖纸底 + 品牌蓝 + 微渐变
   ========================================== */

/* ---- CSS Variables ---- */
:root {
  --bg-primary: #F7F3ED;
  --bg-card: #FAF8F4;
  --bg-white: #FFFFFF;
  --brand-blue: #5B7FBA;
  --brand-blue-dark: #4A6DA8;
  --brand-blue-light: rgba(91, 127, 186, 0.1);
  --brand-blue-glow: rgba(91, 127, 186, 0.2);
  --text-primary: #2A2A2A;
  --text-secondary: #6A6A6A;
  --text-muted: #8A8A8A;
  --text-light: #AAAAAA;
  --border-light: #E8E4DE;
  --border-card: #F0EBE3;
  --kline-red: #E94560;
  --kline-green: #00C853;
  --footer-bg: #2A2A2A;
  --footer-text: #888888;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(91, 127, 186, 0.08);
  --shadow-md: 0 4px 20px rgba(91, 127, 186, 0.12);
  --shadow-lg: 0 20px 60px rgba(91, 127, 186, 0.12);
  --max-width: 1100px;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
               Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- Container ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Section Shared ---- */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.section-subtitle {
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-weight: 400;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 4px 16px var(--brand-blue-glow);
}

.btn-primary:hover {
  background: var(--brand-blue-dark);
  box-shadow: 0 6px 24px var(--brand-blue-glow);
}

.btn-lg {
  padding: 14px 44px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 10px 22px;
  font-size: 13px;
  border-radius: 10px;
  width: 100%;
}

/* ==================== 导航栏 ==================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 243, 237, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--brand-blue);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  border-radius: 8px;
}

.logo-text {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--brand-blue);
  background: var(--brand-blue-light);
}

.nav-link-primary {
  color: var(--brand-blue);
  font-weight: 600;
}

/* 汉堡菜单 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== 1. Hero ==================== */
.hero {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, #FAF8F4 0%, #F7F3ED 60%, #F0EBE3 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
}

.decor-candle {
  position: absolute;
  font-size: 80px;
}

.decor-candle:nth-child(1) { top: 15%; left: 8%; font-size: 90px; }
.decor-candle:nth-child(2) { top: 25%; right: 10%; font-size: 70px; }
.decor-candle:nth-child(3) { bottom: 20%; left: 60%; font-size: 65px; }

.hero-content {
  position: relative;
  z-index: 1;
}

/* 手机 Mockup */
.hero-mockup {
  margin-bottom: 40px;
}

.phone-frame {
  width: 180px;
  height: 370px;
  margin: 0 auto;
  background: linear-gradient(180deg, #E8E4DE 0%, #D8D4CC 100%);
  border-radius: 28px;
  border: 3px solid #CCC8C0;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.phone-notch {
  width: 80px;
  height: 4px;
  background: #CCC8C0;
  border-radius: 0 0 8px 8px;
  margin: 12px auto 0;
}

.phone-screen {
  padding: 24px 16px;
  height: calc(100% - 20px);
}

.phone-placeholder {
  text-align: center;
}

.phone-logo {
  width: 44px;
  height: 44px;
  background: var(--brand-blue);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 22px;
  margin: 10px auto 12px;
}

.phone-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.phone-tagline {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Mockup 内 K线示意 */
.phone-kline {
  padding: 0 8px;
}

.kline-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 100px;
}

.kline-bars .bar {
  width: 8px;
  border-radius: 2px 2px 0 0;
}

.kline-bars .bar.up {
  background: var(--kline-red);
}

.kline-bars .bar.down {
  background: var(--kline-green);
}

/* Hero 文字 */
.hero-title {
  font-size: 40px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.hero-tagline {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
  max-width: 420px;
  margin: 0 auto 36px;
}

/* ==================== 2. 核心功能 ==================== */
.features {
  background: var(--bg-white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  border: 1px solid var(--border-card);
  transition: transform 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 14px;
  line-height: 1;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==================== 3. 如何训练 ==================== */
.how-it-works {
  background: var(--bg-primary);
}

.steps {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.step-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border-light);
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  transition: transform 0.25s, box-shadow 0.25s;
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-number {
  width: 44px;
  height: 44px;
  background: var(--brand-blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  margin: 0 auto 18px;
}

.step-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.step-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ==================== 4. 产品预览 ==================== */
.preview {
  background: var(--bg-white);
}

.screenshots-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.screenshots-scroll::-webkit-scrollbar {
  height: 6px;
}

.screenshots-scroll::-webkit-scrollbar-track {
  background: var(--border-card);
  border-radius: 3px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

.screenshot-card {
  scroll-snap-align: start;
  flex-shrink: 0;
}

.screenshot-frame {
  width: 155px;
  height: 315px;
  background: linear-gradient(180deg, #F0EBE3, #E8E4DE);
  border-radius: 18px;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.screenshot-placeholder {
  text-align: center;
  padding: 20px;
}

.screenshot-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.screenshot-desc {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ==================== 5. 下载专区 ==================== */
.download {
  background: linear-gradient(180deg, var(--bg-primary) 0%, #EDE8DE 100%);
}

.platform-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.platform-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  text-align: center;
  border: 1px solid var(--border-light);
  flex: 1;
  min-width: 130px;
  max-width: 170px;
  transition: transform 0.25s, box-shadow 0.25s;
}

.platform-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.platform-icon {
  font-size: 38px;
  margin-bottom: 12px;
  line-height: 1;
}

.platform-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.platform-card > p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* 下载附加区域 */
.download-extra {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.qr-box {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border-light);
}

.qr-img,
.qr-placeholder {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-sm);
  margin: 0 auto 10px;
}

.qr-placeholder {
  background: var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-light);
}

.qr-box p {
  font-size: 12px;
  color: var(--text-muted);
}

.cross-platform-tips {
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 2.2;
}

/* ==================== 6. 页脚 ==================== */
.footer {
  background: var(--footer-bg);
  padding: 48px 24px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--brand-blue);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  border-radius: 7px;
}

.footer-name {
  color: #CCCCCC;
  font-weight: 700;
  font-size: 15px;
}

.footer-links {
  margin-bottom: 14px;
}

.footer-links a {
  color: var(--footer-text);
  font-size: 12px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #BBB;
}

.footer-sep {
  margin: 0 8px;
  color: #666;
}

.footer-copy {
  color: var(--footer-text);
  font-size: 11px;
  margin-bottom: 16px;
}

.footer-disclaimer {
  color: #666;
  font-size: 10px;
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto;
}

/* ==================== 动画 ==================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 24px;
  }

  .section-subtitle {
    font-size: 14px;
    margin-bottom: 36px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-tagline {
    font-size: 16px;
  }

  .hero-desc {
    font-size: 13px;
  }

  .hero {
    padding: 60px 0 80px;
  }

  .phone-frame {
    width: 150px;
    height: 310px;
    border-radius: 22px;
  }

  /* 移动端导航 */
  .nav-links {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(247, 243, 237, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border-light);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 99;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-link {
    display: block;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 10px;
  }

  .menu-toggle {
    display: flex;
  }

  /* 功能卡片单列 */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* 步骤卡片堆叠 */
  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step-card {
    max-width: 100%;
  }

  /* 平台卡片 2列 */
  .platform-grid {
    gap: 12px;
  }

  .platform-card {
    min-width: calc(50% - 12px);
    max-width: calc(50% - 12px);
  }

  /* 下载附加区堆叠 */
  .download-extra {
    flex-direction: column;
    gap: 20px;
  }

  /* 截图区域 */
  .screenshot-frame {
    width: 130px;
    height: 265px;
    border-radius: 14px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }

  .btn-lg {
    padding: 13px 36px;
    font-size: 15px;
  }

  .platform-card {
    min-width: calc(50% - 8px);
    max-width: calc(50% - 8px);
    padding: 20px 14px;
  }

  .platform-icon {
    font-size: 30px;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
}
