/* ====== 基础变量 ====== */
:root {
    --primary-color: #1c75e3;
    --primary-hover: #0d5bc4;
    --primary-light: #e8f0fe;
    --text-main: #2c3e50;
    --text-secondary: #5a6c7d;
    --text-muted: #8e99a4;
    --border-color: #e8ecef;
    --bg-page: #f8fafc;
    --bg-white: #ffffff;
    --danger-color: #ff6b6b;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
    font-size: 14px;
    color: var(--text-main);
    background: var(--bg-page);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

ul, ol {
    list-style: none;
}

/* ====== 主容器 ====== */
.baike-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* ====== 通用工具类 ====== */
.clearfix::after {
    content: "";
    display: block;
    clear: both;
}

.fl {
    float: left;
}

.fr {
    float: right;
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ====== 首页顶部 ====== */
.baike-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px 28px;
    background: linear-gradient(135deg, var(--bg-white) 0%, #fefefe 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.04);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 28px;
}

.logo-link {
    display: inline-block;
    transition: transform var(--transition-fast);
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 52px;
    width: auto;
    border-radius: var(--radius-sm);
}

.header-links {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-left: 24px;
    border-left: 1px solid var(--border-color);
}

.header-links a {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    position: relative;
}

.header-links a:hover {
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.link-divider {
    color: var(--border-color);
    font-size: 12px;
}

.baike-search-box {
    display: flex;
    gap: 0;
    align-items: center;
}

.baike-search-box input {
    padding: 12px 22px;
    border: 2px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 14px;
    width: 320px;
    outline: none;
    transition: all var(--transition-fast);
    background: #fafbfc;
}

.baike-search-box input:focus {
    border-color: var(--primary-color);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(28, 117, 227, 0.1);
}

.baike-search-box input::placeholder {
    color: var(--text-muted);
}

.btn-search {
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2b8cf7 100%);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(28, 117, 227, 0.2);
}

.btn-search:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #1c75e3 100%);
    box-shadow: 0 4px 14px rgba(28, 117, 227, 0.35);
    transform: translateY(-1px);
}

.btn-site-search {
    padding: 10px 20px;
    background: #009688;
    color: #fff;
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-site-search:hover {
    background: #007a6e;
}

/* ====== 快捷分类按钮 ====== */
.baike-quick-cate {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 24px;
    background: linear-gradient(135deg, var(--bg-white) 0%, #fefefe 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
}

.baike-quick-cate a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
}

.baike-quick-cate a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 117, 227, 0.15);
}

.baike-quick-cate a.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2b8cf7 100%);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px rgba(28, 117, 227, 0.3);
    transform: translateY(-2px);
}

/* ====== 分类导航 ====== */
.baike-nav {
    background: var(--bg-white);
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.baike-nav ul {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.baike-nav li {
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.baike-nav li:hover,
.baike-nav li.active {
    background: var(--primary-color);
}

.baike-nav li:hover a,
.baike-nav li.active a {
    color: #fff;
}

.baike-nav a {
    color: var(--text-main);
    font-size: 14px;
}

/* ====== 热搜词条侧边栏 ====== */
.baike-hot {
    float: right;
    width: 300px;
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.hot-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}


.hot-list ul {
    margin: 0;
    padding: 0;
}

.baike-hot li {
    padding: 12px 10px;
    border-bottom: 1px dashed var(--border-color);
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.baike-hot li:hover {
    background: var(--primary-light);
    padding-left: 14px;
}

.baike-hot li:last-child {
    border-bottom: none;
}

.baike-hot .hot-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.baike-hot li:nth-child(1) .hot-num,
.baike-hot li:nth-child(2) .hot-num,
.baike-hot li:nth-child(3) .hot-num {
    background: var(--danger-color);
}

.baike-hot li i {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    margin-right: 8px;
    font-style: normal;
}

.baike-hot li i.icon1,
.baike-hot li i.icon2,
.baike-hot li i.icon3 {
    background: var(--danger-color);
}

.baike-hot a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.baike-hot a:hover {
    color: var(--primary-color);
    font-weight: 500;
}

/* ====== 百科首页内容区 ====== */
.baike-content {
    margin-right: 320px;
    background: linear-gradient(135deg, var(--bg-white) 0%, #fefefe 100%);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
}

/* ====== 两栏主布局 ====== */
.baike-main {
    display: flex;
}

.baike-main .baike-content {
    flex: 1;
    margin-right: 0;
}

.content-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #2b8cf7 100%);
    border-radius: 2px;
}

.content-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.content-item {
    width: calc(33.333% - 14px);
    margin-bottom: 20px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid rgba(0,0,0,0.04);
}

.content-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.item-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    position: relative;
}

.item-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.08) 0%, transparent 60%);
    z-index: 1;
    pointer-events: none;
}

.item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition-slow);
}

.item-img:hover img {
    transform: scale(1.08);
}

.item-text {
    padding: 16px;
}

