/* 北欧极简风格 CSS */
/* 定义名为 'Local Songti' 的自定义字体 */
@font-face {
    /* 字体族名称 */
    font-family: 'Local Songti';
    /* 字体来源：首先尝试本地安装的 SimSun (宋体)，如果找不到，则加载同级目录下 font 文件夹中的 SimSun.ttc 文件 */
    src: local('SimSun'), url('../font/SimSun.ttc') format('truetype');
    /* 字体粗细：正常 */
    font-weight: normal;
    /* 字体样式：正常 */
    font-style: normal;
    /* 字体显示策略：swap 表示字体加载期间先用后备字体显示，加载完成后再替换，提高用户体验 */
    font-display: swap;
}

@keyframes logoGlow {
    0%, 100% {
        /* 动画开始和结束时，光晕效果较弱 */
        text-shadow: 0 0 6px rgba(180, 180, 255, 0.5);
    }
    50% {
        /* 动画中间，光晕效果最强 */
        text-shadow: 0 0 12px rgba(200, 200, 255, 0.8);
    }
}

/* 全局 CSS 变量定义，在 :root 选择器中定义，方便全局复用和修改 */
:root {
    /* --primary-color: #f9f9f9; */ /* 主要颜色，当前未使用 */
    /* --secondary-color: #f0f0f0; */ /* 次要颜色，当前未使用 */
    /* --text-color: #333333; */ /* 旧的文本颜色，已被 body 中的 color 覆盖 */
    --accent-color: #5e618b; /* 强调色，深紫色调 */
    --light-accent: #a7c4bc; /* 浅强调色，浅蓝绿色调 */
    /* 定义主要西文字体栈：优先使用 New York 字体，若无则使用 Times New Roman */
    --font-main: 'New York', 'Times New Roman';
    /* 定义主要中文字体栈：优先使用前面 @font-face 定义的 Local Songti (实际为宋体)，若无则使用 Georgia 或 serif 通用衬线字体 */
    --font-chinese: 'Local Songti', Georgia, serif;
}

/* 针对整个文档 body 的基础样式 */
body {
    /* -- 字体设置 -- */
    font-family: var(--font-main), var(--font-chinese), serif;
    /* -- 颜色与默认/桌面端背景 -- */
    /* 移除默认渐变背景 */
    /* background: linear-gradient(55deg, #000000, #242424); */
    /* 将背景图片应用到全局 */
    background-image: url('../background/2.jpg');
    color: #e0e0e0;
    /* -- 布局与间距 -- */
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* --- 新增：通用背景设置 --- */
    background-size: cover; /* 覆盖整个区域 */
    background-position: center center; /* 居中显示 */
    background-repeat: no-repeat; /* 不重复图片 */
    /* 取消注释，启用固定背景 */
    background-attachment: fixed; /* 固定背景，滚动时不移动 */
    /* 注意：fixed 在移动端可能导致性能问题或显示异常，后面为移动端覆盖了 */
}

/* --- 新增：移动设备 (屏幕宽度 <= 768px) 的样式 --- */
@media (max-width: 768px) {
    body {
        /* 恢复 body 的默认定位行为，移除 absolute 定位 */
        /* position: absolute; */
        /* left: 0; */
        /* top: 0; */
        /* width: 100%; */
        /* display: block; */

        /* 仍然禁用 body 自身的背景图，交给 ::before 处理 */
        background-image: none;
        /* 新增：设置移动端 body 的背景色为黑色 */
        background-color: #000000;
        /* 移除 body 上的 fixed 和 size 属性，因为它们在移动端可能无效或 problematic */
        /* background-attachment: scroll; */
        /* background-size: auto; */
    }

    /* 替换为新的 body::before 规则 */
    body::before {
        content: "";
        /* 使用你项目的背景图路径，并设置不重复 */
        background: url('../background/2.jpg') no-repeat;
        /* 设置背景宽度为100%，高度自动 */
        background-size: 100% auto; /* 注意：100% 等同于 100% auto */
        position: fixed;
        /* 修改：调整 top 值以使背景上移，这里设置为 0 使其贴顶 */
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        z-index: -1;
    }

    .post-list {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 1rem;
        /* .container 保持 relative 和 z-index: 1，应该显示在 ::before 之上 */
    }
    /* 可选：调整 circles 在小屏幕上的位置或大小 */
    .circles {
        width: 90%;
        height: 200px;
    }
    .circle-1 {
        height: 200px;
        width: 200px;
        top: 50px;
        left: -30px;
    }
     .circle-2 {
        height: 150px;
        width: 150px;
        bottom: 20px;
        right: -40px;
    }
}

