/* 同花顺财经落地页 - 共享样式 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #e93030;
  --red-light: #fff0f0;
  --green: #00a854;
  --green-light: #f0fff4;
  --orange: #ff6600;
  --blue: #4691ff;
  --text: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --border: #eee;
  --bg: #f5f5f5;
  --white: #fff;
  --header-h: 56px;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== 下载按钮 ===== */
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: linear-gradient(135deg, #ff4d4d 0%, #e93030 50%, #cc1a1a 100%);
  color: #fff !important;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(233, 48, 48, .4);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.download-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: rgba(255,255,255,.15);
  transform: skewX(-20deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -60%; }
  40%, 100% { left: 120%; }
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 48, 48, .55);
}

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

.download-btn--lg {
  padding: 16px 48px;
  font-size: 18px;
  border-radius: 8px;
}

.download-btn--outline {
  background: transparent;
  color: var(--red) !important;
  border: 2px solid var(--red);
  box-shadow: none;
}

.download-btn--outline::before { display: none; }

.download-btn--outline:hover {
  background: var(--red-light);
  box-shadow: 0 4px 14px rgba(233, 48, 48, .2);
}

.download-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ===== Header ===== */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
}

.header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.header__logo img { height: 32px; width: auto; }

.header__nav {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}

.header__nav a {
  font-size: 15px;
  color: var(--text);
  transition: color .2s;
}

.header__nav a:hover { color: var(--red); }

.header__search {
  flex: 1;
  max-width: 360px;
  position: relative;
}

.header__search input {
  width: 100%;
  height: 36px;
  padding: 0 16px 0 38px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f8f8f8;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}

.header__search input:focus { border-color: var(--red); }

.header__search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.header__actions a {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.header__actions a:hover { color: var(--red); }

.header__login {
  padding: 6px 16px;
  border: 1px solid var(--red);
  border-radius: 4px;
  color: var(--red) !important;
  font-size: 13px;
}

.header__download-sm {
  padding: 6px 14px;
  background: var(--red);
  color: #fff !important;
  border: 1px solid var(--red);
  border-radius: 4px;
  font-size: 13px;
  transition: background .2s;
}

.header__download-sm:hover {
  background: #cc1a1a;
  color: #fff !important;
}

/* ===== 指数栏 ===== */
.indices-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.indices-bar::-webkit-scrollbar { display: none; }

.indices-bar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  gap: 0;
  min-width: max-content;
}

.index-item {
  padding: 10px 16px;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: background .2s;
  min-width: 120px;
}

.index-item:first-child { border-left: 1px solid var(--border); }
.index-item:hover, .index-item.active { background: var(--red-light); }

.index-item__name {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.index-item__value {
  font-size: 16px;
  font-weight: 600;
}

.index-item__change {
  font-size: 12px;
}

.up { color: var(--red); }
.down { color: var(--green); }

/* ===== 主布局 ===== */
.main-layout {
  max-width: var(--max-w);
  margin: 12px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 12px;
}

/* ===== 图表区 ===== */
.chart-section {
  background: var(--white);
  border-radius: 4px;
  padding: 16px;
}

.chart-section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.chart-section__title {
  font-size: 22px;
  font-weight: 700;
}

.chart-section__stats {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.chart-section__stats span { margin-right: 4px; }

.chart-area {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
}

.chart-canvas {
  height: 220px;
  position: relative;
}

.chart-canvas svg { width: 100%; height: 100%; }

.turnover-box {
  background: #fafafa;
  border-radius: 4px;
  padding: 12px;
  font-size: 12px;
}

.turnover-box__label { color: var(--text-secondary); margin-bottom: 4px; }

.turnover-box__value {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.turnover-box__row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}

.turnover-box__row:first-of-type { border-top: none; }

/* ===== 快捷入口 ===== */
.quick-nav {
  background: var(--white);
  border-radius: 4px;
  padding: 16px;
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.quick-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform .2s;
}

.quick-nav__item:hover { transform: translateY(-2px); }

.quick-nav__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.quick-nav__label {
  font-size: 12px;
  color: var(--text);
  text-align: center;
}

/* ===== 新闻区 ===== */
.news-section {
  background: var(--white);
  border-radius: 4px;
  padding: 16px;
  margin-top: 12px;
}

.news-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  scrollbar-width: none;
}

.news-tabs::-webkit-scrollbar { display: none; }

.news-tabs__item {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}

.news-tabs__item.active,
.news-tabs__item:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

.news-featured {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.news-featured__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--red);
  color: #fff;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  margin-right: 6px;
  vertical-align: middle;
}

