
/* 基础样式重置，确保不同浏览器的一致性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置全局字体和背景渐变 */
body {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #0d47a1, #8e24aa);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden; /* 避免出现水平滚动条 */
}

/* 设置容器的最大宽度和自动边距，确保内容居中 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    grid-gap: 40px;
    padding: 60px 0;
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 71, 161, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    z-index: 1000;
    transition: background 0.3s ease;
}

.navbar:hover {
    background: rgba(13, 71, 161, 1);
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #ff9800;
}

/* 提示信息样式 */
.banner {
    text-align: center;
    padding: 100px 20px 50px 20px; /* 留出导航栏空间 */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.banner h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #ffffff;
}

.banner p {
    font-size: 18px;
    color: #e0e0e0;
}

/* 文章内容样式 */
article h2, article h3, article h4 {
    color: #ffffff;
    margin-bottom: 20px;
}

article h2 {
    font-size: 28px;
}

article h3 {
    font-size: 24px;
    margin-top: 30px;
}

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

/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 8px;
    overflow: auto;
    margin-bottom: 20px;
}

code {
    color: #00e676;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
}

/* 图片样式：圆角、阴影、悬浮效果 */
img.decorative {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 模块化布局样式 */
.section {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.section:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

/* 按钮样式 */
.button {
    background-color: #ff9800;
    border: none;
    padding: 15px 30px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    border-radius: 5px;
}

.button:hover {
    background-color: #e68900;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 阴影和文本阴影效果 */
.box-shadow {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 定义关键帧动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); }
    to { transform: translateY(0); }
}

/* 应用动画到特定元素 */
.fade-in {
    animation: fadeIn 2s ease-in-out;
}

.slide-up {
    animation: slideUp 1s ease-out;
}

/* 响应式设计：适配不同屏幕宽度 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 20px;
    }

    .navbar a {
        margin: 10px 0;
    }

    .container {
        grid-template-columns: 1fr;
        padding: 80px 20px 40px 20px;
    }

    .banner {
        padding: 80px 20px 40px 20px;
    }
}

@media (max-width: 480px) {
    .banner h1 {
        font-size: 24px;
    }

    .banner p {
        font-size: 16px;
    }

    article h2 {
        font-size: 24px;
    }

    article h3 {
        font-size: 20px;
    }

    article p {
        font-size: 14px;
    }

    .button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 链接样式，内部链接添加 rel="nofollow" 强制属性 */
a.internal-link {
    color: #ff9800;
    text-decoration: none;
}

a.internal-link:hover {
    text-decoration: underline;
}

/* 折叠区域样式 */
.collapsible {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
    border-radius: 5px;
    margin-bottom: 10px;
}

.collapsible:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    margin-bottom: 20px;
}

.content.show {
    display: block;
}

/* 代码块标题样式 */
pre code::before {
    content: attr(data-title);
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #00e676;
}

/* 导航栏优化，避免padding导致内容显示不全 */
.navbar .logo {
    font-size: 20px;
    font-weight: bold;
}

.navbar .menu {
    display: flex;
    align-items: center;
}

