/* 全局样式变量 */
:root {
    /* 颜色变量 */
    --primary-color: #4a90d9;
    --primary-dark: #3a7bc8;
    --primary-light: #6ba3e0;
    --secondary-color: #67b26f;
    --accent-color: #5a9fd4;
    
    /* 厂商颜色 */
    --google-color: #4285f4;
    --openai-color: #10a37f;
    --anthropic-color: #d4a574;
    --midjourney-color: #9b59b6;
    --stability-color: #8e44ad;
    --runway-color: #e74c3c;
    --elevenlabs-color: #e67e22;
    
    /* 背景颜色 */
    --bg-color: #f5f7fa;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --content-bg: #f8f9fc;
    
    /* 文字颜色 */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    
    /* 边框和阴影 */
    --border-color: #e2e8f0;
    --border-color-highlight: #ff4757;
    --border-light: #edf2f7;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* 侧边栏宽度 */
    --sidebar-width: 280px;
    --header-height: 70px;
    --footer-height: 55px;
    --collapse-bar-height: 60px;
}

/* 深色模式变量 */
body.dark-mode {
    --bg-color: #0f1419;
    --sidebar-bg: #1a1f2e;
    --card-bg: #1e2433;
    --content-bg: #151a23;
    
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --text-light: #4a5568;
    
    --border-color: #2d3748;
    --border-color-highlight: #00f0ff;
    --border-light: #374151;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 顶部导航栏 */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

body.dark-mode .content-section {
    border-color: var(--border-color-highlight);
}

body.dark-mode .top-header {
    background: rgba(26, 31, 46, 0.95);
}

.header-content {
    max-width: 100%;
    height: 100%;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 280px;
    padding: 10px 40px 10px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--bg-color);
    cursor: pointer;
    font-size: 1.3rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.05);
    background: var(--primary-color);
}

.admin-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--bg-color);
    cursor: pointer;
    font-size: 1.3rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.admin-btn:hover {
    transform: scale(1.1);
    background: var(--primary-color);
}

/* 主容器 - 左右布局 */
.main-container {
    display: flex;
    padding-top: var(--header-height);
    min-height: 100vh;
}

/* 左侧边栏 */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--sidebar-bg);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.sidebar-nav {
    padding: 20px 0;
}

/* 侧边栏收缩/展开控制栏 */
.sidebar-collapse-controls {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    box-sizing: border-box;
}

.collapse-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.collapse-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 144, 217, 0.3);
}

.collapse-btn:active {
    transform: translateY(0);
}

.collapse-icon {
    font-size: 1rem;
}

.collapse-text {
    font-size: 0.85rem;
}

/* 导航分区 */
.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
    user-select: none;
}

.nav-section-title:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.section-icon {
    font-size: 1.1rem;
}

.arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: var(--transition);
}

.nav-section-title .arrow.expanded {
    transform: rotate(180deg);
}

/* 导航项 */
.nav-items {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.nav-items.expanded {
    max-height: 500px;
}

.nav-items li a {
    display: block;
    padding: 10px 20px 10px 45px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.nav-items li a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-items li a.active {
    background: linear-gradient(90deg, rgba(74, 144, 217, 0.1), transparent);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

/* 添加新厂商按钮 */
.nav-section.add-new {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 15px;
}

.add-provider-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.1), rgba(103, 178, 111, 0.1));
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.add-provider-btn:hover {
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.2), rgba(103, 178, 111, 0.2));
    transform: translateX(5px);
}

.plus-icon {
    font-size: 1.2rem;
}

/* 右侧主要内容区 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 40px 50px;
    padding-bottom: calc(var(--footer-height) + 40px);
    background: var(--content-bg);
    min-height: calc(100vh - var(--header-height));
}

/* 内容区块 */
.content-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color-highlight);
    transition: var(--transition);
}

.content-section:hover {
    box-shadow: var(--shadow-lg);
}

.content-section.placeholder {
    opacity: 0.7;
    border-style: dashed;
}

