/* ============================================
   znakg.com AI模板样式
   风格: P-新中式
   布局: F-单栏极简
   色彩: 复古怀旧 #8b7355/#daa520/#bc8f8f
   列表: TA-居中带下划线
   ============================================ */

/* CSS变量 */
:root {
    --primary: #8b7355;
    --secondary: #daa520;
    --accent: #bc8f8f;
    --bg-color: #faf8f5;
    --bg-secondary: #ffffff;
    --bg-dark: #2d2d2d;
    --card-bg: #ffffff;
    --text-dark: #2d2d2d;
    --text-light: #666666;
    --text-muted: #999999;
    --border-color: #e8e0d8;
    --shadow: 0 2px 12px rgba(139,115,85,0.1);
    --radius: 4px;
    --radius-sm: 2px;
    --transition: 0.3s ease;
}

/* 基础重置 */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    background: var(--bg-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ============================================
   头部
   ============================================ */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}
.top_header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: center;
}
#logo img { height: 46px; width: auto; }
.search-warp { display: none; }
#searchform { display: flex; border: 1px solid var(--border-color); border-radius: 20px; overflow: hidden; }
#searchform .input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    font-size: 0.85rem;
    outline: none;
    background: var(--bg-color);
}
#searchform .souss {
    width: 50px;
    border: none;
    background: var(--primary);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
.search-key { font-size: 0.78rem; color: var(--text-muted); }
.search-key a { margin-left: 8px; color: var(--text-light); }
.search-key a:hover { color: var(--primary); }

/* 导航 */
#nav-warp {
    background: var(--bg-dark);
    padding: 0 20px;
    text-align: center;
}
#nav-warp a {
    display: inline-block;
    padding: 15px 25px;
    color: #ccc;
    font-size: 0.9rem;
    transition: var(--transition);
}
#nav-warp a:hover,
#nav-warp a.active {
    color: var(--secondary);
}

/* ============================================
   主内容区
   ============================================ */
.content { max-width: 1200px; margin: 30px auto; padding: 0 20px; display: flex; gap: 30px; }
.nr { flex: 1; }

