/* 周公解梦 - 全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    background: #f8f6f1;
}
a { color: #8b1a1a; text-decoration: none; transition: color .2s; }
a:hover { color: #c9a227; }
img { max-width: 100%; height: auto; border: 0; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.clearfix::after { content: ""; display: table; clear: both; }

/* 顶部 */
.top-bar {
    background: #8b1a1a;
    color: #fff;
    font-size: 13px;
    padding: 8px 0;
}
.top-bar a { color: #ffdf8a; }
.top-bar a:hover { color: #fff; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }

/* 头部 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    padding: 18px 0;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #8b1a1a 0%, #c9a227 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 24px; font-weight: bold;
}
.logo-text h1 { font-size: 26px; color: #8b1a1a; line-height: 1.2; }
.logo-text p { font-size: 13px; color: #888; }

/* 导航 */
.main-nav { background: #fff; border-top: 1px solid #eee; }
.main-nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-menu { display: flex; }
.nav-menu li a {
    display: block; padding: 14px 22px;
    color: #444; font-size: 15px; font-weight: 500;
}
.nav-menu li a:hover, .nav-menu li.active a {
    color: #8b1a1a; background: #fdf8ee;
    border-bottom: 2px solid #c9a227;
}
.header-search { position: relative; }
.header-search input {
    width: 260px; padding: 8px 38px 8px 14px;
    border: 1px solid #ddd; border-radius: 20px;
    font-size: 14px; outline: none;
}
.header-search input:focus { border-color: #c9a227; }
.header-search button {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; cursor: pointer; color: #8b1a1a;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #8b1a1a 0%, #a82b2b 50%, #c9a227 100%);
    color: #fff; padding: 70px 0 80px; text-align: center;
}
.hero h2 { font-size: 38px; margin-bottom: 12px; font-weight: 700; }
.hero p { font-size: 17px; opacity: .95; margin-bottom: 32px; }
.search-box {
    max-width: 720px; margin: 0 auto;
    background: rgba(255,255,255,.18);
    padding: 8px; border-radius: 40px;
    display: flex; backdrop-filter: blur(4px);
}
.search-box input {
    flex: 1; padding: 16px 24px; border: 0; border-radius: 30px;
    font-size: 16px; outline: none;
}
.search-box button {
    padding: 0 36px; margin-left: 8px;
    background: #c9a227; color: #fff; border: 0;
    border-radius: 30px; font-size: 16px; font-weight: 600; cursor: pointer;
}
.search-box button:hover { background: #b08d1c; }
.hot-keys { margin-top: 18px; font-size: 14px; }
.hot-keys span { opacity: .8; margin-right: 8px; }
.hot-keys a { color: #ffdf8a; margin: 0 6px; }
.hot-keys a:hover { color: #fff; text-decoration: underline; }

/* 通用模块标题 */
.section { padding: 50px 0; }
.section-title {
    text-align: center; margin-bottom: 36px;
}
.section-title h3 {
    font-size: 28px; color: #333; display: inline-block;
    padding-bottom: 10px; border-bottom: 3px solid #c9a227;
}
.section-title p { color: #888; font-size: 14px; margin-top: 10px; }

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
}
.category-card {
    background: #fff; border-radius: 10px;
    padding: 24px 12px; text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    transition: transform .2s, box-shadow .2s;
    border: 1px solid #f0ebe0;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(139,26,26,.12);
    border-color: #e6d5b5;
}
.category-card .icon {
    width: 56px; height: 56px; margin: 0 auto 12px;
    background: #fdf8ee; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
}
.category-card h4 { font-size: 16px; color: #333; margin-bottom: 6px; }
.category-card p { font-size: 12px; color: #999; }

/* 内容列表 */
.content-list { display: grid; gap: 16px; }
.dream-item {
    background: #fff; border-radius: 10px; padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    border-left: 4px solid #c9a227;
    display: flex; justify-content: space-between; align-items: center;
}
.dream-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.dream-item h4 { font-size: 17px; margin-bottom: 6px; }
.dream-item p { font-size: 14px; color: #666; }
.dream-item .tag {
    display: inline-block; padding: 2px 10px;
    background: #fdf8ee; color: #8b1a1a; border-radius: 12px;
    font-size: 12px; margin-right: 8px;
}
.dream-item .date { font-size: 13px; color: #aaa; white-space: nowrap; }

/* 两栏布局 */
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.main-panel, .side-panel { background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.side-title {
    font-size: 18px; color: #8b1a1a;
    border-left: 4px solid #c9a227; padding-left: 12px; margin-bottom: 18px;
}
.side-list li { padding: 10px 0; border-bottom: 1px dashed #eee; }
.side-list li:last-child { border-bottom: 0; }
.side-list a { color: #555; font-size: 14px; }
.side-list a:hover { color: #8b1a1a; }

/* 列表页 */
.page-header {
    background: #8b1a1a; color: #fff; padding: 40px 0; text-align: center;
}
.page-header h1 { font-size: 30px; margin-bottom: 8px; }
.page-header p { opacity: .9; font-size: 14px; }
.breadcrumb {
    background: #fff; border-bottom: 1px solid #eee; padding: 12px 0;
    font-size: 13px; color: #666;
}
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #8b1a1a; }

/* 分页 */
.epages { text-align: center; margin-top: 28px; }
.epages a, .epages span {
    display: inline-block; padding: 8px 14px; margin: 0 3px;
    background: #fff; border: 1px solid #eee; border-radius: 4px;
    color: #555; font-size: 14px;
}
.epages a:hover { background: #8b1a1a; color: #fff; border-color: #8b1a1a; }
.epages span { background: #8b1a1a; color: #fff; border-color: #8b1a1a; }

/* 内容页 */
.article-wrap { background: #fff; border-radius: 10px; padding: 36px; box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.article-title { font-size: 28px; color: #333; margin-bottom: 16px; }
.article-meta { color: #999; font-size: 13px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.article-body { font-size: 16px; line-height: 1.9; color: #444; }
.article-body p { margin-bottom: 16px; }
.article-body h3 { font-size: 20px; color: #8b1a1a; margin: 24px 0 12px; }
.article-body ul { margin: 12px 0 12px 24px; list-style: disc; }
.article-body li { margin-bottom: 8px; }
.meaning-box {
    background: #fdf8ee; border-left: 4px solid #c9a227;
    padding: 20px; border-radius: 0 8px 8px 0; margin: 20px 0;
}
.meaning-box strong { color: #8b1a1a; }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a {
    padding: 6px 14px; background: #fff; border: 1px solid #e6d5b5;
    border-radius: 16px; font-size: 13px; color: #8b1a1a;
}
.tag-cloud a:hover { background: #8b1a1a; color: #fff; }

/* 页脚 */
.site-footer {
    background: #2c2c2c; color: #aaa; padding: 50px 0 20px; margin-top: 50px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-grid a { color: #aaa; font-size: 14px; display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: #c9a227; }
.copyright { text-align: center; border-top: 1px solid #444; padding-top: 20px; font-size: 13px; color: #777; }

/* 移动端 */
@media (max-width: 768px) {
    .site-header .container { flex-direction: column; gap: 14px; }
    .main-nav .container { flex-direction: column; }
    .nav-menu { flex-wrap: wrap; justify-content: center; }
    .header-search input { width: 200px; }
    .hero h2 { font-size: 26px; }
    .two-col { grid-template-columns: 1fr; }
    .dream-item { flex-direction: column; align-items: flex-start; }
    .dream-item .date { margin-top: 8px; }
}
