
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72 70%, #2a5298 25%, #ffcc00 5%);
    color: #ffffff;
    overflow-x: hidden;
}

/* 响应式布局容器 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    padding: 40px;
}

/* 模块化内容块 */
.module {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.2);
}

/* 标题样式 */
h1, h2, h3, h4 {
    font-weight: 700;
    margin-bottom: 20px;
}

h1 {
    font-size: 36px;
    text-align: center;
}

h2 {
    font-size: 28px;
    border-bottom: 2px solid #ffcc00;
    padding-bottom: 10px;
}

h3 {
    font-size: 22px;
}

h4 {
    font-size: 18px;
}

/* 正文字体设置 */
p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    color: #ffffff;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #2a5298, #1e3c72);
}

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

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

.navbar li {
    position: relative;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #ffcc00;
}

.navbar li ul {
    display: none;
    position: absolute;
    top: 35px;
    left: 0;
    background: rgba(30, 60, 114, 0.9);
    backdrop-filter: blur(5px);
    padding: 10px 0;
    border-radius: 5px;
    min-width: 150px;
}

.navbar li:hover ul {
    display: block;
}

.navbar li ul li {
    padding: 10px 20px;
}

.navbar li ul li a:hover {
    color: #ffffff;
    background: rgba(255, 204, 0, 0.2);
    border-radius: 5px;
}

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

.decoration-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

/* 代码块样式 */
pre code {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
    overflow: auto;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

pre code::before {
    content: "代码示例";
    position: absolute;
    top: -25px;
    left: 0;
    background: #2a5298;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px 5px 0 0;
    font-size: 12px;
}

/* 轮播图样式 */
.carousel {
    display: flex;
    overflow: hidden;
    position: relative;
    border-radius: 15px;
}

.carousel-item {
    min-width: 100%;
    transition: transform 0.5s ease;
}

.carousel-buttons {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.carousel-button {
    background: rgba(30, 60, 114, 0.7);
    border: none;
    color: #ffffff;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.carousel-button:hover {
    background: rgba(255, 204, 0, 0.8);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2000;
}

.modal.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #ffffff;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ffcc00;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    backdrop-filter: blur(5px);
}

.modal-content button {
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.modal-content button:hover {
    background: linear-gradient(45deg, #2a5298, #1e3c72);
}

/* 首页背景动画 */
@keyframes moveBackground {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-background {
    background: linear-gradient(-45deg, #1e3c72, #2a5298, #1e3c72, #2a5298);
    background-size: 400% 400%;
    animation: moveBackground 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 折叠区域样式 */
.collapsible {
    background: rgba(30, 60, 114, 0.8);
    color: #ffffff;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    transition: background 0.3s ease;
    border-radius: 5px;
    margin-bottom: 10px;
}

.active, .collapsible:hover {
    background: rgba(255, 204, 0, 0.8);
    color: #000000;
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 5px;
    margin-bottom: 20px;
}

/* 点缀色 */
.highlight {
    color: #ffcc00;
}

/* 平滑过渡 */
.transition {
    transition: all 0.3s ease;
}

/* 保证无水平滚动 */
body, html {
    max-width: 100%;
    overflow-x: hidden;
}

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