* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 浅色模式（默认） */
:root {
    --bg: #f7f8fa;
    --card: #ffffff;
    --text: #333;
    --text-light: #666;
    --text-gray: #999;
    --shadow: 0 2px 10px rgba(0,0,0,0.06);
    --hover-shadow: 0 6px 20px rgba(0,0,0,0.09);
    --nav: #fff;
    --border: #eee;
    --accent: #0066cc;
}

/* 深色模式 */
[data-theme="dark"] {
    --bg: #121212;
    --card: #1e1e1e;
    --text: #e0e0e0;
    --text-light: #b0b0b0;
    --text-gray: #777;
    --shadow: 0 2px 10px rgba(0,0,0,0.3);
    --hover-shadow: 0 6px 20px rgba(0,0,0,0.4);
    --nav: #1a1a1a;
    --border: #333;
    --accent: #4285e4;
}

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

/* 导航栏 */
.navbar {
    background: var(--nav);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 99;
}
.nav-container {
    max-width: 1000px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}
.logo {
    font-weight: bold;
    font-size: 20px;
    color: #0066cc;
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: 24px;
    }
.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 15px;
}
.nav-links a:hover {
    color: var(--accent);
}
.theme-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 20px;
}
header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}
header p {
    color: var(--text-light);
    font-size: 15px;
}

/* 博客列表 */
.blog-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
@media (max-width:768px) {
    .blog-list {
        grid-template-columns: 1fr;
    }
}

.blog-item {
    background: var(--card);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.3s;
}
.blog-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
}

.blog-img {
    width: 100%;
    /* height: 100%; */
    object-fit: cover;
    background: #ddd;
}

.blog-content {
    padding: 20px;
}

.blog-time {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 8px;
}
.blog-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
    text-decoration: none;
    display: block;
    line-height: 1.4;
}
.blog-title:hover {
    color: var(--accent);
}
.blog-desc {
    font-size: 14px;
    color: var(--text-light);
}

/* ========= 高级美化分页样式 ========= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 60px;
}
.page-item {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--card);
    color: var(--text-light);
    font-size: 15px;
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    font-weight: 500;
}
.page-item:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}
.page-item.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}
.page-prev, .page-next {
    padding: 0 18px;
    width: auto;
    font-size: 14px;
}

footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 40px;
    color: var(--text-gray);
    font-size: 14px;
    border-top: 1px solid var(--border);
}