
/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 设置页面字体及基础颜色 */
body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #333333;
    background: linear-gradient(135deg, #003366 70%, #FFFFFF 30%);
    line-height: 1.6;
    overflow-x: hidden; /* 避免水平滚动条 */
}
/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #003366;
    color: #FFFFFF;
    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;
}
.navbar ul {
    list-style: none;
    display: flex;
}
.navbar ul li {
    margin-left: 20px;
}
.navbar ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s ease;
}
.navbar ul li a:hover {
    color: #FF9900;
}
/* 响应式导航栏 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar ul {
        flex-direction: column;
        width: 100%;
    }
    .navbar ul li {
        margin: 10px 0;
    }
}
/* 主内容区样式 */
.hero-section {
    position: relative;
    width: 100%;
    height: 60vh;
    overflow: hidden;
    margin-top: 60px; /* 避免被固定导航栏遮挡 */
}
.hero-section video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -1;
}
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF;
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}
.hero-content h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease-out;
}
.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out;
}
.hero-content .cta-button {
    background-color: #FF9900;
    color: #FFFFFF;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.hero-content .cta-button:hover {
    background-color: #e68a00;
    transform: scale(1.05);
}
/* 关键帧动画 */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* 内容区块样式 */
.section {
    padding: 60px 30px;
    background-color: #FFFFFF;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}
.section:nth-child(even) {
    background: linear-gradient(135deg, #33CC33 25%, #FFFFFF 75%);
}
.section h2, .section h3, .section h4 {
    color: #003366;
    margin-bottom: 20px;
}
.section p {
    margin-bottom: 15px;
    font-size: 1em;
}
.section pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}
.section code {
    color: #d63384;
}
/* 图片样式 */
.section img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.section img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 20px rgba(0,0,0,0.2);
}
/* 卡片式布局 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
.card {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex: 1 1 300px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.2);
}
/* 按钮样式 */
.button {
    background-color: #FF9900;
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    font-size: 1em;
}
.button:active {
    transform: scale(0.95);
    background-color: #e68a00;
}
/* 页脚样式 */
.footer {
    background-color: #003366;
    color: #FFFFFF;
    padding: 20px 30px;
    text-align: center;
}
.footer a {
    color: #FF9900;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}
.footer a:hover {
    color: #FFFFFF;
}
/* 渐变分隔线 */
.separator {
    height: 4px;
    background: linear-gradient(90deg, #003366, #33CC33, #FF9900);
    margin: 40px 0;
    border: none;
}
/* 留白区块 */
.space {
    height: 40px;
}
/* 响应式设计 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2em;
    }
    .hero-content p {
        font-size: 1em;
    }
    .section {
        padding: 40px 20px;
    }
    .navbar ul {
        flex-direction: column;
        width: 100%;
    }
    .navbar ul li {
        margin: 10px 0;
    }
}
/* 代码示例样式 */
.code-example {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
    font-family: 'Courier New', Courier, monospace;
    color: #d63384;
}

