
/* 全局样式设置 */
* {
    box-sizing: border-box; /* 统一盒模型 */
    margin: 0;
    padding: 0;
}

/* 设置页面背景及主色调 */
body {
    background: linear-gradient(135deg, #1a1a2e 70%, #16213e 30%);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(22, 33, 62, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.navbar a {
    color: #ffffff;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #feb47b; /* 辅助色点缀 */
}

/* 主要内容容器 */
.container {
    max-width: 1200px;
    width: 100%;
    margin-top: 80px; /* 为固定导航栏留出空间 */
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 20px;
}

/* 文章样式 */
article {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

article h2, article h3, article h4 {
    color: #feb47b; /* 辅助色用于标题 */
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

article h2:hover, article h3:hover, article h4:hover {
    color: #ff7e5f;
}

article p {
    margin-bottom: 20px;
    font-size: 16px;
}

article pre {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

/* 图片样式 */
img.decorative {
    max-width: 650px;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 提示文本样式 */
.reference-note {
    font-size: 18px;
    color: #ff7e5f;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

/* 代码示例样式 */
.code-sample {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-sample code {
    color: #8be9fd;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}

/* 响应式布局 */
@media (min-width: 768px) {
    .container {
        grid-template-columns: 3fr 1fr;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
    }
    
    .navbar a {
        margin: 10px 0;
    }
    
    .reference-note {
        font-size: 16px;
    }

    article {
        padding: 20px;
    }

    article p {
        font-size: 15px;
    }
}

/* 交互动效 */
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 1s ease forwards;
}

/* 滚动条隐藏 */
body::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

