/* css/style.css */

/* --- 基础设置 --- */
:root {
    --primary-color: #333;       /* 主文字色 */
    --accent-color: #007bff;     /* 链接颜色 */
    --bg-color: #ffffff;         /* 背景色 */
    --secondary-bg: #f9f9f9;     /* 浅灰背景 */
    --max-width: 800px;          /* 内容最大宽度 */
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* --- 布局容器 --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 导航栏 --- */
header {
    padding: 40px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links a {
    margin-left: 20px;
    font-size: 1rem;
    color: #666;
}

/* --- 首页文章列表 --- */
.post-item {
    margin-bottom: 40px;
}

.post-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
    display: block;
}

.post-title {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
}

.post-excerpt {
    color: #555;
}

/* --- 关于我页面 & 文章详情 --- */
.profile-section {
    text-align: center;
    margin-bottom: 50px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
}

article h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

article img {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
}

/* --- 页脚 (已更新) --- */
footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    color: #999;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}

/* 备案信息容器：让两个备案号在同一行并居中 */
.beian-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* 在手机等窄屏上允许换行 */
    gap: 15px;       /* 两个备案号之间的间距 */
    margin-top: 10px;
}

/* 公网安备的特殊样式：保证图标和文字垂直对齐 */
.police-beian {
    display: inline-flex;
    align-items: center;
}

/* 备案图标样式 */
.police-beian img {
    height: 1em;       /* 核心：高度设为1em，自动匹配文字高度 */
    width: auto;       /* 宽度自适应 */
    margin-right: 4px; /* 图标和文字的间距 */
    vertical-align: middle;
}

/* 设置页脚链接的颜色，让它和页脚文字融为一体（浅灰色） */
footer a {
    color: #999; 
    text-decoration: none;
}

/* 鼠标悬停时变深色，提示用户可以点击 */
footer a:hover {
    color: #555;
    text-decoration: underline;
}