
/* 
整体页面样式
使用未来主义风格，结合深蓝色与霓虹色调，营造科技感与未来感。通过模块化布局和动态分层设计，实现信息的清晰展示和视觉层次感。
*/

/* 设置全局样式 */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1E272E, #6C5CE7, #B2A4FF);
    color: #FFFFFF;
    overflow-x: hidden;
}

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

header .logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #00FFFF;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: #FFFFFF;
    text-decoration: none;
    position: relative;
    padding: 5px 0;
}

/* 悬停下划线动画 */
nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #32CD32;
    left: 0;
    bottom: 0;
    transition: width 0.3s;
}

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

/* 主要内容区域 */
.main-content {
    padding: 120px 60px 60px 60px;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
}

/* 侧边导航 */
aside {
    position: sticky;
    top: 100px;
    background: rgba(46, 52, 64, 0.8);
    padding: 20px;
    border-radius: 10px;
}

aside ul {
    list-style: none;
    padding: 0;
}

aside ul li {
    margin-bottom: 15px;
}

aside ul li a {
    color: #B2A4FF;
    text-decoration: none;
    transition: color 0.3s;
}

aside ul li a:hover {
    color: #00FFFF;
}

/* 文章内容 */
article {
    background: rgba(46, 52, 64, 0.8);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

article h2 {
    color: #32CD32;
    font-size: 2em;
    margin-bottom: 20px;
    position: relative;
}

article h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background: #00FFFF;
    position: absolute;
    left: 0;
    bottom: -10px;
}

/* 图片样式 */
.article-image {
    width: 100%;
    max-width: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 代码块样式 */
pre {
    background: #2E3440;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 14px;
    color: #D8DEE9;
    position: relative;
}

pre::before {
    content: '代码示例';
    position: absolute;
    top: -20px;
    left: 0;
    background: #81A1C1;
    color: #FFFFFF;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* 按钮样式 */
button {
    background-color: #00FFFF;
    border: none;
    padding: 10px 20px;
    color: #1E272E;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

button:hover {
    background-color: #32CD32;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    aside {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .main-content {
        padding: 100px 20px 20px 20px;
    }
    
    article {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    header .logo {
        font-size: 1.2em;
    }
    
    nav ul li a {
        font-size: 0.9em;
    }
    
    article h2 {
        font-size: 1.5em;
    }
}

