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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #3498db;
}

/* 导航栏 */
nav {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-menu li a {
    display: block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 15px;
}

.nav-menu li.active a,
.nav-menu li a:hover {
    background: #3498db;
    color: #fff;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

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

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 60px 40px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 16px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
}

/* 搜索框 */
.search-box {
    max-width: 700px;
    margin: 0 auto 30px;
    position: relative;
}

.search-box form {
    display: flex;
    gap: 0;
}

.search-box input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
    outline: none;
}

.search-box input:focus {
    border-color: #3498db;
}

.search-box button {
    padding: 0 32px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #2980b9;
}

.search-suggest {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e1e8ed;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.search-suggest a {
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.search-suggest a:hover {
    background: #f5f7fa;
}

/* 分类网格 */
.categories-section {
    margin-bottom: 40px;
}

.categories-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.category-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.category-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #2c3e50;
}

.category-card p {
    color: #666;
    margin-bottom: 12px;
    font-size: 14px;
}

.category-card .count {
    color: #3498db;
    font-size: 13px;
}

/* 内容区域 */
.content-section {
    margin-bottom: 40px;
}

.section-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.section-main h2,
.section-sidebar h2 {
    font-size: 20px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.article-list li {
    background: #fff;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 6px;
    list-style: none;
}

.article-list li a {
    font-size: 16px;
    font-weight: 500;
    display: block;
    margin-bottom: 6px;
}

.article-list li .date {
    font-size: 13px;
    color: #999;
}

.article-list li .summary {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

.hot-list li {
    background: #fff;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hot-list li .num {
    width: 24px;
    height: 24px;
    background: #e1e8ed;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
}

.hot-list li:nth-child(1) .num { background: #e74c3c; color: #fff; }
.hot-list li:nth-child(2) .num { background: #e67e22; color: #fff; }
.hot-list li:nth-child(3) .num { background: #f1c40f; color: #fff; }

/* 友情链接 */
.friend-links {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.friend-links h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.links-list a {
    color: #666;
    font-size: 14px;
}

.links-list a:hover {
    color: #3498db;
}

/* 栏目页 */
.category-header {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.category-header h1 {
    font-size: 28px;
    margin-bottom: 12px;
}

.category-header p {
    color: #666;
}

.category-header .count-info {
    margin-top: 8px;
    font-size: 14px;
    color: #999;
}

.animal-index {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.animal-index h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.animal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.animal-tags a {
    padding: 6px 14px;
    background: #f5f7fa;
    border-radius: 20px;
    font-size: 14px;
}

.animal-tags a:hover {
    background: #3498db;
    color: #fff;
}

.article-list-section {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.article-list-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.category-article-list li {
    list-style: none;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.category-article-list li:last-child {
    border-bottom: none;
}

.category-article-list li h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.category-article-list li .meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}

.category-article-list li .meta span {
    margin-right: 20px;
}

.category-article-list li .summary {
    color: #666;
    font-size: 14px;
}

/* 分页 */
.pagination {
    text-align: center;
    padding: 20px 0;
}

.page-btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    font-size: 14px;
}

.page-btn:hover,
.page-btn.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.page-info {
    margin-left: 16px;
    color: #999;
    font-size: 14px;
}

/* 详情页 */
article {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 24px;
}

article h1 {
    font-size: 28px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.article-meta {
    font-size: 14px;
    color: #999;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.article-meta span {
    margin-right: 20px;
}

.article-summary {
    background: #f8f9fa;
    padding: 16px 20px;
    border-left: 4px solid #3498db;
    border-radius: 0 4px 4px 0;
    margin-bottom: 30px;
}

.article-summary p {
    color: #666;
    font-size: 15px;
}

.article-content h2 {
    font-size: 22px;
    margin: 30px 0 16px;
    padding-left: 12px;
    border-left: 4px solid #3498db;
}

.article-content p {
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.article-content strong {
    color: #2c3e50;
}

.article-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.article-tags span {
    color: #999;
    margin-right: 10px;
}

.article-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: #f5f7fa;
    border-radius: 4px;
    font-size: 13px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.article-tags a:hover {
    background: #3498db;
    color: #fff;
}

.article-nav {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.article-nav p {
    margin-bottom: 8px;
    font-size: 14px;
}

/* 搜索页 */
.search-page {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
}

.search-page h1 {
    font-size: 28px;
    margin-bottom: 24px;
    text-align: center;
}

.search-box-large {
    max-width: 700px;
    margin: 0 auto 30px;
}

.search-box-large form {
    display: flex;
}

.search-box-large input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
    outline: none;
}

.search-box-large button {
    padding: 0 32px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 16px;
    cursor: pointer;
}

#search-result .tip {
    text-align: center;
    color: #999;
    padding: 40px 0;
}

.result-item {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.result-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.result-item .meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.result-item .summary {
    color: #666;
    font-size: 14px;
}

.no-result {
    text-align: center;
    padding: 40px 0;
    color: #999;
}

/* 页脚 */
footer {
    background: #2c3e50;
    color: #fff;
    padding: 40px 20px;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: #fff;
    margin: 0 10px;
    font-size: 14px;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: #3498db;
}

.footer-links span {
    color: #95a5a6;
}

.footer-info p {
    font-size: 13px;
    color: #bdc3c7;
    margin-bottom: 6px;
}

.footer-info a {
    color: #bdc3c7;
}

.footer-info a:hover {
    color: #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 10px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding: 40px 20px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .section-row {
        grid-template-columns: 1fr;
    }
    
    article {
        padding: 20px;
    }
    
    article h1 {
        font-size: 22px;
    }
    
    .article-content h2 {
        font-size: 18px;
    }
    
    .search-page {
        padding: 20px;
    }
    
    .footer-links a {
        display: inline-block;
        margin: 5px;
    }
}
