/* 五行八字测算 - 样式表 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif; font-size: 15px; line-height: 1.7; color: #333; background: #f5f5f0; }
a { color: #2c5aa0; text-decoration: none; }
a:hover { color: #c0392b; text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; background: #fff; min-height: 100vh; box-shadow: 0 0 20px rgba(0,0,0,0.08); }

/* 头部 */
.header { background: linear-gradient(135deg, #1a3a5c 0%, #2c5aa0 100%); color: #fff; padding: 0; }
.header-top { display: flex; justify-content: space-between; align-items: center; padding: 15px 25px; flex-wrap: wrap; gap: 10px; }
.logo { font-size: 22px; font-weight: bold; color: #fff !important; }
.logo:hover { color: #f0c040 !important; text-decoration: none; }
.header-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.header-nav a { color: #e0e8f0; font-size: 14px; }
.header-nav a:hover { color: #f0c040; text-decoration: none; }
.header-info { padding: 8px 25px; background: rgba(0,0,0,0.15); font-size: 13px; display: flex; gap: 25px; flex-wrap: wrap; }

/* 主体 */
.main { padding: 25px; }

/* 面包屑 */
.breadcrumb { font-size: 13px; color: #888; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.breadcrumb a { color: #666; }

/* Hero */
.hero { text-align: center; padding: 40px 20px; background: linear-gradient(135deg, #fdf6e3 0%, #fff 100%); border-radius: 8px; margin-bottom: 30px; }
.hero h1 { font-size: 28px; color: #1a3a5c; margin-bottom: 10px; }
.hero-sub { color: #666; margin-bottom: 25px; font-size: 15px; }

/* 表单 */
.search-form { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.form-select, .form-input { padding: 10px 14px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; background: #fff; }
.form-input { min-width: 200px; }
.form-vs { font-weight: bold; color: #c0392b; }
.btn-primary { padding: 10px 24px; background: #c0392b; color: #fff; border: none; border-radius: 4px; font-size: 15px; cursor: pointer; }
.btn-primary:hover { background: #a93226; }
.btn-outline { display: inline-block; padding: 6px 16px; border: 1px solid #2c5aa0; color: #2c5aa0; border-radius: 4px; font-size: 13px; margin: 3px; }
.btn-outline:hover { background: #2c5aa0; color: #fff; text-decoration: none; }
.btn-outline.active { background: #2c5aa0; color: #fff; }

/* 模块卡片 */
.modules h2, .nav-section h2, .today-section h2 { font-size: 20px; color: #1a3a5c; margin-bottom: 18px; padding-left: 12px; border-left: 4px solid #c0392b; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-bottom: 30px; }
.module-card { display: block; padding: 22px; border: 1px solid #e0e0e0; border-radius: 8px; background: #fff; transition: all 0.2s; }
.module-card:hover { border-color: #2c5aa0; box-shadow: 0 4px 12px rgba(44,90,160,0.15); text-decoration: none; transform: translateY(-2px); }
.module-icon { font-size: 36px; margin-bottom: 10px; }
.module-card h3 { font-size: 18px; color: #1a3a5c; margin-bottom: 8px; }
.module-card p { font-size: 13px; color: #666; }

/* 今日 */
.today-section { margin-bottom: 30px; }
.today-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 15px; }
.today-card { padding: 14px; background: #f9f9f5; border-radius: 6px; border: 1px solid #eee; }
.today-card h4 { font-size: 13px; color: #888; margin-bottom: 6px; font-weight: normal; }
.today-card p { font-size: 14px; color: #333; }
.today-more { text-align: right; }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 25px; }
.tag-cloud a { display: inline-block; padding: 5px 14px; background: #f0f4f8; border-radius: 20px; font-size: 13px; color: #2c5aa0; }
.tag-cloud a:hover { background: #2c5aa0; color: #fff; text-decoration: none; }

/* 详情页 */
.detail-section h1 { font-size: 24px; color: #1a3a5c; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid #2c5aa0; }
.section-intro { color: #666; margin-bottom: 20px; }
.info-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; padding: 22px; margin-bottom: 20px; }
.info-card h3 { font-size: 17px; color: #1a3a5c; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.info-card h4 { font-size: 15px; color: #333; margin: 12px 0 6px; }

/* 表格 */
.info-table { width: 100%; border-collapse: collapse; }
.info-table th { width: 100px; text-align: left; padding: 10px 12px; background: #f8f8f5; font-weight: normal; color: #666; border-bottom: 1px solid #eee; }
.info-table td { padding: 10px 12px; border-bottom: 1px solid #eee; }

/* 八字表 */
.bazi-table { width: 100%; border-collapse: collapse; text-align: center; margin-bottom: 12px; }
.bazi-table th { padding: 10px; background: #1a3a5c; color: #fff; font-weight: normal; }
.bazi-table td { padding: 14px 10px; border: 1px solid #e0e0e0; font-size: 18px; }
.bazi-table small { display: block; font-size: 11px; color: #888; margin-top: 3px; }
.bazi-note { font-size: 13px; color: #666; margin-top: 10px; }

/* 五行条形图 */
.wuxing-bar { margin-bottom: 15px; }
.bar-item { display: flex; align-items: center; margin-bottom: 8px; gap: 10px; }
.bar-label { width: 30px; font-weight: bold; font-size: 16px; }
.bar-track { flex: 1; height: 22px; background: #f0f0f0; border-radius: 11px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 11px; transition: width 0.3s; }
.bar-count { width: 30px; text-align: right; font-weight: bold; color: #555; }
.wuxing-summary p { margin-bottom: 6px; }
.wuxing-detail .wx-item { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px dashed #eee; }
.wuxing-detail .wx-item:last-child { border-bottom: none; }

/* 配对分数 */
.pei-score { display: flex; align-items: center; gap: 30px; margin-bottom: 25px; padding: 25px; background: linear-gradient(135deg, #fdf6e3, #fff); border-radius: 8px; }
.score-circle { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.score-circle span { font-size: 36px; font-weight: bold; color: #333; background: #fff; width: 90px; height: 90px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.score-circle small { font-size: 14px; font-weight: normal; }
.pei-level h2 { font-size: 22px; color: #c0392b; margin-bottom: 8px; }
.pei-level p { color: #555; margin-bottom: 5px; }
.pei-tags { color: #e67e22 !important; font-weight: bold; }

/* 配对网格 */
.pei-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pei-item { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; border-radius: 6px; border: 1px solid #e0e0e0; text-align: center; }
.pei-item:hover { text-decoration: none; border-color: #2c5aa0; }
.pei-item.high { background: #e8f5e9; border-color: #81c784; }
.pei-item.mid { background: #fff8e1; border-color: #ffb74d; }
.pei-item.low { background: #ffebee; border-color: #ef9a9a; }
.pei-name { font-size: 14px; font-weight: bold; color: #333; }
.pei-score-small { font-size: 12px; color: #888; margin-top: 4px; }

/* 星座/属相卡片列表 */
.xz-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-bottom: 25px; }
.xz-card { padding: 20px; border: 1px solid #e0e0e0; border-radius: 8px; background: #fafaf7; }
.xz-card h3 { font-size: 18px; margin-bottom: 8px; }
.xz-date, .xz-element { font-size: 13px; color: #888; margin-bottom: 4px; }
.xz-desc { font-size: 13px; color: #666; margin: 10px 0; line-height: 1.6; }
.xz-actions { display: flex; gap: 8px; }

/* 时辰网格 */
.hour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.hour-item { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; border: 1px solid #e0e0e0; border-radius: 6px; text-align: center; font-size: 15px; font-weight: bold; color: #333; }
.hour-item small { font-size: 11px; color: #888; font-weight: normal; margin-top: 4px; }
.hour-item:hover { border-color: #2c5aa0; text-decoration: none; background: #f0f4f8; }
.hour-item.active { background: #2c5aa0; color: #fff; border-color: #2c5aa0; }
.hour-item.active small { color: #ccc; }

/* 日期导航 */
.date-nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; margin-bottom: 20px; border-top: 1px solid #eee; border-bottom: 1px solid #eee; gap: 10px; flex-wrap: wrap; }
.date-prev, .date-next { font-size: 14px; }
.date-list { padding: 6px 16px; background: #f0f4f8; border-radius: 4px; font-size: 13px; }

/* 相关链接 */
.related-links { background: #f9f9f5; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.related-links h3 { font-size: 16px; color: #1a3a5c; margin-bottom: 12px; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.link-grid a { font-size: 13px; padding: 6px 0; }

/* 日历网格 */
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 20px; }
.day-item { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; border: 1px solid #e0e0e0; border-radius: 6px; text-align: center; }
.day-item:hover { border-color: #2c5aa0; text-decoration: none; background: #f0f4f8; }
.day-solar { font-size: 16px; font-weight: bold; color: #1a3a5c; }
.day-lunar { font-size: 11px; color: #888; margin-top: 3px; }
.day-xz { font-size: 11px; color: #c0392b; margin-top: 2px; }

/* 月份导航 */
.month-nav { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.month-link { padding: 6px 14px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.month-link.active { background: #2c5aa0; color: #fff; border-color: #2c5aa0; }
.month-link:hover { text-decoration: none; border-color: #2c5aa0; }

/* 年月卡片 */
.year-month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ym-card { padding: 18px; text-align: center; border: 1px solid #e0e0e0; border-radius: 8px; background: #fafaf7; }
.ym-card:hover { border-color: #2c5aa0; text-decoration: none; }
.ym-card h3 { font-size: 20px; color: #1a3a5c; margin-bottom: 6px; }
.ym-card p { font-size: 13px; color: #666; }
.ym-lunar { color: #c0392b !important; font-size: 12px !important; }

/* 年份列表 */
.year-nav-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.year-link { display: inline-flex; flex-direction: column; align-items: center; padding: 8px 14px; border: 1px solid #ddd; border-radius: 4px; font-size: 15px; font-weight: bold; color: #333; min-width: 60px; }
.year-link small { font-size: 11px; color: #888; font-weight: normal; }
.year-link:hover { border-color: #2c5aa0; text-decoration: none; background: #f0f4f8; }
.year-link.active { background: #2c5aa0; color: #fff; border-color: #2c5aa0; }
.year-link.active small { color: #ccc; }
.decade-block { margin-bottom: 20px; }
.decade-block h3 { font-size: 16px; color: #555; margin-bottom: 10px; }

/* 名字表格 */
.name-table { width: 100%; border-collapse: collapse; }
.name-table th { padding: 10px; background: #f8f8f5; text-align: left; font-weight: normal; color: #666; border-bottom: 1px solid #eee; }
.name-table td { padding: 10px; border-bottom: 1px solid #eee; }
.score-tag { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: bold; }
.score-tag.high { background: #e8f5e9; color: #2e7d32; }
.score-tag.mid { background: #fff8e1; color: #f57f17; }
.score-tag.low { background: #ffebee; color: #c62828; }

/* 姓氏网格 */
.surname-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 8px; margin-bottom: 15px; }
.surname-item { display: flex; align-items: center; justify-content: center; padding: 10px 0; border: 1px solid #e0e0e0; border-radius: 4px; font-size: 16px; font-weight: bold; color: #333; }
.surname-item:hover { border-color: #2c5aa0; background: #f0f4f8; text-decoration: none; color: #2c5aa0; }

/* 双列 */
.dual-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dual-col .col { padding: 15px; background: #fafaf7; border-radius: 6px; }
.dual-col h4 { margin-top: 0; color: #1a3a5c; }

/* 提示 */
.tips p { margin-bottom: 10px; padding-left: 12px; border-left: 3px solid #e0e0e0; }
.note { font-size: 12px; color: #999; margin-top: 10px; }
.more-link { text-align: right; margin-top: 10px; }

/* 时间戳卡片 */
.timestamp-card { background: linear-gradient(135deg, #f0f4f8, #fff); }

/* SEO文本 */
.seo-text { margin-top: 30px; padding: 25px; background: #fafaf7; border-radius: 8px; }
.seo-text h2 { font-size: 18px; color: #1a3a5c; margin-bottom: 12px; }
.seo-text p { margin-bottom: 12px; color: #555; font-size: 14px; }

/* 关系说明 */
.relation-guide p { margin-bottom: 10px; padding: 8px 12px; background: #f9f9f5; border-radius: 4px; font-size: 14px; }
.sx-relation p { margin-bottom: 12px; line-height: 1.8; }

/* 404 */
.error-page { text-align: center; padding: 60px 20px; }
.error-page h1 { font-size: 72px; color: #ccc; margin-bottom: 15px; }
.error-page p { color: #888; margin-bottom: 20px; }

/* 底部 */
.footer { background: #1a3a5c; color: #b0c4de; padding: 25px; text-align: center; }
.footer-links { margin-bottom: 15px; }
.footer-links a { color: #b0c4de; margin: 0 10px; font-size: 13px; }
.footer-links a:hover { color: #f0c040; }
.footer-copyright p { font-size: 12px; color: #8098b0; margin-bottom: 4px; }

/* 响应式 */
@media (max-width: 768px) {
    .header-top { flex-direction: column; align-items: flex-start; }
    .header-nav { gap: 12px; }
    .pei-score { flex-direction: column; text-align: center; }
    .dual-col { grid-template-columns: 1fr; }
    .hero h1 { font-size: 22px; }
    .detail-section h1 { font-size: 20px; }
    .module-grid, .xz-list { grid-template-columns: 1fr; }
}
