
/* 主体样式设置 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #ffffff 70%, #f0f0f0 30%);
    font-family: 'Roboto', sans-serif;
    color: #333333;
    line-height: 1.6;
    overflow-x: hidden; /* 防止水平滚动 */
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #ffffff;
    position: fixed;
    width: 100%;
    top: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.navbar .nav-links {
    display: flex;
    gap: 20px;
}

.navbar .nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
    color: #27ae60;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #2c3e50;
    margin: 4px 0;
    transition: all 0.3s ease;
}

/* 响应式导航 */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #ffffff;
        position: absolute;
        top: 60px;
        left: 0;
        padding: 20px;
    }
    .navbar .nav-links.active {
        display: flex;
    }
    .hamburger {
        display: flex;
    }
}

/* 主要内容容器 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
}

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

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* 图片样式 */
.card img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card img:hover {
    transform: scale(1.05);
}

/* 标题样式 */
h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 15px;
}

p {
    font-size: 1rem;
    margin-bottom: 15px;
}

/* 代码块样式 */
pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: #c7254e;
    background-color: #f9f2f4;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

thead {
    background-color: #2c3e50;
    color: #ffffff;
}

th, td {
    padding: 12px 15px;
    border: 1px solid #dddddd;
    text-align: left;
}

/* 按钮样式 */
.button-accent {
    background-color: #27ae60;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.button-accent:hover {
    background-color: #2ecc71;
}

/* 强调文字 */
strong {
    color: #2c3e50;
}

/* 留白与布局 */
.section {
    padding: 60px 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.section.visible {
    opacity: 1;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { height: 0; opacity: 0; }
    to { height: auto; opacity: 1; }
}

.nav-links.active {
    animation: slideDown 0.5s forwards;
}

/* 提示信息样式 */
.notice {
    background-color: #fffae6;
    border-left: 4px solid #ffe58f;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    color: #664d03;
}

/* 链接样式 */
a {
    color: #27ae60;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2ecc71;
}

/* 导航链接适配 */
@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }
    h3 {
        font-size: 1.5rem;
    }
    p, code {
        font-size: 0.9rem;
    }
}