/* --- /可选背景装饰 --- */

/* 主要内容容器 */
.container {
    /* 最大宽度限制为 900px */
    max-width: 900px;
    /* 水平居中：上下边距为 0，左右自动 */
    margin: 0 auto;
    /* 内边距为 2rem */
    padding: 2rem;
    /* 设置定位为 relative，确保内容在装饰圆圈之上 (z-index 默认为 auto 或 0，这里设为 1 更明确) */
    position: relative;
    /* 明确设置层叠顺序，高于 .circles 的 -1 */
    z-index: 1;
}

/* 页面头部区域 */
header {
    /* 底部外边距为 3rem */
    margin-bottom: 3rem;
    /* 下边框：1像素实线，颜色为半透明白色 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    /* 底部内边距为 1rem */
    padding-bottom: 1rem;
    box-shadow: 0 4px 6px -6px rgba(255, 255, 255, 0.4);
}

/* 导航栏 */
nav {
    /* 使用 flex 布局 */
    display: flex;
    /* 子元素沿主轴（水平）两端对齐 */
    justify-content: space-between;
    /* 子元素沿交叉轴（垂直）居中对齐 */
    align-items: center;
    /* 修改：减小导航栏底部的外边距，以拉近 logo 和下方分割线的距离 */
    margin-bottom: 0.5rem; /* 原为 2rem，你可以根据需要调整这个值 */
}

/* Logo 样式 */
.logo {
    /* 保留其他样式如 font-size, font-weight, text-decoration, color 等 */
    font-size: 1.5rem;
    font-weight: 500;
    text-decoration: none;
    color: #ffffff;
    /* 移除：移除动画效果 */
    /* animation: logoGlow 3s ease-in-out infinite; */
    /* 新增：添加固定的光晕效果 */
    text-shadow: 0 0 10px rgba(197, 197, 197, 0.8); /* 你可以调整光晕的颜色和强度 */

    /* 确保应用 display: block 来强制换行 */
    display: block;
    /* 可以移除或保留 margin */
    margin-top: 5px;
    margin-bottom: 5px;

    /* 移除下面所有错误嵌套的代码 */
    /*
    .logo { ... }
    margin-bottom: 5px;
    */
}

/* 导航链接 */
.nav-links a {
    /* 左侧外边距 1.5rem，用于分隔链接 */
    margin-left: 1.5rem;
    /* 移除文本下划线 */
    text-decoration: none;
    /* 文本颜色为 #cccccc (浅灰色) */
    color: #cccccc;
    /* 为颜色变化添加过渡效果，时长 0.3秒，缓动函数 ease */
    transition: color 0.3s ease;
}

/* 导航链接悬停状态 */
.nav-links a:hover {
    /* 悬停时文本颜色变为白色 */
    color: #ffffff;
}

/* 页面主标题（如 "文章列表"） */
h1 {
    /* 文本颜色为白色 */
    color: #ffffff;
    /* 文本左对齐 */
    text-align: left;
    /* 底部外边距 2rem */
    margin-bottom: 2rem;
    /* 应用之前定义的字体变量 */
    font-family: var(--font-main), var(--font-chinese);
    /* 字体大小 30px */
    font-size: 30px;
    /* 字体粗细 300 (细体) */
    font-weight: 300;
    /* 左侧内边距 0 */
    padding-left: 0;
    /* 底部内边距 20px */
    padding-bottom: 20px;
    /* 行高为字体大小的 1.5 倍 */
    line-height: 1.5em;
    text-shadow: 0 0 5px rgba(197, 197, 197, 0.6);
}

