
/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置网页的背景色为深蓝色，给页面增加科技感 */
body {
    background: linear-gradient(135deg, #1E272E, #6A5ACD);
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden; /* 防止出现横向滚动条 */
}

/* 设定主要的容器，采用网格布局 */
.container {
    display: grid;
    grid-template-rows: 60px 1fr 100px;
    grid-template-areas:
        "header"
        "main"
        "footer";
    min-height: 100vh;
}

/* 固定导航栏样式 */
.header {
    grid-area: header;
    background: rgba(30, 39, 46, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 导航菜单的链接样式 */
.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #03A9F4;
}

/* 主内容区的样式 */
.main {
    grid-area: main;
    padding: 80px 20px 20px 20px; /* 留出导航栏的空间 */
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 每个独立视觉区块 */
.section {
    background: rgba(47, 54, 64, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 标题样式 */
h2, h3, h4 {
    color: #C71585;
    margin-bottom: 15px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

/* 正文段落样式 */
p {
    font-size: 16px;
    margin-bottom: 15px;
    color: #ffffff;
}

/* 代码块样式 */
pre {
    background: #2F3640;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
}

code {
    color: #03A9F4;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

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

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* 响应式图片布局 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.image-gallery img {
    flex: 1 1 calc(25% - 40px);
    max-width: calc(25% - 40px);
}

@media (max-width: 1200px) {
    .image-gallery img {
        flex: 1 1 calc(33.333% - 40px);
        max-width: calc(33.333% - 40px);
    }
}

@media (max-width: 768px) {
    .image-gallery img {
        flex: 1 1 calc(50% - 40px);
        max-width: calc(50% - 40px);
    }
}

@media (max-width: 480px) {
    .image-gallery img {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* 渐变分隔线 */
.divider {
    height: 2px;
    background: linear-gradient(to right, #03A9F4, #C71585);
    margin: 40px 0;
}

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

button:hover {
    background: #C71585;
    transform: translateY(-2px);
}

/* 卡片样式 */
.card {
    background: #2F3640;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 动画加载样式 */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #03A9F4;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 3D图表样式 */
.chart {
    width: 100%;
    height: 400px;
    perspective: 1000px;
}

.chart-inner {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: rotate 10s infinite linear;
}

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

/* 动态加载动画 */
@keyframes flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.flow-background {
    background: linear-gradient(-45deg, #1E272E, #6A5ACD, #03A9F4, #C71585);
    background-size: 400% 400%;
    animation: flow 15s ease infinite;
}

/* 渐进披露内容 */
.details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    background: #2F3640;
    padding: 0 20px;
    border-radius: 5px;
}

.details.show {
    max-height: 500px; /* 根据内容调整 */
    padding: 20px;
}

/* 底部信息模块 */
.footer {
    grid-area: footer;
    background: rgba(30, 39, 46, 0.9);
    color: #ffffff;
    text-align: center;
    padding: 20px;
}

/* 导航系统样式 */
.nav-system {
    position: fixed;
    top: 60px;
    right: 20px;
    background: rgba(47, 54, 64, 0.9);
    padding: 10px;
    border-radius: 8px;
}

.nav-system a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin: 5px 0;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-system a:hover {
    color: #03A9F4;
}

/* 提示框样式 */
.alert {
    background: #C71585;
    color: #ffffff;
    padding: 15px;
    text-align: center;
    border-radius: 5px;
    font-size: 18px;
    margin-bottom: 40px;
}

/* 高级CSS3效果 */
.glow {
    text-shadow: 0 0 10px #03A9F4, 0 0 20px #03A9F4, 0 0 30px #03A9F4;
}

.button-glow:hover {
    box-shadow: 0 0 20px #C71585, 0 0 30px #C71585;
}

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

table, th, td {
    border: 1px solid #ffffff;
}

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

th {
    background: #6A5ACD;
}

/* 表单样式 */
input, select, textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: none;
    border-radius: 5px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 5px #03A9F4;
}

/* 链接样式 */
a {
    color: #03A9F4;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #C71585;
}

/* 响应式字体大小 */
@media (max-width: 768px) {
    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    p, a, button {
        font-size: 15px;
    }
}

/* 黄金比例布局 */
.gold-ratio {
    width: 61.8%;
    margin: 0 auto;
}

/* 定义动画过渡 */
.transition {
    transition: all 0.3s ease;
}

/* 界面层次分明 */
.layer {
    position: relative;
    z-index: 1;
}

.layer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

/* 动态背景效果 */
.dynamic-bg {
    animation: bgShift 20s linear infinite;
}

@keyframes bgShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

