
/* 
 * 全局样式设置
 * 使用现代化的CSS3技术栈，确保网页的响应式设计和视觉美感
 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica', sans-serif; /* 选择现代无衬线字体，确保可读性 */
    font-size: 16px; /* 正文字体大小 */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 深蓝色渐变背景，符合主色调 */
    color: #ffffff; /* 白色文字在深色背景上更易阅读 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(32, 58, 67, 0.9); /* 半透明背景，保持内容可见 */
    padding: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar a {
    color: #7FDBFF; /* 辅助色荧光蓝 */
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar a:hover {
    color: #B10DC9; /* 点缀色紫罗兰 */
    transform: scale(1.1); /* 悬停时轻微放大，增加互动性 */
}

/* 主内容区样式 */
.main-content {
    padding-top: 80px; /* 避免导航栏遮挡 */
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 章节导航 */
.chapter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.chapter-nav a {
    background: #203a43;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-size: 16px;
}

.chapter-nav a:hover {
    background: #2c5364;
}

/* 文章内容样式 */
article {
    line-height: 1.6;
}

article h2, article h3 {
    color: #7FDBFF; /* 辅助色荧光蓝 */
}

article h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

article h3 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
}

article p {
    font-size: 17px;
    margin-bottom: 20px;
    text-indent: 2em;
}

/* 代码块样式 */
pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    color: #00ffea;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

code {
    color: #00ffea;
}

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    border: 2px solid #7FDBFF;
}

/* 模块化卡片设计 */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    flex: 1 1 calc(33% - 40px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .card {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
        padding: 15px;
    }
    
    .navbar a {
        font-size: 16px;
        padding: 8px 0;
    }
    
    .chapter-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .chapter-nav a {
        width: 100%;
        text-align: center;
    }
}

/* 按钮样式 */
.button {
    background: #7FDBFF;
    color: #0f2027;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

.button:hover {
    background: #B10DC9;
    transform: scale(1.05);
}

/* 过渡效果 */
.fade-in {
    animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 提示信息样式 */
.prompt-message {
    background: rgba(32, 58, 67, 0.8);
    color: #7FDBFF;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* CSS3代码示例区 */
.code-sample {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 40px;
}

.code-sample pre {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

/* 分隔线样式 */
.divider {
    height: 2px;
    background: linear-gradient(to right, #7FDBFF, #B10DC9);
    margin: 40px 0;
    border: none;
}

/* 页脚样式 */
footer {
    background: rgba(32, 58, 67, 0.9);
    color: #ffffff;
    text-align: center;
    padding: 20px;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* 动画效果 */
@keyframes rotate {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

.threeD-model {
    animation: rotate 10s linear infinite;
}

/* 链接样式确保nofollow属性 */
a[rel="nofollow"] {
    /* 无需额外样式 */
}

