
/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto Mono', 'Open Sans', sans-serif;
    background: linear-gradient(-45deg, #001f3f, #2a5298, #1e3c72, #2a5298);
    background-size: 400% 400%;
    animation: aurora-move 15s linear infinite;
    color: #ffffff;
    overflow-x: hidden;
}

/* 渐变背景动画 */
@keyframes aurora-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 布局容器 */
.container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 响应式设计 */
@media (min-width: 320px) and (max-width: 479px) {
    .container {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .container {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        grid-template-columns: 2fr 1fr;
    }
}

@media (min-width: 1024px) and (max-width: 1199px) {
    .container {
        grid-template-columns: 3fr 1fr;
    }
}

@media (min-width: 1200px) {
    .container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 导航栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100%;
    background: rgba(30, 30, 30, 0.9);
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
}

.sidebar h2 {
    color: #6F3FA1;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.sidebar a {
    color: #ffffff;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    transition: color 0.3s;
}

.sidebar a:hover {
    color: #ff5722;
}

/* 主内容样式 */
.main-content {
    margin-left: 220px;
    padding: 20px;
}

.main-content h1, .main-content h2, .main-content h3 {
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.main-content h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #ffdd40;
}

.main-content p {
    font-size: 1em;
    line-height: 1.6;
    color: #ffffff;
}

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

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.card h2 {
    color: #6F3FA1;
    margin-bottom: 10px;
}

.card p {
    color: #f0f0f0;
}

/* 文章样式 */
article {
    background: rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 10px;
    margin-top: 40px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

article h2, article h3 {
    color: #ffdd40;
}

article pre {
    background: #2a5298;
    color: #f2f2f2;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Roboto Mono', monospace;
    margin: 15px 0;
}

article code {
    font-size: 0.9em;
}

article ul {
    list-style-type: disc;
    padding-left: 20px;
    color: #ffffff;
}

.reference-note {
    text-align: center;
    font-size: 1.2em;
    margin-top: 30px;
    color: #ff5722;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* 悬浮按钮 */
.floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #6F3FA1;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

.floating-button:hover {
    transform: scale(1.1);
    background: #ff5722;
}

/* 粒子效果 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: moveParticles 10s infinite linear;
}

@keyframes moveParticles {
    from { transform: translateY(-100px); }
    to { transform: translateY(100vh); }
}

/* 背景图形 */
.geometric-shapes {
    position: absolute;
    top: 50px;
    right: 50px;
    width: 300px;
    height: 300px;
    background: rgba(111,63,161,0.2);
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(111,63,161,0.3);
}

/* 代码块适配 */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 适应大屏 */
@media (min-width: 1440px) {
    .main-content h1 {
        font-size: 3em;
    }
}