/* 文章列表容器 */
.post-list {
    /* 使用网格布局 */
    display: grid;
    /* 网格列定义：自动填充尽可能多的列，每列最小宽度 280px，最大占据剩余空间 (1fr) */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    /* 网格项之间的间隙为 2rem */
    gap: 2rem;
}

/* 单个文章卡片 */
.post-card {
    /* 背景颜色：半透明白色 (8% 不透明度) */
    /* 下面这行的最后一个值 0.08 控制不透明度 */
    background: rgba(255, 255, 255, 0.035);
    /* 背景模糊效果 (毛玻璃) */
    backdrop-filter: blur(6px);
    /* Webkit 内核浏览器的背景模糊兼容 */
    -webkit-backdrop-filter: blur(6px);
    /* 边框：1像素实线，颜色为半透明白色 (15% 不透明度) */
    border: 2px solid rgba(75, 74, 74, 0.15);
    /* 圆角半径 15px */
    border-radius: 12px;
    /* 阴影效果：水平偏移0，垂直偏移4px，模糊半径30px，颜色为半透明黑色 (15% 不透明度) */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    /* 为 transform, box-shadow, background-color 变化添加过渡效果 */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    /* 隐藏超出卡片圆角部分的内容 */
    overflow: hidden;
}

/* 文章卡片悬停状态 */
.post-card:hover {
    /* 悬停时向上移动 5px */
    transform: translateY(-5px);
    /* 悬停时增强阴影效果 */
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    /* 悬停时背景颜色变亮一点 (12% 不透明度) */
    background: rgba(255, 255, 255, 0.12);
}

/* 文章卡片内容区域 */
.post-card-content {
    /* 内边距 1.5rem */
    padding: 1.5rem;
}

/* 文章卡片标题 */
.post-title {
    /* 顶部外边距 0 */
    margin-top: 0;
    /* 底部外边距 0.5rem */
    margin-bottom: 0.5rem;
    /* 字体大小 1.25rem */
    font-size: 1.25rem;
    /* 字体粗细 500 (中等) */
    font-weight: 500;
}

/* 文章卡片标题内的链接 */
.post-title a {
    /* 移除文本下划线 */
    text-decoration: none;
    /* 文本颜色为白色 */
    color: #ffffff;
}
/* 文章卡片标题链接悬停状态 */
.post-title a:hover {
     /* 悬停时文本颜色变为浅灰色 */
     color: #cccccc;
}


/* 文章卡片元信息（如日期） */
.post-meta {
    /* 文本颜色：半透明白色 (70% 不透明度) */
    color: rgba(255, 255, 255, 0.7);
    /* 字体大小 0.875rem */
    font-size: 0.875rem;
    /* 底部外边距 1rem */
    margin-bottom: 1rem;
}

/* 文章卡片摘要 */
.post-summary {
    /* 文本颜色：较亮的半透明白色 (90% 不透明度) */
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    line-height: 1.5;
    /* 修改：保留换行符 collapsing spaces */
    white-space: pre-line; 
}

/* --- 新增或修改：首页阅读更多按钮样式 --- */
.read-more { /* 确保你的 index.html 中使用的是这个 class */
    display: inline-block;
    /* 修改：将背景设置为完全透明 */
    background: transparent;
    color: #acacac;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 2px solid rgba(75, 75, 75, 0.2);
    cursor: pointer;
    margin-top: 1rem;
}

.read-more:hover {
    /* 注意：悬停状态下背景仍然会有点透明度 */
    background-color: rgba(255, 255, 255, 0.2); /* 悬停时加深背景 */
    color: #ffffff;
}



/*
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--light-accent);
}
*/

.btn-secondary { /* 如果还有地方用到，可能需要调整颜色 */
    background-color: #e0e0e0;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}

.post-detail {
    /* 修改：应用毛玻璃效果到详情页 - 与 .post-card 统一 */
    background: rgba(255, 255, 255, 0.035);       /* 统一 background */
    backdrop-filter: blur(9px);             /* 统一 backdrop-filter */
    -w12kit-backdrop-filter: blur(9px);        /* 统一 -webkit-backdrop-filter */
    border: 2px solid rgba(75, 74, 74, 0.15); /* 统一 border (原已一致) */
    border-radius: 12px;                     /* 统一 border-radius (原已一致) */
    padding: 2rem;                           /* 保留原 padding */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15); /* 统一 box-shadow (原已一致) */
    color: #e0e0e0;                           /* 保留原 color */
}

