/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    font-family: "Arial", sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    background-image: url('Picture/bj.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    align-items: center;
    justify-content: center; /* 桌面端水平居中 */
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.logo img {
    height: 5rem; /* 原来是 2rem，现在改为 3rem */
    width: auto; /* 保持宽高比自动调整 */
    margin-right: 0.5rem;
}

.nav-container {
    display: flex;
    gap: 1rem;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin: 0 1rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-links a:hover {
    color: #ff6347;
    background-color: rgba(255, 255, 255, 0.2);
}

/* 主体内容样式 */
main {
    padding: 6rem 2rem 2rem 2rem;
    margin-top: 4rem; /* 为导航栏留出空间 */
}

.section {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
}

.section.active {
    display: block;
}

/* 文章列表样式 */
.post-list {
    list-style: none;
    padding: 0;
}

.post-item {
    border-bottom: 1px solid #ccc; /* 添加轮廓 */
    padding: 1rem 0;
}

.post-link {
    text-decoration: none;
    color: #333;
    display: block;
}

.post-link:hover {
    color: #ff6347;
}

.post-item h3 a {
    color: #333; /* 文章名字颜色 */
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-item h3 a:hover {
    color: #ff6347; /* 鼠标悬停时的颜色 */
}

/* 工具列表样式 */
.tool-list {
    list-style: none;
    padding: 0;
}

.tool-item {
    border-bottom: 1px solid #ccc;
    padding: 1rem 0;
}

.tool-item a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tool-item a:hover {
    color: #ff6347;
}

/* 文章内容样式 */
.post-content {
    display: none; /* 默认隐藏 */
    position: relative; /* 设置相对定位 */
}

.post-content.active {
    display: block; /* 激活时显示 */
}

.post-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1; /* 确保背景图片在内容后面 */
}

.post-text-container {
    background-color: rgba(255, 255, 255, 0.8); /* 半透明背景 */
    padding: 1rem;
    border-radius: 8px;
}

/* 文章内容样式 */
#articleContent {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#articleTitle {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

#articleDate {
    color: #666;
    margin-bottom: 1rem;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .nav-container {
        flex-direction: column;
    }

    .nav-links {
        flex-direction: column;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }
}

/* 页脚样式 */
footer {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    bottom: 0;
}

/* 工具内容样式 */
.tool-content {
    margin-top: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tool-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ccc;
}

.tool-item:last-child {
    border-bottom: none;
}

.tool-name {
    flex: 1;
    font-weight: bold;
}

.tool-size,
.tool-date {
    flex: 0.5;
    text-align: right;
}

.download-button {
    background-color: #ff6347;
    color: white;
    padding: 0.2rem 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.download-button:hover {
    background-color: #ff4500;
}