/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: #2c3e50;
    background: #fafbfc;
    font-size: 13px;
}

/* 主容器 */
.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 左侧菜单 */
.sidebar {
    width: 260px;
    background: #1e293b;
    color: #e2e8f0;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
    position: relative;
    border-right: 1px solid #334155;
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid #334155;
    background: #0f172a;
}

.sidebar-header h1 {
    font-size: 1.25rem;
    margin-bottom: 6px;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header h1 i {
    margin-right: 8px;
    color: #06b6d4;
    font-size: 1.1rem;
}

.version {
    font-size: 0.75rem;
    color: #94a3b8;
    background: #334155;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    text-align: center;
    width: 100%;
}

/* 搜索框 */
.search-box {
    position: relative;
    margin: 16px;
    margin-bottom: 8px;
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #334155;
    border-radius: 6px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.search-box input::placeholder {
    color: #64748b;
}

.search-box input:focus {
    border-color: #06b6d4;
    background: #1e293b;
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.1);
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 13px;
}

/* 菜单样式 */
.menu {
    list-style: none;
    padding: 8px;
}

.menu-item {
    margin-bottom: 1px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
    font-size: 13px;
    font-weight: 500;
}

.menu-link:hover {
    background: #334155;
    color: #f1f5f9;
}

.menu-link.active {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
}

.menu-link i {
    margin-right: 10px;
    width: 14px;
    text-align: center;
    font-size: 12px;
}

.menu-link .arrow {
    margin-left: auto;
    margin-right: 0;
    transition: transform 0.2s ease;
    font-size: 10px;
}

.has-submenu.open .arrow {
    transform: rotate(180deg);
}

/* 子菜单 */
.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #0f172a;
    border-radius: 6px;
    margin-top: 2px;
    border: 1px solid #1e293b;
}

.has-submenu.open .submenu {
    max-height: 300px;
}

.submenu .menu-link {
    padding: 8px 12px 8px 36px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 400;
}

.submenu .menu-link:hover {
    background: #1e293b;
    color: #e2e8f0;
}

.submenu .menu-link.active {
    background: #0891b2;
    color: white;
}

/* 右侧内容区 */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
}

.content-header {
    background: #ffffff;
    padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-height: 50px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
    margin-right: 12px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: #f1f5f9;
    color: #334155;
}

.breadcrumb {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.breadcrumb span {
    color: #374151;
}

.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #fafbfc;
}

/* Markdown 内容样式 */
.markdown-content {
    max-width: none;
    margin: 0;
    padding: 32px 48px;
    background: white;
    min-height: 100%;
    line-height: 1.6;
    box-shadow: 0 0 0 1px #e2e8f0;
    margin-top: 0;
}

.markdown-content h1 {
    color: #0f172a;
    font-size: 1.625rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #06b6d4;
    line-height: 1.2;
}

.markdown-content h2 {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e2e8f0;
    line-height: 1.3;
}

.markdown-content h3 {
    color: #334155;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    line-height: 1.4;
}

.markdown-content h4 {
    color: #475569;
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    line-height: 1.4;
}

.markdown-content p {
    margin-bottom: 1rem;
    color: #374151;
    font-size: 13px;
}

.markdown-content ul, .markdown-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin-bottom: 0.4rem;
    color: #374151;
    font-size: 13px;
}

.markdown-content blockquote {
    border-left: 3px solid #06b6d4;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f8fafc;
    color: #475569;
    font-style: italic;
    border-radius: 0 6px 6px 0;
}

.markdown-content code {
    background: #f1f5f9;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 12px;
    color: #dc2626;
    border: 1px solid #e2e8f0;
}

.markdown-content pre {
    background: #0d1117;
    color: #e6edf3;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    position: relative;
    border: 1px solid #21262d;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', 'Menlo', 'Consolas', monospace;
}

.markdown-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 13px;
    border: none;
    font-family: inherit;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.markdown-content th,
.markdown-content td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
}

.markdown-content th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
    font-size: 12px;
}

.markdown-content tr:hover {
    background: #f8fafc;
}

/* API 特定样式 */
.api-method {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 6px;
    letter-spacing: 0.5px;
}