/* 当前搜索匹配高亮样式 - 亮黄色底 */
.content-section.current-match {
    background: rgba(255, 215, 0, 0.25) !important;
    border: 3px solid #ffaa00 !important;
    box-shadow: 0 0 40px rgba(255, 170, 0, 0.8), 0 0 80px rgba(255, 170, 0, 0.4) !important;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* 脉冲动画效果 - 用于首次跳转时 */
.content-section.match-pulse {
    background: rgba(255, 215, 0, 0.35) !important;
    border: 3px solid #ffaa00 !important;
    box-shadow: 0 0 50px rgba(255, 170, 0, 1), 0 0 100px rgba(255, 170, 0, 0.6) !important;
    transform: scale(1.02);
    animation: searchPulse 1.5s ease-in-out infinite;
}

@keyframes searchPulse {
    0%, 100% {
        box-shadow: 0 0 50px rgba(255, 170, 0, 1), 0 0 100px rgba(255, 170, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 70px rgba(255, 170, 0, 1), 0 0 140px rgba(255, 170, 0, 0.8);
    }
}

/* 关键词高亮样式 */
.keyword-highlight {
    background: rgba(255, 215, 0, 0.4);
    color: inherit;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 当前选中的关键词 - 亮黄色底 */
.keyword-highlight.current {
    background: rgba(255, 170, 0, 0.7) !important;
    color: #000 !important;
    border: 2px solid #ff8800 !important;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.8), 0 0 20px rgba(255, 136, 0, 0.4) !important;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.content-section.guide {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.05), rgba(103, 178, 111, 0.05));
}

/* 区块头部 */
.section-header {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 100%;
    width: 100%;
    text-align: center;
}

.section-desc.full-width {
    text-align: left;
    padding: 0 10px;
}

/* 全新宽屏样式 */
.intro-full-width {
    padding: 25px 30px;
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.1) 0%, rgba(26, 31, 46, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
    margin: -20px -20px 20px -20px;
}

.intro-full-width .section-title {
    text-align: center;
    margin-bottom: 15px;
}

.intro-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
    text-align: left;
    margin: 0;
    padding: 0 10px;
}

/* 信息卡片网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.info-card {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.code-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1e1e1e;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    overflow-x: auto;
}

.code-inline code {
    color: #9cdcfe;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    white-space: nowrap;
}

.copy-btn-small {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.copy-btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
}

.card-note {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.full-width {
    grid-column: 1 / -1;
}

.url-selector {
    margin-top: 12px;
}

.url-hint {
    display: inline-block;
    font-size: 0.85rem;
    color: #67b26f;
    font-weight: 600;
    margin-bottom: 8px;
}

.url-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.url-option {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.url-option:hover {
    border-color: var(--primary-color);
    background: rgba(74, 144, 217, 0.1);
}

.url-option.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.code-url {
    color: #9cdcfe;
    font-weight: 500;
}

/* 配置示例 */
.config-example {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 25px;
    border: 1px solid var(--border-color);
}

.config-example h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* 厂商头部 */
.provider-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

/* 跨类型场景徽章 */
.cross-type-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: auto;
}

.provider-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.provider-badge.google {
    background: linear-gradient(135deg, #4285f4, #34a853);
}

.provider-badge.openai {
    background: linear-gradient(135deg, #10a37f, #1a7f64);
}

.provider-badge.anthropic {
    background: linear-gradient(135deg, #d4a574, #8b6914);
}

.provider-badge.midjourney {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.provider-badge.stability {
    background: linear-gradient(135deg, #8e44ad, #6c3483);
}

.provider-badge.runway {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.provider-badge.elevenlabs {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.provider-logo {
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.provider-logo img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
}

/* 端点信息栏 */
.endpoint-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-color);
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    flex-wrap: wrap;
    border: 1px solid var(--border-color);
}

.endpoint-label, .auth-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.endpoint-url, .auth-url {
    background: #1e1e1e;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    color: #9cdcfe;
}

/* 模型版本 */
.model-versions {
    margin-bottom: 30px;
}

.model-versions h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.quality-group {
    margin-bottom: 20px;
}

.quality-group h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.version-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.version-tag {
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.15), rgba(103, 178, 111, 0.15));
    color: var(--primary-color);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.version-tag:hover {
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.25), rgba(103, 178, 111, 0.25));
    border-color: var(--primary-color);
    transform: scale(1.02);
}

/* 模型标签点击高亮 - 青色 */
.version-tag.model-highlight {
    background-color: rgba(0, 255, 255, 0.35) !important;
    background-image: linear-gradient(135deg, rgba(0, 255, 255, 0.35), rgba(0, 200, 200, 0.3)) !important;
    border-color: #00f0ff !important;
    color: #00f0ff !important;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5), 0 0 30px rgba(0, 240, 255, 0.3) !important;
    transform: scale(1.05);
}

/* 场景卡片 */
.scenario-card {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.scenario-card:last-child {
    margin-bottom: 0;
}

/* 场景分组样式 */
.scenario-group {
    margin-bottom: 30px;
}

.scenario-group:last-child {
    margin-bottom: 0;
}

.scenario-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.1rem;
}

.scenario-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.scenario-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.scenario-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* 子场景 */
.sub-scenario {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    border-left: 4px solid var(--primary-color);
}

.sub-scenario:last-child {
    margin-bottom: 0;
}

.sub-scenario h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

/* 请求标签页 */
.request-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: var(--card-bg);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    border: 1px solid var(--border-color);
}

.tab-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 代码块样式 */
.python-code,
.bash-code,
.json-code {
    background: #1e1e1e;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.python-code pre,
.bash-code pre,
.json-code pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* 即将上线提示 */
.coming-soon-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(103, 178, 111, 0.1), rgba(74, 144, 217, 0.1));
    border-radius: var(--radius);
    border: 1px dashed var(--secondary-color);
}

.coming-icon {
    font-size: 2rem;
}

.coming-soon-mini span {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
}

/* 添加新厂商指南 */
.guide-content {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.guide-step {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.guide-step p {
    color: var(--text-primary);
}

body.dark-mode .guide-step p {
    color: #00f0ff;
}

/* API Key 指南 */
body.dark-mode #api-key-guide .python-code pre code,
body.dark-mode #api-key-guide .python-code .hljs,
body.dark-mode #api-key-guide .python-code .hljs-comment {
    color: #00f0ff !important;
    background: transparent !important;
}

.api-key-image {
    margin-top: 20px;
    text-align: center;
}

.api-key-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.step-number {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.step-content code {
    background: rgba(74, 144, 217, 0.15);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
}

.template-code {
    background: #1e1e1e;
    border-radius: var(--radius);
    overflow: hidden;
}

.template-code h4 {
    padding: 15px 20px;
    background: rgba(74, 144, 217, 0.2);
    color: white;
    font-size: 1rem;
}

.template-code .python-code pre {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

/* 底部版权信息 */
.footer-copyright {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 15px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    z-index: 100;
}

.footer-copyright span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Toast 提示 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--secondary-color);
    color: white;
    padding: 15px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.back-to-top:hover {
    transform: scale(1.1);
}

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

/* 滚动进度条 */
.scroll-progress {
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 1001;
    transition: width 0.1s ease;
    max-width: var(--sidebar-width);
}

/* 关键词锚点提示条样式 */
.keyword-anchor-bar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.95), rgba(103, 178, 111, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.keyword-anchor-bar.visible {
    transform: translateY(0);
    opacity: 1;
}

.keyword-anchor-bar .keyword-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.keyword-anchor-bar .keyword-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 500;
}

.keyword-anchor-bar .keyword-value {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.keyword-anchor-bar .keyword-position {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
}

.keyword-anchor-bar .nav-buttons {
    display: flex;
    gap: 8px;
}

.keyword-anchor-bar .anchor-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.keyword-anchor-bar .anchor-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.keyword-anchor-bar .anchor-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.keyword-anchor-bar .anchor-btn.prev-btn::before {
    content: '←';
    font-size: 1rem;
}

.keyword-anchor-bar .anchor-btn.next-btn::after {
    content: '→';
    font-size: 1rem;
}

.keyword-anchor-bar .close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.keyword-anchor-bar .close-btn:hover {
    background: rgba(255, 100, 100, 0.6);
    transform: rotate(90deg);
}

/* 深色模式适配 */
body.dark-mode .keyword-anchor-bar {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.98), rgba(26, 31, 46, 0.95));
    border-bottom: 1px solid var(--border-color);
}

/* 主内容区域添加锚点条偏移 */
.main-content.with-anchor {
    padding-top: 90px;
}

/* 锚点条显示时的滚动进度条调整 */
.scroll-progress.with-anchor {
    top: calc(var(--header-height) + 50px);
}

/* 代码高亮增强 */
.hljs {
    background: transparent !important;
    padding: 0 !important;
}

.hljs-keyword {
    color: #c586c0;
}

.hljs-string {
    color: #ce9178;
}

.hljs-number {
    color: #b5cea8;
}

.hljs-function {
    color: #dcdcaa;
}

.hljs-comment {
    color: #6a9955;
    font-style: italic;
}

.hljs-attr {
    color: #9cdcfe;
}

.hljs-attribute {
    color: #d4d4d4;
}

.hljs-title {
    color: #569cd6;
}

.hljs-built_in {
    color: #4ec9b0;
}

.hljs-variable {
    color: #9cdcfe;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        padding: 30px 35px;
    }
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
    }
    
    .search-box input {
        width: 200px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
        --header-height: 60px;
    }
    
    .top-header {
        position: relative;
    }
    
    .main-container {
        flex-direction: column;
        padding-top: 0;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
        height: auto;
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-content {
        margin-left: 0;
        padding: 25px 20px;
        padding-bottom: calc(var(--footer-height) + 25px);
    }

    .header-content {
        padding: 0 15px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .search-box {
        display: none;
    }

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

    .footer-copyright {
        position: relative;
        bottom: auto;
        padding: 20px 15px;
        font-size: 0.8rem;
    }
    
    .content-section {
        padding: 25px 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .endpoint-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .provider-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .version-tags {
        justify-content: flex-start;
    }
    
    .request-tabs {
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .tab-btn {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 15px;
    }
    
    .content-section {
        padding: 20px 15px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .scenario-card,
    .sub-scenario {
        padding: 20px 15px;
    }
    
    .guide-step {
        flex-direction: column;
        gap: 15px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .copy-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

/* 打印样式 */
@media print {
    .sidebar,
    .top-header,
    .toast,
    .back-to-top,
    .scroll-progress {
        display: none !important;
    }
    
    .main-container {
        padding-top: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .content-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
