/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #42b883 0%, #35495e 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.search-box {
    display: flex;
    max-width: 400px;
    margin-top: 10px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-box button {
    padding: 10px 20px;
    background-color: #35495e;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #2c3e50;
}

/* 导航栏样式 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-item {
    padding: 15px 0;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 15px 0;
}

.nav-link:hover,
.nav-link.active {
    color: #42b883;
    border-bottom: 2px solid #42b883;
}

/* 主内容区域样式 */
.main-content {
    padding: 40px 0;
}

.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2rem;
    color: #35495e;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #42b883;
}

/* 卡片式布局样式 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-size: 1.3rem;
    color: #35495e;
    margin-bottom: 15px;
}

.card-desc {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-link {
    display: inline-block;
    color: #42b883;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: #35495e;
    text-decoration: underline;
}

/* 内容详情样式 */
.content-detail {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.content-detail h3 {
    color: #35495e;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.content-detail h4 {
    color: #42b883;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.content-detail p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #666;
}

.content-detail ul,
.content-detail ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.content-detail li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #666;
}

/* 代码块样式 */
.code-block {
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
    padding: 20px;
    border-left: 4px solid #42b883;
    overflow-x: auto;
}

.code-block h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #35495e;
}

.code-block pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-block code {
    background-color: transparent;
    padding: 0;
    color: #333;
}

/* 表格样式 */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-table th,
.comparison-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.comparison-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #35495e;
}

.comparison-table tr:hover {
    background-color: #f5f7fa;
}

/* 流程图样式 */
.flowchart {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.flowchart ol {
    counter-reset: section;
}

.flowchart li {
    margin-bottom: 15px;
    position: relative;
}

.flowchart li::before {
    counter-increment: section;
    content: counters(section, ".") ". ";
    font-weight: bold;
    color: #42b883;
}

/* 返回链接样式 */
.back-link {
    margin-top: 30px;
    text-align: center;
}

/* 页脚样式 */
.footer {
    background-color: #35495e;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 60px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        text-align: center;
    }

    .search-box {
        margin: 15px auto 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-item {
        padding: 10px 0;
        text-align: center;
    }

    .nav-link {
        display: block;
    }

    .nav-link:hover,
    .nav-link.active {
        border-bottom: none;
        background-color: #f5f7fa;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    .search-box {
        flex-direction: column;
        max-width: 100%;
    }

    .search-box input {
        border-radius: 4px;
        margin-bottom: 10px;
    }

    .search-box button {
        border-radius: 4px;
    }

    .card {
        padding: 20px;
    }

    .card-title {
        font-size: 1.1rem;
    }
}