.item-text h3 {
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
    margin: 0;
}

.item-text h3 a {
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

.item-text h3 a:hover {
    color: var(--primary-color);
}

/* ====== 百科详情页 ====== */
/* 右侧热搜词条 */
.baike-hot-right {
    float: right;
    width: 300px;
    background: linear-gradient(135deg, var(--bg-white) 0%, #fefefe 100%);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    margin-left: 24px;
}

.baike-hot-right .hot-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.baike-hot-right .hot-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--danger-color) 0%, #ff8787 100%);
    border-radius: 2px;
}

.baike-hot-right .hot-list ul {
    margin: 0;
    padding: 0;
}

.baike-hot-right li {
    padding: 12px 10px;
    border-bottom: 1px dashed var(--border-color);
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.baike-hot-right li:hover {
    background: var(--primary-light);
    padding-left: 14px;
}

.baike-hot-right li:last-child {
    border-bottom: none;
}

.baike-hot-right .hot-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #8e99a4 0%, #a0a9b3 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.baike-hot-right li:nth-child(1) .hot-num {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}

.baike-hot-right li:nth-child(2) .hot-num {
    background: linear-gradient(135deg, #ffa94d 0%, #ffb366 100%);
    box-shadow: 0 2px 6px rgba(255, 169, 77, 0.4);
}

.baike-hot-right li:nth-child(3) .hot-num {
    background: linear-gradient(135deg, #ffd43b 0%, #ffe066 100%);
    box-shadow: 0 2px 6px rgba(255, 212, 59, 0.4);
}

.baike-hot-right a {
    color: var(--text-secondary);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
    transition: all var(--transition-fast);
}

.baike-hot-right a:hover {
    color: var(--primary-color);
    font-weight: 500;
}

/* 主内容区 */
.baike-detail {
    margin-right: 320px;
    background: linear-gradient(135deg, var(--bg-white) 0%, #fefefe 100%);
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
}

/* 面包屑 */
.detail-bread {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.detail-bread a {
    color: var(--primary-color);
}

.detail-bread a:hover {
    color: var(--primary-hover);
}

.detail-bread span {
    margin: 0 8px;
    color: var(--text-muted);
}

/* 标题 */
.detail-title-h1 {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.4;
}

/* 相关词条 */
.detail-related {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: var(--radius-md);
}

.detail-related span {
    color: var(--text-secondary);
    margin-right: 10px;
    font-weight: bold;
    padding-top: 2px;
}

.detail-related ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    flex: 1;
}

.detail-related li {
    line-height: 1.6;
}

.detail-related a {
    color: var(--primary-color);
    font-size: 14px;
}

.detail-related a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 详情正文 */
.detail-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-main);
}

.detail-text p {
    margin-bottom: 15px;
    text-align: justify;
}

.detail-text h1,
.detail-text h2,
.detail-text h3,
.detail-text h4 {
    margin: 25px 0 15px;
    font-weight: bold;
    line-height: 1.4;
}

.detail-text h1 {
    font-size: 22px;
}

.detail-text h2 {
    font-size: 20px;
    color: var(--text-main);
}

.detail-text h3 {
    font-size: 17px;
}

.detail-text img {
    max-width: 100%;
    height: auto;
    margin: 15px auto;
    display: block;
    border-radius: var(--radius-md);
}

.detail-text video {
    max-width: 100%;
    margin: 15px auto;
    display: block;
}

.detail-text ul,
.detail-text ol {
    margin: 15px 0;
    padding-left: 25px;
    list-style: disc;
}

.detail-text ol {
    list-style: decimal;
}

.detail-text li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.detail-text a {
    color: var(--primary-color);
}

.detail-text strong {
    font-weight: bold;
}

.detail-text blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 15px 0;
    background: #f8f9fa;
    color: var(--text-secondary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ====== 搜索页 ====== */
.baike-search {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-box button {
    padding: 12px 30px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--primary-hover);
}

/* 搜索结果 */
.search-result {
    margin-top: 10px;
}

.result-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text-main);
}

.result-list {
    margin: 0;
    padding: 0;
}

.result-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-item h3 a {
    color: var(--primary-color);
}

.result-item h3 a:hover {
    text-decoration: underline;
}

.result-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ====== 响应式 ====== */
@media (max-width: 960px) {
    .baike-hot {
        float: none;
        width: 100%;
        margin-top: 20px;
    }

    .baike-hot-right {
        float: none;
        width: 100%;
        margin-left: 0;
        margin-bottom: 20px;
    }

    .baike-content {
        margin-right: 0;
    }

    .baike-detail {
        margin-right: 0;
    }

    .content-item {
        width: calc(50% - 10px);
    }
}

@media (max-width: 600px) {
    .baike-detail {
        margin-right: 0;
        padding: 20px 15px;
    }

    .detail-title-h1 {
        font-size: 22px;
    }

    .content-item {
        width: 100%;
    }

    .baike-search {
        padding: 20px 15px;
    }
}