.api-method.get { background: #10b981; color: white; }
.api-method.post { background: #3b82f6; color: white; }
.api-method.put { background: #f59e0b; color: white; }
.api-method.delete { background: #ef4444; color: white; }

.api-endpoint {
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, monospace;
    border-left: 3px solid #06b6d4;
    margin: 1rem 0;
    font-size: 12px;
    color: #1e293b;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.loading i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
    color: #06b6d4;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: #06b6d4;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #0891b2;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 1001;
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .content {
        width: 100%;
    }
    
    .markdown-content {
        padding: 20px 16px;
        margin: 0;
        box-shadow: none;
    }
    
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar,
.content-body::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1e293b;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.content-body::-webkit-scrollbar-track {
    background: #f8fafc;
}

.content-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.content-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

.markdown-content {
    animation: fadeIn 0.3s ease-out;
}

/* 搜索高亮 */
.highlight {
    background: #fef08a;
    padding: 2px 4px;
    border-radius: 2px;
}

/* 错误状态 */
.error {
    text-align: center;
    padding: 60px 20px;
    color: #ef4444;
}

.error h2 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.error p {
    font-size: 14px;
    color: #64748b;
}

/* 对接流程特殊样式 */
.markdown-content h3[id^="步骤"] {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid #cbd5e1;
    border-left: 4px solid #06b6d4;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 2rem 0 1rem;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.markdown-content h3[id^="步骤"]:before {
    content: "🔸";
    margin-right: 8px;
    font-size: 1.1em;
}

/* 警告和提示框样式 */
.markdown-content blockquote {
    position: relative;
    padding-left: 3rem;
}

.markdown-content blockquote:before {
    content: "⚠️";
    position: absolute;
    left: 1rem;
    top: 1rem;
    font-size: 1.2em;
}

/* 需要商户主动开启的回调订阅提示 */
.subscription-notice {
    margin: 1rem 0 1.5rem;
    padding: 0.9rem 1rem;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    color: #9a3412;
    font-size: 13px;
}

.subscription-badge,
.subscription-default-off {
    display: inline-block;
    margin-right: 0.5rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    color: white;
    font-size: 11px;
    font-weight: 600;
}

.subscription-badge {
    background: #f59e0b;
}

.subscription-default-off {
    background: #ef4444;
}

/* 检查清单样式 */
.markdown-content ul li:has(input[type="checkbox"]) {
    list-style: none;
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.markdown-content ul li input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 0.1rem;
    transform: scale(1.2);
    accent-color: #06b6d4;
}

.markdown-content ul li input[type="checkbox"]:checked + span {
    color: #059669;
    text-decoration: line-through;
}

/* 支持表格样式增强 */
.markdown-content table th:first-child {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    font-weight: 600;
}

.markdown-content table td:first-child {
    font-weight: 600;
    color: #1e293b;
    background: #f8fafc;
}

/* 代码块语言标签 */
.markdown-content pre {
    position: relative;
}

.markdown-content pre:before {
    content: attr(data-language);
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: #334155;
    color: #94a3b8;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 流程步骤编号样式 */
.markdown-content h3[id*="步骤一"]:before { content: "1️⃣"; }
.markdown-content h3[id*="步骤二"]:before { content: "2️⃣"; }
.markdown-content h3[id*="步骤三"]:before { content: "3️⃣"; }
.markdown-content h3[id*="步骤四"]:before { content: "4️⃣"; }
.markdown-content h3[id*="步骤五"]:before { content: "5️⃣"; }
.markdown-content h3[id*="步骤六"]:before { content: "6️⃣"; }
.markdown-content h3[id*="步骤七"]:before { content: "7️⃣"; }
.markdown-content h3[id*="步骤八"]:before { content: "8️⃣"; }

/* 成功/错误提示样式 */
.markdown-content li:has([class*="✅"]) {
    color: #059669;
    font-weight: 500;
}

.markdown-content li:has([class*="❌"]) {
    color: #dc2626;
    font-weight: 500;
}

/* 联系信息卡片样式 */
.markdown-content h2:contains("技术支持") + table {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px solid #0891b2;
    box-shadow: 0 4px 6px rgba(8, 145, 178, 0.1);
}

.markdown-content h2:contains("技术支持") + table th {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: white;
}

/* FAQ 样式 */
.markdown-content p:has(strong:contains("Q:")) {
    background: #f8fafc;
    border-left: 3px solid #3b82f6;
    padding: 0.75rem 1rem;
    margin: 1rem 0 0.5rem;
    border-radius: 0 6px 6px 0;
    font-weight: 600;
    color: #1e40af;
}

.markdown-content p:has(strong:contains("A:")) {
    background: #f0fdf4;
    border-left: 3px solid #10b981;
    padding: 0.75rem 1rem;
    margin: 0 0 1.5rem;
    border-radius: 0 6px 6px 0;
    color: #065f46;
}

/* 进度指示器样式 */
.progress-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    color: #64748b;
    position: relative;
}

.progress-step.active {
    color: #06b6d4;
    font-weight: 600;
}

.progress-step.completed {
    color: #059669;
}

.progress-step:not(:last-child):after {
    content: "";
    position: absolute;
    right: -50%;
    top: 1rem;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
}

.progress-step.completed:not(:last-child):after {
    background: #10b981;
}

/* Mermaid 图表样式 */
.mermaid {
    text-align: center;
    margin: 2rem 0;
    background: #fafbfc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mermaid svg {
    max-width: 100%;
    height: auto;
}

/* 移动端对接流程优化 */
@media (max-width: 768px) {
    .markdown-content h3[id^="步骤"] {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .markdown-content table {
        font-size: 12px;
    }
    
    .markdown-content pre {
        font-size: 12px;
        padding: 1rem;
    }
    
    .progress-indicator {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-step:after {
        display: none;
    }
}

/* 主题切换按钮 */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.theme-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.theme-btn:hover {
    background: #e2e8f0;
}

.theme-btn.active {
    background: #06b6d4;
    color: white;
    border-color: #0891b2;
}

/* 暗色主题 */
.theme-dark .markdown-content {
    background: #1a1a1a;
    color: #e2e8f0;
}

.theme-dark .markdown-content h1 {
    color: #f8fafc;
    border-bottom: 2px solid #06b6d4;
}

.theme-dark .markdown-content h2 {
    color: #f1f5f9;
    border-bottom: 1px solid #374151;
}

.theme-dark .markdown-content h3 {
    color: #cbd5e1;
}

.theme-dark .markdown-content p {
    color: #e2e8f0;
}

.theme-dark .markdown-content li {
    color: #e2e8f0;
}

.theme-dark .markdown-content blockquote {
    background: #2d3748;
    color: #cbd5e1;
    border-left: 3px solid #06b6d4;
}

.theme-dark .markdown-content code {
    background: #2d3748;
    color: #fbbf24;
    border: 1px solid #4a5568;
}

.theme-dark .markdown-content pre {
    background: #1a202c;
    color: #e2e8f0;
    border: 1px solid #2d3748;
}

.theme-dark .markdown-content table {
    background: #2d3748;
    border: 1px solid #4a5568;
}

.theme-dark .markdown-content th {
    background: #374151;
    color: #f8fafc;
}

.theme-dark .markdown-content td {
    border-bottom: 1px solid #4a5568;
}

.theme-dark .markdown-content tr:hover {
    background: #374151;
}

.theme-dark .markdown-content h3[id^="步骤"] {
    background: linear-gradient(135deg, #2d3748, #374151);
    border: 1px solid #4a5568;
    border-left: 4px solid #06b6d4;
}

/* 简约主题 */
.theme-minimal .markdown-content {
    background: #ffffff;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
}

.theme-minimal .markdown-content h1 {
    color: #111827;
    border-bottom: none;
    font-weight: 800;
    font-size: 2rem;
}

.theme-minimal .markdown-content h2 {
    color: #374151;
    border-bottom: none;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
}

.theme-minimal .markdown-content h3 {
    color: #4b5563;
    font-weight: 600;
    margin: 2rem 0 1rem;
}

.theme-minimal .markdown-content p {
    color: #6b7280;
    line-height: 1.7;
    font-size: 13px;
}

.theme-minimal .markdown-content blockquote {
    background: none;
    border-left: 4px solid #e5e7eb;
    color: #6b7280;
    font-style: normal;
    padding: 1rem 2rem;
}

.theme-minimal .markdown-content code {
    background: #f3f4f6;
    color: #1f2937;
    border: none;
    padding: 0.2rem 0.5rem;
}

.theme-minimal .markdown-content pre {
    background: #f9fafb;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.theme-minimal .markdown-content table {
    border: none;
    box-shadow: none;
}

.theme-minimal .markdown-content th {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.theme-minimal .markdown-content td {
    border-bottom: 1px solid #f3f4f6;
}

.theme-minimal .markdown-content h3[id^="步骤"] {
    background: none;
    border: none;
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.5rem;
    border-radius: 0;
    box-shadow: none;
}

/* 温暖主题 */
.theme-warm .markdown-content {
    background: #fefcf3;
    color: #92400e;
}

.theme-warm .markdown-content h1 {
    color: #92400e;
    border-bottom: 2px solid #f59e0b;
}

.theme-warm .markdown-content h2 {
    color: #b45309;
    border-bottom: 1px solid #fbbf24;
}

.theme-warm .markdown-content h3 {
    color: #d97706;
}

.theme-warm .markdown-content p {
    color: #a16207;
}

.theme-warm .markdown-content li {
    color: #a16207;
}

.theme-warm .markdown-content blockquote {
    background: #fef3c7;
    color: #92400e;
    border-left: 3px solid #f59e0b;
}

.theme-warm .markdown-content code {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.theme-warm .markdown-content pre {
    background: #451a03;
    color: #fbbf24;
    border: 1px solid #92400e;
}

.theme-warm .markdown-content table {
    background: #ffffff;
    border: 1px solid #fbbf24;
}

.theme-warm .markdown-content th {
    background: #fef3c7;
    color: #92400e;
}

.theme-warm .markdown-content tr:hover {
    background: #fffbeb;
}

.theme-warm .markdown-content h3[id^="步骤"] {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fbbf24;
    border-left: 4px solid #f59e0b;
}

/* 清新主题 */
.theme-fresh .markdown-content {
    background: #f0fdf4;
    color: #166534;
}

.theme-fresh .markdown-content h1 {
    color: #14532d;
    border-bottom: 2px solid #22c55e;
}

.theme-fresh .markdown-content h2 {
    color: #166534;
    border-bottom: 1px solid #4ade80;
}

.theme-fresh .markdown-content h3 {
    color: #15803d;
}

.theme-fresh .markdown-content p {
    color: #166534;
}

.theme-fresh .markdown-content li {
    color: #166534;
}

.theme-fresh .markdown-content blockquote {
    background: #dcfce7;
    color: #166534;
    border-left: 3px solid #22c55e;
}

.theme-fresh .markdown-content code {
    background: #dcfce7;
    color: #14532d;
    border: 1px solid #4ade80;
}

.theme-fresh .markdown-content pre {
    background: #052e16;
    color: #4ade80;
    border: 1px solid #166534;
}

.theme-fresh .markdown-content table {
    background: #ffffff;
    border: 1px solid #4ade80;
}

.theme-fresh .markdown-content th {
    background: #dcfce7;
    color: #14532d;
}

.theme-fresh .markdown-content tr:hover {
    background: #f0fdf4;
}

.theme-fresh .markdown-content h3[id^="步骤"] {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border: 1px solid #4ade80;
    border-left: 4px solid #22c55e;
}

/* 代码示例选项卡样式 */
.code-tabs {
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    position: relative;
}

.tab-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.tab-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-right: 8px;
    background: #f8fafc;
}

.tab-buttons {
    display: flex;
    align-items: center;
    flex: 1;
}

.tab-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.verify-tab-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
}

.verify-tab-btn i {
    margin-right: 6px;
    font-size: 12px;
}

.verify-tab-btn:hover {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    box-shadow: 0 4px 6px rgba(6, 182, 212, 0.3);
}

/* 签名和验签浮窗样式 */
.signature-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 24px;
    width: 90%;
    max-width: 600px;
    z-index: 1100;
    display: none;
}

.signature-modal.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 18px;
    color: #1e293b;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #1e293b;
}

.modal-body {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-weight: 500;
    font-size: 14px;
}

.form-group textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #1e293b;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #06b6d4;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group textarea:read-only {
    background: #f1f5f9;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    box-shadow: 0 4px 6px rgba(6, 182, 212, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #334155;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
}

.modal-overlay.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 在线验证按钮样式 */
.verify-online-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 16px;
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
}

.verify-online-btn i {
    margin-right: 6px;
    font-size: 12px;
}

.verify-online-btn:hover {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    box-shadow: 0 4px 6px rgba(6, 182, 212, 0.3);
}

.tab-button {
    padding: 12px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid transparent;
}

.tab-button:hover {
    color: #334155;
    background: #f1f5f9;
}

.tab-button.active {
    color: #06b6d4;
    background: #ffffff;
    border-bottom-color: #06b6d4;
    font-weight: 600;
}

.tab-button i {
    font-size: 14px;
}

.tab-content {
    display: none;
    background: #ffffff;
}

.tab-content.active {
    display: block;
}

.tab-content pre {
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    background: #0d1117 !important;
    position: relative;
    overflow-x: auto;
}

.tab-content pre code {
    background: #0d1117 !important;
    color: #e6edf3 !important;
    padding: 20px !important;
    display: block !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', 'Menlo', 'Consolas', monospace !important;
    border-radius: 0;
    overflow-x: auto;
    white-space: pre;
    word-wrap: normal;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .code-tabs {
        margin: 16px 0;
    }
    
    .tab-button {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .tab-button span {
        display: none;
    }
    
    .tab-button i {
        font-size: 16px;
        margin: 0;
    }
    
    .verify-tab-btn {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .verify-tab-btn span {
        display: none;
    }
    
    .verify-tab-btn i {
        margin: 0;
    }
    
    .tab-content pre code {
        padding: 16px !important;
        font-size: 12px !important;
    }
}

/* 代码复制按钮 */
.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #21262d;
    border: 1px solid #30363d;
    color: #f0f6fc;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
}

.code-copy-btn:hover {
    background: #30363d;
    border-color: #484f58;
}

.code-copy-btn.copied {
    background: #238636;
    border-color: #2ea043;
}

.markdown-content pre:hover .code-copy-btn,
.tab-content pre:hover .code-copy-btn {
    opacity: 1;
}
