/* 炒股百科 - 全新首页样式 */

/* === Variables === */
:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text2: #64748b;
  --text3: #94a3b8;
  --border: #e2e8f0;
  --accent: #e53e3e;
  --accent2: #f56565;
  --blue: #3b82f6;
  --blue2: #60a5fa;
  --green: #10b981;
  --orange: #f59e0b;
  --purple: #8b5cf6;
  --hd-h: 64px;
  --radius: 12px;
}

/* === Base Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }

/* === Header === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--hd-h);
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.header-btn-qihuo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: linear-gradient(135deg, #e53e3e, #fc8181);
  color: #fff;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(229,62,62,0.3);
}
.header-btn-qihuo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(229,62,62,0.45);
}

/* === Hero Section === */
.hero-section {
  position: relative;
  margin-top: var(--hd-h);
  padding: 80px 24px 100px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(229,62,62,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(59,130,246,0.1) 0%, transparent 50%);
}
.hero-content {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  margin-bottom: 24px;
}
.pulse {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #fff, #f56565);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 18px;
  color: #94a3b8;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 20px rgba(229,62,62,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(229,62,62,0.5);
  text-decoration: none;
}
.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  text-decoration: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}
.stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: transform 0.3s, border-color 0.3s;
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(229,62,62,0.5);
}
.stat-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}
.stat-num {
  font-size: 42px;
  font-weight: 800;
  color: var(--accent2);
  display: inline;
}
.stat-unit {
  font-size: 20px;
  color: var(--accent2);
  font-weight: 600;
}
.stat-label {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
}

/* === Sections === */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
}
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.section-tag.hot { background: rgba(239,68,68,0.1); color: var(--accent); }
.section-tag.blue { background: rgba(59,130,246,0.1); color: var(--blue); }
.section-tag.red { background: rgba(239,68,68,0.1); color: var(--accent); }
.section-tag.green { background: rgba(16,185,129,0.1); color: var(--green); }
.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.section-desc {
  font-size: 15px;
  color: var(--text2);
}

/* === Knowledge Cards === */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.kn-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s;
}
.kn-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: var(--accent);
  text-decoration: none;
}
.kn-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239,68,68,0.1);
  border-radius: 12px;
  flex-shrink: 0;
}
.kn-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.kn-desc {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
}

/* === System Cards === */
.system-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.sys-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.sys-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.sys-card:hover::before { transform: scaleX(1); }
.sys-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  text-decoration: none;
}
.sys-card.kline::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.sys-card.ma::before { background: linear-gradient(90deg, #10b981, #34d399); }
.sys-card.indicators::before { background: linear-gradient(90deg, var(--accent), #f87171); }
.sys-card.volume::before { background: linear-gradient(90deg, var(--blue), #60a5fa); }
.sys-card.pattern::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.sys-card.selection::before { background: linear-gradient(90deg, #ec4899, #f472b6); }
.sys-card.fundamental::before { background: linear-gradient(90deg, #14b8a6, #2dd4bf); }
.sys-card.strategy::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.sys-card.sector::before { background: linear-gradient(90deg, #f97316, #fb923c); }

.sys-icon {
  font-size: 36px;
  margin-bottom: 12px;
}
.sys-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.sys-count {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 12px;
}
.sys-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.sys-tags span {
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text2);
}

/* === Sector Groups === */
.sector-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sector-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  transition: box-shadow 0.3s;
}
.sector-group:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.group-icon { font-size: 20px; }
.group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-red, .tag-blue {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.tag-red {
  color: var(--accent);
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
}
.tag-red:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
}
.tag-blue {
  color: var(--blue);
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
}
.tag-blue:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
}

/* === Concept Groups === */
.concept-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.concept-group {
  background: var(--card);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 16px;
  padding: 20px 24px;
  transition: box-shadow 0.3s;
}
.concept-group:hover {
  box-shadow: 0 8px 24px rgba(59,130,246,0.1);
}
.concept-group .group-title {
  color: var(--blue);
  border-bottom-color: rgba(59,130,246,0.2);
}

/* === Chapters Grid === */
.chapters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ch-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s;
}
.ch-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  border-color: var(--accent);
  text-decoration: none;
}
.ch-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.2;
  line-height: 1;
}
.ch-card:hover .ch-num { opacity: 1; }
.ch-content h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.ch-content p {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 8px;
}
.ch-pages {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(239,68,68,0.1);
  color: var(--accent);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* === Promo Section === */
.promo-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}
.promo-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(229,62,62,0.15) 0%, transparent 70%);
}
.promo-content {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.promo-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(229,62,62,0.2);
  border: 1px solid rgba(229,62,62,0.4);
  border-radius: 20px;
  color: #f56565;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.promo-title {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 40px;
  letter-spacing: -0.5px;
}
.promo-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
  text-align: left;
}
.feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 28px 24px;
  transition: all 0.3s;
}
.feature-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(229,62,62,0.3);
  transform: translateY(-4px);
}
.fc-icon { font-size: 32px; margin-bottom: 12px; }
.fc-title {
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 10px;
}
.fc-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.7;
}
.promo-mission {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 32px;
  line-height: 1.8;
}
.promo-btn {
  display: inline-block;
  padding: 16px 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(229,62,62,0.4);
}
.promo-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(229,62,62,0.5);
  text-decoration: none;
}

/* === Footer === */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}
.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}
.footer-links a {
  color: var(--text2);
  font-size: 14px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-info {
  color: var(--text3);
  font-size: 13px;
  line-height: 1.8;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
  .system-grid { grid-template-columns: repeat(2, 1fr); }
  .chapters-grid { grid-template-columns: repeat(2, 1fr); }
  .concept-groups { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .site-header { padding: 0 16px; gap: 12px; }
  .logo-sub { display: none; }
  .header-center { display: none; }
  .hero-section { padding: 60px 16px 80px; }
  .hero-title { font-size: 32px; }
  .hero-desc { font-size: 15px; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section { padding: 48px 16px; }
  .section-title { font-size: 26px; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .system-grid { grid-template-columns: 1fr; }
  .chapters-grid { grid-template-columns: 1fr; }
  .sector-group { padding: 16px; }
  .group-tags { gap: 8px; }
  .tag-red, .tag-blue { padding: 5px 12px; font-size: 12px; }
  .promo-title { font-size: 26px; margin-bottom: 28px; }
  .promo-features { grid-template-columns: 1fr; gap: 12px; }
  .feature-card { padding: 20px 18px; }
  .promo-mission { font-size: 14px; }
  .footer-links { gap: 16px; }
}
