
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体，确保可读性 */
    background: linear-gradient(135deg, #1e3c72, #2a5298); /* 主色调为深蓝色渐变，营造科技感 */
    color: #ffffff; /* 正文字体颜色为白色，确保对比度 */
    line-height: 1.6;
    transition: background 0.5s ease;
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(31, 39, 51, 0.9); /* 半透明深色背景 */
    backdrop-filter: blur(10px); /* 背景模糊效果 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* 阴影效果增强立体感 */
}

.navbar .logo {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
}

.navbar .nav-links {
    display: flex;
    gap: 20px;
}

.navbar .nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    position: relative;
    transition: color 0.3s ease;
}

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #ff8c00; /* 点缀色用于悬停下划线 */
    transition: width 0.3s ease;
}

.navbar .nav-links a:hover {
    color: #ff8c00; /* 悬停时文字颜色变化 */
}

.navbar .nav-links a:hover::after {
    width: 100%; /* 悬停时下划线展开 */
}

/* 主容器样式 */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px; /* 为固定导航栏留出空间 */
    padding-bottom: 50px;
}

/* 提示语样式 */
.banner {
    background: rgba(255, 140, 0, 0.8); /* 使用点缀色背景 */
    color: #ffffff;
    padding: 20px 40px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 18px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 2s ease-in-out;
}

/* 文章部分样式 */
article {
    max-width: 1200px;
    width: 90%;
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

article h2, article h3, article h4 {
    color: #ff8c00; /* 采用点缀色作为标题颜色 */
    margin-top: 30px;
    margin-bottom: 15px;
}

article p {
    font-size: 16px;
    margin-bottom: 20px;
}

article pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

article code {
    font-family: 'Courier New', Courier, monospace;
    color: #ff8c00;
}

/* 图片容器样式 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.image-gallery img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 10px 20px;
    }

    .navbar .nav-links {
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .banner {
        font-size: 16px;
        padding: 15px 30px;
    }

    article {
        padding: 20px;
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }
}

/* 代码块样式 */
.language-css {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

.language-css code {
    font-family: 'Courier New', Courier, monospace;
    color: #66d9ef;
}

/* 关键帧动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 折叠内容样式 */
.details {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.details:hover {
    background: rgba(255, 255, 255, 0.3);
}

.details summary {
    font-weight: bold;
    color: #ffa733;
}

.details[open] {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* 按钮样式 */
button {
    background: #ff8c00;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #ffa733;
}

/* 链接样式 */
a {
    color: #66d9ef;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff8c00;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th, table td {
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

table th {
    background: #2a5298;
    color: #ffffff;
}

table tr:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 阴影与光效增强 */
.shadow-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: box-shadow 0.3s ease;
}

.shadow-box:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