/* 新增/修改：详情页内部元素样式 */
.post-detail .post-title { /* 详情页标题 */
    color: #ffffff;
}

.post-detail .post-meta { /* 详情页元数据 */
     color: rgba(255, 255, 255, 0.7);
}

.post-detail .post-content { /* 详情页内容 */
    line-height: 1.8;
    margin: 2rem 0;
    color: rgba(255, 255, 255, 0.9);
    /* 修改：保留换行符 collapsing spaces */
    white-space: pre-line; 
}

.post-detail h2 { /* 详情页附件标题 */
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-detail .media-item p { /* 详情页附件描述 */
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    text-align: center;
    margin-top: 0.5rem;
}

.post-detail .btn { /* 详情页返回按钮 */
    /* 沿用/复制 .read-more 的样式 */
    display: inline-block;
    /* 修改：将背景设置为完全透明以匹配 .read-more */
    background: transparent;
    color:#acacac;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* 修改：将边框样式改为与 .read-more 相同 */
    border: 2px solid rgba(75, 75, 75, 0.2);
    cursor: pointer;
    margin-top: 1rem;
}
.post-detail .btn:hover {
     /* 悬停样式与 .read-more:hover 保持一致 */
     background-color: rgba(255, 255, 255, 0.2);
     color: #ffffff;
}


.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    /* 新增：确保 label 颜色适应暗色主题 */
    color: #e0e0e0; /* 如果表单也需要暗色主题，在这里增加 */
    /* 继承 body 的 font-family，如果需要特定字体可取消下一行注释 */
    /* font-family: var(--font-main), 'Songti SC', sans-serif; */
}

input[type="text"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 4px;
    /* 修改：使用定义的字体变量 */
    font-family: var(--font-main), var(--font-chinese);
    font-size: 1rem;
    /* 暗色主题适应性修改 */
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

textarea {
    min-height: 200px;
    resize: vertical;
}

.actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
    /* 修改：页脚颜色 */
    color: rgba(255, 255, 255, 0.6); /* 页脚文字改为半透明白色 */
    font-size: 0.875rem;
    /* 修改：页脚边框颜色 */
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* 页脚分割线颜色 */
}

@media (max-width: 768px) {
    .post-list {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 1rem;
    }
    /* 可选：调整 circles 在小屏幕上的位置或大小 */
    .circles {
        width: 90%;
        height: 200px;
    }
    .circle-1 {
        height: 200px;
        width: 200px;
        top: 50px;
        left: -30px;
    }
     .circle-2 {
        height: 150px;
        width: 150px;
        bottom: 20px;
        right: -40px;
    }
}

/* 新增：超链接按钮样式 */
/* 注意：.block 类默认继承 body 的字体设置 */
.block {
    font-size: 0.9rem; /* 保留原字体大小 */
    /* 修改：统一文字颜色为白色 */
    color: #ffffff; /* 原为 #363b46 */
    padding: 3px 8px; /* 保留原内边距 */
    /* 修改：统一圆角为 8px */
    border-radius: 8px; /* 原为 0.8em */
    /* 修改：统一背景色 */
    background-color: rgba(255, 255, 255, 0.1); /* 原为 rgba(118, 119, 143, 0.5) */
    /* 移除：移除背景模糊效果 */
    /* backdrop-filter: blur(5px); */
    text-decoration: none;
    display: inline-block;
    margin: 2px 1px; /* 保留原外边距 */
    /* 修改：统一过渡效果（主要是背景色和颜色） */
    transition: background-color 0.3s ease, color 0.3s ease;
    /* 修改：统一边框 -> 移除边框 */
    border: none; /* 原为 border: 1px solid rgba(255, 255, 255, 0.2); */
}

.block:hover {
    /* 修改：统一悬停背景色 */
    background-color: rgba(255, 255, 255, 0.2); /* 原为 rgba(167, 196, 188, 0.3) */
    /* 保持文字颜色为白色 */
    color: #ffffff;
}

/* 新增：定义本地字体 */

