/* 百度新闻风格样式 */
:root {
    --primary-color: #2932e1; /* 百度蓝 */
    --secondary-color: #e6f0ff;
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #e8e8e8;
    --bg-light: #f5f7fa;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.6;
}

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

/* 顶部导航 */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo a {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-item {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s;
}

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

.admin-btn {
    background: var(--primary-color);
    color: white !important;
}

/* 主内容区 */
.main {
    padding: 20px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

/* 新闻列表 */
.news-list {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.section-header h2 {
    font-size: 18px;
    color: var(--text-primary);
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.tab {
    padding: 6px 16px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 文章卡片 */
.article-card {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.article-card:last-child {
    border-bottom: none;
}

.article-card:hover {
    background: var(--bg-light);
}

.article-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
}

.article-title:hover {
    color: var(--primary-color);
}

.article-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.article-category {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.article-preview {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-images {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
}

.article-images img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.widget h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.widget p,
.widget li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.widget ul {
    list-style: none;
}

.widget a {
    color: var(--primary-color);
    text-decoration: none;
}

.widget a:hover {
    text-decoration: underline;
}

.stat-item {
    margin-bottom: 10px;
    font-size: 14px;
}

.stat-item span {
    font-weight: 600;
    color: var(--primary-color);
}

/* 页脚 */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 30px;
    text-align: center;
}

.footer p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

/* 响应式 */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .nav {
        gap: 10px;
    }

    .nav-item {
        padding: 6px 12px;
        font-size: 14px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .filter-tabs {
        flex-wrap: wrap;
    }
}
