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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* 导航栏 */
.navbar {
    background: #2c3e50;
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #ecf0f1;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #3498db;
    color: #fff;
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: #fff;
    color: #667eea;
}

.btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
}

.btn-outline:hover {
    background: #fff;
    color: #667eea;
    transform: translateY(-2px);
}

/* 学习模块 */
.modules {
    padding: 80px 0;
    background: #fff;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #3498db;
    margin: 1rem auto 0;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.module-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.module-card:hover {
    transform: translateY(-5px);
    border-color: #3498db;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.module-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.module-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.module-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.btn-link {
    color: #3498db;
    font-weight: 600;
}

.btn-link:hover {
    color: #2980b9;
}

/* 学习要点 */
.features {
    padding: 80px 0;
    background: #f8f9fa;
}

.features-list {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.feature-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #27ae60;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

.feature-item h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.feature-item p {
    color: #666;
}

/* 页脚 */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 2rem 0;
}

/* 页面样式 */
.page {
    padding: 40px 0;
}

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.content {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.content h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #3498db;
}

.content h3 {
    color: #34495e;
    margin: 1.5rem 0 1rem;
}

.content p {
    margin-bottom: 1rem;
    color: #555;
}

.content ul, .content ol {
    margin: 1rem 0 1rem 2rem;
}

.content li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

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

table th {
    background: #3498db;
    color: #fff;
    font-weight: 600;
}

table tr:nth-child(even) {
    background: #f8f9fa;
}

table tr:hover {
    background: #e8f4f8;
}

/* 模拟器样式 */
.simulator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.simulator-form,
.simulator-history {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
}

.transaction-table th,
.transaction-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

.transaction-table th {
    background: #2c3e50;
    color: #fff;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #27ae60;
    color: #fff;
}

.badge-danger {
    background: #e74c3c;
    color: #fff;
}

.badge-warning {
    background: #f39c12;
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* 流程图样式 - 按角色归类 */
.flow-chart {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
    border-radius: 16px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.flow-section {
    margin-bottom: 35px;
}

.flow-section:last-child {
    margin-bottom: 0;
}

.flow-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flow-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    padding: 12px 15px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e8eaed;
    transition: all 0.3s ease;
}

.flow-row:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    transform: translateX(5px);
}

.flow-step {
    min-width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.flow-arrow {
    color: #667eea;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.flow-action {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
}

.flow-action strong {
    color: #667eea;
}

.flow-result {
    padding: 4px 12px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.flow-result.highlight {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    animation: pulse 2s infinite;
}

/* 角色泳道样式 */
.swimlane-diagram {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
    border-radius: 16px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow-x: auto;
}

.swimlane-header {
    display: flex;
    border-bottom: 3px solid #667eea;
    margin-bottom: 20px;
    min-width: 800px;
}

.swimlane-role {
    flex: 1;
    padding: 15px;
    text-align: center;
    font-weight: 700;
    color: #fff;
    border-radius: 10px 10px 0 0;
    min-width: 150px;
}

.swimlane-role:nth-child(1) { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.swimlane-role:nth-child(2) { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.swimlane-role:nth-child(3) { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.swimlane-role:nth-child(4) { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%); }

.swimlane-timeline {
    min-width: 800px;
}

.swimlane-step {
    display: flex;
    align-items: stretch;
    margin-bottom: 8px;
    min-height: 50px;
}

.swimlane-step-num {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8eaed;
    border-radius: 8px;
    font-weight: 700;
    color: #667eea;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.swimlane-step-content {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.swimlane-cell {
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8eaed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.swimlane-cell.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.swimlane-cell.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    border-color: #11998e;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

/* 支付流程字母序号样式 */
.swimlane-cell strong {
    font-size: 1.8rem;
    margin-right: 5px;
}

/* 架构图样式 - 视觉增强版 */
.architecture-diagram {
    display: grid;
    grid-template-columns: 1fr 40px 1fr 40px 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px;
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, #fafbfc 0%, #f0f4f8 100%);
    border-radius: 16px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.component {
    padding: 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid #3498db;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    min-width: 140px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.15);
    transition: all 0.3s ease;
    line-height: 1.6;
}

.component:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.3);
    border-color: #667eea;
}

.component-core {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.component-core:hover {
    box-shadow: 0 8px 35px rgba(102, 126, 234, 0.6);
}

.component-bank {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(17, 153, 142, 0.4);
}

.component-bank:hover {
    box-shadow: 0 8px 35px rgba(17, 153, 142, 0.6);
}

.component-clearing {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.4);
}

.component-clearing:hover {
    box-shadow: 0 8px 35px rgba(245, 87, 108, 0.6);
}

.connector {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #667eea;
    font-weight: bold;
}

.component-flow {
    grid-column: 1 / span 5;
    grid-row: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    padding-top: 20px;
    border-top: 3px dashed #667eea;
    font-style: normal;
    color: #667eea;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    padding: 15px;
    border-radius: 8px;
}

/* 架构图样式 - 兼容旧选择器 */
.architecture-diagram .component {
    padding: 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid #3498db;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    min-width: 140px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.15);
}

/* 对比图表样式 - 视觉增强版 */
.comparison-diagram {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.payment-flow-section {
    margin-bottom: 2rem;
    padding: 25px;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
    border-radius: 16px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.payment-flow-section:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.payment-flow-section h3 {
    margin-bottom: 1.5rem;
    color: #fff;
    border-bottom: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1.2rem;
    display: inline-block;
}

.payment-flow-section:nth-child(1) h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.payment-flow-section:nth-child(2) h3 {
    background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.4);
}

.payment-flow-section:nth-child(3) h3 {
    background: linear-gradient(135deg, #e60012 0%, #c21500 100%);
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.4);
}

/* 对比表格样式 - 视觉增强版 */
.comparison-chart {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.chart-row {
    display: contents;
}

.chart-row.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
}

.chart-cell {
    padding: 18px 15px;
    border-bottom: 1px solid #e8eaed;
    border-right: 1px solid #e8eaed;
    text-align: left;
    font-size: 0.95rem;
}

.chart-cell:last-child {
    border-right: none;
}

.chart-row:last-child .chart-cell {
    border-bottom: none;
}

.chart-row.header .chart-cell {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(255,255,255,0.2);
}

.chart-row:not(.header):hover .chart-cell {
    background: rgba(102, 126, 234, 0.05);
}

.chart-row:nth-child(even):not(.header) {
    background: #fafbfc;
}

/* 概念映射图样式 - 视觉增强版 */
.concept-map {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 20px;
}

.concept-node {
    flex: 1;
    min-width: 180px;
    padding: 25px 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid #e1e8ed;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.concept-node:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.concept-node h4 {
    margin-top: 0;
    color: #667eea;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.concept-node p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.concept-node:nth-child(1) { border-top: 4px solid #667eea; }
.concept-node:nth-child(2) { border-top: 4px solid #764ba2; }
.concept-node:nth-child(3) { border-top: 4px solid #11998e; }
.concept-node:nth-child(4) { border-top: 4px solid #f093fb; }
.concept-node:nth-child(5) { border-top: 4px solid #f5576c; }

.concept-connection {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    align-self: center;
    padding: 0 10px;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2c3e50;
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .simulator-container {
        grid-template-columns: 1fr;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    /* 移动端序列图样式 */
    .sequence-diagram {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        overflow-x: auto;
    }

    .participant-row,
    .message-row {
        grid-template-columns: 1fr !important;
        display: flex;
        flex-direction: column;
    }

    .architecture-diagram {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        overflow-x: auto;
    }

    .component-flow {
        display: none;
    }
    
    /* 移动端对比图表样式 */
    .comparison-diagram {
        gap: 1rem;
    }
    
    .comparison-chart {
        display: block;
    }
    
    .chart-row {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #ddd;
    }
    
    .chart-cell {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 10px;
    }
    
    .chart-cell:first-child {
        font-weight: bold;
        background: #f8f9fa;
    }
    
    .concept-map {
        flex-direction: column;
        gap: 2rem;
    }
    
    .concept-connection {
        transform: rotate(90deg);
    }

    /* 泳道图响应式 */
    .swimlane-diagram {
        padding: 15px;
    }

    .swimlane-header {
        flex-direction: column;
        gap: 10px;
    }

    .swimlane-role {
        border-radius: 8px;
    }

    .swimlane-step {
        flex-direction: column;
        align-items: flex-start;
    }

    .swimlane-step-num {
        width: 100%;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .swimlane-step-content {
        grid-template-columns: 1fr;
    }

    /* 网关卡片样式 */
    .gateway-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
        margin-top: 20px;
    }

    .gateway-card {
        background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
        border-radius: 16px;
        padding: 25px;
        border: 2px solid #e1e8ed;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    }

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

    .gateway-card-header {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 2px solid #e1e8ed;
    }

    .gateway-card-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: #fff;
    }

    .gateway-card-title {
        font-size: 1.2rem;
        font-weight: 700;
        color: #2c3e50;
    }

    .gateway-card-desc {
        color: #666;
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .gateway-card-section {
        margin-bottom: 15px;
    }

    .gateway-card-section-title {
        font-weight: 600;
        color: #2c3e50;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .gateway-card-section ul {
        margin: 0;
        padding-left: 18px;
    }

    .gateway-card-section li {
        color: #666;
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .gateway-card-tag {
        display: inline-block;
        padding: 3px 10px;
        background: #e8f5e9;
        color: #2e7d32;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        margin-right: 5px;
        margin-bottom: 5px;
    }

    .gateway-card-tag.new {
        background: #e3f2fd;
        color: #1565c0;
    }

    .gateway-card-tag.featured {
        background: #fff3e0;
        color: #e65100;
    }

    /* 集成步骤流程图 */
    .integration-flow {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 15px;
        margin: 30px 0;
        flex-wrap: wrap;
    }

    .integration-step {
        flex: 1;
        min-width: 200px;
        text-align: center;
        position: relative;
        padding: 20px 15px;
        background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
        border-radius: 16px;
        border: 2px solid #e1e8ed;
        transition: all 0.3s ease;
    }

    .integration-step:hover {
        transform: translateY(-5px);
        border-color: #667eea;
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    }

    .integration-step:not(:last-child)::after {
        content: "→";
        position: absolute;
        right: -25px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.5rem;
        color: #667eea;
        font-weight: bold;
    }

    .integration-step-num {
        width: 40px;
        height: 40px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        margin: 0 auto 15px;
    }

    .integration-step-title {
        font-weight: 600;
        color: #2c3e50;
        margin-bottom: 10px;
    }

    .integration-step-desc {
        font-size: 0.85rem;
        color: #666;
    }

    .integration-step-materials {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px dashed #e1e8ed;
    }

    .integration-step-materials span {
        display: block;
        font-size: 0.8rem;
        color: #999;
    }

    /* 接口表格样式增强 */
    .api-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        margin: 15px 0;
        border: 1px solid #e1e8ed;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    .api-table th {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
        font-weight: 600;
        padding: 15px;
        text-align: left;
    }

    .api-table td {
        padding: 12px 15px;
        border-bottom: 1px solid #e1e8ed;
        color: #555;
    }

    .api-table tr:last-child td {
        border-bottom: none;
    }

    .api-table tr:hover td {
        background: #f8f9fa;
    }

    .api-table .required {
        color: #e74c3c;
        font-weight: 600;
    }

    .api-table .optional {
        color: #999;
    }

    /* 状态图样式 */
    .status-flow {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin: 20px 0;
        padding: 20px;
    }

    .status-box {
        padding: 12px 20px;
        border-radius: 8px;
        font-weight: 600;
        text-align: center;
        min-width: 100px;
    }

    .status-box.created {
        background: #e3f2fd;
        color: #1565c0;
        border: 2px solid #1565c0;
    }

    .status-box.wait {
        background: #fff3e0;
        color: #e65100;
        border: 2px solid #e65100;
    }

    .status-box.success {
        background: #e8f5e9;
        color: #2e7d32;
        border: 2px solid #2e7d32;
    }

    .status-box.refund {
        background: #fce4ec;
        color: #c2185b;
        border: 2px solid #c2185b;
    }

    .status-box.closed {
        background: #f5f5f5;
        color: #666;
        border: 2px solid #999;
    }

    .status-arrow {
        font-size: 1.5rem;
        color: #667eea;
    }

    /* 错误码卡片 */
    .error-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin: 15px 0;
    }

    .error-card {
        padding: 15px;
        background: #fff;
        border-radius: 10px;
        border: 1px solid #e1e8ed;
        text-align: center;
    }

    .error-code {
        font-size: 1.5rem;
        font-weight: 700;
        color: #667eea;
        margin-bottom: 5px;
    }

    .error-msg {
        color: #666;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .error-suggest {
        color: #999;
        font-size: 0.8rem;
    }

    /* 监控指标卡片 */
    .metrics-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        margin: 15px 0;
    }

    .metric-card {
        padding: 20px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 12px;
        color: #fff;
        text-align: center;
    }

    .metric-value {
        font-size: 2rem;
        font-weight: 700;
    }

    .metric-label {
        opacity: 0.9;
    }

    /* 重点难点突出样式 */
    .highlight-box {
        background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
        border-left: 5px solid #ff6b00;
        padding: 20px;
        border-radius: 0 12px 12px 0;
        margin: 20px 0;
    }

    .highlight-box.danger {
        background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
        border-left-color: #e53935;
    }

    .highlight-box.success {
        background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
        border-left-color: #43a047;
    }

    .highlight-box.info {
        background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
        border-left-color: #1e88e5;
    }

    .highlight-title {
        font-size: 1.2rem;
        font-weight: 700;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .highlight-box p {
        margin: 0;
        color: #333;
    }

    .danger-title { color: #c62828; }
    .warning-title { color: #e65100; }
    .success-title { color: #2e7d32; }
    .info-title { color: #1565c0; }

    /* 代码块样式 */
    div.code-block {
        background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%) !important;
        color: #d4d4d4 !important;
        padding: 25px 20px !important;
        border-radius: 12px !important;
        font-family: 'Monaco', 'Menlo', 'Consolas', monospace !important;
        font-size: 0.9rem !important;
        overflow-x: auto !important;
        margin: 20px 0 !important;
        line-height: 1.8 !important;
        border: 2px solid #667eea !important;
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3), inset 0 1px 0 rgba(255,255,255,0.1) !important;
        position: relative !important;
        white-space: pre !important; /* 保留空白符和换行 */
    }

    .code-block::before {
        content: "💻 代码示例";
        position: absolute;
        top: -12px;
        left: 20px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
        padding: 4px 16px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
    }

    div.code-block span.comment { color: #6a9955 !important; font-style: italic !important; }
    div.code-block span.keyword { color: #569cd6 !important; font-weight: 600 !important; }
    div.code-block span.string { color: #ce9178 !important; }
    div.code-block span.function { color: #dcdcaa !important; }
    div.code-block span.number { color: #b5cea8 !important; }
    div.code-block span.variable { color: #9cdcfe !important; }

    /* 核心概念卡片 */
    .core-concept {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
        margin: 20px 0;
    }

    .concept-card {
        background: #fff;
        border-radius: 16px;
        padding: 25px;
        border: 2px solid #e1e8ed;
        position: relative;
        overflow: hidden;
    }

    .concept-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
    }

    .concept-card.signature::before { background: linear-gradient(90deg, #667eea, #764ba2); }
    .concept-card.callback::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
    .concept-card.idempotent::before { background: linear-gradient(90deg, #11998e, #38ef7d); }
    .concept-card.timeout::before { background: linear-gradient(90deg, #ff6b6b, #ee5a5a); }

    .concept-card-title {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .concept-card-desc {
        color: #666;
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .concept-card-importance {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px dashed #e1e8ed;
        font-size: 0.85rem;
        color: #e53935;
        font-weight: 600;
    }

    /* 简化的网关表格 */
    .gateway-compare {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        margin: 20px 0;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    }

    .gateway-compare th {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #fff;
        font-weight: 600;
        padding: 15px;
        text-align: left;
    }

    .gateway-compare td {
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
    }

    .gateway-compare tr:last-child td { border-bottom: none; }
    .gateway-compare tr:hover td { background: #f8f9fa; }

    .gateway-compare .gateway-name {
        font-weight: 600;
        color: #2c3e50;
    }

    /* 横向流程图 */
    .content .flow-chart-horizontal {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 20px !important;
        margin: 30px 0 !important;
        flex-wrap: nowrap !important;
        padding: 20px 0 !important;
        width: 100% !important;
    }

    .content .flow-chart-horizontal .flow-node {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        min-width: 220px !important;
        position: relative !important;
        margin: 10px !important;
        flex: 1 !important;
        text-align: center !important;
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    .content .flow-chart-horizontal .flow-node:not(:last-child)::after {
        content: "→" !important;
        position: absolute !important;
        right: -30px !important;
        top: 30px !important;
        font-size: 2rem !important;
        color: #667eea !important;
        font-weight: bold !important;
        z-index: 10 !important;
    }

    .content .flow-chart-horizontal .flow-node:last-child::after {
        display: none !important;
    }

    .content .flow-chart-horizontal .flow-node-circle {
        width: 70px !important;
        height: 70px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
        box-shadow: 0 6px 20px rgba(0,0,0,0.2) !important;
        z-index: 2 !important;
        position: relative !important;
    }

    .content .flow-chart-horizontal .flow-node:nth-child(1) .flow-node-circle { 
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; 
    }
    .content .flow-chart-horizontal .flow-node:nth-child(2) .flow-node-circle { 
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important; 
    }
    .content .flow-chart-horizontal .flow-node:nth-child(3) .flow-node-circle { 
        background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important; 
    }
    .content .flow-chart-horizontal .flow-node:nth-child(4) .flow-node-circle { 
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%) !important; 
    }

    .content .flow-chart-horizontal .flow-node-title {
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        color: #2c3e50 !important;
        margin-bottom: 12px !important;
        text-align: center !important;
    }

    .content .flow-chart-horizontal .flow-node-content {
        background: #f8f9fa !important;
        border-radius: 12px !important;
        padding: 18px !important;
        text-align: center !important;
        width: 100% !important;
        border: 2px solid #e1e8ed !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
    }

    .content .flow-chart-horizontal .flow-node-content ul {
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        font-size: 0.9rem !important;
        color: #666 !important;
    }

    .content .flow-chart-horizontal .flow-node-content li {
        padding: 5px 0 !important;
        border-bottom: 1px dashed #e1e8ed !important;
    }

    .content .flow-chart-horizontal .flow-node-content li:last-child {
        border-bottom: none !important;
    }

    .content .flow-chart-horizontal .flow-node-content li::before {
        content: "• " !important;
        color: #667eea !important;
    }

    /* 移动端响应式设计 */
    @media (max-width: 768px) {
        .content .flow-chart-horizontal {
            flex-wrap: wrap !important;
            align-items: center !important;
        }

        .content .flow-chart-horizontal .flow-node {
            min-width: calc(50% - 10px) !important;
            margin-bottom: 30px !important;
        }

        .content .flow-chart-horizontal .flow-node:not(:last-child)::after {
            content: "↓" !important;
            position: absolute !important;
            right: 50% !important;
            top: 65px !important;
            transform: translateX(50%) !important;
        }

        .content .flow-chart-horizontal .flow-node:nth-child(odd) {
            margin-right: 5px !important;
        }

        .content .flow-chart-horizontal .flow-node:nth-child(even) {
            margin-left: 5px !important;
        }
    }

    @media (max-width: 480px) {
        .content .flow-chart-horizontal {
            flex-direction: column !important;
            align-items: center !important;
        }

        .content .flow-chart-horizontal .flow-node {
            min-width: 100% !important;
            max-width: 300px !important;
            margin: 20px 0 !important;
        }

        .content .flow-chart-horizontal .flow-node:not(:last-child)::after {
            content: "↓" !important;
            position: static !important;
            transform: none !important;
            margin: 10px auto !important;
        }
    }
}