/* 热门推荐图文列表 */
.hot-grid { margin-bottom: 30px; }
.hot-grid-tit { font-size: 1.1rem; font-weight: 600; color: var(--text-dark); padding: 15px 0; border-bottom: 2px solid var(--primary); margin-bottom: 15px; }
.hot-grid-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.hot-item { display: block; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.hot-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.hot-item img { width: 100%; height: 120px; object-fit: cover; }
.hot-item b { display: block; padding: 10px; font-size: 0.85rem; color: var(--text-dark); text-align: center; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hot-item:hover b { color: var(--primary); }

/* 专题区块 */
.feature-section { margin-bottom: 30px; }
.feature-tabs { display: flex; gap: 20px; padding: 15px 0; border-bottom: 2px solid var(--secondary); }
.feature-tabs .tab { font-size: 0.95rem; color: var(--text-light); cursor: pointer; padding: 8px 16px; border-bottom: 2px solid transparent; transition: var(--transition); }
.feature-tabs .tab:hover,
.feature-tabs .tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.feature-content { display: flex; gap: 20px; padding: 20px 0; }
.feature-main { display: flex; gap: 15px; width: 320px; flex-shrink: 0; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; }
.feature-main:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.feature-main img { width: 140px; height: 100px; object-fit: cover; }
.feature-info { padding: 15px; display: flex; flex-direction: column; gap: 10px; }
.feature-info b { font-size: 0.95rem; font-weight: 600; color: var(--text-dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feature-main:hover b { color: var(--primary); }
.feature-info p { font-size: 0.78rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feature-list { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.feature-item { display: flex; gap: 12px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 12px; transition: var(--transition); }
.feature-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.feature-item img { width: 80px; height: 55px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.feature-item .item-info { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.feature-item b { font-size: 0.82rem; font-weight: 500; color: var(--text-dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feature-item:hover b { color: var(--primary); }
.feature-item p { font-size: 0.72rem; color: var(--text-muted); }

/* 头条大图 */
.list_toutiao {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.list_toutiao li a {
    display: block;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}
.list_toutiao li a:hover { box-shadow: var(--shadow); }
.list_toutiao li a h2 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 15px 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 文章列表 */
.wz_list { flex: 1; }
.list_tit {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--secondary);
}
.list_tit .tab {
    font-size: 0.95rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px 16px;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.list_tit .tab:hover,
.list_tit .tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.list_box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.list_item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}
.list_item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
.list_item img {
    width: 140px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.item_info { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.item_info b { font-size: 0.95rem; font-weight: 600; color: var(--text-dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list_item:hover b { color: var(--primary); }
.item_info p { font-size: 0.78rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item_info span { font-size: 0.72rem; color: var(--text-muted); }

/* 详情页 */
.crumb {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.crumb a { color: var(--text-light); }
.crumb a:hover { color: var(--primary); }
#jy_title { text-align: center; margin-bottom: 30px; }
#jy_title h1 { font-size: 1.6rem; font-weight: 700; color: var(--text-dark); margin-bottom: 15px; }
#jy_title aside { display: flex; justify-content: center; gap: 20px; font-size: 0.82rem; color: var(--text-muted); }
.jy_content {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-light);
    padding: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}
.jy_content p { margin-bottom: 15px; }

/* 分页 */
.pagebar { display: flex; justify-content: center; padding: 30px 0; }
.pagination { display: flex; gap: 8px; }
.page-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.page-item:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-item.page-link.st { padding: 0 15px; }

/* ============================================
   侧边栏
   ============================================ */
.right { width: 280px; flex-shrink: 0; }
.right .widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
}
.right .widget-tit {
    padding: 15px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}
.right ul { padding: 15px; }
.right li { border-bottom: 1px dashed var(--border-color); }
.right li:last-child { border-bottom: none; }
.right li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 0.85rem;
    color: var(--text-dark);
}
.right li a:hover { color: var(--primary); }

/* ============================================
   底部
   ============================================ */
footer { background: var(--bg-dark); padding: 30px 20px; margin-top: 50px; }
.webInfo { max-width: 1200px; margin: 0 auto; text-align: center; }
.webInfo span { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.webInfo a { color: #aaa; font-size: 0.82rem; }
.webInfo a:hover { color: var(--secondary); }
.webInfo > div { font-size: 0.82rem; color: #666; text-align: center; }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1024px) {
    .list_toutiao { grid-template-columns: repeat(2, 1fr); }
    .right { width: 240px; }
}
@media (max-width: 768px) {
    .nr { flex-direction: column; }
    .right { width: 100%; }
    .list_toutiao { grid-template-columns: 1fr; }
    .list_toutiao li a { height: 180px; }
    .wz_list img { width: 120px; height: 80px; }
    .top_header { flex-wrap: wrap; }
}

/* ============================================
   分类列表页
   ============================================ */
.list-header {
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--secondary);
}
.list-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}
.list-title em { color: var(--primary); }

.list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.list-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}
.list-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.list-card .card-img {
    width: 140px;
    height: 95px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.list-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.list-card:hover .card-img img {
    transform: scale(1.05);
}
.list-card .card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.list-card b {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.list-card:hover b { color: var(--primary); }
.list-card .card-sort {
    font-size: 0.72rem;
    color: var(--secondary);
}
.list-card p {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.list-card .card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.empty-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .list-grid { grid-template-columns: 1fr; }
    .list-card .card-img { width: 120px; height: 80px; }
}

.site-name { font-size: 1.2rem !important; font-weight: 700 !important; color: #1e293b !important; }
#logo img { width: 100px !important; height: 100px !important; object-fit: cover !important; border-radius: 10px !important; }
#logo { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 10px !important; } #logo img { height: 100px !important; width: 100px !important; } .site-name { text-align: center !important; margin-bottom: 30px !important; }
