
/* 全局样式设置，包括字体、背景和基本布局 */
body {
    /* 使用现代无衬线字体，确保可读性和现代感 */
    font-family: 'Roboto', sans-serif;
    color: #333333;
    margin: 0;
    padding: 0;
    /* 应用主色调的线性渐变作为背景 */
    background: linear-gradient(135deg, #1e3c72 30%, #2a5298 90%);
    /* 设置全局盒模型为边界盒 */
    box-sizing: border-box;
}

/* 布局容器，使用网格系统实现响应式设计 */
.container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 40px;
    max-width: 1200px;
    margin: auto;
}

/* 顶部导航栏样式 */
.navbar-fixed {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.9);
    padding: 20px;
    z-index: 1000;
    transition: background 0.3s ease;
}

/* 导航栏在滚动时的背景变化 */
.navbar-fixed.scrolled {
    background: rgba(30, 60, 114, 1);
}

/* 导航链接样式，添加悬停效果 */
.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #00ffff;
}

/* 主标题样式 */
h1, h2, h3, h4 {
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    margin-bottom: 20px;
}

/* 段落文本样式 */
p {
    font-size: 16px;
    line-height: 1.6;
    color: #f0f0f0;
}

/* 卡片式布局样式，添加阴影和悬浮效果 */
.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 图像样式，添加圆角和阴影 */
img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.05);
}

/* 按钮样式，应用主色调和过渡效果 */
.button {
    background-color: #00ffff;
    color: #001f3f;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.button:hover {
    background-color: #0074D9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 响应式设计，调整网格布局 */
@media (max-width: 1200px) {
    .card {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(6, 1fr);
        padding: 20px;
    }
    .card {
        grid-column: span 6;
    }
    .navbar a {
        margin: 0 10px;
        font-size: 14px;
    }
}

/* 动画效果，定义滚动时的可见状态 */
.scroll-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* 代码块样式，区别于正文内容 */
pre code {
    background: rgba(0, 0, 0, 0.8);
    color: #00ffea;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    display: block;
    margin: 20px 0;
    font-family: 'Courier New', Courier, monospace;
}

/* 添加关键帧动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 加载动画样式 */
.loading-spinner {
    width: 100px;
    height: 100px;
    border: 10px solid #f3f3f3;
    border-top: 10px solid #00ffff;
    border-radius: 50%;
    animation: spin 2s linear infinite;
    margin: 100px auto;
}

/* 固定导航栏下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(30, 60, 114, 0.95);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
}

.dropdown-content a {
    color: #ffffff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #00ffff;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 分割线样式，使用SVG图形 */
.section-divider {
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 100"><path d="M0,0 C600,100 600,0 1200,100 L1200,00 L0,0 Z" fill="%23e0e0e0"/></svg>') no-repeat center center;
    background-size: cover;
}

/* 透明层叠效果 */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 31, 63, 0.5);
    z-index: 1;
}

.content {
    position: relative;
    z-index: 2;
}

/* 动态加载动画 */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

