
/* 基本样式设置 */
/* 设置页面的主色调为深蓝色，辅色为橙色和绿色，点缀色为白色 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0d47a1 70%, #424242 25%, #ffffff 5%);
    color: #333333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #1e88e5;
    padding: 15px 0;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    position: relative;
    padding: 5px 10px;
    font-size: 16px;
}

.navbar a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #ff9800;
    transition: width 0.3s;
    position: absolute;
    bottom: 0;
    left: 0;
}

.navbar a:hover::after {
    width: 100%;
}

/* 主要内容区域 */
.container {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
}

.module {
    flex: 1 1 300px;
    margin: 15px;
    padding: 20px;
    background-color: #f5f5f5;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
    transition: transform 0.3s;
}

.module:hover {
    transform: translateY(-5px);
}

/* 图片样式 */
img.decorative {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 文章样式 */
article {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

article h2, article h3, article h4 {
    color: #0d47a1;
}

article p {
    font-size: 16px;
    color: #333333;
}

pre code {
    background-color: #e0e0e0;
    padding: 10px;
    border-radius: 5px;
    display: block;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
}

code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #e0e0e0;
    padding: 2px 4px;
    border-radius: 3px;
}

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

.button:hover {
    background-color: #e68900;
    transform: translateY(-2px);
}

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

    .container {
        padding: 10px;
    }

    .module {
        margin: 10px 0;
    }

    article {
        padding: 10px;
    }

    .navbar a {
        font-size: 14px;
    }
}

/* 微交互动效 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* CSS3 代码块样式 */
.code-block {
    background-color: #f0f0f0;
    border-left: 4px solid #ff9800;
    padding: 10px;
    margin: 20px 0;
    overflow-x: auto;
}

/* 其他装饰元素 */
.gradient-line {
    height: 4px;
    background: linear-gradient(90deg, #1e88e5, #ff9800, #4caf50);
    margin: 20px 0;
}

.footer {
    background-color: #424242;
    color: #ffffff;
    text-align: center;
    padding: 15px 0;
}

/* 加载动画 */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #1e88e5;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 100px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

