
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0D1B2A, #1B263B);
    color: #FFFFFF;
    overflow-x: hidden;
}

/* 头部样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(27, 38, 59, 0.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.header .title {
    font-size: 1.5rem;
    color: #4A90E2;
    text-shadow: 0 0 10px #4A90E2;
}

.header .menu-toggle {
    display: none;
    cursor: pointer;
}

.header .menu-toggle div {
    width: 25px;
    height: 3px;
    background-color: #FFFFFF;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 导航菜单样式 */
.nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 200px;
    height: calc(100% - 60px);
    background: rgba(27, 38, 59, 0.95);
    padding-top: 20px;
    transition: transform 0.3s ease;
}

.nav a {
    display: block;
    padding: 15px 20px;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.nav a:hover {
    background: rgba(74, 144, 226, 0.2);
}

.nav a[rel="nofollow"] {
    /* Internal links with nofollow */
}

/* 主要内容样式 */
.main-content {
    margin-left: 200px;
    padding: 80px 20px 20px 20px;
    background: linear-gradient(135deg, #1B263B, #0D1B2A);
    min-height: 100vh;
    box-sizing: border-box;
}

.article {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.article h2, .article h3, .article h4 {
    color: #6A1B9A;
    text-shadow: 0 0 5px #6A1B9A;
}

.article pre {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 10px 0;
}

.article code {
    color: #4A90E2;
    font-family: 'Courier New', Courier, monospace;
}

/* 图像样式 */
.article img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 10px 0;
}

/* 按钮样式 */
.button {
    background: #6A1B9A;
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 16px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* 动画粒子背景 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 10s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

/* 悬停效果 */
.hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-effect:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 1200px) {
    .header .title {
        font-size: 1.3rem;
    }
}

@media (max-width: 1024px) {
    .nav {
        width: 180px;
    }
    .main-content {
        margin-left: 180px;
    }
}

@media (max-width: 768px) {
    .nav {
        transform: translateX(-100%);
    }
    .nav.open {
        transform: translateX(0);
    }
    .header .menu-toggle {
        display: block;
    }
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .header .title {
        font-size: 1.2rem;
    }
    .nav {
        width: 150px;
    }
}

@media (max-width: 320px) {
    .header .title {
        font-size: 1rem;
    }
    .nav {
        width: 120px;
    }
}

/* 主题切换样式 */
body.light {
    background: linear-gradient(135deg, #FFFFFF, #E0E0E0);
    color: #000000;
}

body.light .header, body.light .nav {
    background: rgba(224, 224, 224, 0.9);
}

body.light .title {
    color: #6A1B9A;
    text-shadow: 0 0 10px #6A1B9A;
}

body.light .nav a:hover {
    background: rgba(74, 144, 226, 0.2);
}

body.light .card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

body.light .article h2, 
body.light .article h3, 
body.light .article h4 {
    color: #4A90E2;
}

body.light .article pre {
    background: rgba(240, 240, 240, 0.9);
    color: #000000;
}

body.light .article code {
    color: #D32F2F;
}

body.light .particles {
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.2) 1px, transparent 1px);
}


