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

/* 设置全局字体和背景 */
body {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    color: #333;
    overflow-x: hidden;
    transition: background 0.5s ease;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #2575fc;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background: #2575fc;
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

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

.language-switcher button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
    transition: color 0.3s ease;
}

.language-switcher button:hover {
    color: #2575fc;
}

/* 主内容区样式 */
.header {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.header h1 {
    font-size: 3em;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeInDown 2s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 章节导航样式 */
.section-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 500;
}

.section-nav a {
    text-decoration: none;
    color: #fff;
    background: rgba(37, 117, 252, 0.7);
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.section-nav a:hover {
    background: #fff;
    color: #2575fc;
    transform: scale(1.1);
}

/* 主要内容区模块样式 */
.section {
    padding: 100px 50px;
    min-height: 100vh;
}

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

.section h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.section p {
    font-size: 1em;
    color: #f0f0f0;
    margin-bottom: 15px;
    line-height: 1.8;
}

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

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

/* 卡片样式 */
.card {
    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);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 64px 0 rgba(31, 38, 135, 0.37);
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: none;
    padding: 10px 20px;
    color: #fff;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    font-size: 1em;
}

.button:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, #FFA500, #FFD700);
}

/* 代码块样式 */
.code-block {
    background: rgba(0, 0, 0, 0.7);
    color: #f8f8f2;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin: 20px 0;
}

.code-block code {
    display: block;
}

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

    .navbar ul {
        flex-direction: column;
        width: 100%;
    }

    .navbar ul li {
        width: 100%;
        text-align: left;
        margin-bottom: 10px;
    }

    .section-nav {
        display: none;
    }
}

