
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #2c3e50 70%, #34495e 30%);
    color: #ecf0f1;
    line-height: 1.6;
}

/* 容器设置，确保内容有良好的边距和响应式布局 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    padding: 40px 0;
}

/* 板块样式，应用磨砂玻璃效果 */
.module {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    position: relative;
    overflow: hidden;
}

/* 标题样式 */
h2, h3, h4 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

h4 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

/* 段落样式 */
p {
    font-size: 16px;
    color: #ecf0f1;
    margin-bottom: 15px;
}

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

th, td {
    border: 1px solid #bdc3c7;
    padding: 10px;
    text-align: left;
}

th {
    background: rgba(255, 255, 255, 0.2);
}

td {
    background: rgba(255, 255, 255, 0.1);
}

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

code {
    color: #2ecc71;
    font-family: 'Courier New', Courier, monospace;
    display: block;
}

/* 添加代码块标题 */
pre code::before {
    content: "代码示例";
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #e74c3c;
}

/* 按钮样式 */
.button-primary, .button-hover {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px 0;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
    font-size: 16px;
}

.button-primary {
    background: linear-gradient(45deg, #ff7e5f, #feb47b);
    box-shadow: 0 4px 15px rgba(255, 126, 95, 0.4);
}

.button-primary:hover {
    background: linear-gradient(45deg, #feb47b, #ff7e5f);
    transform: scale(1.05);
}

.button-hover {
    background: linear-gradient(45deg, #2980b9, #6dd5fa);
    box-shadow: 0 4px 15px rgba(41, 128, 185, 0.4);
}

.button-hover:hover {
    background: linear-gradient(45deg, #ee0979, #ff6a00);
    transform: scale(1.05);
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(23, 43, 77, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    z-index: 1000;
}

.navbar ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 20px;
    margin: 0;
}

.navbar ul li {
    margin: 0 15px;
}

.navbar ul li a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 18px;
    position: relative;
}

.navbar ul li a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #ecf0f1;
    transition: width 0.3s;
}

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

/* 图片样式 */
.image-decor {
    width: 100%;
    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-decor:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

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

/* 动画应用到模块 */
.module {
    animation: fadeIn 1s ease forwards;
    opacity: 0;
}

.module.visible {
    opacity: 1;
    transform: translateY(0);
}

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