
/* 全局样式与渐变背景 */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #00008B, #4B0082, #00FF7F);
    background-size: 200% 200%;
    animation: gradient-animation 10s infinite;
    color: white;
    line-height: 1.6;
    padding: 20px;
}

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

h1, h2, h3 {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 2px;
    color: #FFA500;
    margin-top: 20px;
}

p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

a {
    color: #FFD700;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 网格布局 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.grid-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.grid-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* 悬浮侧边栏 */
.sidebar {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    list-style: none;
    padding: 0;
    z-index: 1000;
}

.sidebar li {
    margin-bottom: 10px;
}

.sidebar a {
    display: block;
    padding: 10px 15px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar a:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

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

/* 粒子系统 */
.particle-system {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin: 40px 0;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    animation: particle-animation 5s infinite;
}

@keyframes particle-animation {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

/* 自适应代码块 */
pre {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin: 20px 0;
}

code {
    color: #FFD700;
    font-family: 'Courier New', monospace;
}

/* 小屏幕适配 */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    pre {
        font-size: 0.8rem;
    }
}

