/* API文档移动端样式 - 飞翰品牌色系 */
/* 主色：#1f1570 (深蓝紫色) */
/* 辅色：#094f6e (青蓝色) */
/* 强调色：#1f1570 (飞翰主题色) */

.api-docs-page {
    background: #f5f6fa;
    min-height: 100vh;
    padding-bottom: 30px;
}

/* 顶部标题区 */
.api-docs-hero {
    background: linear-gradient(135deg, #1f1570 0%, #0148a4 100%);
    padding: 40px 20px;
    text-align: center;
    color: #fff;
}

.api-docs-hero h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.api-docs-hero p {
    font-size: 14px;
    opacity: 0.9;
}

/* 快捷导航 */
.api-quick-nav {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 100;
}

.quick-nav-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 15px;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.quick-nav-scroll::-webkit-scrollbar {
    display: none;
}

.quick-link {
    flex-shrink: 0;
    padding: 8px 16px;
    background: #f5f6fa;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s;
}

.quick-link.active {
    background: #1f1570;
    color: #fff;
}

/* 内容区块 */
.api-section {
    margin: 15px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f1570;
    padding: 20px;
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

.section-content {
    padding: 20px;
}

.section-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 25px 0 15px;
}

.section-content h3:first-child {
    margin-top: 0;
}

.section-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: #094f6e;
    margin: 20px 0 12px;
}

.section-content p {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 12px;
}

/* 服务卡片 */
.service-list {
    margin: 20px 0;
}

.service-item {
    background: #f8f9fc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #1f1570;
}

.service-tag {
    display: inline-block;
    background: #094f6e;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.service-item p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* 代码块 */
.code-block {
    background: #f5f6fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin: 15px 0;
    overflow-x: auto;
}

.code-header {
    background: #e8e8e8;
    padding: 10px 15px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
    border-bottom: 1px solid #ddd;
}

.code-block pre {
    padding: 15px;
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #333;
    overflow-x: auto;
    white-space: pre;
}

.code-block.xml pre {
    color: #d73a49;
}

.code-block.json pre {
    color: #22863a;
}

/* 环境卡片 */
.env-card {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.env-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
}

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

.env-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.env-row code {
    font-family: 'Consolas', monospace;
    font-size: 12px;
    color: #1f1570;
}

.warning-tip {
    color: #094f6e;
    font-size: 12px;
    margin-top: 10px;
}

.env-info {
    background: #f0f7ff;
    border-left: 3px solid #0148a4;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.env-info p {
    margin: 0;
    font-size: 13px;
}

/* 流程列表 */
.process-list {
    margin: 20px 0;
}

.process-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.process-item:last-child {
    border-bottom: none;
}

.process-num {
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: #1f1570;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 15px;
}

.process-info h4 {
    margin: 0 0 5px;
    font-size: 15px;
    color: #333;
}

.process-info p {
    margin: 0;
    font-size: 13px;
    color: #888;
}

/* 提示框 */
.tip-box {
    background: #f0f7ff;
    border-left: 3px solid #0148a4;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.tip-box.warning {
    background: #f0f7ff;
    border-left-color: #094f6e;
}

.tip-box h4 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #333;
}

.tip-box p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* 参数列表 */
.param-list {
    margin: 15px 0;
}

.param-item {
    background: #f8f9fc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.param-name {
    font-family: 'Consolas', monospace;
    font-size: 14px;
    color: #1f1570;
    font-weight: 600;
}

.param-type {
    display: inline-block;
    background: #e8e8e8;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 8px;
}

.param-required {
    display: inline-block;
    background: #094f6e;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 8px;
}

.param-optional {
    display: inline-block;
    background: #999;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 8px;
}

.param-item p {
    margin: 8px 0 0;
    font-size: 13px;
    color: #666;
}

/* 状态列表 */
.status-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.status-item {
    display: flex;
    align-items: center;
    background: #f8f9fc;
    padding: 12px;
    border-radius: 8px;
}

.status-code {
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: #1f1570;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 10px;
    flex-shrink: 0;
}

.status-desc {
    font-size: 13px;
    color: #555;
}

/* API卡片 */
.api-card {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.api-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.api-card-header h3 {
    margin: 0;
    font-size: 16px;
    color: #1f1570;
}

.api-version {
    background: #1f1570;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
}

.api-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}

.api-url {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.api-url .method {
    background: #094f6e;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.api-url code {
    font-family: 'Consolas', monospace;
    font-size: 12px;
    color: #333;
    word-break: break-all;
}

/* 错误码列表 */
.error-code-list {
    margin: 15px 0;
}

.error-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.error-item:last-child {
    border-bottom: none;
}

.error-code {
    width: 50px;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    color: #1f1570;
    font-weight: 600;
    flex-shrink: 0;
}

.error-code.success {
    color: #22863a;
}

.error-msg {
    font-size: 14px;
    color: #555;
}

/* 指南信息 */
.guide-info {
    background: #f0f7ff;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.guide-info p {
    margin: 0;
    font-size: 14px;
}

/* 表格 */
.api-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 13px;
}

.api-table thead {
    background: #f5f6fa;
}

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

.api-table th {
    font-weight: 600;
    color: #333;
}

.api-table td {
    color: #555;
}

.api-table code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    color: #d73a49;
}

/* 常见问题 */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: #fff;
    border-left: 4px solid #0148a4;
    border-radius: 0 8px 8px 0;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.faq-question {
    font-size: 15px;
    font-weight: 600;
    color: #1f1570;
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e8e8;
}

.faq-answer {
    font-size: 13px;
    line-height: 1.8;
    color: #555;
}

.faq-answer p {
    margin: 0;
}

.faq-contact-tip {
    margin-top: 20px;
    padding: 12px 15px;
    background: #fff8f3;
    border-left: 4px solid #ff7200;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #333;
}

.faq-contact-tip p {
    margin: 0;
    line-height: 1.6;
}

.faq-contact-tip strong {
    color: #ff7200;
}

/* 警告提示框 */
.alert-box {
    padding: 12px 15px;
    margin-top: 15px;
    border-radius: 6px;
    border-left: 4px solid;
    font-size: 13px;
    line-height: 1.6;
}

.alert-box.warning {
    background: #fff8e6;
    border-color: #ff9800;
    color: #664d03;
}

.alert-box code {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
}
