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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #00008B, #8A2BE2);
    color: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 固定顶部导航栏 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 139, 0.8);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.3s ease;
}

nav:hover {
    background: rgba(138, 43, 226, 0.9);
}

nav a {
    color: #FFFFFF;
    text-decoration: none;
    margin-left: 20px;
    position: relative;
}

nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #7FFF00;
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #7FFF00;
}

/* 主内容区域 */
.main {
    padding: 100px 20px 50px 20px;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
}

/* 侧边栏 */
.sidebar {
    background: rgba(255, 20, 147, 0.2);
    padding: 20px;
    border-radius: 10px;
    position: sticky;
    top: 80px;
}

.sidebar img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.3s;
}

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

.sidebar a {
    display: block;
    color: #00FF7F;
    text-decoration: none;
    margin: 10px 0;
    rel="nofollow";
}

.sidebar a:hover {
    text-decoration: underline;
}

/* 主要内容 */
.content {
    background: rgba(75, 0, 130, 0.5);
    padding: 20px;
    border-radius: 10px;
}

.content h2, .content h3, .content h4 {
    color: #FF69B4;
    margin-bottom: 10px;
}

.content pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    color: #00FF7F;
}

.content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.content table, .content th, .content td {
    border: 1px solid #FFFFFF;
}

.content th, .content td {
    padding: 10px;
    text-align: center;
}

.content th {
    background: rgba(255, 105, 180, 0.3);
}

/* 示例数据展示 */
.sample-data {
    background: rgba(0, 191, 255, 0.2);
    padding: 20px;
    border-radius: 10px;
    margin-top: 40px;
}

.sample-data h2 {
    color: #FFD700;
    margin-bottom: 15px;
}

.sample-data ul {
    list-style: disc inside;
    margin-bottom: 15px;
}

.sample-data li {
    margin-bottom: 10px;
    color: #ADFF2F;
}

/* 图片画廊 */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.gallery img {
    width: calc(33.333% - 10px);
    border-radius: 5px;
    transition: transform 0.3s;
}

.gallery img:hover {
    transform: scale(1.1);
}

@media (max-width: 1440px) {
    .main {
        grid-template-columns: 1fr 2.5fr;
    }
}

@media (max-width: 1200px) {
    .main {
        grid-template-columns: 1fr 2fr;
    }
}

@media (max-width: 1024px) {
    .main {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 10px 20px;
    }

    .logo {
        font-size: 1.2em;
    }

    .gallery img {
        width: calc(50% - 10px);
    }
}

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

    .content h2 {
        font-size: 1.5em;
    }

    .content h3 {
        font-size: 1.2em;
    }
}

@media (max-width: 320px) {
    nav a {
        margin-left: 10px;
        font-size: 0.9em;
    }

    .main {
        padding: 80px 10px 30px 10px;
    }
}

/* 动画与微交互 */
@keyframes particle {
    0% { opacity: 0; transform: translateY(0px); }
    50% { opacity: 1; transform: translateY(-10px); }
    100% { opacity: 0; transform: translateY(0px); }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.particle {
    width: 5px;
    height: 5px;
    background: #7FFF00;
    border-radius: 50%;
    position: absolute;
    animation: particle 2s infinite;
}

.particle:nth-child(odd) {
    background: #FF1493;
}

/* 滚动视差 */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 400px;
    position: relative;
}

/* 鼠标悬停动画 */
.element:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease-in-out;
}