.news-featured__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
  cursor: pointer;
}

.news-featured__title:hover { color: var(--red); }

.news-featured__summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}

.news-featured__meta {
  font-size: 12px;
  color: var(--text-muted);
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.news-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.news-card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 6px;
  cursor: pointer;
}

.news-card__title:hover { color: var(--red); }

.news-card__summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.news-card--with-img {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 10px;
}

.news-card__thumb {
  width: 100px;
  height: 68px;
  border-radius: 4px;
  object-fit: cover;
  background: #eee;
}

/* ===== 快讯侧边栏 ===== */
.flash-news {
  background: var(--white);
  border-radius: 4px;
  padding: 16px;
  position: sticky;
  top: calc(var(--header-h) + 12px);
  max-height: calc(100vh - var(--header-h) - 24px);
  overflow-y: auto;
}

.flash-news__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
}

.flash-news__badge {
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}

.flash-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  scrollbar-width: none;
}

.flash-tabs__item {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.flash-tabs__item.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

.flash-list { position: relative; }

.flash-list::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.flash-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  padding: 10px 0;
  position: relative;
}

.flash-item__time {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  padding-top: 2px;
}

.flash-item__dot {
  position: absolute;
  left: 24px;
  top: 14px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--white);
  z-index: 1;
}

.flash-item__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 4px;
}

.flash-item__content {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.flash-item__stock {
  display: inline;
  font-weight: 600;
}

/* ===== AI 助手浮条 ===== */
.ai-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  width: 480px;
  max-width: calc(100% - 32px);
}

.ai-bar__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.ai-bar__icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #4691ff, #7b61ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}

.ai-bar__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text-muted);
  background: transparent;
}

/* ===== 下载页 ===== */
.download-hero {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 40%, #f0f7ff 100%);
  padding: 60px 0 80px;
  text-align: center;
}

.download-hero__title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #e93030, #ff6600);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.download-hero__subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.download-hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.download-hero__note {
  font-size: 13px;
  color: var(--text-muted);
}

.download-hero__platforms {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 32px;
}

.platform-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

.features-section {
  padding: 60px 0;
  background: var(--white);
}

.section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-desc {
  text-align: center;
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
}

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

.feature-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.feature-card__title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.seo-section {
  padding: 60px 0;
  background: var(--bg);
}

.seo-content {
  max-width: 800px;
  margin: 0 auto;
}

.seo-content h2 {
  font-size: 22px;
  margin: 24px 0 12px;
  color: var(--text);
}

.seo-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.seo-content ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}

.seo-content li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  list-style: disc;
}

.download-cta {
  background: linear-gradient(135deg, #e93030, #cc1a1a);
  padding: 48px 0;
  text-align: center;
  color: #fff;
}

.download-cta__title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.download-cta__desc {
  font-size: 15px;
  opacity: .9;
  margin-bottom: 24px;
}

.download-cta .download-btn {
  background: #fff;
  color: var(--red) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

.download-cta .download-btn::before { display: none; }

/* ===== Footer ===== */
.footer {
  background: #2a2a2a;
  color: #aaa;
  padding: 32px 0;
  font-size: 12px;
  text-align: center;
  line-height: 2;
}

.footer a { color: #ccc; }
.footer a:hover { color: #fff; }

.footer__links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* ===== 下载横幅 ===== */
.download-banner {
  background: linear-gradient(90deg, #fff5f5, #fff);
  border: 1px solid #ffd6d6;
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.download-banner__text h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.download-banner__text p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .main-layout { grid-template-columns: 1fr; }
  .flash-news { position: static; max-height: none; }
  .quick-nav { grid-template-columns: repeat(4, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .chart-area { grid-template-columns: 1fr; }
  .turnover-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .header__nav { display: none; }
  .header__search { max-width: 200px; }
}

@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; }
  .quick-nav { grid-template-columns: repeat(3, 1fr); }
  .download-hero__title { font-size: 26px; }
  .download-banner { flex-direction: column; text-align: center; }
}
