
/* 全局样式设置，应用基础字体和背景渐变 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代感强的无衬线字体 */
    font-size: 16px; /* 正文字号 */
    line-height: 1.6;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); /* 深蓝渐变背景 */
    color: #ffffff;
    overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(32, 58, 67, 0.9); /* 半透明深蓝背景 */
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    z-index: 1000;
    transition: background-color 0.5s ease;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
    font-size: 18px; /* h2/h3/h4标题字号 */
}

.navbar a:hover {
    background-color: #ff7e5f; /* 橙色点缀 */
    color: #ffffff;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 60px;
    height: 100%;
    background-color: rgba(32, 58, 67, 0.9);
    transition: width 0.3s ease;
    overflow: hidden;
    z-index: 999;
}

.sidebar:hover {
    width: 200px;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 15px;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.sidebar a:hover {
    background-color: #ff7e5f;
}

.sidebar .icon {
    margin-right: 10px;
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

.sidebar .label {
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar:hover .label {
    opacity: 1;
}

/* 主内容区域样式 */
.main-content {
    margin: 80px 20px 20px 80px; /* 留出导航栏和侧边栏空间 */
    max-width: 1200px;
    margin-left: 80px;
}

.section {
    margin-bottom: 50px;
    padding: 20px;
    background-color: rgba(50, 75, 85, 0.8); /* 深色背景与整体风格协调 */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

.section h2, .section h3, .section h4 {
    color: #ff7e5f; /* 橙色作为点缀色 */
    margin-bottom: 15px;
}

.section p {
    font-size: 16px;
    line-height: 1.8;
    color: #ffffff;
}

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

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

/* 代码块样式 */
.code-sample {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Courier New', Courier, monospace;
}

.code-sample code {
    color: #ff7e5f;
    display: block;
    white-space: pre;
}

/* 导航提示样式 */
.announcement {
    text-align: center;
    font-size: 20px;
    margin: 20px 0;
    color: #ffffff;
    background-color: rgba(255, 126, 95, 0.8);
    padding: 10px;
    border-radius: 5px;
}

/* 底部样式 */
.footer {
    background-color: rgba(32, 58, 67, 0.95);
    padding: 30px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer .section {
    flex: 1 1 200px;
    margin: 10px;
}

.footer h3 {
    margin-bottom: 15px;
    border-bottom: 2px solid #ff7e5f;
    display: inline-block;
}

.footer a {
    color: #ff7e5f;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffffff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin: 80px 10px 10px 10px;
    }
}

@media (max-width: 480px) {
    .announcement {
        font-size: 16px;
    }
    
    .section h2, .section h3, .section h4 {
        font-size: 16px;
    }
    
    .navbar a {
        font-size: 16px;
    }
}

