/* fortune_b 风格 (fortune 站 - 八字命理)
   主题: 中国红渐变 / 传统纹样 / 国风命理
   特点: 暖色调 + 朱红 + 圆形装饰
*/

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Songti SC", "STSong", serif;
  line-height: 1.8;
  color: #2d1f1f;
  background: #fdf6f0;
  background-image: linear-gradient(135deg, #fdf6f0 0%, #fef9f3 100%);
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.banner-top { padding: 14px 0; text-align: center; background: #fef9f3; }
.banner-top .banner-content {
  display: inline-flex; align-items: center; justify-content: center;
  max-width: 728px; width: 100%; height: 90px; padding: 0 24px;
  border-radius: 4px; color: white; font-size: 18px; font-weight: 700;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
}

.banner-wrap { display: block; }
.banner-link { display: block; text-decoration: none; }
.banner-content { display: inline-flex; align-items: center; padding: 12px 20px;
  border-radius: 4px; color: white; font-weight: 600; transition: transform 0.2s;
  font-family: "STKaiti", "KaiTi", serif; }
.banner-content:hover { transform: translateY(-2px); }
.banner-icon { font-size: 24px; margin-right: 12px; }
.banner-arrow { font-size: 22px; margin-left: 12px; }

.banner-sidebar { position: fixed; right: 20px; bottom: 100px; width: 300px; z-index: 100; }
.banner-sidebar .banner-content { display: flex; width: 300px; height: 250px;
  flex-direction: column; justify-content: center; padding: 20px; text-align: center;
  border: 2px solid #c0392b; }

.banner-bottom { margin: 40px 0; text-align: center; }
.banner-bottom .banner-content { width: 100%; max-width: 728px; height: 90px; justify-content: center; }

.banner-inline { margin: 30px 0; padding: 16px; background: white;
  border: 1px solid var(--primary); border-left: 4px solid var(--primary);
  border-radius: 4px; text-align: center; }
.banner-inline .banner-content { width: 100%; height: 60px; justify-content: center; font-size: 16px; }

.banner-popup { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center; }
.banner-popup-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.banner-popup-content { position: relative; width: 480px; max-width: 90vw; padding: 32px 40px;
  background: white; border: 2px solid var(--primary); border-radius: 8px;
  box-shadow: 0 20px 60px rgba(192, 57, 43, 0.3); text-align: center; z-index: 1; }
.popup-cta { display: inline-block; padding: 14px 32px; background: var(--primary);
  color: white !important; border-radius: 4px; font-weight: 700; font-size: 16px; text-decoration: none; }
.popup-cta:hover { background: var(--accent); }
.banner-popup-close { position: absolute; top: 12px; right: 16px; width: 32px; height: 32px;
  background: transparent; border: none; font-size: 24px; color: #a0aec0; cursor: pointer; }

.site-header { padding: 20px 0; background: white;
  border-bottom: 3px double var(--primary); }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.site-header .logo { display: flex; flex-direction: column; text-decoration: none; }
.site-header .logo .site-name { font-size: 24px; font-weight: 700;
  font-family: "STKaiti", "KaiTi", "STSong", serif; }
.site-header .logo small { font-size: 11px; color: #a0aec0; letter-spacing: 2px; text-transform: uppercase; }
.site-header nav { display: flex; gap: 24px; }
.site-header nav a { text-decoration: none; color: #4a2828; font-weight: 500; }
.site-header nav a:hover { color: var(--accent); }

main { padding: 30px 20px; min-height: 60vh; }

.hero { text-align: center; padding: 40px 0 30px; }
.hero h1 { font-size: 34px; margin-bottom: 12px;
  font-family: "STKaiti", "KaiTi", "STSong", serif; color: var(--accent); }
.hero .subtitle { font-size: 16px; color: #6b4f4f; }
.hero .stats { font-size: 13px; color: #a78bfa; margin-top: 8px; }

.section-title { font-size: 24px; margin: 30px 0 20px; padding: 8px 20px;
  background: var(--primary); color: white; display: inline-block;
  font-family: "STKaiti", "KaiTi", serif; border-radius: 4px; }

.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-bottom: 40px; }
.article-card { padding: 20px; background: white;
  border: 1px solid #e8d4c4; border-radius: 8px;
  text-decoration: none; color: #2d1f1f; transition: all 0.2s;
  font-family: "STKaiti", "KaiTi", serif; }
.article-card:hover { border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(192, 57, 43, 0.15); transform: translateY(-4px); }
.article-card.popular { background: linear-gradient(135deg, white, #fef9f3);
  border: 1px solid var(--primary); }
.article-card h3 { font-size: 16px; margin-bottom: 12px; line-height: 1.5; }
.article-card .meta { font-size: 12px; color: #a0786a; display: flex; gap: 12px; }

.article-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.article-item { padding: 20px; background: white; border: 1px solid #e8d4c4; border-radius: 8px; }
.article-item a { text-decoration: none; color: inherit; display: block; }
.article-item h3 { font-size: 18px; margin-bottom: 8px; color: var(--accent);
  font-family: "STKaiti", "KaiTi", serif; }
.article-item:hover h3 { color: var(--primary); }
.article-item .excerpt { font-size: 14px; color: #6b4f4f; margin-bottom: 8px; line-height: 1.6; }
.article-item .meta { font-size: 12px; color: #a0786a; display: flex; gap: 16px; }
.tag-pill { display: inline-block; padding: 2px 10px; font-size: 11px;
  border-radius: 4px; color: white !important; background: var(--primary); }

.article-detail { max-width: 800px; margin: 0 auto; background: white;
  padding: 30px; border: 1px solid #e8d4c4; border-radius: 8px; }
.article-header { padding: 30px 0 20px; border-bottom: 2px solid var(--primary); margin-bottom: 30px; }
.article-header h1 { font-size: 32px; line-height: 1.5; margin-bottom: 16px;
  font-family: "STKaiti", "KaiTi", "STSong", serif; color: var(--accent); }
.article-header .meta { font-size: 13px; color: #a0786a; display: flex; gap: 16px; }
.article-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }

.article-content { font-size: 16px; line-height: 2; color: #2d1f1f;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif; }
.article-content h1, .article-content h2, .article-content h3 { margin: 30px 0 16px;
  font-family: "STKaiti", "KaiTi", "STSong", serif; color: var(--accent); }
.article-content h2 { font-size: 26px; padding: 8px 16px; background: var(--primary);
  color: white; border-radius: 4px; text-align: center; }
.article-content h3 { font-size: 20px; }
.article-content p { margin-bottom: 16px; text-indent: 2em; }
.article-content ul, .article-content ol { margin: 16px 0 16px 24px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote { border-left: 4px solid var(--primary);
  padding: 12px 20px; margin: 20px 0; background: #fef9f3;
  font-family: "STKaiti", serif; }

.disclaimer { margin: 40px 0; padding: 16px 20px; background: #fff8e6;
  border-left: 4px solid #f59e0b; border-radius: 8px; }
.disclaimer p { font-size: 13px; color: #92400e; margin: 0; }

.related-articles { max-width: 800px; margin: 40px auto 0; padding: 20px;
  background: white; border: 1px solid #e8d4c4; border-radius: 8px; }
.related-articles h3 { font-size: 18px; margin-bottom: 16px; color: var(--accent);
  font-family: "STKaiti", serif; }
.related-articles ul { list-style: none; }
.related-articles li { padding: 8px 0; border-bottom: 1px solid #e8d4c4; }
.related-articles a { color: #4a2828; text-decoration: none; font-size: 14px; }
.related-articles a:hover { color: var(--primary); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 40px 0; }
.pagination a { padding: 8px 20px; border: 1px solid var(--primary); border-radius: 4px;
  text-decoration: none; color: var(--primary); }
.pagination a:hover { background: var(--primary); color: white; }

.empty-state, .error-page { text-align: center; padding: 80px 20px; color: #6b4f4f; }
.error-page h1 { font-size: 80px; color: var(--primary); margin-bottom: 16px;
  font-family: "STKaiti", serif; }
.error-page a { color: var(--accent); text-decoration: none; }

.about-content { max-width: 720px; margin: 0 auto; padding: 20px 0; }
.about-content h1 { font-size: 28px; margin-bottom: 24px; color: var(--accent);
  font-family: "STKaiti", serif; }
.about-content h2 { font-size: 20px; margin: 24px 0 12px; color: var(--primary); }
.about-content p { margin-bottom: 16px; line-height: 1.9; font-family: "STKaiti", serif; }

.cta-section { text-align: center; padding: 40px 0; border-top: 2px double var(--primary); margin-top: 40px; }
.cta-section a { font-size: 16px; font-weight: 500; text-decoration: none; color: var(--accent); }

.site-footer { border-top: 2px double var(--primary);
  padding: 30px 0; background: #fef9f3; margin-top: 60px; }
.site-footer p { text-align: center; font-size: 13px; color: #a0786a; margin-bottom: 4px; }

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .site-header .container { flex-direction: column; gap: 12px; }
  .hero h1 { font-size: 24px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 22px; }
  .article-content { font-size: 15px; }
  .banner-sidebar { display: none; }
}

/* ============ 内容板块 (公共, 所有站用) ============ */
.content-block {
  margin-bottom: 56px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.block-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.block-icon { font-size: 32px; flex: 0 0 auto; }
.block-titles { flex: 1; }
.block-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; color: var(--text); letter-spacing: -0.3px; }
.block-subtitle { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* Ranking List */
.ranking-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ranking-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px; background: var(--bg); border-radius: 10px; border: 1px solid var(--border); transition: all 0.2s; }
.ranking-item:hover { border-color: var(--primary); transform: translateX(4px); }
.rank-num { flex: 0 0 32px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--text-muted); color: white; border-radius: 8px; font-size: 14px; font-weight: 700; }
.ranking-item:nth-child(1) .rank-num { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.ranking-item:nth-child(2) .rank-num { background: linear-gradient(135deg, #94a3b8, #64748b); }
.ranking-item:nth-child(3) .rank-num { background: linear-gradient(135deg, #d97706, #b45309); }
.ranking-item:nth-child(4) .rank-num { background: linear-gradient(135deg, #4a5568, #2d3748); }
.rank-content { flex: 1; min-width: 0; }
.rank-content h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.rank-content p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* Guide List */
.guide-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.guide-item { padding: 18px; background: var(--bg); border-radius: 10px; border-left: 4px solid var(--primary); transition: all 0.2s; }
.guide-item:hover { background: linear-gradient(135deg, var(--bg), var(--bg-alt)); box-shadow: var(--shadow-sm); }
.guide-item h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--primary); }
.guide-item p { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* Cards Grid */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.info-card { padding: 18px; background: linear-gradient(135deg, var(--bg), var(--bg-alt)); border: 1px solid var(--border); border-radius: 10px; transition: all 0.2s; }
.info-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.info-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.info-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* FAQ List */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: all 0.2s; }
.faq-item[open] { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.faq-question { padding: 16px 20px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--text); position: relative; list-style: none; }
.faq-question::-webkit-details-marker { display: none; }
.faq-question::before { content: 'Q'; display: inline-block; width: 24px; height: 24px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; border-radius: 6px; text-align: center; line-height: 24px; font-size: 13px; margin-right: 12px; font-weight: 700; vertical-align: middle; }
.faq-question::after { content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 300; color: var(--text-muted); transition: transform 0.2s; }
.faq-item[open] .faq-question::after { content: '−'; }
.faq-answer { padding: 0 20px 18px 56px; font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* Comparison Table */
.comparison-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
.comparison-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.comparison-table th { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; padding: 12px 16px; text-align: left; font-weight: 600; font-size: 12px; letter-spacing: 0.5px; text-transform: uppercase; }
.comparison-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) { background: var(--bg); }
.comparison-table tr:hover { background: rgba(0,0,0,0.02); }

/* People Grid */
.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.person-card { padding: 20px; background: linear-gradient(135deg, var(--bg), var(--bg-alt)); border: 1px solid var(--border); border-radius: 12px; text-align: center; transition: all 0.2s; }
.person-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.person-card h4 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.person-card h5 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--primary); }
.person-date { display: inline-block; background: var(--primary); color: white; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; margin-bottom: 8px; }
.person-tag { display: inline-block; background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; margin-right: 4px; }
.person-meta { display: block; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.person-meaning, .person-traits, .person-reason { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.6; }
.person-match { display: inline-block; background: #fef3c7; color: #92400e; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; margin-top: 6px; }

/* Responsive */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-list { grid-template-columns: 1fr; }
  .ranking-list { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: repeat(3, 1fr); }
  .content-block { padding: 24px; }
}
@media (max-width: 640px) {
  .card-grid, .guide-list, .ranking-list, .people-grid { grid-template-columns: 1fr; }
  .block-title { font-size: 18px; }
  .content-block { padding: 20px; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; font-size: 12px; }
}

/* ============ 多级导航菜单 (公共) ============ */
.main-nav { position: relative; }
.nav-item { position: relative; }
.nav-arrow { font-size: 10px; margin-left: 4px; opacity: 0.6; }
.nav-dropdown { position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.2s; z-index: 100; }
.nav-item.has-dropdown:hover .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: block; padding: 10px 14px; font-size: 13px; color: var(--text); border-radius: 6px; transition: all 0.15s; white-space: nowrap; }
.dropdown-item:hover { background: var(--bg); color: var(--primary); padding-left: 18px; }
.header-tagline { font-size: 12px; color: var(--text-muted); max-width: 200px; text-align: right; }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* ============ Footer 增强 (公共) ============ */
.footer-disclaimer { padding: 20px 0; margin: 20px 0; border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-disclaimer p { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.6; }
.footer-social { display: flex; gap: 12px; margin-top: 12px; }
.footer-social a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.08); border-radius: 8px; font-size: 16px; transition: all 0.2s; }
.footer-social a:hover { background: var(--primary); transform: translateY(-2px); }
