/* ============================================
   StockPulse — 富途牛牛风格 移动端优先
   ============================================ */

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

:root {
  --primary: #1A6DFF;
  --primary-dark: #0052D9;
  --primary-light: #E8F0FF;
  --accent: #6C5CE7;
  --success: #00B894;
  --danger: #FF4757;
  --bg: #FFFFFF;
  --bg-alt: #F7F9FC;
  --text: #1A1A2E;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --border: #E5E7EB;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 70px; /* 底部CTA空间 */
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { border: none; background: none; cursor: pointer; font: inherit; }

/* ===== 导航栏 ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s var(--ease);
}

.nav.scrolled {
  background: rgba(255,255,255,0.95);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  max-width: 100%;
}

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

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

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

.nav-cta {
  padding: 8px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}

.nav-cta:active {
  transform: scale(0.96);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 40px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.7) 0%,
    rgba(232,240,255,0.8) 40%,
    rgba(255,255,255,0.9) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(26,109,255,0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 28px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 36px;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26,109,255,0.1);
}

.hero-stat {
  text-align: center;
  flex: 1;
}

.hero-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  display: inline;
}

.hero-stat-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.hero-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s var(--ease);
  min-height: 44px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:active {
  background: var(--primary-dark);
}

.btn-ghost {
  background: rgba(255,255,255,0.8);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* ===== Section Common ===== */
.section-header {
  text-align: center;
  padding: 0 20px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.section-desc {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 6px;
}

/* ===== Tab 产品区 ===== */
.products {
  padding: 48px 0 32px;
  background: var(--bg);
}

.tab-bar {
  display: flex;
  gap: 0;
  padding: 0 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  transition: all 0.2s var(--ease);
  text-align: center;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-panel {
  display: none;
  padding: 0 16px;
}

.tab-panel.active {
  display: block;
}

/* ===== Product Card ===== */
.product-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  transition: all 0.2s var(--ease);
  flex-wrap: wrap;
}

.product-card:active {
  background: var(--bg-alt);
  transform: scale(0.99);
}

.product-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-card-icon.blue { background: #E8F0FF; color: var(--primary); }
.product-card-icon.purple { background: #F0EDFF; color: var(--accent); }
.product-card-icon.teal { background: #E0F7F0; color: #00B894; }
.product-card-icon.orange { background: #FFF3E8; color: #F59E0B; }
.product-card-icon.green { background: #E0F7F0; color: #00B894; }

.product-card-body {
  flex: 1;
  min-width: 0;
}

.product-card-body h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.product-card-body p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

.product-card-link {
  width: 100%;
  text-align: right;
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  margin-top: 4px;
}

/* ===== 多元投资 ===== */
.multi-asset {
  padding: 48px 0 32px;
  background: var(--bg-alt);
}

.asset-scroll {
  display: flex;
  gap: 12px;
  padding: 0 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.asset-scroll::-webkit-scrollbar { display: none; }

.asset-card {
  flex: 0 0 240px;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  position: relative;
}

.asset-card-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.asset-card-tag.purple { background: var(--accent); }

.asset-card h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.asset-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 12px;
}

.asset-card-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

/* ===== 行情中心 ===== */
.market {
  padding: 48px 0 32px;
  background: var(--bg);
}

.index-cards {
  display: flex;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.index-cards::-webkit-scrollbar { display: none; }

.index-card {
  flex: 0 0 calc(33.333% - 7px);
  min-width: 110px;
  padding: 14px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.index-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.index-name {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

.index-change {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.index-change.up { color: var(--success); background: rgba(0,184,148,0.1); }
.index-change.down { color: var(--danger); background: rgba(255,71,87,0.1); }

.index-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.market-tabs {
  display: flex;
  gap: 0;
  padding: 0 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.market-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  text-align: center;
  transition: all 0.2s var(--ease);
}

.market-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.market-table-wrap {
  padding: 0 16px;
}

.market-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.market-table-header span:first-child { flex: 1; }
.market-table-header span:nth-child(2) { width: 80px; text-align: right; }
.market-table-header span:last-child { width: 70px; text-align: right; }

.market-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(229,231,235,0.5);
}

.market-row:last-child { border-bottom: none; }

.market-row-name {
  flex: 1;
  min-width: 0;
}

.market-row-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-row-code {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.market-row-price {
  width: 80px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.market-row-change {
  width: 70px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

.market-row-change.up { color: var(--success); background: rgba(0,184,148,0.1); }
.market-row-change.down { color: var(--danger); background: rgba(255,71,87,0.1); }

/* ===== 平台优势 ===== */
.advantages {
  padding: 48px 0 32px;
  background: var(--bg-alt);
}

.adv-grid {
  padding: 0 16px;
}

.adv-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.adv-item:last-child { border-bottom: none; }

.adv-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adv-item h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.adv-item p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ===== 安全保障 ===== */
.security {
  padding: 48px 0 32px;
  background: var(--bg);
}

.security-cards {
  padding: 0 16px;
}

.security-card {
  padding: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.security-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.security-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.security-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ===== CTA ===== */
.cta {
  position: relative;
  padding: 60px 20px;
  text-align: center;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 0;
}

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

.cta h2 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.cta > .cta-content > p {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 24px;
}

.cta-form {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto 12px;
}

.cta-input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: all 0.2s var(--ease);
  min-height: 48px;
}

.cta-input::placeholder { color: rgba(255,255,255,0.6); }
.cta-input:focus { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.2); }
.cta-input.error { border-color: #FF4757; animation: shake 0.3s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.cta-btn {
  padding: 14px 24px;
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s var(--ease);
  min-height: 48px;
}

.cta-btn:active { transform: scale(0.97); }

.cta-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

/* ===== 下载区 ===== */
.download {
  padding: 48px 0 32px;
  background: var(--bg-alt);
  text-align: center;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px;
  max-width: 320px;
  margin: 0 auto;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s var(--ease);
  min-height: 48px;
}

.download-btn:active {
  background: var(--bg-alt);
  transform: scale(0.98);
}

/* ===== Footer ===== */
.footer {
  padding: 40px 20px 24px;
  background: #1A1A2E;
  color: rgba(255,255,255,0.7);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-col {
  flex: 1;
  min-width: 100px;
}

.footer-col h5 {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-col a:active { color: rgba(255,255,255,0.8); }

.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
}

.footer-legal p {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
  margin-bottom: 4px;
}

/* ===== 底部固定 CTA ===== */
.bottom-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  transform: translateY(100%);
  transition: transform 0.3s var(--ease);
}

.bottom-cta.visible {
  transform: translateY(0);
}

.bottom-cta-text {
  display: flex;
  flex-direction: column;
}

.bottom-cta-text strong {
  font-size: 14px;
  color: var(--text);
}

.bottom-cta-text span {
  font-size: 12px;
  color: var(--text-2);
}

.bottom-cta-btn {
  padding: 10px 20px;
  font-size: 14px;
  min-height: 40px;
}

/* ===== 滚动淡入动画 ===== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

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

/* ===== 平板适配 (>480px) ===== */
@media (min-width: 481px) {
  .hero-title { font-size: 42px; }

  .tab-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .tab-panel.active { display: grid; }

  .product-card {
    flex-direction: column;
    align-items: stretch;
  }

  .product-card-link {
    text-align: left;
    margin-top: 8px;
  }

  .index-cards {
    justify-content: center;
  }

  .index-card {
    flex: 1;
    min-width: 140px;
  }

  .adv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }

  .adv-item {
    border-bottom: none;
    padding: 16px 0;
  }

  .security-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
  }

  .security-card {
    margin-bottom: 0;
  }

  .download-buttons {
    flex-direction: row;
    max-width: 100%;
  }

  .download-btn {
    flex: 1;
  }
}

/* ===== 大屏适配 (>768px) ===== */
@media (min-width: 769px) {
  .hero { padding: 100px 40px 60px; }
  .hero-title { font-size: 52px; }
  .hero-stat-num { font-size: 28px; }

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

  .tab-panel {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
    margin: 0 auto;
  }

  .adv-grid {
    max-width: 600px;
    margin: 0 auto;
  }

  .security-cards {
    max-width: 700px;
    margin: 0 auto;
  }

  .market-table-wrap {
    max-width: 600px;
    margin: 0 auto;
  }
}
