
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #0d47a1, #512da8); /* 主色调渐变背景 */
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden; /* 避免水平滚动条 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 71, 161, 0.9);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

.navbar li {
    position: relative;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #00e5ff; /* 点缀色悬停效果 */
}

.navbar li ul {
    position: absolute;
    top: 40px;
    left: 0;
    background: #1e1e1e;
    padding: 10px;
    border-radius: 5px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar li:hover ul {
    visibility: visible;
    opacity: 1;
}

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

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

/* 主要内容样式 */
.main-content {
    padding: 100px 40px 40px 40px; /* 留出导航栏空间 */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 文章内容样式 */
article {
    background: rgba(30, 30, 30, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out forwards;
}

article h2, article h3 {
    color: #00e5ff; /* 辅助色用于标题 */
}

article pre {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

article code {
    color: #00c853; /* 亮色代码字体 */
    font-family: 'Courier New', Courier, monospace;
}

article table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

article table, article th, article td {
    border: 1px solid #00e5ff;
}

article th, article td {
    padding: 10px;
    text-align: left;
}

article th {
    background: #512da8;
}

.article-image {
    max-width: 650px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-image:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.7);
}

/* 强调区域 */
.highlight {
    background: rgba(0, 229, 255, 0.1);
    padding: 10px;
    border-left: 5px solid #00e5ff;
    margin: 20px 0;
}

/* 折叠区域样式 */
.collapsible {
    background: #1e1e1e;
    color: #ffffff;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.active, .collapsible:hover {
    background: #00c853;
}

.content {
    padding: 0 18px;
    display: none;
    background: #2e2e2e;
    overflow: hidden;
    border-radius: 5px;
}

.content p {
    margin: 10px 0;
}

/* 提示信息样式 */
.reference-note {
    background: #00c853;
    color: #ffffff;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 18px;
    margin-bottom: 30px;
}

/* 图片布局 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.image-grid img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.6);
}

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

    .main-content {
        padding: 100px 20px 20px 20px;
    }

    .collapsible {
        font-size: 14px;
    }

    .reference-note {
        font-size: 16px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: none;
}

/* 代码块样式 */
.code-block {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.code-block code {
    color: #00c853;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

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

.button:hover {
    background: #00e676;
    transform: scale(1.05);
}

/* 加载动画样式 */
.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #00e5ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

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

th {
    background: #512da8;
}

/* 3D效果 */
.vr-container {
    perspective: 1000px;
    width: 100%;
    height: 500px;
    position: relative;
}

.vr-object {
    transform-style: preserve-3d;
    animation: rotate 10s infinite linear;
}

@keyframes rotate {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

/* 多语言支持字体调整 */
[lang="en"] {
    font-family: 'Roboto', sans-serif;
}

[lang="zh"] {
    font-family: 'Montserrat', sans-serif;
}

