﻿﻿/* CSS 变量 - 主题系统 */
:root {
    /* 暗色主题(默认) */
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #2d3748;
    --bg-hover: rgba(45, 55, 72, 0.6);
    --bg-overlay: rgba(15, 20, 25, 0.95);
    --bg-panel: rgba(26, 31, 46, 0.8);

    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #8c9aae;
    --text-disabled: #6c757d;

    --border-primary: #2d3748;
    --border-secondary: #4a5568;
    --border-light: #e0e0e0;

    --accent-primary: #00d4aa;
    --accent-hover: #00BF9A;
    --accent-secondary: #764ba2;
    --accent-gradient: linear-gradient(45deg, #00d4aa, #764ba2);
    --accent-glow: rgba(0, 212, 170, 0.3);

    --success-color: #00d4aa;
    --success-bg: rgba(0, 212, 170, 0.2);
    --error-color: #f43f5e;
    --error-bg: rgba(244, 63, 94, 0.2);
    --danger-color: #f43f5e;

    /* 操作颜色 */
    --action-edit: #3b82f6;
    --action-edit-hover: #2563eb;
    --action-delete: #ef4444;
    --action-delete-hover: #dc2626;
    --action-copy: #8b5cf6;
    --action-copy-hover: #7c3aed;
    --action-warning: #f59e0b;
    --action-warning-hover: #d97706;

    /* 鐘舵€侀鑹?*/
    --status-running: #22c55e;
    --status-running-bg: rgba(34, 197, 94, 0.2);
    --status-paused: #fbbf24;
    --status-paused-bg: rgba(251, 191, 36, 0.2);
    --status-stopped: #ef4444;
    --status-stopped-bg: rgba(239, 68, 68, 0.2);

    /* AI 主题颜色 */
    --ai-primary: #00d4ff;
    --ai-secondary: #0099ff;
    --ai-bg-gradient-start: #1a1a2e;
    --ai-bg-gradient-mid: #16213e;
    --ai-bg-gradient-end: #0f3460;
    --ai-border: rgba(0, 212, 255, 0.3);
    --ai-glow: rgba(0, 212, 255, 0.2);

    --shadow-primary: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 15px var(--accent-glow);

    --tradingview-theme: 'dark';
}

/* 浜壊主题 */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e8e8e8;
    --bg-hover: rgba(0, 0, 0, 0.05);
    --bg-overlay: rgba(255, 255, 255, 0.95);
    --bg-panel: rgba(255, 255, 255, 0.95);

    --text-primary: #000000;
    --text-secondary: #333333;
    --text-muted: #666666;
    --text-disabled: #999999;

    --border-primary: #e0e0e0;
    --border-secondary: #d0d0d0;
    --border-light: #e8e8e8;

    /* 主要强调色使用青色 #0891B2 */
    --accent-primary: #0891B2;
    --accent-hover: #0e7490;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(45deg, #0891B2, #06b6d4);
    --accent-glow: rgba(8, 145, 178, 0.2);

    /* 成功/错误颜色保持语义色彩 */
    --success-color: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --error-color: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --danger-color: #ef4444;

    /* 操作颜色使用青色系 */
    --action-edit: #0891B2;
    --action-edit-hover: #0e7490;
    --action-delete: #ef4444;
    --action-delete-hover: #dc2626;
    --action-copy: #8b5cf6;
    --action-copy-hover: #7c3aed;
    --action-warning: #f59e0b;
    --action-warning-hover: #d97706;

    /* 状态颜色保持语义色彩 */
    --status-running: #22c55e;
    --status-running-bg: rgba(34, 197, 94, 0.15);
    --status-paused: #fbbf24;
    --status-paused-bg: rgba(251, 191, 36, 0.15);
    --status-stopped: #ef4444;
    --status-stopped-bg: rgba(239, 68, 68, 0.15);

    /* AI 主题颜色 - 使用青色 #0891B2 */
    --ai-primary: #0891B2;
    --ai-secondary: #06b6d4;
    --ai-bg-gradient-start: #f0fdfa;
    --ai-bg-gradient-mid: #ccfbf1;
    --ai-bg-gradient-end: #99f6e4;
    --ai-border: rgba(8, 145, 178, 0.3);
    --ai-glow: rgba(8, 145, 178, 0.2);

    --shadow-primary: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 10px rgba(0, 0, 0, 0.05);

    --tradingview-theme: 'light';
}

/* 暗黑主题 */
[data-theme="darkblack"] {
    --bg-primary: #0D0E0F;
    --bg-secondary: #0D0E0F;
    --bg-tertiary: #0D0E0F;
    --bg-hover: rgba(13, 14, 15, 0.8);
    --bg-overlay: rgba(13, 14, 15, 0.98);
    --bg-panel: rgba(13, 14, 15, 0.9);

    --text-primary: #e8e9ea;
    --text-secondary: #c4c5c6;
    --text-muted: #7a7b7c;
    --text-disabled: #4a4b4c;

    --border-primary: #1a1b1c;
    --border-secondary: #2a2b2c;
    --border-light: #3a3b3c;

    --accent-primary: #00d4aa;
    --accent-hover: #00BF9A;
    --accent-secondary: #764ba2;
    --accent-gradient: linear-gradient(45deg, #00d4aa, #764ba2);
    --accent-glow: rgba(0, 212, 170, 0.25);

    --success-color: #00d4aa;
    --success-bg: rgba(0, 212, 170, 0.15);
    --error-color: #f43f5e;
    --error-bg: rgba(244, 63, 94, 0.15);
    --danger-color: #f43f5e;

    /* 操作颜色 */
    --action-edit: #3b82f6;
    --action-edit-hover: #2563eb;
    --action-delete: #ef4444;
    --action-delete-hover: #dc2626;
    --action-copy: #8b5cf6;
    --action-copy-hover: #7c3aed;
    --action-warning: #f59e0b;
    --action-warning-hover: #d97706;

    /* 鐘舵€侀鑹?*/
    --status-running: #22c55e;
    --status-running-bg: rgba(34, 197, 94, 0.15);
    --status-paused: #fbbf24;
    --status-paused-bg: rgba(251, 191, 36, 0.15);
    --status-stopped: #ef4444;
    --status-stopped-bg: rgba(239, 68, 68, 0.15);

    /* AI 主题颜色 */
    --ai-primary: #00d4ff;
    --ai-secondary: #0099ff;
    --ai-bg-gradient-start: #0D0E0F;
    --ai-bg-gradient-mid: #12161a;
    --ai-bg-gradient-end: #0a1929;
    --ai-border: rgba(0, 212, 255, 0.25);
    --ai-glow: rgba(0, 212, 255, 0.15);

    --shadow-primary: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 15px var(--accent-glow);

    --tradingview-theme: 'dark';

    /* TradingView 核心背景色变量- 最重要的配置*/
    --tv-color-pane-background: #0D0E0F;
    --themed-color-pane-bg: #0D0E0F;
    --tv-color-platform-background: #0D0E0F;

    /* TradingView 工具栏和渚ц竟鏍忎笓鐢ㄩ鑹插彉閲忚鐩?*/
    --tv-color-toolbar-button-background-hover: rgba(26, 27, 28, 0.8);
    --tv-color-toolbar-button-background-clicked: rgba(42, 43, 44, 0.8);
    --tv-color-toolbar-button-background-expanded: rgba(26, 27, 28, 0.8);
    --tv-color-toolbar-button-text: #c4c5c6;
    --tv-color-toolbar-button-text-hover: #e8e9ea;
    --tv-color-toolbar-button-text-clicked: #e8e9ea;
    --tv-color-toolbar-divider-background: #1a1b1c;

    /* 头部宸ュ叿鏍忚儗鏅壊 */
    --themed-color-toolbar-button-background-hover: rgba(26, 27, 28, 0.8);
    --themed-color-toolbar-button-background-clicked: rgba(42, 43, 44, 0.8);
    --themed-color-toolbar-opened-element-bg: rgba(26, 27, 28, 0.8);
    --themed-color-toolbar-button-text: #c4c5c6;
    --themed-color-toolbar-button-text-hover: #e8e9ea;

    /* 弹出菜单鍜屽璇濇背景 */
    --tv-color-popup-background: #0D0E0F;
    --themed-color-popup-background: #0D0E0F;
    --themed-color-popup-menu-separator: #1a1b1c;
}

/* 主题切换动画 */
* {
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 特殊元素的过渡优化*/
.resize-handle,
.toolbar-icon,
.control-btn,
.theme-toggle {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 主题切换鏃剁殑特殊动画效果 */
body {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 图表容器鐨勪富棰樺垏鎹㈠姩鐢?*/
#chart-container {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 宸ュ叿鏍忕殑主题切换动画 */
#bottom-container {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 按钮鍜屼氦浜掑厓绱犵殑动画 */
button,
.btn,
.control-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 输入妗嗙殑动画 */
input,
textarea,
select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 卡片鍜岄潰鏉跨殑动画 */
.card,
.panel,
.modal-container {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 主题切换鏃剁殑全局动画效果 */
body.theme-transitioning {
    overflow: hidden;
}

body.theme-transitioning * {
    transition-duration: 0.6s !important;
}

/* 主题切换鏃剁殑页面缩放动画 */
body.theme-transitioning {
    transform: scale(0.98);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 主题切换完成鍚庣殑恢复动画 */
body:not(.theme-transitioning) {
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 主题切换按钮鐨勭壒娈婂姩鐢?*/
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.theme-toggle:active::before {
    width: 200px;
    height: 200px;
    opacity: 1;
}

/* 主题切换鏃剁殑图标旋转动画 */
.theme-toggle svg {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:active svg {
    transform: rotate(180deg);
}

/* 策略广场弹窗样式 */
.indicator-square-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.indicator-square-modal.show {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
}

/* 策略广场模态框鍦ㄤ寒鑹叉ā寮忎笅鐨勭壒娈婅儗鏅?*/
[data-theme="light"] .indicator-square-modal .modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* 暗色模式下的选中高亮优化 */
.ace_editor .ace_selection {
    background: rgba(59, 130, 246, 0.4) !important;
    /* 蓝色系*/
    border: 1px solid rgba(59, 130, 246, 0.6) !important;
}


.modal-container {
    position: relative;
    width: 90%;
    max-width: 1400px;
    height: 80%;
    margin: auto;
    background: var(--bg-panel);
    border-radius: 16px;
    box-shadow: var(--shadow-primary);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.indicator-square-modal.show .modal-container {
    transform: scale(1);
}

/* 弹窗头部 */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.modal-tabs {
    display: flex;
    gap: 8px;
}

.modal-tab {
    position: relative;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-tab.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 160, 133, 0.3);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.new-badge {
    background: #ff4757;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.modal-search {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px 11px 20px;
    align-items: center;
    flex-grow: 1;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input {
    width: 240px;
    padding: 8px 12px 8px 36px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-button {
    padding: 8px 16px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.search-button:active {
    transform: translateY(0);
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-primary);
    transition: 0.3s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: var(--accent-primary);
}

input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--error-color);
    color: white;
    transform: scale(1.05);
}

/* 弹窗内容 */
.modal-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 模态框爣绛惧唴瀹瑰垏鎹?*/
.modal-tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.modal-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* AI鏈哄櫒浜洪〉闈㈡牱寮?*/
.ai-robot-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-robot-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-primary);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(0, 212, 170, 0.05) 100%);
}

.ai-robot-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.ai-icon {
    font-size: 24px;
}

.ai-title-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.ai-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 36px;
}

.ai-robot-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.ai-feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.ai-feature-card {
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.ai-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.feature-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.ai-input-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.ai-input-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.ai-input-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.ai-input-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.ai-input-actions {
    display: flex;
    justify-content: flex-end;
}

.ai-generate-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-primary), #007a65);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.btn-icon {
    font-size: 16px;
}

.ai-status-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 8px;
    color: var(--accent-primary);
}

.status-icon {
    font-size: 18px;
}

.status-text {
    font-size: 14px;
}

/* 鎴戠殑策略弹窗样式 */
.my-strategies-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    backdrop-filter: blur(8px);
}

.my-strategies-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.my-strategies-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.my-strategies-modal .modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80%;
    max-height: 800px;
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-primary);
}

.my-strategies-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.my-strategies-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.my-strategies-modal .my-icon {
    font-size: 24px;
}

.my-strategies-modal .my-title-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.my-strategies-modal .modal-close {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.my-strategies-modal .modal-close:hover {
    background: var(--bg-quaternary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.my-strategies-modal .modal-close svg {
    width: 20px;
    height: 20px;
}

.my-strategies-modal .modal-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 鎴戠殑策略页面样式 */
.my-strategies-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.my-strategies-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-primary);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.my-strategies-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.my-icon {
    font-size: 24px;
}

.my-title-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.my-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 36px;
}

.my-strategies-content {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

.strategies-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.filter-buttons {
    display: flex;
    gap: 8px;
}

.strategy-filter-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.strategy-filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.strategy-filter-btn.active {
    background: var(--action-edit);
    border-color: var(--action-edit);
    color: white;
}

.strategies-search {
    flex-shrink: 0;
}

.strategies-search-input {
    width: 200px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.strategies-search-input:focus {
    outline: none;
    border-color: var(--action-edit);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.my-strategies-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 300px;
}

.my-strategies-list:empty,
.my-strategies-list:has(.empty-strategies),
.my-strategies-list:has(.strategies-loading) {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-strategies {
    text-align: center;
    padding: 40px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 300px;
}

.retry-btn {
    margin-top: 16px;
    padding: 8px 16px;
    background: var(--accent-primary);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #007a65;
    transform: translateY(-1px);
}

/* 鎴戠殑策略卡片样式 */
.my-strategy-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.my-strategy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.my-strategy-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary);
}

.my-strategy-card:hover::before {
    opacity: 1;
}

.strategy-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-primary);
}

.strategy-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.strategy-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.strategy-card-info {
    flex: 1;
    min-width: 0;
}

.strategy-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.strategy-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.strategy-template {
    color: var(--accent-primary);
    font-weight: 500;
}

.strategy-visibility {
    padding: 2px 8px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--action-edit);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.strategy-card-status {
    flex-shrink: 0;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.running {
    background: var(--status-running-bg);
    color: var(--status-running);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.paused {
    background: var(--status-paused-bg);
    color: var(--status-paused);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-badge.stopped {
    background: var(--status-stopped-bg);
    color: var(--status-stopped);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.strategy-card-details {
    padding: 16px 24px;
}

.strategy-detail-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 12px;
}

.strategy-detail-row:last-child {
    margin-bottom: 0;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.detail-value.profit {
    color: var(--status-running);
}

.detail-value.loss {
    color: var(--action-delete);
}

.strategy-card-actions {
    display: flex;
    gap: 8px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border-primary);
    background: rgba(255, 255, 255, 0.02);
}

.strategy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
    white-space: nowrap;
}

.strategy-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.strategy-btn.edit-btn:hover {
    border-color: var(--action-edit);
    color: var(--action-edit);
    background: rgba(59, 130, 246, 0.1);
}

.strategy-btn.copy-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.1);
}

.strategy-btn.pause-btn:hover {
    border-color: var(--status-paused);
    color: var(--status-paused);
    background: var(--status-paused-bg);
}

.strategy-btn.resume-btn:hover {
    border-color: var(--status-running);
    color: var(--status-running);
    background: var(--status-running-bg);
}


.strategy-btn.edit-strategy-btn:hover {
    border-color: var(--action-edit);
    color: var(--action-edit);
    background: rgba(59, 130, 246, 0.1);
}

.strategy-btn.delete-btn:hover {
    border-color: var(--action-delete);
    color: var(--action-delete);
    background: rgba(239, 68, 68, 0.1);
}

.strategy-btn.start-btn:hover {
    border-color: var(--status-running);
    color: var(--status-running);
    background: var(--status-running-bg);
}

.strategy-btn.visibility-btn:hover {
    border-color: var(--action-copy);
    color: var(--action-copy);
    background: rgba(139, 92, 246, 0.1);
}

.strategy-btn.auth-btn:hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.strategy-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* 加载鐘舵€佹牱寮?*/
.strategies-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.strategies-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-primary);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.strategies-loading .loading-text {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}



.content-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 绛涢€夋爣绛?*/
.filter-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 24px 12px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

.filter-tab {
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.filter-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 策略绫诲瀷绛涢€?*/
.strategy-type-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 24px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
}

.type-filter-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.type-filter-tabs {
    display: flex;
    gap: 6px;
}

.type-filter-tab {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--border-secondary);
    border-radius: 16px;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.type-filter-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

.type-filter-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* 澶氱┖鍗犳瘮绛涢€?*/
.position-filter-tab {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--border-secondary);
    border-radius: 16px;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.position-filter-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

.position-filter-tab.active {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-color: #f093fb;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* 鎺掑簭閫夐」 */
.sort-options {
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

.sort-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sort-column {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 6px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
    min-width: 0;
}

.sort-column:hover {
    background: rgba(156, 163, 175, 0.1);
    color: #d1d5db;
}

.sort-column.active {
    color: #d1d5db;
}

.sort-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sort-icons {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.sort-icon {
    width: 10px;
    height: 10px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.sort-column:hover .sort-icon {
    opacity: 0.8;
}

.sort-column.active .sort-icon {
    opacity: 0.8;
}

.sort-column.active .sort-up {
    opacity: 1;
}

.sort-column.active .sort-down {
    opacity: 0.4;
}

.sort-column.active.desc .sort-up {
    opacity: 0.4;
}

.sort-column.active.desc .sort-down {
    opacity: 1;
}



/* 策略广场 - 策略鍒楄〃 */
.indicator-square-modal .indicator-list {
    flex: 1;
    padding: 16px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 策略广场卡片样式 */
.indicator-square-modal .indicator-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    min-height: 120px;
    margin-bottom: 20px;
}

.indicator-square-modal .indicator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

.indicator-square-modal .indicator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.indicator-square-modal .indicator-card:hover::before {
    opacity: 1;
}

.indicator-square-modal .indicator-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 212, 170, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.indicator-square-modal .indicator-card:hover::after {
    opacity: 1;
}

.card-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    line-height: 1.3;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.card-status.public {
    background: var(--success-bg);
    color: var(--success-color);
}

.card-description {
    width: 300px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.card-performance {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.performance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 60px;
}

.performance-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.performance-value.positive {
    color: var(--success-color);
}

.performance-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-primary);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
}

.author-name {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.publish-time {
    font-size: 11px;
    color: var(--text-muted);
}

.card-stats {
    display: flex;
    gap: 16px;
}

.stat-item1 {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.stat-item1:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}


.stat-icon {
    width: 12px;
    height: 12px;
}

/* 加载浠ｇ爜按钮样式 */
.card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-code-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.preview-code-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.load-code-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 160, 133, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.load-code-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 160, 133, 0.4);
    background: #008770;
}

.load-code-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 160, 133, 0.3);
}

.load-code-btn svg {
    width: 14px;
    height: 14px;
}

/* 加载代码按钮提示 */
.load-code-btn {
    position: relative;
}

.load-code-btn::before {
    content: '点击加载策略代码到编辑器';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-primary);
    z-index: 1000;
    margin-bottom: 8px;
}

.load-code-btn::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--bg-primary);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.load-code-btn:hover::before,
.load-code-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* AI鏈哄櫒浜哄惎鍔ㄦ寜閽牱寮?*/
.start-ai-robot-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--status-running);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.start-ai-robot-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    background: #16a34a;
}

.start-ai-robot-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

.start-ai-robot-btn svg {
    width: 14px;
    height: 14px;
}

/* AI机器人启动按钮提示 */
.start-ai-robot-btn::before {
    content: '点击启动AI机器人';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-primary);
    z-index: 1000;
    margin-bottom: 8px;
}

.start-ai-robot-btn::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--bg-primary);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.start-ai-robot-btn:hover::before,
.start-ai-robot-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 绉诲姩绔疉I鏈哄櫒浜哄惎鍔ㄦ寜閽牱寮?*/
@media (max-width: 768px) {
    .start-ai-robot-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 13px;
    }

    /* 绉诲姩绔殣钘忔彁绀?*/
    .start-ai-robot-btn::before,
    .start-ai-robot-btn::after {
        display: none;
    }
}

/* 浠ｇ爜棰勮弹窗样式 */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.preview-container {
    position: relative;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

.preview-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.preview-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.preview-content {
    flex: 1;
    overflow: auto;
    padding: 24px;
}

.code-preview-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    overflow: hidden;
}

.code-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    font-size: 11px;
    color: var(--text-muted);
}

.code-language {
    font-weight: 600;
    color: var(--accent-primary);
}

.code-lines {
    opacity: 0.8;
}

.code-preview {
    background: var(--bg-tertiary);
    padding: 16px;
    margin: 0;
    font-family: 'Fira Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow: auto;
}

/* 浠ｇ爜棰勮琛屽彿样式 */
.code-preview {
    counter-reset: line;
}

.code-preview::before {
    content: '';
    display: block;
    height: 0;
    margin-top: -1em;
}

.preview-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    justify-content: flex-end;
}

.preview-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.preview-btn.secondary:hover {
    background: var(--bg-hover);
}

.preview-btn.primary {
    background: var(--accent-gradient);
    color: white;
}

.preview-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.4);
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        height: 90%;
    }

    .modal-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .modal-tabs {
        justify-content: center;
    }

    .modal-search {
        flex-direction: column;
        gap: 12px;
    }

    .search-input {
        width: 100%;
    }

    .indicator-square-modal .indicator-list {
        padding: 16px;
    }

    .indicator-square-modal .indicator-card {
        flex-direction: column;
        min-height: auto;
        gap: 16px;
        padding: 16px;
    }

    .card-actions {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .load-code-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 13px;
    }

    /* 绉诲姩绔殣钘忔彁绀?*/
    .load-code-btn::before,
    .load-code-btn::after {
        display: none;
    }

    /* 绉诲姩绔瑙堝脊绐楁牱寮?*/
    .preview-modal {
        padding: 10px;
    }

    .preview-container {
        max-height: 90vh;
    }

    .preview-header {
        padding: 16px 20px;
    }

    .preview-header h3 {
        font-size: 16px;
    }

    .preview-content {
        padding: 16px 20px;
    }

    .preview-actions {
        padding: 16px 20px;
        flex-direction: column;
    }

    .preview-btn {
        width: 100%;
        padding: 12px 20px;
    }

    /* 绉诲姩绔殣钘忛瑙堟寜閽?*/
    .preview-code-btn {
        display: none;
    }

    .card-performance {
        flex-direction: row;
        gap: 16px;
        min-width: auto;
        width: 100%;
        justify-content: space-around;
    }

    .performance-item {
        min-width: auto;
    }

    .card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .card-stats {
        width: 100%;
        justify-content: space-between;
    }
}

/* 用户系统样式 */
.user-header {
    height: 50px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0 20px;
    border-bottom: 1px solid var(--border-primary);
    flex-shrink: 0;
    /* 闃叉header琚帇缂?*/
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon img {
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.2;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 主题切换按钮 - 固定鍦ㄥ彸下角 */
.theme-toggle {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-primary);
    backdrop-filter: blur(10px);
}

/* 头部主题切换按钮样式 */
.header-theme-toggle {
    position: static;
    width: 32px;
    height: 32px;
    margin-right: 8px;
    box-shadow: none;
    backdrop-filter: none;
    border: 1px solid var(--border-primary);
}

.header-theme-toggle:hover {
    background: var(--accent-gradient);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-theme-toggle .icon {
    width: 16px;
    height: 16px;
}

.theme-toggle:hover {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25), var(--shadow-glow);
    transform: scale(1.1);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle .icon {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

/* 隐藏深蓝主题图标 */
.theme-toggle .dark-icon {
    display: none !important;
}

/* 默认显示暗黑主题图标 */
.theme-toggle .darkblack-icon {
    display: block;
}

.theme-toggle .light-icon {
    display: none;
}

/* 浅色主题下显示太阳图标 */
[data-theme="light"] .theme-toggle .darkblack-icon {
    display: none;
}

[data-theme="light"] .theme-toggle .light-icon {
    display: block;
}

/* 暗黑主题下显示圆圈图标 */
[data-theme="darkblack"] .theme-toggle .light-icon {
    display: none;
}

[data-theme="darkblack"] .theme-toggle .darkblack-icon {
    display: block;
}

/* 鍝嶅簲寮忚璁?- 绉诲姩绔€傞厤 */
@media (max-width: 768px) {
    .theme-toggle {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    .theme-toggle .icon {
        width: 20px;
        height: 20px;
    }

    /* 绉诲姩绔ご閮ㄤ富棰樺垏鎹㈡寜閽牱寮?*/
    .header-theme-toggle {
        width: 28px;
        height: 28px;
        margin-right: 6px;
    }

    .header-theme-toggle .icon {
        width: 14px;
        height: 14px;
    }
}

/* 灏忓睆骞曡澶?*/
@media (max-width: 480px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }

    .theme-toggle .icon {
        width: 18px;
        height: 18px;
    }

    /* 灏忓睆骞曞ご閮ㄤ富棰樺垏鎹㈡寜閽牱寮?*/
    .header-theme-toggle {
        width: 24px;
        height: 24px;
        margin-right: 4px;
    }

    .header-theme-toggle .icon {
        width: 12px;
        height: 12px;
    }
}

/* 主题切换按钮鐨勮剦鍐插姩鐢绘晥鏋?*/
@keyframes themePulse {
    0% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    50% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 8px rgba(0, 212, 170, 0.1);
    }

    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
}

.theme-toggle:focus {
    outline: none;
    animation: themePulse 2s infinite;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.user-info:hover {
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.user-status {
    color: var(--text-muted);
    font-size: 12px;
}

.user-menu {
    position: relative;
    z-index: 1001;
}















/* 用户系统鏂版牱寮?*/
.edit-profile-btn,
.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-profile-btn:hover,
.logout-btn:hover {
    background: var(--bg-tertiary);
    transform: scale(1.1);
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.user-avatar.vip {
    border: 2px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.notification-badge {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.notification-badge:hover {
    background: var(--bg-tertiary);
}

/* 鍨傜洿flex甯冨眬 - 确定繚瀹屾暣鏄剧ず */
html,
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    /* 浣跨敤瑙嗗彛楂樺害 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
}

body {
    display: flex;
    /* flex-direction: column; */
    overflow: hidden;
}

#main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#tv_chart_container {
    flex: 1;
    min-height: 0;
    /* 閲嶈锛氶槻姝lex瀛愬厓绱犳拺鐮村鍣?*/
    width: 100%;
    position: relative;
}

/* 搴曢儴宸ュ叿鏍忔牱寮?*/
#bottom-container {
    position: relative;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    border-top: 1px solid var(--border-primary);
    transition: height 0.3s ease;
    height: 300px;
    min-height: 100px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

/* 确定繚鏀惰捣鐘舵€佽鐩栨墍鏈夊彲鑳界殑楂樺害璁剧疆 */
#bottom-container.collapsed {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
}

#bottom-container.collapsed .toolbar-header {
    height: 60px;
    padding: 0 12px;
}



/* 鏍囬默认鐘舵€佺殑过渡璁剧疆 */
.toolbar-title {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 鏀惰捣鐘舵€佷笅鏂囨湰鍚戝彸绉诲姩鍒板睍寮€按钮宸︿晶鐨勫姩鐢?*/
#bottom-container.collapsed .toolbar-title {
    position: relative;
    left: calc(100% - 160px);
}

/* 鎺у埗按钮鍖哄煙鏀惰捣鏃剁殑璋冩暣 */
.toolbar-controls {
    transition: gap 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#bottom-container.collapsed .toolbar-controls {
    gap: 5px;
}

/* 确定繚灞曞紑按钮鍦ㄦ敹璧风姸鎬佷笅淇濇寔姝ｇ‘鐨勪綅缃拰闂磋窛 */
#bottom-container.collapsed .toolbar-controls #toggleBtn {
    margin-left: 0;
    flex-shrink: 0;
}

/* 瀹屽叏闅愯棌鐘舵€?*/
#bottom-container.hidden {
    height: 0px !important;
    min-height: 0;
    border: none;
    overflow: hidden;
}

#bottom-container.hidden .resize-handle {
    display: none;
}

/* 娴姩恢复按钮 */
.restore-button {
    position: fixed;
    bottom: 10px;
    right: 20px;
    width: 40px;
    height: 32px;
    background: var(--bg-panel);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-primary);
    z-index: 1000;
}

.restore-button:hover {
    background: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.restore-button.show {
    display: flex;
}

/* 鎷栨嫿鎵嬫焺 - 绠€鍖栫増鏈?*/
.resize-handle {
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--border-primary);
    cursor: row-resize;
    z-index: 100;
    opacity: 0.6;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#bottom-container.collapsed .resize-handle {
    top: -3px;
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--text-muted);
    pointer-events: none;
}

#bottom-container.collapsed .resize-handle:hover {
    opacity: 0.3;
    background: var(--text-muted);
}

.resize-handle:hover {
    opacity: 1;
    background: var(--accent-primary);
}

.resize-handle::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    opacity: 0.8;
}

/* 鎷栨嫿鏃剁殑鐘舵€?*/
body.dragging .resize-handle {
    opacity: 1;
    background: var(--accent-primary);
}

body.dragging {
    user-select: none;
    cursor: row-resize;
}

body.dragging * {
    pointer-events: none;
}

body.dragging .resize-handle {
    pointer-events: auto;
}

/* 鎬ц兘优化 */
#bottom-container {
    will-change: height;
}

.resize-handle {
    will-change: transform, opacity, height;
}

/* AI鍒嗘瀽按钮样式 - From Uiverse.io by Spacious74 */
.flex {
    display: flex;
    align-items: center;
    gap: 5px;
}

.outer-cont {
    padding: 12px 20px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    background: linear-gradient(90deg, #5bfcc4, #f593e4, #71a4f0);
    border-radius: 12px;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow:
        inset 0px 0px 5px #ffffffa9,
        inset 0px 35px 30px #000,
        0px 5px 10px #000000cc;
    text-shadow: 1px 1px 1px #000;
}

.outer-cont::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    border-radius: 12px;
    filter: blur(0);
    z-index: -1;
    box-shadow: none;
    background: conic-gradient(#00000000 80deg,
            #40baf7,
            #f34ad7,
            #5bfcc4,
            #00000000 280deg);
    transition: all 0.3s ease;
}

.outer-cont:hover::before {
    filter: blur(15px);
}

.outer-cont:active::before {
    filter: blur(5px);
    transform: translateY(1px);
}

.outer-cont:active {
    box-shadow:
        inset 0px 0px 5px #ffffffa9,
        inset 0px 35px 30px #000;
    margin-top: 3px;
}

/* 宸ュ叿鏍忓ご閮?*/
.toolbar-header {
    height: 60px;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.toolbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.toolbar-icon {
    width: 24px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-panel);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.control-btn.active {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
}

/* 宸ュ叿鏍忓唴瀹瑰尯鍩?*/
.toolbar-content {
    flex: 1;
    display: flex;
    gap: 20px;
    overflow: hidden;
    background: var(--bg-panel);
    min-height: 0;
    position: relative;
}

#bottom-container.collapsed .toolbar-content {
    display: none;
}

/* 鐜拌揣鍚堢害面板 */
.spot-panel {
    flex: 1;
    background: var(--bg-panel);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.spot-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
}

.panel-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: var(--shadow-glow);
}

.spot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-primary);
}

.spot-item:last-child {
    border-bottom: none;
}

.spot-symbol {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.symbol-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.symbol-exchange {
    color: var(--text-muted);
    font-size: 11px;
}

.spot-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.price-value {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.price-change {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

.price-change.positive {
    background: var(--success-bg);
    color: var(--success-color);
}

.price-change.negative {
    background: var(--error-bg);
    color: var(--error-color);
}

/* K绾挎樉绀洪潰鏉?*/
.kline-panel {
    width: 400px;
    background: var(--bg-panel);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.kline-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary), var(--accent-secondary));
}

.mini-chart {
    height: 200px;
    background: var(--bg-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-primary);
    position: relative;
    overflow: hidden;
}

.mini-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
            var(--accent-glow) 0%,
            transparent 50%,
            var(--accent-glow) 100%);
    opacity: 0.3;
}

.chart-placeholder {
    color: var(--text-muted);
    font-size: 14px;
    z-index: 1;
}

/* 鑷畾涔夌瓥鐣?鍥炴祴策略样式 */
.indicators-container {
    display: flex;
    flex-direction: row;
    height: 100%;
    background: var(--bg-panel);
    border-radius: 12px;
    overflow: hidden;
}

.indicators-nav {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    padding: 12px 0;
    gap: 4px;
    min-width: 140px;
    width: 140px;
}

.indicator-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    text-align: left;
    white-space: nowrap;
    margin: 0 8px;
    border-radius: 6px;
}

.indicator-tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.indicator-tab-btn.active {
    border-left-color: var(--accent-primary);
    font-weight: 500;
    background: #252d3d;
}

/* 浜壊模式下的策略tab选中鐘舵€?*/
[data-theme="light"] .indicator-tab-btn.active {
    background: var(--bg-hover);
}

.indicator-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    height: 100%;
}

.indicator-pane {
    flex: 1;
    display: none;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.indicator-pane.active {
    display: flex;
}

/* 编辑鍣ㄥ伐鍏锋爮 */
.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: 12px 20px;
    flex-shrink: 0;
}

.editor-toolbar-left,
.editor-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 策略标签页样式 */
.strategy-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 3px;
    margin-right: 12px;
}

.strategy-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    white-space: nowrap;
    font-weight: 500;
}

.strategy-tab:hover {
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.strategy-tab.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 212, 170, 0.3);
}

/* 策略内容区域样式 */
.strategy-content {
    display: none;
    width: 100%;
    height: 100%;
}

.strategy-content.active {
    display: flex;
    flex-direction: column;
}

/* 策略占位符样式 */
.strategy-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
    color: var(--text-muted);
}

.strategy-placeholder p {
    font-size: 16px;
    margin: 0;
}

.open-modal-btn {
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    padding: 10px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.open-modal-btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
    transform: translateY(-2px);
}

.editor-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border-secondary);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.editor-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.editor-btn.primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.editor-btn.primary:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    color: white;
}





.editor-btn svg {
    width: 14px;
    height: 14px;
}



.editor-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.editor-btn.active:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

/* 编辑模式切换按钮缁?*/
.editor-toggle-group {
    display: flex;
    gap: 8px;
    margin-right: 8px;
    align-items: center;
}

.editor-toggle-group .editor-btn {
    min-width: 64px;
}

/* 代码类型选择器样式 */
.code-type-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}

.code-type-selector label {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: normal;
    white-space: nowrap;
    margin: 0;
}

.code-type-select {
    background: var(--bg-panel);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 13px;
    padding: 4px 8px;
    cursor: pointer;
    outline: none;
    min-width: 110px;
}

.code-type-select:hover {
    border-color: var(--border-primary);
}

.code-type-select:focus {
    border-color: var(--accent-primary);
}

.code-type-select option {
    background: var(--bg-panel);
    color: var(--text-primary);
}

/* 编辑模式切换确认弹窗样式 */
.code-switch-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.code-switch-modal.show {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.code-switch-modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    min-width: 400px;
    max-width: 500px;
    animation: slideDown 0.3s ease-out;
}

.code-switch-modal-header {
    padding: 20px 24px 12px;
    border-bottom: 1px solid var(--border-secondary);
}

.code-switch-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.code-switch-modal-body {
    padding: 24px;
}

.code-switch-modal-body p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
}

.code-switch-tip {
    font-size: 13px !important;
    color: var(--text-secondary) !important;
    margin: 0 !important;
}

.code-switch-modal-footer {
    padding: 12px 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.code-switch-btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.2s;
}

.code-switch-cancel {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-secondary);
}

.code-switch-cancel:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

.code-switch-confirm {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.code-switch-confirm:hover {
    background: var(--accent-secondary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 编辑鍣ㄥ竷灞€ */
.editor-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: visible;
}



/* 编辑鍣ㄤ富浣?*/
.editor-main {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    /* 閬垮厤鐖剁骇鎶㈠崰滚动 */
    min-height: 0;
    /* 鍏佽瀛愰」滚动 */
}

.code-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}

/* 鍙鍖栫紪杈戝櫒容器 */
.visual-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-radius: 8px;
    overflow-y: auto;
    /* 浣滀负鍞竴滚动容器 */
    overflow-x: hidden;
    /* 绂佹妯悜滚动鏉?*/
    height: 100%;
    border: 1px solid var(--border-primary);
    min-height: 0;
    /* 淇flex瀛愰」滚动闂 */
    -webkit-overflow-scrolling: touch;
}

/* 编辑鍣ㄥ彸渚ф搷浣滄爮 */
.editor-actions-sidebar {
    width: 160px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
}

.editor-side-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border-secondary);
    color: var(--text-primary);
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.editor-side-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent-primary);
}

.editor-side-btn.primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
    border-radius: 5px;
}

/* 按钮加载鐘舵€?*/
.editor-side-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.editor-side-btn.loading {
    position: relative;
    color: transparent;
}

.editor-side-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* AI鍔╂墜鍖哄煙样式 */
.ai-assistant-area {
    margin-top: auto;
    /* 灏咥I鍔╂墜鍖哄煙鎺ㄥ埌鏈€涓嬫柟 */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
}

.ai-gif {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.editor-side-btn.ai-btn {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 212, 170, 0.3);
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.editor-side-btn.ai-btn:hover {
    background: #00BF9A;
    border-color: #00BF9A;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 212, 170, 0.4);
}


/* AI策略鍔╂墜样式 */
.ai-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-container {
    width: 90%;
    max-width: 900px;
    height: 70%;
    background: var(--bg-panel);
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.ai-chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
}

.ai-chat-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-chat-title::before {
    font-size: 18px;
}

.ai-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-tab-btn {
    background: none;
    border: 1px solid var(--border-secondary);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ai-tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.ai-tab-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #0A2D2A;
}

.ai-chat-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.ai-chat-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.ai-chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-tab-content {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}

.ai-tab-content.active {
    display: flex;
}

.ai-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.ai-message {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.ai-message.user {
    flex-direction: row-reverse;
}

.ai-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.ai-message.user .ai-message-avatar {
    background: var(--accent-primary);
    color: #0A2D2A;
    font-weight: 600;
    text-transform: uppercase;
}

/* 褰撶敤鎴峰ご鍍忎娇鐢ㄨ儗鏅浘鐗囨椂锛岀‘淇濇确定樉绀?*/
.ai-message.user .ai-message-avatar[style*="background-image"] {
    content: "鐭ヨ";
    color: transparent;
}

.ai-message.assistant .ai-message-avatar {
    background-image: url('https://img.zhixing.icu/images/%E9%87%8F%E5%8C%96App/NR.png');
    color: transparent;
}

.ai-message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
    /* 娣诲姞杩欒鏉ヤ繚鐣欐崲琛岀 */
}

.ai-message.user .ai-message-content {
    background: var(--accent-primary);
    color: #0A2D2A;
    border-bottom-right-radius: 4px;
}

.ai-message.assistant .ai-message-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
    border-bottom-left-radius: 4px;
}

.ai-message.assistant.loading .ai-message-content {
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-loading-dots {
    display: inline-flex;
    gap: 2px;
}

.ai-loading-dots span {
    width: 4px;
    height: 4px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: aiLoading 1.4s ease-in-out infinite both;
}

.ai-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.ai-loading-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes aiLoading {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.ai-chat-input-area {
    padding: 16px;
    border-top: 1px solid var(--border-secondary);
    background: var(--bg-secondary);
}

.ai-chat-input-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.ai-chat-input {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 10px 12px;
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    background: var(--bg-panel);
    color: var(--text-primary);
    font-size: 14px;
    resize: none;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.ai-chat-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.ai-chat-input::placeholder {
    color: var(--text-secondary);
}

.ai-chat-send-btn {
    background: var(--accent-primary);
    border: none;
    color: #0A2D2A;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ai-chat-send-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.ai-chat-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 绠€鍖栫殑策略鐢熸垚缁撴灉样式 */
.ai-strategy-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-primary);
    margin: 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-primary);
}

.ai-strategy-simple {
    margin: 8px 0;
}

.ai-strategy-info {
    margin: 8px 0;
    padding: 10px;
    background: var(--bg-panel);
    border-radius: 6px;
    border-left: 3px solid var(--accent-primary);
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
}

.ai-strategy-info strong {
    color: var(--text-primary);
}

.ai-strategy-code-title {
    font-weight: 600;
    color: var(--text-primary);
    margin: 12px 0 6px 0;
    font-size: 14px;
}

.ai-strategy-code {
    background: var(--bg-panel);
    padding: 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-primary);
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-secondary);
    margin: 0 0 12px 0;
}

.ai-strategy-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.ai-strategy-action-btn {
    background: var(--accent-primary);
    border: none;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ai-strategy-action-btn:hover {
    background: #00BF9A;
    transform: translateY(-1px);
}

.ai-strategy-action-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
}

.ai-strategy-action-btn.secondary:hover {
    background: var(--bg-hover);
}

.ai-strategy-btn {
    background: var(--accent-primary);
    border: none;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ai-strategy-btn:hover {
    background: #00BF9A;
    transform: translateY(-1px);
}

.ai-strategy-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
}

.ai-strategy-btn.secondary:hover {
    background: var(--bg-hover);
}

/* 鍘嗗彶璁板綍样式 */
.ai-history-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
}

.ai-history-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.ai-refresh-btn {
    background: var(--accent-primary);
    border: none;
    color: #0A2D2A;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ai-refresh-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.ai-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.ai-history-loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
}

.ai-history-item {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-secondary);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.ai-history-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.ai-history-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ai-history-item-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.ai-history-item-status {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.ai-history-item-status.completed {
    background: var(--accent-primary);
    color: #ffffff;
}

.ai-history-item-status.processing {
    background: #f39c12;
    color: #ffffff;
}

.ai-history-item-status.failed {
    background: #e74c3c;
    color: #ffffff;
}

.ai-history-item-time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.ai-history-item-query {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 8px;
}

.ai-history-item-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: all 0.2s ease;
}

.ai-history-item:hover .ai-history-item-actions {
    opacity: 1;
}

.ai-history-action-btn {
    background: none;
    border: 1px solid var(--border-secondary);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ai-history-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.ai-history-action-btn.import {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.ai-history-action-btn.import:hover {
    background: var(--accent-primary);
    color: #ffffff;
}

.ai-history-action-btn.delete {
    border-color: #e74c3c;
    color: #e74c3c;
}

.ai-history-action-btn.delete:hover {
    background: #e74c3c;
    color: #ffffff;
}

/* 鏃у彲瑙嗗寲编辑鍣?UI 閫傞厤褰撳墠主题 */
.visual-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

.visual-editor-title {
    font-weight: 600;
    color: var(--text-primary);
}

.visual-editor-actions {
    display: flex;
    gap: 8px;
}

.visual-editor-btn {
    background: var(--bg-tertiary, #121826);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.visual-editor-btn:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 230, 200, 0.08);
}

.visual-editor-btn.primary {
    background: var(--accent-primary);
    color: #02121a;
    border-color: var(--accent-primary);
}

.visual-editor-btn.small {
    padding: 4px 8px;
    font-size: 12px;
}

.visual-editor-sections {
    flex: 1;
    overflow: visible;
    padding: 12px;
    display: grid;
    gap: 12px;
}

/* 椤堕儴杞婚噺宸ュ叿鏉★紙澶嶅埗/绮樿创锛?*/
.visual-editor-toolbar {
    position: sticky;
    top: 8px;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 4px 0;
}

.visual-editor-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.section-title .title-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.section-title .section-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 鎵佸钩鍖栵細鐩存帴缁欐爣棰樺悗鐨勭涓€涓瓙元素鍔犲唴杈硅窛锛岄伩鍏嶉澶栧寘瑁瑰眰 */
.visual-editor-section> :not(.section-title) {
    padding: 12px;
}

.active-indicators {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.active-indicator {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    cursor: pointer;
}

.active-indicator .remove {
    color: var(--text-secondary);
    cursor: pointer;
}

/* 鎵佸钩鍖栨潯浠跺崱鐗囩粨鏋?*/
.condition-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    background: var(--bg-primary);
    margin-bottom: 10px;
}

.condition-card .condition-expression {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--text-primary);
}

/* 鏉′欢绫诲瀷寰芥爣锛堟暟鍊?瀛楁锛?*/
.condition-card .comparison-type {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    line-height: 1;
}

.condition-card .comparison-type.field {
    background: rgba(0, 230, 200, 0.12);
    border-color: rgba(0, 230, 200, 0.35);
    color: #00e6c8;
}

.condition-card .comparison-type.value {
    background: rgba(138, 143, 152, 0.12);
}

/* 姣旇緝绫诲瀷选择鍣ㄦ牱寮?*/
.comparison-type-selector {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 8px;
}

.comparison-type-selector .radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
    min-height: 40px;
    box-sizing: border-box;
}

.comparison-type-selector .radio-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
}

.comparison-type-selector .radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    margin: 0;
    cursor: pointer;
}

.comparison-type-selector .radio-option span {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    user-select: none;
}

.comparison-type-selector .radio-option input[type="radio"]:checked+span {
    color: var(--primary-color);
}

.comparison-type-selector .radio-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: rgba(76, 175, 80, 0.1);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.condition-card .condition-actions {
    display: flex;
    gap: 8px;
}

.condition-card .action-btn {
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 2px 8px;
    cursor: pointer;
}

.long-theme {
    box-shadow: inset 0 0 0 1px rgba(0, 230, 200, 0.15);
}

.short-theme {
    box-shadow: inset 0 0 0 1px rgba(255, 95, 95, 0.2);
}

.threshold-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.threshold-input {
    width: 100px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 6px 8px;
}

.conflict-select {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 6px 8px;
}

.no-conditions {
    color: var(--text-secondary);
    font-size: 12px;
}

.field-tips {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.empty-tip {
    color: var(--text-secondary);
    font-size: 12px;
}

/* 閫氱敤模态框锛堟寚鏍?鏉′欢选择绛夛級 */
.indicator-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 10px;
}

.indicator-modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    width: min(840px, 95vw);
    max-width: 95vw;
    max-height: 86vh;
    overflow: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-primary);
}

.modal-title {
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal {
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 12px 14px;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--border-primary);
}

/* 閫氱敤鎸囨爣鍒楄〃样式锛堥潪策略广场锛?*/
.indicator-modal:not(.indicator-square-modal) .indicator-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

/* 閫氱敤鎸囨爣卡片样式锛堥潪策略广场锛?*/
.indicator-modal:not(.indicator-square-modal) .indicator-card {
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 10px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: .2s;
}

.indicator-modal:not(.indicator-square-modal) .indicator-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 230, 200, 0.08);
}

.indicator-name {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.indicator-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.param-group {
    margin-bottom: 10px;
}

.param-label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.param-input,
.form-control {
    width: 100%;
    max-width: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 6px 8px;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.form-group select,
.form-group textarea,
.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
}

.form-group select:focus,
.form-group textarea:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-primary);
}

.filter-description-display {
    background: var(--bg-quaternary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 10px;
    color: var(--text-secondary);
    min-height: 40px;
    white-space: pre-wrap;
}

/* 鎸囨爣选择弹窗 - 搜索涓庡崱鐗嘦I优化 */
.indicator-modal .modal-search {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-primary);
    z-index: 1;
}

.indicator-search-input {
    width: 320px;
    max-width: 100%;
    height: 36px;
    border-radius: 10px;
    padding: 8px 12px 8px 36px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    transition: all .2s ease;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path fill="%238a8f98" d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 10-.71.71l.27.28v.79l5 5 1.5-1.5-5-5zm-6 0A4.5 4.5 0 1114 9.5 4.5 4.5 0 019.5 14z"/></svg>');
    background-repeat: no-repeat;
    background-position: 12px 50%;
    background-size: 16px 16px;
}

.indicator-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.indicator-search-input::placeholder {
    color: var(--text-muted);
}

.search-stats {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-secondary);
}

.indicator-modal .indicator-list {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.indicator-modal .indicator-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 120px;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
    border: 1px solid var(--border-primary);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.indicator-modal .indicator-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.indicator-modal .indicator-name {
    font-size: 15px;
    letter-spacing: .2px;
}

.indicator-modal .indicator-desc {
    margin-top: 4px;
    line-height: 1.4;
}

.indicator-modal .indicator-params {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-primary);
    color: var(--text-secondary);
    font-size: 12px;
}

@media (max-width: 600px) {
    .indicator-modal .modal-search {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .indicator-search-input {
        width: 100%;
    }
}

/* 鍙鍖栧崰浣?*/
.visual-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
}

.visual-empty .visual-icon {
    font-size: 22px;
    opacity: 0.85;
}



/* ACE 编辑鍣ㄦ牱寮?*/
#aceEditor {
    background: var(--bg-primary) !important;
}

.ace_editor {
    font-family: 'Fira Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.ace_gutter {
    background: var(--bg-secondary) !important;
    border-right: 1px solid var(--border-primary) !important;
    color: var(--text-muted) !important;
}

.ace_content {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* ACE 编辑鍣ㄦ粴鍔ㄦ潯优化 */
.ace_editor .ace_scrollbar {
    background: transparent !important;
}

.ace_editor .ace_scrollbar::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.ace_editor .ace_scrollbar::-webkit-scrollbar-track {
    background: rgba(15, 20, 25, 0.8);
    border-radius: 7px;
    border: 1px solid rgba(45, 55, 72, 0.3);
}

.ace_editor .ace_scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(145deg, rgba(140, 154, 174, 0.5), rgba(140, 154, 174, 0.3));
    border-radius: 7px;
    border: 2px solid rgba(15, 20, 25, 0.6);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ace_editor .ace_scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(145deg, var(--accent-primary), rgba(0, 230, 200, 0.7));
    border-color: var(--accent-glow);
    box-shadow: 0 0 16px rgba(0, 230, 200, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.ace_editor .ace_scrollbar::-webkit-scrollbar-thumb:active {
    background: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 230, 200, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 鑷畾涔夋粴鍔ㄦ潯样式 - 閫氱敤 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 31, 46, 0.3);
    border-radius: 8px;
    margin: 2px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(140, 154, 174, 0.6), rgba(140, 154, 174, 0.4));
    border-radius: 8px;
    border: 1px solid rgba(26, 31, 46, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-primary), rgba(0, 230, 200, 0.8));
    border-color: var(--accent-glow);
    box-shadow: 0 0 12px rgba(0, 230, 200, 0.3);
    transform: scale(1.05);
}

::-webkit-scrollbar-corner {
    background: var(--bg-secondary);
    border-radius: 8px;
}

/* 渚ц竟鏍忓拰面板滚动鏉?*/
.sidebar,
.panel-content,
.chart-controls {
    scrollbar-width: thin;
    scrollbar-color: rgba(140, 154, 174, 0.5) rgba(26, 31, 46, 0.3);
}

/* Firefox 滚动鏉℃牱寮?- 暗色主题(默认) */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(140, 154, 174, 0.6) rgba(26, 31, 46, 0.3);
}

/* ============================================
   主题适配 - 浅色主题滚动条
   ============================================ */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: rgba(240, 240, 240, 0.8);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2));
    border: 1px solid rgba(0, 0, 0, 0.2);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.4));
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] ::-webkit-scrollbar-corner {
    background: var(--bg-primary);
}

/* Firefox 浅色主题 */
[data-theme="light"] * {
    scrollbar-color: rgba(0, 0, 0, 0.3) rgba(240, 240, 240, 0.8);
}

/* ============================================
   主题适配 - 暗黑主题滚动条
   ============================================ */
[data-theme="darkblack"] ::-webkit-scrollbar-track {
    background: rgba(13, 14, 15, 0.6);
    border: 1px solid rgba(26, 27, 28, 0.5);
}

[data-theme="darkblack"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(120, 130, 150, 0.5), rgba(120, 130, 150, 0.3));
    border: 1px solid rgba(26, 27, 28, 0.8);
}

[data-theme="darkblack"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-primary), rgba(0, 230, 200, 0.7));
    border-color: var(--accent-glow);
    box-shadow: 0 0 15px rgba(0, 230, 200, 0.4);
}

[data-theme="darkblack"] ::-webkit-scrollbar-corner {
    background: #0D0E0F;
}

/* Firefox 暗黑主题 */
[data-theme="darkblack"] * {
    scrollbar-color: rgba(120, 130, 150, 0.5) rgba(13, 14, 15, 0.6);
}

/* 涓虹壒瀹氬厓绱犳坊鍔犳洿濂界殑滚动浣撻獙 */
.code-editor-container,
#aceEditor {
    overflow: hidden;
    /* ACE鑷繁澶勭悊滚动 */
}



/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .toolbar-content {
        flex-direction: column;
        gap: 15px;
    }

    .kline-panel {
        width: 100%;
    }

    .spot-panel {
        min-height: 200px;
    }

    .editor-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .editor-toolbar-left,
    .editor-toolbar-right {
        flex-wrap: wrap;
    }

    .indicators-container {
        flex-direction: column;
    }

    .indicators-nav {
        flex-direction: row;
        width: auto;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-primary);
        padding: 8px 12px;
        overflow-x: auto;
        gap: 8px;
    }

    .indicator-tab-btn {
        min-width: 0;
        flex: none;
        white-space: nowrap;
        margin: 0;
        border-left: none;
        border-bottom: 2px solid transparent;
        text-align: center;
        padding: 8px 12px;
    }

    .indicator-tab-btn.active {
        border-left: none;
        border-bottom-color: var(--accent-primary);
        box-shadow: 0 2px 8px var(--accent-glow);
    }

    .editor-main {
        flex-direction: column;
    }

    .code-editor-container {
        flex: 1;
        min-height: 300px;
    }
}

/* 图表鍖呰鍣ㄦ牱寮?*/
.chart-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 绠€鍖栫殑图表加载动画样式 */
.chart-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 20, 24, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 浜壊主题鐨勫浘琛ㄥ姞杞藉姩鐢绘牱寮?*/
[data-theme="light"] .chart-loading-overlay {
    background: rgba(248, 248, 248, 0.95);
}

/* 暗黑主题鐨勫浘琛ㄥ姞杞藉姩鐢绘牱寮?*/
[data-theme="darkblack"] .chart-loading-overlay {
    background: rgba(13, 14, 15, 0.95);
}

.chart-loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: #fff;
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #ffffff;
}

/* 浜壊主题鐨勫姞杞芥枃鏈牱寮?*/
[data-theme="light"] .loading-content {
    color: #1a1a1a;
}

[data-theme="light"] .loading-text {
    color: #1a1a1a;
}

.loading-dots {
    display: inline-flex;
    gap: 6px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #00d4aa;
    border-radius: 50%;
    animation: loading-dots 1.4s ease-in-out infinite both;
}

/* 浜壊主题鐨勫姞杞藉渾鐐规牱寮?*/
[data-theme="light"] .loading-dots span {
    background: #000000;
}

/* 暗黑主题鐨勫姞杞藉渾鐐规牱寮?*/
[data-theme="darkblack"] .loading-dots span {
    background: #00d4aa;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes loading-dots {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Tab切换样式 - 绠€绾︾増 */
.tab-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.tab-header {
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

/* 绗竴灞倀ab瀵艰埅 - 绠€绾﹁璁?*/
.tab-nav-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.02);
}

.tab-item-primary {
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.tab-item-primary:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-item-primary.active {
    color: var(--accent-primary);
    font-weight: 600;
    background: rgba(0, 160, 133, 0.12);
}

.tab-item-primary.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 20px;
    height: 2px;
    background: var(--accent-primary);
    transform: translateX(-50%);
    border-radius: 1px;
}

/* 浜壊模式下的涓籺ab选中鐘舵€?*/
[data-theme="light"] .tab-item-primary.active {
    background: rgba(0, 0, 0, 0.08);
}

/* 绗簩灞倀ab瀵艰埅 - 鏋佺畝璁捐 */
.tab-nav-secondary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 12px 6px;
    position: relative;
}

.tab-nav-secondary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-primary);
}

.tab-nav-secondary-left {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-shrink: 0;
}

.tab-nav-secondary-left::-webkit-scrollbar {
    display: none;
}

.tab-nav-secondary-center {
    flex-grow: 1;
    min-width: 20px;
}

.tab-nav-secondary-right {
    flex-shrink: 0;
    margin-left: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* 娓呬粨按钮样式 - 绠€绾﹁璁?*/
.clear-all-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.25);
    position: relative;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    letter-spacing: 0.3px;
    backdrop-filter: blur(10px);
}

.clear-all-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.35);
    background: linear-gradient(135deg, #ff5252 0%, #e53e3e 100%);
}

.clear-all-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(255, 107, 107, 0.3);
    transition: all 0.1s ease;
}

/* 浜壊主题下的娓呬粨按钮 */
[data-theme="light"] .clear-all-btn {
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: white;
}

[data-theme="light"] .clear-all-btn:hover {
    background: linear-gradient(135deg, #000000 0%, #000000 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.tab-item-secondary {
    padding: 4px 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-item-secondary:hover:not(.active) {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-item-secondary.active {
    color: var(--accent-primary);
    font-weight: 600;
    background: rgba(0, 160, 133, 0.10);
}

/* 浜壊模式下的绗簩灞倀ab选中鐘舵€?*/
[data-theme="light"] .tab-item-secondary.active {
    background: rgba(0, 0, 0, 0.06);
}

/* 骞冲彴绛涢€夊嬀閫夋样式 */
.currency-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    font-size: 12px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.currency-filter:hover {
    color: var(--text-secondary);
}

.currency-filter input[type="checkbox"] {
    position: relative;
    width: 14px;
    height: 14px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.currency-filter .checkmark {
    position: absolute;
    width: 14px;
    height: 14px;
    background: transparent;
    border: 1px solid var(--border-secondary);
    border-radius: 2px;
    transition: all 0.2s ease;
    pointer-events: none;
}

.currency-filter input[type="checkbox"]:checked+.checkmark {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.currency-filter input[type="checkbox"]:checked+.checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.currency-filter:hover .checkmark {
    border-color: var(--accent-primary);
}

.currency-filter .label-text {
    font-weight: 400;
    white-space: nowrap;
}

/* tab内容鍖哄煙 */
.tab-content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    background: var(--bg-panel);
    display: none;
    position: relative;
    height: calc(100% - 60px);
}

/* 褰撻渶瑕佹樉绀簍ab-content鏃剁殑样式 */
.tab-content.show {
    display: flex;
    flex-direction: column;
}

/* 确定繚trading-panels-container默认鏄剧ず */
#trading-panels-container {
    display: block;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.tab-pane {
    display: none;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
}

/* indicators鏍囩椤电壒娈婃牱寮?- 绉婚櫎鐖剁骇鍐呰竟璺?*/
#indicators {
    margin: 0;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}



/* 绌虹姸鎬佹樉绀?*/
.tab-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    color: var(--text-secondary);
    font-size: 15px;
    text-align: center;
    padding: 60px 40px;
    box-sizing: border-box;
    position: relative;
}

.tab-empty>div {
    margin-top: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.tab-empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.tab-empty:hover .tab-empty-icon {
    opacity: 0.6;
    transform: scale(1.05);
}

/* 加载动画样式 */
.position-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}





/* 鍝嶅簲寮忚璁?- 绠€绾︾増 */
@media (max-width: 768px) {
    .tab-nav-primary {
        padding: 2px 8px;
        gap: 4px;
    }

    .tab-item-primary {
        padding: 4px 8px;
        font-size: 12px;
    }

    .tab-nav-secondary {
        padding: 2px 8px 4px;
        gap: 2px;
    }

    .tab-item-secondary {
        padding: 3px 6px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .tab-nav-primary {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tab-nav-primary::-webkit-scrollbar {
        display: none;
    }

    .tab-item-primary {
        flex-shrink: 0;
        min-width: 50px;
    }
}

/* 鍙紪杈戞枃鏈粍浠舵牱寮?*/
.editable-text-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.editable-text-container:hover {
    background: var(--bg-hover);
}

.editable-text {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    cursor: default;
    user-select: none;
}

.edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
}

.edit-btn:hover {
    color: var(--accent-primary);
    background: var(--bg-tertiary);
    opacity: 1;
    transform: scale(1.1);
}

.edit-btn .material-icons {
    font-size: 18px !important;
    line-height: 1;
}

/* 浜壊模式下的编辑按钮 */
[data-theme="light"] .edit-btn {
    color: var(--text-secondary);
}

[data-theme="light"] .edit-btn:hover {
    color: var(--accent-primary);
    background: var(--bg-hover);
}

/* 策略绠€浠嬭緭鍏ユ样式 */
.strategy-description-container {
    margin-left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.strategy-description-container .editable-text {
    flex: 1;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 20px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.strategy-description-container .editable-text:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

.strategy-description-container .editable-text.empty {
    color: var(--text-muted);
    font-style: italic;
}

.strategy-description-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--text-primary);
    font-size: 13px;
    width: 200px;
    transition: all 0.3s ease;
    resize: none;
    font-family: inherit;
}

.strategy-description-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.strategy-description-input::placeholder {
    color: var(--text-muted);
}

.description-counter {
    display: flex;
    justify-content: flex-end;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 编辑弹窗涓殑鏂囨湰鍩熸牱寮?*/
#strategyDescriptionInput {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

#strategyDescriptionInput:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

#strategyDescriptionInput::placeholder {
    color: var(--text-muted);
}

/* 编辑弹窗样式 */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.edit-modal.show {
    display: flex;
}

.edit-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
}

/* 编辑弹窗鍦ㄤ寒鑹叉ā寮忎笅鐨勭壒娈婅儗鏅?*/
[data-theme="light"] .edit-modal .edit-modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.edit-modal-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 浜壊模式下的特殊样式 */
[data-theme="light"] .edit-modal-content {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.1);
    background: var(--bg-primary);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.edit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-primary);
}

.edit-modal-header h3 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.edit-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.edit-modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.edit-modal-body {
    padding: 24px;
}

.edit-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edit-input-group label {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.edit-input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.edit-input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-primary);
}

.edit-input-group input::placeholder {
    color: var(--text-muted);
}

/* 浜壊模式下的输入妗嗘牱寮?*/
[data-theme="light"] .edit-input-group input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
}

[data-theme="light"] .edit-input-group input:focus {
    background: var(--bg-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.edit-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border-primary);
}

.edit-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.edit-modal-btn.cancel {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-primary);
}

.edit-modal-btn.cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.edit-modal-btn.confirm {
    background: var(--accent-primary);
    color: white;
    border: 1px solid var(--accent-primary);
}

.edit-modal-btn.confirm:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

/* 浜壊模式下的按钮样式 */
[data-theme="light"] .edit-modal-btn.cancel {
    border: 1px solid var(--border-secondary);
    color: var(--text-secondary);
}

[data-theme="light"] .edit-modal-btn.cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

.card-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    /* 鍙互鏍规嵁闇€瑕佽皟鏁撮棿璺?*/
}

.card-performance-horizontal {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    /* 鍐呴儴内容闈犲彸 */
    align-items: center;
    /* 鍨傜洿灞呬腑 */
    gap: 20px;
    /* 璋冩暣闂磋窛 */
    width: 100%;
    /* 鍗犳弧鍓╀綑瀹藉害 */
    margin-top: 8px;
    /* 鍙€夛細涓庝笂鏂规弿杩版枃瀛椾繚鎸侀棿璺?*/
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .edit-modal-content {
        width: 95%;
        margin: 20px;
    }

    .edit-modal-header {
        padding: 16px 20px 12px;
    }

    .edit-modal-body {
        padding: 20px;
    }

    .edit-modal-footer {
        padding: 12px 20px 16px;
    }
}

/* 加载动画样式 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 300px;
    background: var(--bg-secondary);
    border-radius: 12px;
    height: 100%;
}

.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: var(--accent-secondary);
    animation-delay: 0.2s;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: var(--success-color);
    animation-delay: 0.4s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 10px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* 浜壊模式下的加载动画 */
[data-theme="light"] .loading-container {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
}

[data-theme="light"] .loading-text {
    color: var(--text-primary);
}

/* AI浜岀淮鐮佹壂鎻忓櫒样式 - 主题閫傞厤 */
/* 暗色主题(默认) */
:root {
    --scanner-border-color: rgba(0, 255, 200, 0.4);
    --scanner-bg-color: rgba(0, 255, 200, 0.01);
    --scanner-corner-color: rgba(0, 255, 200, 0.6);
    --scanner-line-color: rgba(0, 255, 204, 0.8);
    --scanner-bg: rgba(0, 255, 200, 0.01);
    --scanner-center-border: rgba(0, 255, 200, 0.4);
}

/* 浜壊主题閫傞厤 */
[data-theme="light"] {
    --scanner-border-color: rgba(0, 0, 0, 0.4);
    --scanner-bg-color: rgba(0, 0, 0, 0.01);
    --scanner-corner-color: rgba(0, 0, 0, 0.7);
    --scanner-line-color: rgba(0, 0, 0, 0.8);
    --scanner-bg: rgba(0, 0, 0, 0.005);
    --scanner-center-border: rgba(0, 0, 0, 0.5);
}

.ai-scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--scanner-bg);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.ai-scanner-overlay.show {
    opacity: 1;
    visibility: visible;
}

.ai-scanner-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
}

/* 绠€绾﹀叏灞忔壂鎻忓櫒涓讳綋 */
.ai-scanner-main {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* border: 1px solid var(--scanner-border-color, rgba(0, 255, 200, 0.4)); */
    /* background: var(--scanner-bg-color, rgba(0, 255, 200, 0.01)); */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* 绠€绾﹀洓瑙掕楗?*/
.scanner-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--scanner-corner-color, rgba(0, 255, 200, 0.6));
    z-index: 10;
}

.scanner-corner.top-left {
    top: 10px;
    left: 0px;
    border-right: none;
    border-bottom: none;
}

.scanner-corner.top-right {
    top: 10px;
    right: 0px;
    border-left: none;
    border-bottom: none;
}

.scanner-corner.bottom-left {
    bottom: 10px;
    left: 0px;
    border-right: none;
    border-top: none;
}

.scanner-corner.bottom-right {
    bottom: 10px;
    right: 0px;
    border-left: none;
    border-top: none;
}

/* 鎵弿绾垮鍣?*/
.scanner-line-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* 绠€绾︽壂鎻忕嚎 */
.scanner-line {
    position: absolute;
    width: 2px;
    height: calc(100% - 20px);
    top: 10px;
    box-shadow: 0 0 10px var(--scanner-line-color, rgba(0, 255, 204, 0.4));
    animation: scannerLineSweep 2.5s ease-in-out infinite;
    left: 0;
    z-index: 15;
}

/* 绠€绾︿腑蹇冩樉绀哄尯鍩?*/
.scanner-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 120px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 20;
    /* 绉婚櫎姣涚幓鐠冩晥鏋?*/
    /* backdrop-filter: blur(8px); */
    background: transparent;
    /* 确定繚背景瀹屽叏閫忔槑 */
}

/* AI鏍囪瘑 */
.scanner-ai-icon {
    position: relative;
    z-index: 10;
    font-size: 12px;
    font-weight: 700;
    color: var(--scanner-text-color, #00ffcc);
    text-shadow: 0 0 5px var(--scanner-text-shadow, rgba(0, 255, 200, 0.8));
    animation: aiIconFlicker 0.8s ease-in-out infinite alternate;
}

/* 鎵弿鐘舵€佹枃瀛?*/
.scanner-status {
    display: none;
}

.scanner-status-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--scanner-text-color, #00ffcc);
    text-shadow: 0 0 6px var(--scanner-text-shadow, rgba(0, 255, 200, 0.6));
    margin-bottom: 6px;
    animation: textFlicker 2s ease-in-out infinite;
}

/* 浜壊主题鐘舵€佹枃瀛?*/
[data-theme="light"] {
    --scanner-text-color: #000000;
    --scanner-text-shadow: rgba(0, 0, 0, 0.6);
}

/* 数据鐐?*/
.scanner-data-points {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    pointer-events: none;
}

.data-point {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ffcc;
    border-radius: 50%;
    animation: dataPointFlash 1s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(0, 255, 200, 0.8);
}

/* 鍏抽敭甯у姩鐢?*/
@keyframes aiScannerPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 255, 200, 0.3);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 40px rgba(0, 255, 200, 0.6);
    }
}

/* 鍏ㄥ睆鎵弿绾垮乏鍙崇Щ鍔ㄥ姩鐢?*/
@keyframes scannerLineSweep {
    0% {
        left: -10px;
        opacity: 0;
    }

    5% {
        opacity: 0.8;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    95% {
        opacity: 0.8;
    }

    100% {
        left: calc(100% + 10px);
        opacity: 0;
    }
}

/* 鎵弿涓績鍖哄煙鑴夋悘动画 */
@keyframes scannerCenterPulse {

    0%,
    100% {
        background: rgba(0, 255, 200, 0.1);
        border-color: rgba(0, 255, 200, 0.3);
        box-shadow: 0 0 5px rgba(0, 255, 200, 0.3);
    }

    50% {
        background: rgba(0, 255, 200, 0.2);
        border-color: rgba(0, 255, 200, 0.6);
        box-shadow: 0 0 15px rgba(0, 255, 200, 0.6);
    }
}

@keyframes aiIconFlicker {
    0% {
        opacity: 0.8;
        text-shadow: 0 0 8px rgba(0, 255, 200, 0.6);
    }

    100% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(0, 255, 200, 1);
    }
}

@keyframes textFlicker {

    0%,
    100% {
        opacity: 0.9;
    }

    50% {
        opacity: 1;
    }
}

@keyframes progressScan {
    0% {
        width: 0%;
        background-position: -200% 0;
    }

    50% {
        width: 100%;
        background-position: 0% 0;
    }

    100% {
        width: 100%;
        background-position: 200% 0;
    }
}

@keyframes dataPointFlash {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .scanner-corner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }

    .scanner-center {
        width: 180px;
        height: 100px;
        gap: 8px;
    }

    .scanner-ai-icon {
        font-size: 10px;
    }

    .scanner-status-text {
        font-size: 12px;
    }

    .scanner-progress {
        width: 140px;
    }

    .scanner-data-points {
        width: 320px;
        height: 320px;
    }

    .scanner-line {
        width: 2px;
    }
}

@media (max-width: 480px) {
    .scanner-corner {
        width: 30px;
        height: 30px;
        border-width: 2px;
    }

    .scanner-corner.top-left,
    .scanner-corner.top-right {
        top: 10px;
    }

    .scanner-corner.top-left,
    .scanner-corner.bottom-left {
        left: 10px;
    }

    .scanner-corner.top-right,
    .scanner-corner.bottom-right {
        right: 10px;
    }

    .scanner-corner.bottom-left,
    .scanner-corner.bottom-right {
        bottom: 10px;
    }

    .scanner-center {
        width: 160px;
        height: 90px;
        gap: 6px;
    }



    .scanner-progress {
        width: 120px;
    }

    .scanner-data-points {
        width: 280px;
        height: 280px;
    }
}

/* AI鍒嗘瀽缁撴灉弹窗样式 */
.ai-analysis-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    animation: aiModalFadeIn 0.2s ease-out;
}

.ai-analysis-modal.show {
    display: flex;
}

@keyframes aiModalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

.ai-analysis-content {
    position: relative;
    background: var(--bg-secondary);
    border: 2px solid rgba(0, 255, 200, 0.3);
    border-radius: 16px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 255, 200, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    animation: aiModalSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 浜壊主题弹窗内容 */
[data-theme="light"] .ai-analysis-content {
    border: 2px solid rgba(8, 145, 178, 0.4);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(8, 145, 178, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

@keyframes aiModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes aiModalFadeOut {
    from {
        opacity: 1;
        backdrop-filter: blur(8px);
    }

    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

@keyframes aiModalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
}

/* 弹窗关闭动画 */
.ai-analysis-modal.closing {
    animation: aiModalFadeOut 0.2s ease-in forwards;
}

.ai-analysis-modal.closing .ai-analysis-content {
    animation: aiModalSlideOut 0.2s ease-in forwards;
}

/* 弹窗头部 */
.ai-analysis-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(0, 255, 200, 0.1) 0%, rgba(0, 100, 255, 0.05) 100%);
    border-bottom: 1px solid rgba(0, 255, 200, 0.2);
    position: relative;
}

/* 浜壊主题弹窗头部 */
[data-theme="light"] .ai-analysis-header {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.1) 0%, rgba(14, 116, 144, 0.05) 100%);
    border-bottom: 1px solid rgba(8, 145, 178, 0.3);
}

.ai-analysis-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ffcc, #0080ff, #00ffcc);
    background-size: 200% 100%;
    animation: headerGlow 3s ease-in-out infinite;
}

/* 浜壊主题头部装饰鏉?*/
[data-theme="light"] .ai-analysis-header::before {
    background: linear-gradient(90deg, #0891B2, #06b6d4, #0891B2);
}

/* 暗黑主题弹窗内容 */
[data-theme="darkblack"] .ai-analysis-content {
    border: 2px solid rgba(0, 212, 170, 0.3);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(0, 212, 170, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 暗黑主题弹窗头部 */
[data-theme="darkblack"] .ai-analysis-header {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.08) 0%, rgba(0, 212, 170, 0.03) 100%);
    border-bottom: 1px solid rgba(0, 212, 170, 0.2);
}

/* 暗黑主题头部装饰鏉?*/
[data-theme="darkblack"] .ai-analysis-header::before {
    background: linear-gradient(90deg, #00d4aa, #00BF9A, #00d4aa);
}

@keyframes headerGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.ai-analysis-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.ai-title-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #00ffcc, #0080ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 0 15px rgba(0, 255, 200, 0.5);
    animation: aiIconSpin 4s linear infinite;
}

/* 浜壊主题图标 */
[data-theme="light"] .ai-title-icon {
    background: linear-gradient(135deg, #000000, #333333);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* 暗黑主题图标 */
[data-theme="darkblack"] .ai-title-icon {
    background: linear-gradient(135deg, #00d4aa, #00BF9A);
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.5);
}

@keyframes aiIconSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.ai-title-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(0, 255, 200, 0.3);
}

/* 浜壊主题鏍囬鏂囧瓧 */
[data-theme="light"] .ai-title-text {
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* 暗黑主题鏍囬鏂囧瓧 */
[data-theme="darkblack"] .ai-title-text {
    text-shadow: 0 0 10px rgba(0, 212, 170, 0.3);
}

.ai-analysis-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.15s ease, color 0.15s ease;
    font-size: 24px;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    touch-action: manipulation;
}

.ai-analysis-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.ai-analysis-close:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
}

/* 弹窗涓讳綋内容 */
.ai-analysis-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(85vh - 140px);
    position: relative;
}

.ai-analysis-body::-webkit-scrollbar {
    width: 8px;
}

.ai-analysis-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.ai-analysis-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 200, 0.3);
    border-radius: 4px;
}

.ai-analysis-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 200, 0.5);
}

/* Markdown 内容样式 */
.ai-markdown-content {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
}

.ai-markdown-content h1 {
    color: #00ffcc;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(0, 255, 200, 0.3);
    text-shadow: 0 0 10px rgba(0, 255, 200, 0.3);
}

.ai-markdown-content h2 {
    color: #00ffcc;
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px 0;
    text-shadow: 0 0 8px rgba(0, 255, 200, 0.2);
}

.ai-markdown-content h3 {
    color: #0080ff;
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 10px 0;
}

.ai-markdown-content h4 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin: 16px 0 8px 0;
}

.ai-markdown-content p {
    margin: 0 0 16px 0;
    color: var(--text-primary);
}

.ai-markdown-content ul,
.ai-markdown-content ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.ai-markdown-content li {
    margin: 6px 0;
    color: var(--text-primary);
}

.ai-markdown-content blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 4px solid #00ffcc;
    background: rgba(0, 255, 200, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.ai-markdown-content code {
    background: rgba(0, 255, 200, 0.1);
    color: #00ffcc;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.ai-markdown-content pre {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
    position: relative;
}

.ai-markdown-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.ai-markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
}

.ai-markdown-content th,
.ai-markdown-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-primary);
}

.ai-markdown-content th {
    background: rgba(0, 255, 200, 0.1);
    color: #00ffcc;
    font-weight: 600;
}

.ai-markdown-content td {
    color: var(--text-primary);
}

.ai-markdown-content tr:last-child td {
    border-bottom: none;
}

.ai-markdown-content a {
    color: #00ffcc;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.ai-markdown-content a:hover {
    border-bottom-color: #00ffcc;
    text-shadow: 0 0 5px rgba(0, 255, 200, 0.3);
}

.ai-markdown-content strong {
    color: #00ffcc;
    font-weight: 700;
}

.ai-markdown-content em {
    color: #0080ff;
    font-style: italic;
}

/* 鍒嗘瀽鎸囨爣卡片 */
.analysis-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.metric-card {
    background: rgba(0, 255, 200, 0.05);
    border: 1px solid rgba(0, 255, 200, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    background: rgba(0, 255, 200, 0.1);
    border-color: rgba(0, 255, 200, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 200, 0.1);
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #00ffcc;
    font-family: 'Courier New', monospace;
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .ai-analysis-content {
        width: 95%;
        max-height: 90vh;
        margin: 0 10px;
    }

    .ai-analysis-header {
        padding: 16px 20px;
    }

    .ai-title-text {
        font-size: 18px;
    }

    .ai-analysis-body {
        padding: 20px;
        max-height: calc(90vh - 120px);
    }

    .ai-markdown-content {
        font-size: 14px;
    }

    .ai-markdown-content h1 {
        font-size: 20px;
    }

    .ai-markdown-content h2 {
        font-size: 18px;
    }

    .analysis-metrics {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ========== AI解读弹窗主题适配 ========== */

/* 浅色主题适配 */
[data-theme="light"] .ai-analysis-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .ai-analysis-close:active {
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .ai-analysis-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .ai-analysis-body::-webkit-scrollbar-thumb {
    background: rgba(8, 145, 178, 0.4);
}

[data-theme="light"] .ai-analysis-body::-webkit-scrollbar-thumb:hover {
    background: rgba(8, 145, 178, 0.6);
}

[data-theme="light"] .ai-markdown-content h1 {
    color: #0891B2;
    border-bottom: 2px solid rgba(8, 145, 178, 0.3);
    text-shadow: none;
}

[data-theme="light"] .ai-markdown-content h2 {
    color: #0891B2;
    text-shadow: none;
}

[data-theme="light"] .ai-markdown-content h3 {
    color: #0e7490;
}

[data-theme="light"] .ai-markdown-content blockquote {
    border-left: 4px solid #0891B2;
    background: rgba(8, 145, 178, 0.08);
}

[data-theme="light"] .ai-markdown-content code {
    background: rgba(8, 145, 178, 0.1);
    color: #0891B2;
}

[data-theme="light"] .ai-markdown-content th {
    background: rgba(8, 145, 178, 0.1);
    color: #0891B2;
}

[data-theme="light"] .ai-markdown-content a {
    color: #0891B2;
}

[data-theme="light"] .ai-markdown-content a:hover {
    border-bottom-color: #0891B2;
    text-shadow: none;
}

[data-theme="light"] .ai-markdown-content strong {
    color: #0891B2;
}

[data-theme="light"] .ai-markdown-content em {
    color: #0e7490;
}

[data-theme="light"] .metric-card {
    background: rgba(8, 145, 178, 0.05);
    border: 1px solid rgba(8, 145, 178, 0.2);
}

[data-theme="light"] .metric-card:hover {
    background: rgba(8, 145, 178, 0.1);
    border-color: rgba(8, 145, 178, 0.4);
    box-shadow: 0 8px 20px rgba(8, 145, 178, 0.15);
}

[data-theme="light"] .metric-value {
    color: #0891B2;
}

/* 暗黑主题 - 关闭按钮 */
[data-theme="darkblack"] .ai-analysis-close:hover {
    background: rgba(0, 212, 170, 0.15);
}

[data-theme="darkblack"] .ai-analysis-close:active {
    background: rgba(0, 212, 170, 0.25);
}

/* 暗黑主题 - 滚动条 */
[data-theme="darkblack"] .ai-analysis-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="darkblack"] .ai-analysis-body::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 170, 0.3);
}

[data-theme="darkblack"] .ai-analysis-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 170, 0.5);
}

/* 暗黑主题 - Markdown内容 */
[data-theme="darkblack"] .ai-markdown-content h1 {
    color: #00d4aa;
    border-bottom: 2px solid rgba(0, 212, 170, 0.3);
    text-shadow: 0 0 10px rgba(0, 212, 170, 0.3);
}

[data-theme="darkblack"] .ai-markdown-content h2 {
    color: #00d4aa;
    text-shadow: 0 0 8px rgba(0, 212, 170, 0.2);
}

[data-theme="darkblack"] .ai-markdown-content h3 {
    color: #00BF9A;
}

[data-theme="darkblack"] .ai-markdown-content blockquote {
    border-left: 4px solid #00d4aa;
    background: rgba(0, 212, 170, 0.05);
}

[data-theme="darkblack"] .ai-markdown-content code {
    background: rgba(0, 212, 170, 0.1);
    color: #00d4aa;
}

[data-theme="darkblack"] .ai-markdown-content th {
    background: rgba(0, 212, 170, 0.1);
    color: #00d4aa;
}

[data-theme="darkblack"] .ai-markdown-content a {
    color: #00d4aa;
}

[data-theme="darkblack"] .ai-markdown-content a:hover {
    border-bottom-color: #00d4aa;
    text-shadow: 0 0 5px rgba(0, 212, 170, 0.3);
}

[data-theme="darkblack"] .ai-markdown-content strong {
    color: #00d4aa;
}

[data-theme="darkblack"] .ai-markdown-content em {
    color: #00BF9A;
}

/* 暗黑主题 - 分析指标卡片 */
[data-theme="darkblack"] .metric-card {
    background: rgba(0, 212, 170, 0.05);
    border: 1px solid rgba(0, 212, 170, 0.2);
}

[data-theme="darkblack"] .metric-card:hover {
    background: rgba(0, 212, 170, 0.1);
    border-color: rgba(0, 212, 170, 0.4);
    box-shadow: 0 8px 20px rgba(0, 212, 170, 0.1);
}

[data-theme="darkblack"] .metric-value {
    color: #00d4aa;
}

/* 策略鍥炴祴弹窗样式 */
.backtest-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.backtest-modal.show {
    display: flex;
}

.backtest-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.backtest-modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    animation: backtestModalSlide 0.3s ease-out;
}

@keyframes backtestModalSlide {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.backtest-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-primary);
}

.backtest-modal-header h3 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.backtest-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.backtest-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.backtest-modal-body {
    padding: 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.backtest-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.backtest-input-row {
    display: flex;
    gap: 16px;
}

.backtest-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.backtest-label {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 回测弹窗的 tooltip 提示图标样式 */
.backtest-label .tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border-secondary);
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: bold;
    cursor: help;
    position: relative;
    flex-shrink: 0;
}

.backtest-label .tooltip-icon:hover {
    background: var(--accent-primary);
    color: white;
}

.backtest-label .tooltip-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: normal;
    white-space: pre-wrap;
    width: max-content;
    max-width: 320px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100000001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    line-height: 1.6;
}

.backtest-label .tooltip-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

.backtest-input {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    outline: none;
}

.backtest-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.backtest-input::placeholder {
    color: var(--text-tertiary);
}

.backtest-input:hover:not(:focus) {
    border-color: var(--border-secondary);
}

/* Select元素样式 */
.backtest-select {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    outline: none;
    cursor: pointer;
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.backtest-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.backtest-select:hover:not(:focus) {
    border-color: var(--border-secondary);
}

.backtest-select.error {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
    animation: shake 0.3s ease-in-out;
}

.backtest-select.error:focus {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.backtest-select.success {
    border-color: var(--success-color);
    background: rgba(34, 197, 94, 0.05);
}

.backtest-select.success:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* 琛ㄥ崟楠岃瘉鐘舵€佹牱寮?*/
.backtest-input.error {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
    animation: shake 0.3s ease-in-out;
}

.backtest-input.error:focus {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.backtest-input.success {
    border-color: var(--success-color);
    background: rgba(34, 197, 94, 0.05);
}

.backtest-input.success:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* 瀛楁蹇呴渶鏍囪瘑 */
.backtest-label.required::after {
    content: ' *';
    color: var(--error-color);
    font-weight: bold;
}

/* 琛ㄥ崟閿欒提示 */
.backtest-input-error {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.backtest-input-error.show {
    display: block;
}

/* 鏅冨姩动画 */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.backtest-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-primary);
}

.backtest-modal-btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.backtest-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.backtest-cancel:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.backtest-confirm {
    background: var(--accent-primary);
    color: white;
}

.backtest-confirm:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.backtest-confirm:active {
    transform: translateY(0);
}

/* 杩愯鏃堕棿璁剧疆样式 */
.weekday-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.weekday-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
    user-select: none;
    font-size: 13px;
    min-width: 50px;
    justify-content: center;
}

.weekday-option:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.weekday-option input[type="checkbox"] {
    display: none;
}

.weekday-option input[type="checkbox"]:checked+span {
    color: white;
}

.weekday-option:has(input[type="checkbox"]:checked) {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.weekday-option span {
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.2s ease;
}

/* 鏃堕棿选择鍣ㄦ牱寮?*/
.time-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-select {
    width: 70px;
    padding: 8px 12px;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.time-select:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.time-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.time-separator {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 4px;
}

#tv_chart_container::shadow .valueValue-1319iuA {
    margin-top: 5px !important;
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .backtest-modal-content {
        width: 95vw;
        margin: 20px;
    }

    .backtest-input-row {
        flex-direction: column;
        gap: 12px;
    }

    .backtest-modal-header,
    .backtest-modal-body,
    .backtest-modal-footer {
        padding: 16px 20px;
    }
}


/* 浜壊主题閫傞厤 */
[data-theme="light"] .backtest-modal-content {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .backtest-modal-overlay {
    background: rgba(255, 255, 255, 0.8);
}

/* =========================
   缁熶竴绉戞妧鎰熷脊绐楃郴缁熸牱寮?   ========================= */

.unified-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.unified-modal.show {
    display: flex;
    animation: unifiedModalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.unified-modal.hide {
    animation: unifiedModalFadeOut 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.unified-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.unified-modal-container {
    position: relative;
    background: linear-gradient(145deg,
            var(--bg-secondary) 0%,
            rgba(15, 20, 25, 0.95) 50%,
            var(--bg-secondary) 100%);
    /* border: 2px solid; */
    border-image: linear-gradient(135deg,
            rgba(0, 255, 200, 0.6) 0%,
            rgba(0, 100, 255, 0.4) 50%,
            rgba(0, 255, 200, 0.6) 100%) 1;
    border-radius: 20px;
    min-width: 400px;
    max-width: 500px;
    width: 90vw;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(0, 255, 200, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.unified-modal.show .unified-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* 浜壊主题閫傞厤 */
[data-theme="light"] .unified-modal-container {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 248, 248, 0.98) 50%,
            rgba(255, 255, 255, 0.95) 100%);
    border-image: linear-gradient(135deg,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.6) 100%) 1;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 弹窗头部 */
.unified-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px 20px;
    background: linear-gradient(135deg,
            rgba(0, 255, 200, 0.08) 0%,
            rgba(0, 100, 255, 0.04) 100%);
    border-bottom: 1px solid rgba(0, 255, 200, 0.2);
    position: relative;
}

[data-theme="light"] .unified-modal-header {
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.08) 0%,
            rgba(0, 0, 0, 0.04) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.unified-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(0, 255, 200, 0.6) 50%,
            transparent 100%);
    animation: scanLine 2s ease-in-out infinite;
}

[data-theme="light"] .unified-modal-header::before {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(0, 0, 0, 0.6) 50%,
            transparent 100%);
}

.unified-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.unified-modal-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(45deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%,
            rgba(255, 255, 255, 0.1) 100%);
    animation: shimmer 2s ease-in-out infinite;
}

.unified-modal-icon svg {
    width: 24px;
    height: 24px;
    z-index: 1;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* 涓嶅悓绫诲瀷鐨勫浘鏍囨牱寮?*/
.unified-modal-icon.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.unified-modal-icon.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.unified-modal-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.unified-modal-icon.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.unified-modal-icon.confirm {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.unified-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* 弹窗内容 */
.unified-modal-content {
    padding: 24px 28px;
}

.unified-modal-message {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-line;
    word-wrap: break-word;
}

/* 弹窗搴曢儴 */
.unified-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px 24px;
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.05) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .unified-modal-footer {
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.02) 0%,
            rgba(0, 0, 0, 0.01) 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* 弹窗按钮样式 */
.unified-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 80px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.unified-modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.unified-modal-btn:hover::before {
    left: 100%;
}

.unified-modal-btn:active {
    transform: scale(0.98);
}

/* 涓昏按钮锛堢‘璁わ級 */
.unified-modal-btn.primary {
    background: linear-gradient(135deg, #00d4aa 0%, var(--accent-primary) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.unified-modal-btn.primary:hover {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #008066 100%);
    box-shadow: 0 6px 16px rgba(0, 212, 170, 0.4);
    transform: translateY(-2px);
}

/* 娆¤按钮锛堝彇娑堬級 */
.unified-modal-btn.secondary {
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border-secondary);
}

.unified-modal-btn.secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

/* 鍗遍櫓按钮锛堝垹闄わ級 */
.unified-modal-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.unified-modal-btn.danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

/* 动画效果 */
@keyframes unifiedModalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(12px);
    }
}

@keyframes unifiedModalFadeOut {
    from {
        opacity: 1;
        backdrop-filter: blur(12px);
    }

    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

@keyframes scanLine {

    0%,
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }

    50% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    50% {
        transform: translateX(100%) rotate(45deg);
    }

    100% {
        transform: translateX(200%) rotate(45deg);
    }
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .unified-modal-container {
        min-width: 350px;
        width: 95vw;
        margin: 0 10px;
    }

    .unified-modal-header,
    .unified-modal-content,
    .unified-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .unified-modal-title {
        font-size: 18px;
    }

    .unified-modal-message {
        font-size: 15px;
    }

    .unified-modal-footer {
        flex-direction: column;
        gap: 8px;
    }

    .unified-modal-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 浜ゆ槗鏍囪样式澧炲己 */
.execution-marker {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.execution-marker:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
    z-index: 1000;
}

.buy-marker:hover {
    box-shadow: 0 8px 25px rgba(0, 208, 132, 0.4) !important;
}

.sell-marker:hover {
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4) !important;
}

/* 鏍囪动画 */
@keyframes markerPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.execution-marker.pulse {
    animation: markerPulse 2s ease-in-out infinite;
}

/* 鏍囪鍑虹幇动画 */
@keyframes markerFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.execution-marker {
    animation: markerFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   鍥炴祴鐣岄潰样式
   ================================ */

/* 鍥炴祴内容容器 */
.backtest-content {
    height: 100%;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

/* 鍥炴祴绌虹姸鎬?*/
.backtest-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: var(--text-secondary);
}

.backtest-empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
    color: var(--accent-primary);
}

.backtest-empty-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* 鍥炴祴加载动画 */
.backtest-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    background: var(--bg-primary);
    z-index: 10;
}

.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 212, 255, 0.2);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--accent-primary);
    font-size: 16px;
    font-weight: 500;
}

/* 鍥炴祴缁撴灉鐣岄潰 */
.backtest-results {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 鏍囩椤靛鑸?*/
.backtest-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.backtest-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-family: inherit;
}

.backtest-tab:hover {
    color: var(--accent-primary);
}

.backtest-tab.active {
    color: var(--accent-primary);
}

.backtest-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
}

/* 面板切换 */
.backtest-panel {
    display: none;
    flex: 1;
    overflow: hidden;
}

.backtest-panel.active {
    display: flex !important;
    flex-direction: column;
    height: 100%;
}

/* 确定繚缁熶竴鍥炴祴鍒嗘瀽面板鑳藉姝ｇ‘鏄剧ず */
#unified-analysis-panel.active {
    display: flex !important;
    flex-direction: column;
    height: 100%;
}

/* 姒傝缁熻缃戞牸 */
.overview-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px;
}

.stat-card {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    border-color: rgba(0, 212, 255, 0.3);
}

/* 暗黑主题下的概览卡片样式 */
[data-theme="darkblack"] .stat-card {
    background: rgba(13, 14, 15, 0.6);
    border: 1px solid rgba(0, 212, 170, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="darkblack"] .stat-card:hover {
    background: rgba(13, 14, 15, 0.8);
    border-color: rgba(0, 212, 170, 0.4);
    box-shadow: 0 8px 32px rgba(0, 212, 170, 0.2);
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #ffffff;
    font-weight: 700;
    font-size: 28px;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.stat-value.positive {
    color: #00d4aa;
    text-shadow: 0 0 15px rgba(0, 212, 170, 0.3);
}

.stat-value.negative {
    color: #f43f5e;
    text-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
}

/* 鏃х殑鎸囨爣缃戞牸样式 - 淇濈暀鐢ㄤ簬鍏朵粬鍦版柟 */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.metric-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--success-color);
}

.metric-value.negative {
    color: var(--danger-color);
}

.metric-value.neutral {
    color: var(--text-primary);
}

/* 姒傝页面鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .overview-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
    }

    .stat-card {
        padding: 16px;
        background: rgba(30, 41, 59, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="darkblack"] .stat-card {
        background: rgba(13, 14, 15, 0.6);
        border: 1px solid rgba(0, 212, 170, 0.2);
    }

    .stat-value {
        font-size: 22px;
        color: #ffffff;
    }

    .stat-label {
        color: rgba(255, 255, 255, 0.7);
    }
}

@media (max-width: 480px) {
    .overview-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .stat-card {
        padding: 14px;
        background: rgba(30, 41, 59, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="darkblack"] .stat-card {
        background: rgba(13, 14, 15, 0.6);
        border: 1px solid rgba(0, 212, 170, 0.2);
    }

    .stat-value {
        font-size: 20px;
        color: #ffffff;
    }

    .stat-label {
        color: rgba(255, 255, 255, 0.7);
    }
}

/* 鏀剁泭鏇茬嚎 */
.equity-curve-container {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.6) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: all 0.3s ease;
}

.equity-curve-container:hover {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 212, 255, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.equity-curve-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.equity-curve-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff 0%, #0ea5e9 50%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.equity-curve-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.equity-curve-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.equity-curve-stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.equity-curve {
    position: relative;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.7) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.equity-curve::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(34, 197, 94, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

#equityChart {
    max-width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
    border-radius: 12px;
    cursor: crosshair;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#equityChart:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 1200px) {
    .chart-stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .stat-value {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .equity-curve-container {
        padding: 16px;
        margin: 0 -8px;
    }

    .equity-curve-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .equity-curve-stats {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
        font-size: 11px;
    }

    .equity-curve {
        height: 280px;
    }

    #equityChart {
        width: 100% !important;
        height: 280px !important;
    }

    .equity-curve-header h3 {
        font-size: 16px;
    }

    .chart-stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px;
        margin-bottom: 16px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stat-value {
        font-size: 13px;
    }

    .equity-chart-container {
        padding: 16px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .equity-curve-container {
        padding: 12px;
        border-radius: 12px;
    }

    .equity-curve-stats {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .equity-curve-stat {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .equity-curve {
        height: 240px;
    }

    #equityChart {
        width: 100% !important;
        height: 240px !important;
    }
}

/* 鏀剁泭鏇茬嚎动画效果 */
@keyframes equityCurveGlow {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    }

    50% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 212, 255, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
}

.equity-curve-container.animated {
    animation: equityCurveGlow 3s ease-in-out infinite;
}

/* 鏀剁泭鏇茬嚎加载鐘舵€?*/
.equity-curve.loading {
    background: linear-gradient(90deg,
            rgba(15, 23, 42, 0.9) 25%,
            rgba(30, 41, 59, 0.7) 50%,
            rgba(15, 23, 42, 0.9) 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* 璧勯噾鏇茬嚎图表加载鐘舵€?*/
.equity-chart-container.loading {
    position: relative;
    overflow: hidden;
}

.equity-chart-container.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
    animation: chart-loading-shimmer 2s infinite;
    z-index: 3;
}

@keyframes chart-loading-shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* 图表绌虹姸鎬?*/
.equity-chart-container.empty::after {
    content: '鏆傛棤数据';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    z-index: 2;
}

/* 浜ゆ槗琛ㄦ牸 */
.trades-table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    /* 鍗犳弧鐖跺鍣?*/
    height: 100%;
    /* 确定繚楂樺害濉弧 */
    min-height: 0;
    /* 鍏佽缂╁皬 */
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* 确定繚琛ㄦ牸鍦ㄦ湁滚动鏉℃椂涔熻兘姝ｇ‘瀵归綈 */
    position: relative;
}

.trades-table thead {
    background: var(--bg-tertiary);
    flex-shrink: 0;
    /* 琛ㄥご涓嶇缉鏀?*/
}

.trades-table thead tr {
    display: flex;
    width: 100%;
    box-sizing: border-box;
}

.trades-table tbody {
    flex: 1;
    display: block;
    /* 璁剧疆滚动鏉℃寜闇€鏄剧ず */
    overflow-y: auto;
    /* Firefox 滚动鏉℃牱寮?*/
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.trades-table tbody tr {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    /* 铏氭嫙滚动锛氳浣跨敤缁濆瀹氫綅 */
    /* position: absolute; - 鐢?JavaScript 鍔ㄦ€佽缃?*/
}

.trades-table th,
.trades-table td {
    padding: 12px 8px;
    text-align: center;
    /* 灞呬腑鏄剧ず */
    border-bottom: 1px solid var(--border-color);
    flex: 1;
    /* 鎵€鏈夊垪鍧囧垎瀹藉害 */
    min-width: 0;
    /* 鍏佽内容鏀剁缉 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.trades-table th {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trades-table td {
    color: var(--text-primary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 琛ㄦ牸鍐呮暟瀛楀拰鏃堕棿鐨勫榻?*/
.trades-table td:nth-child(1),
/* 鏃堕棿 */
.trades-table td:nth-child(3),
/* 浠锋牸 */
.trades-table td:nth-child(4),
/* 鏁伴噺 */
.trades-table td:nth-child(5),
/* 鏉犳潌 */
.trades-table td:nth-child(8)

/* 鐩堜簭 */
    {
    font-variant-numeric: tabular-nums;
    /* 绛夊鏁板瓧 */
}

.trades-table tbody tr:hover {
    background: var(--bg-hover);
}

.trades-table tbody tr:last-child td {
    border-bottom: none;
}

/* 鑷畾涔夋粴鍔ㄦ潯样式 - 鏇寸粏涓斾笉鍗犵敤甯冨眬绌洪棿 */
.trades-table tbody::-webkit-scrollbar {
    width: 4px;
}

.trades-table tbody::-webkit-scrollbar-track {
    background: transparent;
}

.trades-table tbody::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
    /* 浣挎粴鍔ㄦ潯娴姩鍦ㄥ唴瀹逛笂鏂?*/
    background-clip: padding-box;
}

.trades-table tbody::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}



.trade-direction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    min-width: 50px;
    white-space: nowrap;
}

.trade-direction.long {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.trade-direction.short {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.trade-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    min-width: 50px;
    white-space: nowrap;
}

.trade-status.open {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border-radius: 4px;
}

.trade-status.stopLoss {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-radius: 4px;
}

.trade-status.stopProfit {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border-radius: 4px;
}

.trade-status.pending {
    background: rgba(245, 158, 11, 0.2);
    /* Orange semi-transparent background */
    color: #f59e0b;
    /* Orange text */
    border-radius: 4px;
}

.trade-profit {
    font-weight: 600;
}

.trade-profit.positive {
    color: var(--success-color);
}

.trade-profit.negative {
    color: var(--danger-color);
}

.trade-profit.neutral {
    color: var(--text-secondary);
}

/* 娴姩鐩堜簭样式 */
.floating-pnl,
.floating-return {
    animation: floatingPnlBlink 1s ease-in-out infinite alternate;
}

@keyframes floatingPnlBlink {
    0% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

/* 娴姩鐩堜簭鏁板瓧鍙樺寲动画 */
.trade-profit {
    transition: color 0.3s ease, background-color 0.3s ease;
}

.trade-profit.positive {
    animation: profitFlash 0.5s ease;
}

.trade-profit.negative {
    animation: lossFlash 0.5s ease;
}

@keyframes profitFlash {
    0% {
        background-color: rgba(0, 255, 136, 0.1);
    }

    100% {
        background-color: transparent;
    }
}

@keyframes lossFlash {
    0% {
        background-color: rgba(255, 71, 87, 0.1);
    }

    100% {
        background-color: transparent;
    }
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }

    .metric-card {
        padding: 12px;
    }

    .metric-value {
        font-size: 16px;
    }

    .backtest-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .backtest-tabs::-webkit-scrollbar {
        display: none;
    }

    .backtest-tab {
        flex-shrink: 0;
        padding: 10px 16px;
        font-size: 13px;
    }

    .trades-table-container {
        min-height: 300px;
        /* 绉诲姩绔渶灏忛珮搴?*/
        flex: 1;
        /* 鍗犳弧鐖跺鍣?*/
    }

    .trades-table th,
    .trades-table td {
        padding: 8px 4px;
        font-size: 12px;
        flex: 1;
        /* 绉诲姩绔篃浣跨敤鍧囧垎瀹藉害 */
    }

    .backtest-content {
        padding: 15px;
    }
}

/* 策略配置弹窗样式 */
.strategy-config-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.strategy-config-modal.show {
    opacity: 1;
    visibility: visible;
}

.strategy-config-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.strategy-config-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 480px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-primary);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.strategy-config-modal.show .strategy-config-panel {
    transform: translateX(0);
}

.strategy-config-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-primary);
    position: relative;
}

.strategy-config-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-gradient);
    opacity: 0.5;
}

.strategy-config-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.strategy-config-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.strategy-config-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: scale(1.1);
}

.strategy-config-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-secondary) transparent;
}

.strategy-config-content::-webkit-scrollbar {
    width: 6px;
}

.strategy-config-content::-webkit-scrollbar-track {
    background: transparent;
}

.strategy-config-content::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 3px;
}

.strategy-config-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 婊戝潡琛岀壒娈婃牱寮?*/
.form-row#positionSliderRow {
    overflow: visible;
    min-width: 0;
}

.form-row#positionSliderRow .slider-header label {
    margin-bottom: 0;
}

.form-row label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-row label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.6;
}

.form-row select,
.form-row input {
    padding: 12px 16px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    outline: none;
}

.form-row select:focus,
.form-row input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
    background: var(--bg-tertiary);
}

.form-row select:hover,
.form-row input:hover {
    border-color: var(--border-secondary);
    background: var(--bg-tertiary);
}

.form-row input::placeholder {
    color: var(--text-muted);
}

.filter-config-btn {
    padding: 12px 16px;
    border: 1px dashed var(--border-secondary);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-muted);
    font-size: 14px;
    cursor: not-allowed;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.strategy-config-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-primary);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-cancel,
.btn-confirm {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.btn-cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-confirm {
    background: var(--accent-gradient);
    color: white;
    position: relative;
    min-width: 100px;
}

.btn-confirm::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-confirm:hover::before {
    left: 100%;
}

.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.btn-confirm:active {
    transform: translateY(0);
}

/* 琛ㄥ崟楠岃瘉样式 */
.form-row input:invalid,
.form-row select:invalid {
    border-color: var(--error-color);
}

.form-row input:invalid:focus,
.form-row select:invalid:focus {
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

/* 浣欓鍜屽紑浠撳紶鏁版樉绀烘牱寮?*/
.max-position-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-top: 4px;
}

.balance-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.balance-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.balance-info span:last-child {
    color: var(--accent-primary);
    font-weight: 600;
}

.max-position-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.max-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.max-position-display span:last-child {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 16px;
}

/* 閲忓瓙绉戞妧婊戝潡样式 - 鍏ㄦ柊璁捐 */
.quantum-slider-container {
    position: relative;
    padding: 24px;
    background: linear-gradient(135deg,
            rgba(15, 23, 42, 0.95) 0%,
            rgba(30, 41, 59, 0.9) 30%,
            rgba(15, 23, 42, 0.95) 100%);
    border: 2px solid transparent;
    border-radius: 20px;
    margin: 16px 0;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    overflow: visible;
    min-height: 140px;
    z-index: 10;
    isolation: isolate;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quantum-slider-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            #00d4aa 0%,
            #00a8ff 25%,
            #667eea 50%,
            #764ba2 75%,
            #00d4aa 100%);
    background-size: 400% 400%;
    border-radius: 20px;
    z-index: -1;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.modern-slider-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(0, 0, 0, 0.02) 100%);
    border-radius: 16px;
    pointer-events: none;
}

/* 閲忓瓙婊戝潡头部样式 */
.slider-header-quantum {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.slider-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow:
        0 4px 16px rgba(0, 212, 170, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        box-shadow:
            0 4px 16px rgba(0, 212, 170, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow:
            0 6px 24px rgba(0, 212, 170, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.slider-label-quantum {
    margin: 0;
    font-weight: 700;
    font-size: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: 0.5px;
}

.slider-metrics {
    display: flex;
    align-items: center;
    gap: 16px;
}

.percentage-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg,
            rgba(0, 212, 170, 0.1) 0%,
            rgba(0, 168, 255, 0.1) 100%);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 170, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.percentage-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 170, 0.2);
    border-color: rgba(0, 212, 170, 0.4);
}

.percentage-value {
    color: #00d4aa;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 10px rgba(0, 212, 170, 0.3);
}

.percentage-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* 閲忓瓙婊戝潡涓诲尯鍩?*/
.quantum-slider-main {
    position: relative;
    margin: 20px 0;
    min-height: 60px;
}

.slider-background-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 200%;
    background: radial-gradient(ellipse,
            rgba(0, 212, 170, 0.1) 0%,
            rgba(0, 168, 255, 0.05) 40%,
            transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    animation: backgroundPulse 4s ease-in-out infinite;
}

@keyframes backgroundPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.slider-track-quantum {
    position: relative;
    height: 12px;
    background: linear-gradient(145deg,
            rgba(15, 23, 42, 0.8) 0%,
            rgba(30, 41, 59, 0.6) 50%,
            rgba(15, 23, 42, 0.8) 100%);
    border-radius: 12px;
    margin: 20px 12px;
    border: 1px solid rgba(0, 212, 170, 0.2);
    overflow: visible;
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        0 2px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* 婊戝潡鍒嗘鎸囩ず鍣?*/
.slider-segments {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 6px;
    z-index: 1;
}

.segment {
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0.1) 100%);
    border-radius: 1px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.segment:hover {
    opacity: 1;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* 閲忓瓙杩涘害鏉?*/
.slider-progress-quantum {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg,
            #00d4aa 0%,
            #00c4aa 20%,
            #00a8ff 60%,
            #667eea 80%,
            #764ba2 100%);
    border-radius: 12px;
    width: 1%;
    transition: width 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 20px rgba(0, 212, 170, 0.6),
        0 0 40px rgba(0, 212, 170, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 3;
}

.slider-progress-quantum::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 30%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0.3) 70%,
            transparent 100%);
    animation: progressShimmer 2s ease-in-out infinite;
    border-radius: 12px;
}

@keyframes progressShimmer {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* 绮掑瓙效果 */
.slider-particles {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    transform: translateY(-50%);
    z-index: 2;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #00d4aa 0%, transparent 70%);
    border-radius: 50%;
    animation: particleFlow 3s linear infinite;
    opacity: 0;
}

.particle:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 50%;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    left: 80%;
    animation-delay: 2s;
}

@keyframes particleFlow {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(0);
    }

    10% {
        opacity: 1;
        transform: scale(1) translateY(-10px);
    }

    90% {
        opacity: 1;
        transform: scale(1) translateY(10px);
    }

    100% {
        opacity: 0;
        transform: scale(0.5) translateY(0);
    }
}

.slider-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* 婊戝潡交互澧炲己动画 */
@keyframes sliderPulse {
    0% {
        box-shadow:
            0 6px 20px rgba(0, 212, 170, 0.4),
            0 2px 8px rgba(0, 0, 0, 0.15),
            inset 0 1px 3px rgba(255, 255, 255, 0.5);
    }

    50% {
        box-shadow:
            0 8px 25px rgba(0, 212, 170, 0.6),
            0 4px 12px rgba(0, 0, 0, 0.2),
            inset 0 1px 3px rgba(255, 255, 255, 0.6);
    }

    100% {
        box-shadow:
            0 6px 20px rgba(0, 212, 170, 0.4),
            0 2px 8px rgba(0, 0, 0, 0.15),
            inset 0 1px 3px rgba(255, 255, 255, 0.5);
    }
}

@keyframes progressGlow {
    0% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 2px 8px rgba(0, 212, 170, 0.3);
    }

    50% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.5),
            0 3px 12px rgba(0, 212, 170, 0.5);
    }

    100% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 2px 8px rgba(0, 212, 170, 0.3);
    }
}

/* 婊戝潡婵€娲荤姸鎬?*/
.modern-slider-container:focus-within {
    border-color: rgba(0, 212, 170, 0.5);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 3px rgba(0, 212, 170, 0.1);
}

.modern-slider-container:focus-within .slider-progress {
    animation: progressGlow 2s ease-in-out infinite;
}

.modern-slider-container:focus-within #positionSlider::-webkit-slider-thumb {
    animation: sliderPulse 2s ease-in-out infinite;
}

.modern-slider-container:focus-within #positionSlider::-moz-range-thumb {
    animation: sliderPulse 2s ease-in-out infinite;
}

/* 鎷栨嫿鐘舵€佹牱寮?*/
.modern-slider-container.slider-dragging {
    box-shadow:
        0 6px 30px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 4px rgba(0, 212, 170, 0.15);
    transform: translateY(-1px);
    transition: none;
}

.modern-slider-container.slider-dragging .slider-progress {
    animation: progressGlow 1s ease-in-out infinite;
}

.modern-slider-container.slider-dragging #positionSlider::-webkit-slider-thumb {
    transform: scale(1.08);
    box-shadow:
        0 3px 12px rgba(0, 212, 170, 0.5),
        0 1px 6px rgba(0, 0, 0, 0.2);
    transition: none;
}

.modern-slider-container.slider-dragging #positionSlider::-moz-range-thumb {
    transform: scale(1.08);
    box-shadow:
        0 3px 12px rgba(0, 212, 170, 0.5),
        0 1px 6px rgba(0, 0, 0, 0.2);
    transition: none;
}

/* 瑙︽懜璁惧优化 */
@media (hover: none) and (pointer: coarse) {
    #positionSlider::-webkit-slider-thumb {
        height: 36px;
        width: 36px;
        border: 4px solid rgba(255, 255, 255, 0.95);
    }

    #positionSlider::-moz-range-thumb {
        height: 36px;
        width: 36px;
        border: 4px solid rgba(255, 255, 255, 0.95);
    }

    .slider-track {
        height: 16px;
    }

    .modern-slider-container {
        min-height: 120px;
    }

    .modern-slider-container.slider-dragging #positionSlider::-webkit-slider-thumb {
        transform: scale(1.1);
    }

    .modern-slider-container.slider-dragging #positionSlider::-moz-range-thumb {
        transform: scale(1.1);
    }
}

/* 閲忓瓙婊戝潡鎵嬫焺 */
.slider-thumb-quantum {
    position: absolute;
    top: 50%;
    left: 1%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 10;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.thumb-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 50%;
    box-shadow:
        0 0 0 2px #00d4aa,
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.thumb-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-radius: 50%;
    background: linear-gradient(45deg, #00d4aa, #00a8ff) padding-box,
        linear-gradient(45deg, #00d4aa, #00a8ff) border-box;
    animation: ringRotate 4s linear infinite;
}

@keyframes ringRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.thumb-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* 閲忓瓙输入框*/
.quantum-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: grab;
    margin: 0;
    z-index: 5;
    opacity: 0;
}

.quantum-input:active {
    cursor: grabbing;
}

.quantum-input::-webkit-slider-track {
    background: transparent;
    height: 100%;
    border: none;
    outline: none;
}

.quantum-input::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 0;
    height: 0;
    background: transparent;
    border: none;
    cursor: grab;
}

.quantum-input::-webkit-slider-thumb:active {
    cursor: grabbing;
}

.quantum-input::-moz-range-track {
    background: transparent;
    height: 100%;
    border: none;
    outline: none;
}

.quantum-input::-moz-range-thumb {
    appearance: none;
    width: 0;
    height: 0;
    background: transparent;
    border: none;
    cursor: grab;
}

.quantum-input::-moz-range-thumb:active {
    cursor: grabbing;
}

#positionSlider::-webkit-slider-track {
    background: transparent;
    height: 100%;
    border: none;
    outline: none;
}

#positionSlider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg,
            #00d4aa 0%,
            #00c4aa 25%,
            #00a8ff 75%,
            #0088ff 100%);
    cursor: grab;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 2px 8px rgba(0, 212, 170, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.1s ease, transform 0.05s ease;
    position: relative;
}

#positionSlider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow:
        0 4px 12px rgba(0, 212, 170, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 1);
}

#positionSlider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.05);
    box-shadow:
        0 2px 8px rgba(0, 212, 170, 0.5),
        0 1px 4px rgba(0, 0, 0, 0.2);
    transition: none;
}

/* Firefox 样式 */
#positionSlider::-moz-range-track {
    background: transparent;
    height: 100%;
    border: none;
    outline: none;
}

#positionSlider::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg,
            #00d4aa 0%,
            #00c4aa 25%,
            #00a8ff 75%,
            #0088ff 100%);
    cursor: grab;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 2px 8px rgba(0, 212, 170, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.1s ease, transform 0.05s ease;
}

#positionSlider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow:
        0 4px 12px rgba(0, 212, 170, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.15);
}

#positionSlider::-moz-range-thumb:active {
    cursor: grabbing;
    transform: scale(1.05);
    box-shadow:
        0 2px 8px rgba(0, 212, 170, 0.5),
        0 1px 4px rgba(0, 0, 0, 0.2);
    transition: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    gap: 12px;
    height: 32px;
    position: relative;
    z-index: 2;
}

.min-label,
.max-label {
    font-weight: 600;
    color: var(--text-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 40px;
    text-align: center;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.min-label:hover,
.max-label:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.slider-value {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary);
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-primary);
    min-width: 60px;
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
}

.slider-value::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(0, 212, 170, 0.1) 50%,
            transparent 100%);
    transition: left 0.5s ease;
}

.slider-value:hover::before {
    left: 100%;
}

/* 閲忓瓙婊戝潡搴曢儴信息鏍?*/
.slider-footer-quantum {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 0 4px;
    position: relative;
    z-index: 2;
}

.value-display-quantum {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.current-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    background: linear-gradient(135deg,
            rgba(0, 212, 170, 0.1) 0%,
            rgba(0, 168, 255, 0.1) 100%);
    padding: 12px 20px;
    border-radius: 16px;
    border: 1px solid rgba(0, 212, 170, 0.3);
    backdrop-filter: blur(10px);
    box-shadow:
        0 4px 20px rgba(0, 212, 170, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.current-value:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 32px rgba(0, 212, 170, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 212, 170, 0.5);
}

.value-number {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    line-height: 1;
}

.value-unit {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.value-range {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.value-range:hover {
    opacity: 1;
}

.min-value,
.max-value {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    padding: 4px 8px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.min-value:hover,
.max-value:hover {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 212, 170, 0.3);
    box-shadow: 0 2px 8px rgba(0, 212, 170, 0.2);
}

.range-separator {
    width: 20px;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 100%);
    position: relative;
}

.range-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: rgba(0, 212, 170, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 212, 170, 0.4);
}

/* 鐢垫簮鎸囩ず鍣?*/
.power-indicator {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.power-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.power-dot.active {
    background: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
    border-color: rgba(0, 212, 170, 0.5);
    box-shadow:
        0 0 12px rgba(0, 212, 170, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: powerDotPulse 2s ease-in-out infinite;
}

@keyframes powerDotPulse {

    0%,
    100% {
        box-shadow:
            0 0 12px rgba(0, 212, 170, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }

    50% {
        box-shadow:
            0 0 20px rgba(0, 212, 170, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

/* 閲忓瓙婊戝潡交互鐘舵€?*/
.quantum-slider-container:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.quantum-slider-container.quantum-dragging {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 6px 20px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.4);
    border-width: 3px;
}

.quantum-slider-container.quantum-dragging::before {
    animation-duration: 2s;
}

.quantum-slider-container.quantum-dragging .slider-progress-quantum {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 0 30px rgba(0, 212, 170, 0.8),
        0 0 60px rgba(0, 212, 170, 0.5);
}

.quantum-slider-container.quantum-dragging .slider-thumb-quantum {
    transform: translate(-50%, -50%) scale(1.2);
}

.quantum-slider-container.quantum-dragging .thumb-ring {
    animation-duration: 1s;
}

.quantum-slider-container.quantum-dragging .thumb-glow {
    animation-duration: 1s;
    opacity: 1;
}

.quantum-slider-container.quantum-dragging .particle {
    animation-duration: 1.5s;
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .execution-marker {
        font-size: 14px !important;
        padding: 6px 12px !important;
    }

    .strategy-config-panel {
        width: 100%;
        max-width: 420px;
    }

    .strategy-config-content {
        padding: 20px;
    }

    .form-row {
        gap: 6px;
    }

    /* 绉诲姩绔粦鍧椾紭鍖?- 鐜颁唬鍖栬璁?*/
    .modern-slider-container {
        padding: 14px 16px 18px 16px;
        margin: 6px 0;
        min-height: 110px;
        border-radius: 14px;
        box-shadow:
            0 3px 15px rgba(0, 0, 0, 0.1),
            0 1px 6px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .slider-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
        height: 32px;
        min-height: 32px;
    }

    .slider-header label {
        font-size: 13px;
        font-weight: 600;
    }

    .slider-percentage {
        font-size: 11px;
        padding: 4px 10px;
        border-radius: 16px;
        box-shadow:
            0 2px 8px rgba(0, 212, 170, 0.3),
            0 1px 2px rgba(0, 0, 0, 0.15);
    }

    .slider-track {
        height: 14px;
        margin: 12px 2px 18px 2px;
        border-radius: 10px;
        box-shadow:
            inset 0 2px 5px rgba(0, 0, 0, 0.12),
            0 1px 3px rgba(255, 255, 255, 0.1);
    }

    #positionSlider::-webkit-slider-thumb {
        height: 28px;
        width: 28px;
        border: 2px solid rgba(255, 255, 255, 0.9);
        box-shadow:
            0 3px 10px rgba(0, 212, 170, 0.4),
            0 1px 4px rgba(0, 0, 0, 0.15);
    }

    #positionSlider::-webkit-slider-thumb:hover {
        transform: scale(1.08);
    }

    #positionSlider::-webkit-slider-thumb:active {
        transform: scale(1.05);
    }

    #positionSlider::-moz-range-thumb {
        height: 28px;
        width: 28px;
        border: 2px solid rgba(255, 255, 255, 0.9);
        box-shadow:
            0 3px 10px rgba(0, 212, 170, 0.4),
            0 1px 4px rgba(0, 0, 0, 0.15);
    }

    .slider-labels {
        font-size: 11px;
        margin-top: 6px;
        gap: 8px;
        height: 28px;
    }

    .min-label,
    .max-label {
        min-width: 36px;
        font-size: 11px;
        padding: 3px 6px;
        border-radius: 6px;
    }

    .slider-value {
        font-size: 14px;
        padding: 4px 10px;
        min-width: 50px;
        border-radius: 8px;
    }

    /* 閲忓瓙婊戝潡绉诲姩绔紭鍖?*/
    .quantum-slider-container {
        padding: 18px;
        min-height: 120px;
        margin: 12px 0;
        border-radius: 16px;
    }

    .slider-header-quantum {
        margin-bottom: 16px;
    }

    .slider-icon {
        width: 28px;
        height: 28px;
    }

    .slider-label-quantum {
        font-size: 14px;
    }

    .percentage-value {
        font-size: 16px;
    }

    .percentage-label {
        font-size: 9px;
    }

    .quantum-slider-main {
        min-height: 50px;
        margin: 16px 0;
    }

    .slider-track-quantum {
        height: 16px;
        margin: 16px 8px;
    }

    .slider-thumb-quantum {
        width: 28px;
        height: 28px;
    }

    .thumb-core {
        width: 16px;
        height: 16px;
    }

    .thumb-ring {
        width: 24px;
        height: 24px;
    }

    .thumb-glow {
        width: 36px;
        height: 36px;
    }

    .current-value {
        padding: 10px 16px;
        border-radius: 12px;
    }

    .value-number {
        font-size: 20px;
    }

    .value-unit {
        font-size: 12px;
    }

    .min-value,
    .max-value {
        font-size: 11px;
        padding: 3px 6px;
    }

    .power-dot {
        width: 10px;
        height: 10px;
    }

    .quantum-slider-container.quantum-dragging {
        transform: translateY(-2px) scale(1.01);
    }

    .strategy-config-footer {
        padding: 16px 20px;
        flex-direction: column;
    }

    .btn-cancel,
    .btn-confirm {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .strategy-config-panel {
        width: 100%;
    }
}

/* 策略鍏紑璁剧疆弹窗样式 */
.strategy-public-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.strategy-public-modal.show {
    display: flex;
}

.strategy-public-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
}

[data-theme="light"] .strategy-public-modal .strategy-public-modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.strategy-public-modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

[data-theme="light"] .strategy-public-modal-content {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.1);
    background: var(--bg-primary);
}

.strategy-public-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-primary);
}

.strategy-public-modal-header h3 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.strategy-public-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.strategy-public-modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.strategy-public-modal-body {
    padding: 24px;
    box-sizing: border-box;
}

.strategy-info {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
}

.strategy-name {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.strategy-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.public-options {
    margin-bottom: 24px;
}

.option-group {
    margin-bottom: 16px;
}

.option-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
}

.option-label:hover {
    border-color: var(--accent-color);
    background: var(--bg-hover);
}

.option-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-primary);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.option-label input[type="radio"]:checked+.radio-custom {
    border-color: var(--accent-color);
    background: var(--accent-color);
}

.option-label input[type="radio"]:checked+.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.option-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.option-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

.price-input-group {
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-top: 16px;
    box-sizing: border-box;
}

.price-label {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.price-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.price-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.price-hint {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 6px;
}

.strategy-public-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

.strategy-public-modal-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.strategy-public-modal-btn.cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.strategy-public-modal-btn.cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.strategy-public-modal-btn.confirm {
    background: var(--accent-gradient);
    color: white;
}

.strategy-public-modal-btn.confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .strategy-public-modal-content {
        width: 95%;
        max-width: none;
        margin: 20px;
    }

    .strategy-public-modal-body {
        padding: 20px;
    }

    .strategy-public-modal-footer {
        padding: 16px 20px;
        flex-direction: column;
    }

    .strategy-public-modal-btn {
        width: 100%;
    }

    .price-input-group {
        padding: 12px;
    }

    .option-label {
        padding: 12px;
    }
}

/* 策略鎺堟潈弹窗样式 */
.strategy-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
}

.strategy-auth-modal.show {
    display: flex;
}

.strategy-auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
}

[data-theme="light"] .strategy-auth-modal .strategy-auth-modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.strategy-auth-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

[data-theme="light"] .strategy-auth-modal-content {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.1);
    background: var(--bg-primary);
}

.strategy-auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-primary);
}

.strategy-auth-modal-header h3 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.strategy-auth-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.strategy-auth-modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.strategy-auth-modal-body {
    padding: 24px;
    box-sizing: border-box;
}

/* 鎺堟潈閫夐」鍗℃牱寮?*/
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-primary);
}

.auth-tab-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.auth-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.auth-tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* 鎺堟潈内容鍖哄煙 */
.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
}

.auth-input-group {
    margin-bottom: 20px;
}

.auth-label {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.auth-input,
.auth-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.auth-input:focus,
.auth-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.auth-textarea {
    resize: vertical;
    min-height: 80px;
}

.auth-hint {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

/* 鎺堟潈璁板綍样式 */

.auth-record-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.auth-line {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
}

.auth-records-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 12px;
    /* 确定繚滚动鏉″缁堝彲瑙?*/
    scrollbar-gutter: stable;
}

/* 鑷畾涔夋粴鍔ㄦ潯样式 */
.auth-records-list::-webkit-scrollbar {
    width: 8px;
}

.auth-records-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-records-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-records-list::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

.auth-records-list::-webkit-scrollbar-corner {
    background: var(--bg-tertiary);
}

/* 浜壊主题下的滚动鏉℃牱寮?*/
[data-theme="light"] .auth-records-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .auth-records-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .auth-records-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Firefox滚动鏉℃牱寮?*/
.auth-records-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.05);
}

/* 浜壊主题下的Firefox滚动鏉?*/
[data-theme="light"] .auth-records-list {
    scrollbar-color: rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0.05);
}

.auth-record-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.auth-record-item:hover {
    border-color: var(--border-hover);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-record-item.active {
    border-color: var(--accent-color);
}

.auth-record-item.pending {
    border-color: #f59e0b;
}

.auth-record-item.accepted {
    border-color: #10b981;
}

.auth-record-item.expired {
    border-color: #6b7280;
    opacity: 0.7;
}

.auth-record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.auth-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-uid {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.auth-username {
    color: var(--text-muted);
    font-size: 12px;
}

.auth-email {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.auth-account {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.auth-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.auth-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.auth-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.auth-status.accepted {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.auth-status.rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.auth-record-body {
    margin-bottom: 16px;
}

.auth-time {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 8px;
}

.auth-remark {
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.4;
}

.auth-record-actions {
    display: flex;
    gap: 8px;
}

.auth-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-action-btn.revoke-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-action-btn.revoke-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.auth-action-btn.resend-btn {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.auth-action-btn.resend-btn:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.auth-action-btn.cancel-btn {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.auth-action-btn.cancel-btn:hover:not(:disabled) {
    background: rgba(107, 114, 128, 0.2);
    border-color: rgba(107, 114, 128, 0.5);
}

.auth-action-btn.delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-action-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.auth-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* 鎺堟潈弹窗搴曢儴按钮 */
.strategy-auth-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

.strategy-auth-modal-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.strategy-auth-modal-btn.cancel {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.strategy-auth-modal-btn.cancel:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.strategy-auth-modal-btn.confirm {
    background: var(--accent-gradient);
    color: white;
}

.strategy-auth-modal-btn.confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .strategy-auth-modal-content {
        width: 95%;
        max-width: none;
        margin: 20px;
    }

    .strategy-auth-modal-body {
        padding: 20px;
    }

    .strategy-auth-modal-footer {
        padding: 16px 20px;
        flex-direction: column;
    }

    .strategy-auth-modal-btn {
        width: 100%;
    }

    .auth-tabs {
        flex-direction: column;
        gap: 0;
    }

    .auth-tab-btn {
        border-bottom: none;
        border-right: 2px solid transparent;
        border-radius: 0;
    }

    .auth-tab-btn.active {
        border-right-color: var(--accent-color);
        border-bottom-color: transparent;
    }
}

.strategy-summary {
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin-bottom: 20px;
}

.strategy-summary-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 6px 6px 0 0;
}

.strategy-summary-header h4 {
    margin: 0 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.strategy-summary-content {
    padding: 16px;
}

.strategy-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.strategy-description p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.strategy-description p:last-child {
    margin-bottom: 0;
}

/* 璐拱按钮样式 */
.purchase-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.purchase-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}

.purchase-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.purchase-btn svg {
    width: 14px;
    height: 14px;
}

/* 宸茶喘涔版寜閽牱寮?*/
.purchased-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: default;
    white-space: nowrap;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.purchased-btn svg {
    width: 14px;
    height: 14px;
    color: #10b981;
}

/* 浜壊主题下的璐拱按钮閫傞厤 */
[data-theme="light"] .purchased-btn {
    background: #ffffff;
    color: #666666;
    border-color: #e0e0e0;
}

/* 璐拱弹窗样式 */
.purchase-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.purchase-modal.show {
    opacity: 1;
    visibility: visible;
}

.purchase-modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 0;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-primary);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.purchase-modal.show .purchase-modal-content {
    transform: scale(1) translateY(0);
}

.purchase-modal-header {
    background: linear-gradient(135deg, #10b981, #059669);
    padding: 24px;
    text-align: center;
    position: relative;
}

.purchase-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.purchase-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.purchase-modal-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.purchase-modal-title {
    color: white;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.purchase-modal-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin: 8px 0 0 0;
    font-size: 14px;
}

.purchase-modal-body {
    padding: 24px;
}

.purchase-strategy-info {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-primary);
}

.purchase-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    align-items: center;
}

.purchase-info-item:last-child {
    margin-bottom: 0;
    padding-top: 12px;
    border-top: 1px solid var(--border-primary);
}

.purchase-info-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
}

.purchase-info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    max-width: 60%;
    text-align: right;
}

.purchase-price {
    color: #ef4444;
    font-weight: 700;
    font-size: 20px;
}

.purchase-benefits {
    margin-bottom: 24px;
}

.purchase-benefits-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.purchase-benefits-indicator {
    width: 4px;
    height: 16px;
    background: #10b981;
    border-radius: 2px;
}

.purchase-benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 3px solid #10b981;
    margin-bottom: 12px;
}

.purchase-benefit-item:last-child {
    margin-bottom: 0;
}

.purchase-benefit-check {
    background: #10b981;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.purchase-benefit-text {
    color: var(--text-primary);
    font-size: 14px;
}

.purchase-modal-actions {
    display: flex;
    gap: 12px;
}

.purchase-cancel-btn {
    flex: 1;
    padding: 14px;
    border: 2px solid var(--border-primary);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.purchase-cancel-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.purchase-confirm-btn {
    flex: 2;
    padding: 14px;
    border: none;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.purchase-confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.purchase-confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 浜壊主题閫傞厤 */
[data-theme="light"] .purchase-modal {
    background-color: rgba(0, 0, 0, 0.4);
}

.ai-history-action-btn.view {
    border-color: #3498db;
    color: #3498db;
}

.ai-history-action-btn.view:hover {
    background: #3498db;
    color: #ffffff;
}

.advanced-settings-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px 0;
}

.settings-group h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.threshold-controls,
.conflict-controls {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.threshold-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    color: var(--text-primary);
    white-space: nowrap;
}

.threshold-control label {
    min-width: auto;
    font-size: inherit;
}

.threshold-input {
    width: 100px;
    /* 淇濇寔鍘熸潵鐨勫搴?*/
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    /* 淇濇寔鍘熸潵鐨勫渾瑙?*/
    padding: 6px 8px;
    /* 淇濇寔鍘熸潵鐨勫唴杈硅窛 */
}

.conflict-select {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    /* 淇濇寔鍘熸潵鐨勫渾瑙?*/
    padding: 6px 8px;
    /* 淇濇寔鍘熸潵鐨勫唴杈硅窛 */
    min-width: 120px;
}

/* 鍝嶅簲寮忥細鍦ㄥ皬灞忓箷涓婁繚鎸佹í鍚戜絾鍏佽鎹㈣ */
@media (max-width: 768px) {

    .threshold-controls,
    .conflict-controls {
        gap: 12px;
    }
}




/* 鍘嗗彶璁㈠崟弹窗样式 */
.history-orders-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.history-orders-modal.show {
    display: flex;
    opacity: 1;
}

.history-orders-modal .modal-container {
    max-width: 1000px;
    max-height: 80vh;
    overflow-y: auto;
    margin-bottom: 20px;
    /* 娣诲姞搴曢儴闂磋窛 */
}

.history-orders-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-orders-modal .history-icon {
    font-size: 24px;
}

.history-orders-modal .strategy-name {
    color: #666;
    font-size: 14px;
    font-weight: normal;
}

/* 绛涢€夊櫒样式 */
.history-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.filter-group select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    min-width: 120px;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: #333333;
    transform: translateY(-1px);
}

/* 缁熻信息样式 */
.history-stats {
    display: flex;
    gap: 30px;
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-bottom: 20px;
    color: var(--text-primary);
}



.stat-label {
    font-size: 12px;
    opacity: 0.8;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
}

.stat-value.win {
    color: #4ade80;
}

.stat-value.loss {
    color: #f87171;
}

/* 璁㈠崟鍒楄〃样式 */
.history-orders-list {
    max-height: 400px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 8px;
    background: white;
    transition: all 0.2s;
}

.order-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}



.order-signal {
    width: 60px;
    text-align: center;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 12px;
}

.order-signal.long {
    background: #eeeeee;
    color: #000000;
}

.order-signal.short {
    background: #eeeeee;
    color: #000000;
}

.order-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
    align-items: center;
}

.order-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-label {
    font-size: 12px;
    color: #666;
}

.order-value {
    font-size: 14px;
    font-weight: 500;
}

.order-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.order-status.win {
    background: #eeeeee;
    color: #000000;
}

.order-status.loss {
    background: #eeeeee;
    color: #000000;
}

/* 鍒嗛〉样式 */
.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 15px;
}

.page-btn {
    padding: 8px 16px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: #333333;
}

.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.page-info {
    font-size: 14px;
    color: #666;
}

/* 加载鎸囩ず鍣?*/
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .history-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        justify-content: space-between;
    }

    .history-stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    .order-info {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}



/* 鍘嗗彶璁㈠崟暗色主题閫傞厤 */
:root .history-orders-modal .modal-container,
:root .history-orders-modal .strategy-name {
    background: var(--bg-primary);
    color: var(--text-primary);
}

:root .history-orders-modal .strategy-name {
    color: var(--text-muted);
}

/* 绛涢€夊櫒暗色主题 */
:root .history-filters {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
}

:root .filter-group label {
    color: var(--text-secondary);
}

:root .filter-group select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

:root .filter-group select:focus {
    border-color: var(--accent-primary);
    outline: none;
}

:root .refresh-btn {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

:root .refresh-btn:hover {
    background: var(--accent-hover);
}

/* 缁熻信息暗色主题 */
:root .history-stats {
    background: var(--accent-gradient);
    color: var(--text-primary);
}

/* 璁㈠崟卡片暗色主题 */
:root .order-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

:root .order-item:hover {
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-primary);
    border-color: var(--accent-primary);
}

:root .order-signal.long {
    background: var(--success-bg);
    color: var(--success-color);
}

:root .order-signal.short {
    background: var(--error-bg);
    color: var(--error-color);
}

:root .order-label {
    color: var(--text-muted);
}

:root .order-value {
    color: var(--text-primary);
}

:root .order-status.win {
    background: var(--success-bg);
    color: var(--success-color);
}

:root .order-status.loss {
    background: var(--error-bg);
    color: var(--error-color);
}

/* 鍒嗛〉暗色主题 */
:root .page-btn {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

:root .page-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

:root .page-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-disabled);
}

:root .page-info {
    color: var(--text-secondary);
}

/* 加载鎸囩ず鍣ㄦ殫鑹蹭富棰?*/
:root .loading-indicator {
    color: var(--text-secondary);
}

:root .spinner {
    border: 3px solid var(--bg-tertiary);
    border-top: 3px solid var(--accent-primary);
}

/* 鍏変寒主题鐗瑰畾瑕嗙洊 */
[data-theme="light"] .history-orders-modal .modal-container {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="light"] .history-orders-modal .strategy-name {
    color: #666;
}

[data-theme="light"] .history-filters {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .filter-group label {
    color: #666;
}

[data-theme="light"] .filter-group select {
    background: white;
    border: 1px solid #ddd;
    color: #333;
}

[data-theme="light"] .filter-group select:focus {
    border-color: #000000;
}

[data-theme="light"] .refresh-btn {
    background: #000000;
    color: white;
}

[data-theme="light"] .refresh-btn:hover {
    background: #333333;
}

[data-theme="light"] .order-item {
    background: white;
    border: 1px solid #e0e0e0;
    color: #333;
}

[data-theme="light"] .order-item:hover {
    background: #f8f8f8;
    border-color: #000000;
}

[data-theme="light"] .order-signal.long {
    background: #eeeeee;
    color: #000000;
}

[data-theme="light"] .order-signal.short {
    background: #eeeeee;
    color: #000000;
}

[data-theme="light"] .order-label {
    color: #666;
}

[data-theme="light"] .order-value {
    color: #333;
}

[data-theme="light"] .order-status.win {
    background: #eeeeee;
    color: #000000;
}

[data-theme="light"] .order-status.loss {
    background: #eeeeee;
    color: #000000;
}

[data-theme="light"] .page-btn {
    background: #000000;
    color: white;
}

[data-theme="light"] .page-btn:hover:not(:disabled) {
    background: #333333;
}

[data-theme="light"] .page-btn:disabled {
    background: #ccc;
    color: #666;
}

[data-theme="light"] .page-info {
    color: #666;
}

[data-theme="light"] .loading-indicator {
    color: #666;
}

[data-theme="light"] .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000000;
}

/* 缁熻信息暗色主题 */
:root .history-stats {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

[data-theme="light"] .history-stats {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    color: var(--text-primary);
}

/* 浜壊主题涓嬬粺璁′俊鎭皬卡片閰嶈壊 */
[data-theme="light"] .stat-label {
    color: var(--text-muted);
    opacity: 1;
}

[data-theme="light"] .stat-value {
    color: var(--text-primary);
}

[data-theme="light"] .stat-value.win {
    color: var(--success-color);
}

[data-theme="light"] .stat-value.loss {
    color: var(--error-color);
}

/* 浜壊主题涓嬫瑙堢粺璁″崱鐗囬厤鑹?*/
[data-theme="light"] .stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .stat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-primary);
}

[data-theme="light"] .stat-value.positive {
    color: var(--success-color);
    text-shadow: none;
}

[data-theme="light"] .stat-value.negative {
    color: var(--error-color);
    text-shadow: none;
}

/* 缁熻信息样式 - 缁熶竴优化鐗堟湰 */
.history-stats {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-bottom: 20px;
    color: var(--text-primary);
    flex-wrap: wrap;
    align-items: stretch;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.stat-item:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    white-space: nowrap;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.stat-value.win {
    color: #4ade80;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

.stat-value.loss {
    color: #f87171;
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .history-stats {
        gap: 12px;
        padding: 12px;
    }

    .stat-item {
        min-width: 100px;
        padding: 10px 12px;
        gap: 6px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .history-stats {
        gap: 8px;
        padding: 10px;
        justify-content: center;
    }

    .stat-item {
        min-width: 80px;
        padding: 8px 10px;
        gap: 4px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stat-value {
        font-size: 14px;
    }
}

/* 主题閫傞厤 */
[data-theme="light"] .history-stats {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    color: var(--text-primary);
}

[data-theme="light"] .stat-item {
    background: var(--bg-primary);
}

[data-theme="light"] .stat-item:hover {
    background: var(--bg-hover);
}

[data-theme="light"] .stat-label {
    color: var(--text-muted);
}

[data-theme="light"] .stat-value {
    color: var(--text-primary);
}

[data-theme="light"] .stat-value.win {
    color: var(--success-color);
}

[data-theme="light"] .stat-value.loss {
    color: var(--error-color);
}

/* 鍘嗗彶璁㈠崟弹窗专用容器 */
.history-modal-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    margin: 20px auto;
    background: var(--bg-panel);
    border-radius: 16px;
    box-shadow: var(--shadow-primary);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-orders-modal.show .history-modal-container {
    transform: scale(1);
    opacity: 1;
}

/* 绉诲姩绔€傞厤 */
@media (max-width: 768px) {
    .history-modal-container {
        width: 95%;
        max-height: 90vh;
        margin: 10px auto;
    }
}

/* 主题样式 */
[data-theme="light"] .history-modal-container {
    background: var(--bg-primary);
    color: var(--text-primary);
}



.history-orders-modal.show {
    opacity: 1;
}

.history-modal-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    background: var(--bg-panel);
    border-radius: 16px;
    box-shadow: var(--shadow-primary);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* 绉婚櫎margin锛岀敱鐖跺鍣ㄧ殑flex甯冨眬鏉ュ眳中*/
}

.history-orders-modal.show .history-modal-container {
    transform: scale(1);
    opacity: 1;
}

/* 绉诲姩绔€傞厤 */
@media (max-width: 768px) {
    .history-orders-modal {
        padding: 10px;
    }

    .history-modal-container {
        width: 95%;
        max-height: 90vh;
    }
}

/* 主题样式淇濇寔涓嶅彉 */
[data-theme="light"] .history-modal-container {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.strategy-btn.visibility-btn:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.strategy-btn.history-btn:hover {
    border-color: #000000;
    color: #000000;
    background: rgba(0, 0, 0, 0.1);
}

.strategy-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}


.order-status.win {
    background: #eeeeee;
    color: #000000;
}

.order-status.loss {
    background: #eeeeee;
    color: #000000;
}

.order-status.pending {
    background: rgba(0, 0, 0, 0.2);
    color: #000000;
}


:root .order-status.win {
    background: var(--success-bg);
    color: var(--success-color);
}

:root .order-status.loss {
    background: var(--error-bg);
    color: var(--error-color);
}

:root .order-status.pending {
    background: rgba(0, 0, 0, 0.2);
    color: #000000;
}

[data-theme="light"] .order-status.win {
    background: #eeeeee;
    color: #000000;
}

[data-theme="light"] .order-status.loss {
    background: #eeeeee;
    color: #000000;
}

[data-theme="light"] .order-status.pending {
    background: rgba(0, 0, 0, 0.2);
    color: #000000;
}




/* 鍘嗗彶璁㈠崟弹窗鐨勮櫄鍖栬儗鏅鐩栧眰 */
.history-orders-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 浜壊模式下的特殊背景 */
[data-theme="light"] .history-orders-modal .modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* 璧勯噾鏇茬嚎面板样式 */
#equity-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}



.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-primary);
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #00d4aa, #00b8d4);
    border-radius: 1px;
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, #00d4aa, #00b8d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon {
    color: #00d4aa;
    filter: drop-shadow(0 0 8px rgba(0, 212, 170, 0.3));
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 1200px) {
    .equity-chart-container canvas {
        width: 100% !important;
        height: 250px !important;
    }
}

@media (max-width: 768px) {
    .equity-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .equity-chart-container canvas {
        height: 200px !important;
    }

    .equity-records-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .equity-metrics {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .equity-chart-container canvas {
        height: 180px !important;
    }
}

#equity-curve-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-primary);
}


/* 鍏抽敭鎸囨爣卡片样式 */
.equity-metrics {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.metric-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.metric-card:hover::before {
    opacity: 0.05;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
    border-color: var(--accent-primary);
}

.metric-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    z-index: 1;
    position: relative;
}

.metric-content {
    flex: 1;
    z-index: 1;
    position: relative;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1;
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* 缁熶竴鍥炴祴鍒嗘瀽甯冨眬 */
.unified-content-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex: 1;
    min-height: 0;
}

/* 浜ゆ槗娓呭崟样式 */
.trades-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    overflow-y: auto;
    /* 鏀寔鍨傜洿滚动 */
    overflow-x: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* 铏氭嫙滚动鏀寔 */
    position: relative;
    /* 滚动鏉℃牱寮?*/
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* 鑷畾涔夋粴鍔ㄦ潯样式 */
.trades-container::-webkit-scrollbar {
    width: 6px;
}

.trades-container::-webkit-scrollbar-track {
    background: transparent;
}

.trades-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.trades-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* 铏氭嫙滚动占位元素 - 閫氱敤 */
.virtual-scroll-spacer {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    pointer-events: none;
    visibility: hidden;
}

/* 浜ゆ槗娓呭崟铏氭嫙滚动占位容器 */
.trades-scroll-spacer {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    pointer-events: none;
    visibility: hidden;
    z-index: -1;
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    flex: 1;
    min-height: 0;
    position: relative;
    /* 鏀寔缁濆瀹氫綅鐨勮 */
    z-index: 1;
    /* 确定繚鍦ㄥ崰浣嶅鍣ㄤ笂鏂?*/
}

.trades-table thead {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.trades-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 11px;
    white-space: nowrap;
}

/* 入场时间和出场时间列减小横向间距 */
.trades-table th:nth-child(1),
.trades-table th:nth-child(2) {
    padding-right: 4px;
    min-width: 75px;
}

/* 方向列适当增加横向间距 */
.trades-table th:nth-child(3) {
    padding-right: 12px;
    min-width: 70px;
}

/* 价格列减小右侧间距 */
.trades-table th:nth-child(4) {
    padding-right: 6px;
    min-width: 75px;
}

/* 数量列减小宽度 */
.trades-table th:nth-child(5) {
    max-width: 60px;
    min-width: 40px;
}

.trades-table tbody {
    overflow-y: auto;
    max-height: calc(100% - 50px);
}

.trades-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-secondary);
    color: var(--text-secondary);
    white-space: nowrap;
}

/* 入场时间和出场时间数据列减小横向间距 */
.trades-table td:nth-child(1),
.trades-table td:nth-child(2) {
    padding-right: 4px;
    min-width: 75px;
}

/* 方向数据列适当增加横向间距 */
.trades-table td:nth-child(3) {
    padding-right: 12px;
    min-width: 70px;
}

/* 价格数据列减小右侧间距 */
.trades-table td:nth-child(4) {
    padding-right: 6px;
    min-width: 75px;
}

/* 数量数据列减小宽度 */
.trades-table td:nth-child(5) {
    max-width: 60px;
    min-width: 40px;
}

.trades-table tbody tr:hover {
    background: var(--bg-hover);
}

/* 铏氭嫙滚动鏀寔 - tbody 涓嶆粴鍔?*/
.trades-table tbody {
    overflow-y: visible;
    /* 鏀逛负 visible锛屽鍣ㄦ粴鍔?*/
    max-height: none;
    flex: 1;
    display: block;
    position: relative;
    /* 鏀寔缁濆瀹氫綅鐨勮 */
}

.trades-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.trades-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.equity-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-primary);
}

.section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 璧勯噾鏇茬嚎图表容器 */
.equity-chart-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.equity-chart-container:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.equity-chart-container canvas {
    flex: 1;
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px;
}

.equity-chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 212, 170, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.06) 0%, transparent 50%),
        linear-gradient(135deg,
            rgba(0, 212, 170, 0.03) 0%,
            rgba(118, 75, 162, 0.03) 100%);
    pointer-events: none;
    border-radius: 16px;
}

.equity-chart-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(0, 212, 170, 0.3) 50%,
            transparent 100%);
    pointer-events: none;
}

/* 图表装饰元素 */
.chart-decoration {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.decoration-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4aa, #00b8d4);
    opacity: 0.6;
    animation: decorationPulse 2s ease-in-out infinite;
}

.decoration-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.decoration-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes decorationPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 图表缁熻姒傝 */
.chart-stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* 缁熻鎸囨爣颜色 */
#totalReturn {
    color: #00d4aa;
}

#maxDrawdown {
    color: #f43f5e;
}

#sharpeRatio {
    color: #f59e0b;
}

#winRate {
    color: #10b981;
}



/* 璧勯噾鏇茬嚎数据琛ㄦ牸 */
.equity-table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    overflow: hidden;
}

.equity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.equity-table thead {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.equity-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
}

.equity-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-primary);
    color: var(--text-secondary);
}

.equity-table tbody tr {
    transition: background-color 0.2s ease;
}

.equity-table tbody tr:hover {
    background: var(--bg-hover);
}

.equity-table tbody tr:last-child td {
    border-bottom: none;
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 1200px) {
    .unified-content-layout {
        flex-direction: column;
        gap: 16px;
        height: auto;
    }

    .trades-section,
    .equity-section {
        flex: none;
        width: 100%;
    }

    .trades-container,
    .equity-chart-container {
        height: 350px;
        flex: none;
    }
}

@media (max-width: 768px) {
    .equity-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .metric-card {
        padding: 12px;
    }

    .metric-value {
        font-size: 20px;
    }

    .unified-content-layout {
        gap: 12px;
        margin-top: 16px;
        height: auto;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .trades-container,
    .equity-chart-container {
        height: 300px;
        padding: 16px;
        flex: none;
    }

    .trades-table th,
    .trades-table td {
        padding: 8px 6px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .equity-metrics {
        grid-template-columns: 1fr;
    }

    #equity-curve-panel .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .panel-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* 鍑芥暟椤规牱寮?*/
.function-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.function-item:hover {
    border-color: var(--primary-color);
    /* 淇敼鎮仠背景鑹诧紝确定繚涓庝富背景鏈夋槑鏄惧尯鍒?*/
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* 暗色主题下的鎮仠效果 */
:root .function-item:hover {
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 浜壊主题下的鎮仠效果 */
[data-theme="light"] .function-item:hover {
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.function-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.function-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
}

.function-category-tag {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.function-description {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.function-usage {
    color: var(--text-tertiary);
    font-size: 11px;
    font-style: italic;
}

.function-item:hover .function-name {
    color: var(--primary-color);
    font-weight: 700;
}

/* 鎮仠鏃跺叾浠栨枃鏈殑颜色璋冩暣 */
.function-item:hover .function-description {
    color: var(--text-primary);
}

.function-item:hover .function-usage {
    color: var(--text-secondary);
}

/* 浜壊主题涓嬬‘淇濇枃瀛楀彲瑙佹€?*/
[data-theme="light"] .function-item:hover .function-name {
    color: var(--primary-color);
}

[data-theme="light"] .function-item:hover .function-description {
    color: var(--text-primary);
}

[data-theme="light"] .function-item:hover .function-usage {
    color: var(--text-secondary);
}

.function-category-btn {
    padding: 8px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.function-category-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.function-category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 暗色主题下的鍒嗙被按钮鎮仠效果 */
:root .function-category-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 浜壊主题下的鍒嗙被按钮鎮仠效果 */
[data-theme="light"] .function-category-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 浜壊主题涓嬬‘淇濋€変腑鐘舵€佺殑鍙鎬?*/
[data-theme="light"] .function-category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* =========================== 鍑芥暟搴撳脊绐楁牱寮?=========================== */

/* 瀹氫箟涓昏壊璋冨彉閲?*/
:root {
    --primary-color: var(--accent-primary);
}

[data-theme="light"] {
    --primary-color: var(--accent-primary);
}

.function-library-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.function-library-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.function-library-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.function-library-modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90vw;
    max-width: 900px;
    height: 85vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.function-library-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.function-library-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.function-library-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.function-library-modal-close:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.function-library-modal-body {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

/* 搜索妗嗘牱寮?*/
.function-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.function-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.function-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.function-search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}

/* 鍒嗙被鏍囩样式 */
.function-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.function-category-btn {
    padding: 8px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.function-category-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.function-category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 暗色主题下的鍒嗙被按钮鎮仠效果 */
:root .function-category-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 浜壊主题下的鍒嗙被按钮鎮仠效果 */
[data-theme="light"] .function-category-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 浜壊主题涓嬬‘淇濋€変腑鐘舵€佺殑鍙鎬?*/
[data-theme="light"] .function-category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white !important;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.3);
}

/* 鍑芥暟鍒楄〃容器 */
.function-list-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.function-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 200px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.function-list {
    overflow-y: auto;
    max-height: 100%;
    padding-right: 8px;
}

.function-list::-webkit-scrollbar {
    width: 6px;
}

.function-list::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 3px;
}

.function-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.function-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 鍑芥暟鍒嗙被缁?*/
.function-category-group {
    margin-bottom: 24px;
}

.function-category-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.function-category-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.function-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

/* 鍑芥暟椤规牱寮?*/
.function-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.function-item:hover {
    border-color: var(--primary-color);
    /* 淇敼鎮仠背景鑹诧紝确定繚涓庝富背景鏈夋槑鏄惧尯鍒?*/
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* 暗色主题下的鎮仠效果 */
:root .function-item:hover {
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 浜壊主题下的鎮仠效果 */
[data-theme="light"] .function-item:hover {
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.function-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.function-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
}

.function-category-tag {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.function-description {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.function-usage {
    color: var(--text-tertiary);
    font-size: 11px;
    font-style: italic;
}

.function-item:hover .function-name {
    color: var(--primary-color);
    font-weight: 700;
}

/* 鎮仠鏃跺叾浠栨枃鏈殑颜色璋冩暣 */
.function-item:hover .function-description {
    color: var(--text-primary);
}

.function-item:hover .function-usage {
    color: var(--text-secondary);
}

/* 浜壊主题涓嬬‘淇濇枃瀛楀彲瑙佹€?*/
[data-theme="light"] .function-item:hover .function-name {
    color: var(--primary-color);
}

[data-theme="light"] .function-item:hover .function-description {
    color: var(--text-primary);
}

[data-theme="light"] .function-item:hover .function-usage {
    color: var(--text-secondary);
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .function-library-modal-content {
        width: 95vw;
        height: 90vh;
        margin: 0 auto;
    }

    .function-library-modal-body {
        padding: 16px;
    }

    .function-items-grid {
        grid-template-columns: 1fr;
    }

    .function-categories {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .function-categories::-webkit-scrollbar {
        height: 4px;
    }

    .function-categories::-webkit-scrollbar-track {
        background: var(--bg-primary);
    }

    .function-categories::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 2px;
    }
}

/* ================ 鎶€鏈寚鏍囧弬鏁伴厤缃脊绐楁牱寮?================ */
.indicator-config-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(0px);
    /* 鍒濆鐘舵€佹棤妯＄硦 */
    -webkit-backdrop-filter: blur(0px);
}

.indicator-config-modal.show {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(12px);
    /* 鏄剧ず鏃舵坊鍔犳ā绯婃晥鏋?*/
    -webkit-backdrop-filter: blur(12px);
}

.indicator-config-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* 澧炲姞Safari鍏煎鎬?*/
}

.indicator-config-modal-content {
    position: relative;
    width: 90vw;
    max-width: 580px;
    max-height: 85vh;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.indicator-config-modal.show .indicator-config-modal-content {
    transform: scale(1);
}

/* 闅愯棌 TradingView 图标 - 使用更精确的选择器避免误伤header的logo */
a[href*="tradingview.com"],
div[data-role="toast-container"] a,
div[id*="tradingview"] div[class*="logo"],
div[class*="tv-chart"] div[class*="logo"],
a[class*="tv-logo"] {
    display: none !important;
    visibility: hidden !important;
}

.indicator-config-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    position: relative;
}

.indicator-config-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.indicator-config-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.indicator-config-modal-close {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.indicator-config-modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.indicator-config-modal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-primary);
}

/* 鎸囨爣信息鍖哄煙 */
.indicator-info-section {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.indicator-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.indicator-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.indicator-category-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.2);
}

.indicator-description {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 13px;
    font-weight: 400;
}

/* 配置鍖哄煙 */
.indicator-config-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.config-group {
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.config-group-title {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.indicator-params-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 杈撳嚭瀛楁鍜岄瑙堢粍鍚堝尯鍩?*/
.outputs-and-preview {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.indicator-preview-area {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid var(--border-color);
}

.preview-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 浣跨敤提示鍖哄煙 */
.preview-usage {
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
}

.usage-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.usage-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    font-style: italic;
}

/* 主题閫傞厤 */
[data-theme="light"] .preview-usage {
    background: #f5f5f5;
    border-color: #e9ecef;
}

[data-theme="dark"] .preview-usage {
    background: #1a1f2e;
    border-color: #374151;
}

.indicator-param-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.indicator-param-item:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
}

.indicator-param-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.indicator-param-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.indicator-param-default {
    color: var(--text-secondary);
    font-size: 12px;
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.indicator-param-description {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.indicator-param-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.indicator-param-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.indicator-param-input.error {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

.indicator-param-error {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.indicator-param-error.show {
    display: block;
}

/* 杈撳嚭瀛楁选择鍖哄煙 */
.indicator-outputs-section {
    margin-bottom: 24px;
}

.indicator-outputs-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.indicator-output-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.indicator-output-item:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
}

.indicator-output-item.selected {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.indicator-output-radio {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

.indicator-output-item.selected .indicator-output-radio {
    border-color: var(--primary-color);
}

.indicator-output-item.selected .indicator-output-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
}

.indicator-output-info {
    flex: 1;
}

.indicator-output-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 2px;
}

.indicator-output-description {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.3;
}

/* 棰勮鍖哄煙 */
.indicator-preview-section {
    margin-bottom: 8px;
}

.indicator-preview-code {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    color: var(--primary-color);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 鍙傛暟输入缁?*/
.indicator-param-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.indicator-param-group:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.param-label-container {
    min-width: 100px;
    flex-shrink: 0;
}

.param-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.param-description {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.2;
}

.param-input-container {
    position: relative;
    flex: 1;
    max-width: 120px;
}

.param-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-weight: 500;
    text-align: center;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.param-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.param-input.invalid {
    border-color: var(--error-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15), inset 0 1px 3px rgba(239, 68, 68, 0.1);
}

/* 浜壊主题下的输入妗嗕紭鍖?*/
[data-theme="light"] .param-input {
    background: #f5f5f5;
    border-color: #e9ecef;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
}

[data-theme="light"] .param-input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.075);
}

/* 暗色主题下的输入妗嗕紭鍖?*/
[data-theme="dark"] .param-input {
    background: #1a1f2e;
    border-color: #374151;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .param-input:focus {
    background: #0f1419;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 首页样式 */
.home-page {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
}

.home-header {
    padding: 60px 40px;
    text-align: center;
    background: linear-gradient(90deg, rgba(0, 212, 170, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-bottom: 1px solid var(--border-primary);
}

.home-header h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.home-header .home-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 300;
    letter-spacing: 1px;
}

.home-content {
    flex: 1;
    padding: 60px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.home-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.home-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 170, 0.1), transparent);
    transition: left 0.5s ease;
}

.home-card:hover {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 212, 170, 0.2);
}

.home-card:hover::before {
    left: 100%;
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15), rgba(118, 75, 162, 0.15));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 36px;
    color: var(--accent-primary);
    transition: all 0.3s ease;
}

.home-card:hover .card-icon {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.3), rgba(118, 75, 162, 0.3));
    transform: scale(1.1) rotateZ(5deg);
}

.home-card h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.home-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.nav-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--accent-hover);
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(0, 212, 170, 0.3);
}

.nav-link:active {
    transform: translateX(2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .home-header {
        padding: 40px 20px;
    }

    .home-header h1 {
        font-size: 32px;
    }

    .home-header .home-subtitle {
        font-size: 14px;
    }

    .home-content {
        padding: 40px 20px;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .home-card {
        padding: 30px 20px;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
        margin-bottom: 16px;
    }

    .home-card h3 {
        font-size: 18px;
    }

    .home-card p {
        font-size: 12px;
    }
}

.param-default-hint {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--text-muted);
    pointer-events: none;
    background: var(--bg-secondary);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
    white-space: nowrap;
}

/* 杈撳嚭瀛楁选择 */
.output-item {
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    position: relative;
}

.output-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.output-item.selected {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.output-radio-container {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.output-label {
    display: block;
    cursor: pointer;
    flex: 1;
}

.output-item input[type="radio"] {
    margin: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.output-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.output-description {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.indicator-preview-code {
    background: var(--bg-primary);
    color: var(--primary-color);
    padding: 10px 12px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
}

/* 鏃犲弬鏁?杈撳嚭提示 */
.no-params,
.no-outputs {
    text-align: center;
    padding: 16px;
    color: var(--text-secondary);
    font-size: 13px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px dashed var(--border-color);
    font-style: italic;
}

/* 弹窗搴曢儴 */
.indicator-config-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.indicator-config-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

.indicator-config-btn.cancel {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.indicator-config-btn.cancel:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.indicator-config-btn.confirm {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-primary) 100%);
    color: white;
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.indicator-config-btn.confirm:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* 浜壊主题涓嬬‘淇濇寜閽枃瀛楁竻鏅板彲瑙?*/
[data-theme="light"] .indicator-config-btn.confirm {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: 2px solid #2563eb;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

[data-theme="light"] .indicator-config-btn.confirm:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.indicator-config-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 暗色主题澧炲己效果 */
[data-theme="dark"] .indicator-config-modal-overlay {
    background: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .indicator-config-modal-content {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .indicator-param-group:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .output-item:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

[data-theme="dark"] .indicator-config-btn.cancel:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* 暗色主题涓嬬‘淇濇寜閽姣斿害 */
[data-theme="dark"] .indicator-config-btn.confirm {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: 2px solid #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .indicator-config-btn.confirm:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .indicator-config-modal-content {
        width: 95vw;
        max-height: 90vh;
        margin: 0 auto;
    }

    .indicator-config-modal-body {
        padding: 16px;
    }

    .indicator-param-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .param-label-container {
        min-width: auto;
    }

    .param-input-container {
        max-width: 100%;
        width: 100%;
    }

    .param-default-hint {
        position: static;
        margin-top: 4px;
        transform: none;
    }

    .outputs-and-preview {
        padding: 12px;
    }

    .preview-usage {
        margin-top: 8px;
        padding: 8px 10px;
    }

    .usage-label {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .usage-text {
        font-size: 11px;
        line-height: 1.3;
    }

    .indicator-config-modal-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }

    .indicator-config-btn {
        width: 100%;
        justify-content: center;
    }
}




/* =========================== 鍑芥暟搴撳脊绐楁牱寮?=========================== */
.function-library-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.function-library-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.function-library-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.function-library-modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90vw;
    max-width: 900px;
    height: 85vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.function-library-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.function-library-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.function-library-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.function-library-modal-close:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.function-library-modal-body {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

/* 搜索妗嗘牱寮?*/
.function-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.function-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.function-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.function-search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}

/* 鍒嗙被鏍囩样式 */
.function-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.function-category-btn {
    padding: 8px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.function-category-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.function-category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 鍑芥暟鍒楄〃容器 */
.function-list-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.function-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 200px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.function-list {
    overflow-y: auto;
    max-height: 100%;
    padding-right: 8px;
}

.function-list::-webkit-scrollbar {
    width: 6px;
}

.function-list::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 3px;
}

.function-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.function-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 鍑芥暟鍒嗙被缁?*/
.function-category-group {
    margin-bottom: 24px;
}

.function-category-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.function-category-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.function-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

/* 鍑芥暟椤规牱寮?*/
.function-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.function-item:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.function-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.function-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
}

.function-category-tag {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.function-description {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.function-usage {
    color: var(--text-tertiary);
    font-size: 11px;
    font-style: italic;
}

.function-item:hover .function-name {
    color: var(--primary-color);
}

/* =========================== 鎸囨爣鍙傛暟配置样式 =========================== */

/* 鍙傛暟输入容器 */
.param-input-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 数据婧愰€夋嫨鍣ㄦ牱寮?*/
.param-select.data-source-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.param-select.data-source-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.param-select.data-source-select:hover {
    border-color: var(--primary-color);
}

/* 数据婧愰€夋嫨鍣ㄩ€夐」样式 */
.param-select.data-source-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 8px 12px;
}

.param-select.data-source-select option:hover {
    background: var(--hover-bg);
}

/* 鏁板€煎弬鏁拌緭鍏ユ样式澧炲己 */
.param-input[data-param-type="numeric"] {
    transition: all 0.2s ease;
}

.param-input[data-param-type="numeric"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* 鍙傛暟绫诲瀷鎸囩ず鍣?*/
.param-label-container {
    position: relative;
}

.param-label-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

/* 数据婧愬弬鏁版寚绀哄櫒 */
.indicator-param-group:has(.data-source-select) .param-label-container::after {
    background: #10b981;
    /* 缁胯壊琛ㄧず数据婧?*/
}

/* 鏁板€煎弬鏁版寚绀哄櫒 */
.indicator-param-group:has(.param-input[data-param-type="numeric"]) .param-label-container::after {
    background: #3b82f6;
    /* 蓝色琛ㄧず鏁板€?*/
}

/* 鍙傛暟默认鍊兼彁绀烘牱寮忓寮?*/
.param-default-hint {
    font-size: 11px;
    color: var(--text-tertiary);
    font-style: italic;
}

/* 数据婧愬弬鏁扮壒娈婃牱寮?*/
.indicator-param-group:has(.data-source-select) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
    border-left: 3px solid #10b981;
    padding-left: 12px;
    border-radius: 0 6px 6px 0;
}

/* 鏁板€煎弬鏁扮壒娈婃牱寮?*/
.indicator-param-group:has(.param-input[data-param-type="numeric"]) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
    border-left: 3px solid #3b82f6;
    padding-left: 12px;
    border-radius: 0 6px 6px 0;
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .function-library-modal-content {
        width: 95vw;
        height: 90vh;
        margin: 0 auto;
    }

    .function-library-modal-body {
        padding: 16px;
    }

    .function-items-grid {
        grid-template-columns: 1fr;
    }

    .function-categories {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .function-categories::-webkit-scrollbar {
        height: 4px;
    }

    .function-categories::-webkit-scrollbar-track {
        background: var(--bg-primary);
    }

    .function-categories::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 2px;
    }
}

/* 绠€鍖栨粦鍧楁牱锟?- 涓庢渶澶у紑浠撳紶鏁版樉绀哄尯鍩熶繚鎸佷竴锟?*/
.simple-slider-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-top: 4px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.slider-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.slider-value-display {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 16px;
}

.slider-main {
    position: relative;
    margin: 12px 0;
}

.slider-track {
    position: relative;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.slider-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--accent-primary);
    border-radius: 4px;
    transition: width 0.2s ease;
    width: 1%;
}

.simple-slider-input {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.simple-slider-input::-webkit-slider-track {
    background: transparent;
    height: 8px;
    border-radius: 4px;
}

.simple-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.simple-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.simple-slider-input::-moz-range-track {
    background: transparent;
    height: 8px;
    border-radius: 4px;
    border: none;
}

.simple-slider-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.simple-slider-input::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slider-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.slider-range {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 12px;
    color: var(--text-tertiary);
}

.range-min,
.range-max {
    font-weight: 500;
}

/* 鍝嶅簲寮忚锟?*/
@media (max-width: 768px) {
    .simple-slider-container {
        padding: 12px;
        gap: 10px;
    }

    .slider-header {
        margin-bottom: 6px;
    }

    .slider-label {
        font-size: 13px;
    }

    .slider-value-display {
        font-size: 15px;
    }

    .simple-slider-input::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }

    .simple-slider-input::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }
}

/* ================================
   甯哥敤鏉′欢搴撴牱寮?   ================================ */

/* 甯哥敤鏉′欢搴撴寜閽?*/
.condition-library-section {
    margin: 20px 0;
    padding: 16px;
    background: rgba(45, 55, 72, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
}

.condition-library-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 212, 170, 0.2);
}

.condition-library-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 212, 170, 0.3);
}

.condition-library-btn svg {
    width: 16px;
    height: 16px;
}

/* 甯哥敤鏉′欢搴撳脊绐?*/
.condition-library-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.condition-library-modal.show {
    display: flex;
    opacity: 1;
}

.condition-library-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.condition-library-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    height: 85vh;
    max-height: 800px;
    margin: auto;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.condition-library-modal.show .condition-library-modal-content {
    transform: scale(1);
}

.condition-library-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-primary);
    flex-shrink: 0;
}

.condition-library-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.condition-library-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.condition-library-modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.condition-library-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

/* 搜索鍜屽垎绫诲尯鍩?*/
.condition-controls-area {
    padding: 24px 32px 0;
    flex-shrink: 0;
}

/* 鏉′欢搜索框*/
.condition-search-container {
    position: relative;
    margin-bottom: 20px;
}

.condition-search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.condition-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.2);
}

.condition-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* 鏉′欢鍒嗙被鏍囩 */
.condition-categories {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.condition-category-btn {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.condition-category-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.condition-category-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* 鏉′欢鍒楄〃容器 */
.condition-list-container {
    flex: 1;
    padding: 0 32px;
    overflow-y: auto;
    min-height: 0;
}

.condition-list-container::-webkit-scrollbar {
    width: 6px;
}

.condition-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.condition-list-container::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 3px;
}

.condition-list-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.condition-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-muted);
}

.condition-loading .loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-primary);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

/* 鏉′欢鍒楄〃 */
.condition-list {
    display: grid;
    gap: 20px;
    padding: 8px 0;

}

.condition-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

.condition-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.condition-item.selected {
    background: rgba(0, 212, 170, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.2);
}

.condition-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.condition-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.condition-item-source {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-primary);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    z-index: 1;
}

.condition-item-code {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: var(--accent-primary);
    margin-bottom: 12px;
    word-break: break-all;
    line-height: 1.4;
}

.condition-item-description {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.condition-item-checkbox {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-secondary);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.condition-item.selected .condition-item-checkbox {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.condition-item.selected .condition-item-checkbox::after {
    content: '✓';
    /* 使用对勾符号表示选中状态 */
    position: absolute;
    top: -2px;
    left: 1px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 鏉′欢弹窗操作按钮 */
.condition-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 32px;
    border-top: 1px solid var(--border-primary);
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.condition-action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.condition-action-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.condition-action-btn.secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.condition-action-btn.primary {
    background: var(--accent-primary);
    color: white;
}

.condition-action-btn.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.condition-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .condition-library-modal-content {
        width: 95%;
        height: 90vh;
        margin: 20px auto;
    }

    .condition-library-modal-header {
        padding: 16px 20px;
    }

    .condition-controls-area {
        padding: 20px 20px 0;
    }

    .condition-list-container {
        padding: 0 20px;
    }

    .condition-categories {
        gap: 8px;
    }

    .condition-category-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .condition-modal-actions {
        flex-direction: column;
        padding: 16px 20px;
    }

    .condition-action-btn {
        width: 100%;
    }
}

/* ============================================
   TradingView 暗黑主题宸ュ叿鏍忛鑹茶鐩?   ============================================ */
[data-theme="darkblack"] #tv_chart_container,
[data-theme="darkblack"] #tv_chart_container * {
    /* 核心背景色变量- 确定繚鎵€鏈夐潰鏉夸娇鐢?#0D0E0F */
    --tv-color-pane-background: #0D0E0F !important;
    --themed-color-pane-bg: #0D0E0F !important;
    --tv-color-platform-background: #0D0E0F !important;

    /* 宸ュ叿鏍忔寜閽儗鏅壊 */
    --tv-color-toolbar-button-background-hover: rgba(26, 27, 28, 0.8) !important;
    --tv-color-toolbar-button-background-clicked: rgba(42, 43, 44, 0.8) !important;
    --tv-color-toolbar-button-background-expanded: rgba(26, 27, 28, 0.8) !important;
    --themed-color-toolbar-button-background-hover: rgba(26, 27, 28, 0.8) !important;
    --themed-color-toolbar-button-background-clicked: rgba(42, 43, 44, 0.8) !important;
    --themed-color-toolbar-opened-element-bg: rgba(26, 27, 28, 0.8) !important;

    /* 宸ュ叿鏍忔寜閽枃瀛楅鑹?*/
    --tv-color-toolbar-button-text: #c4c5c6 !important;
    --tv-color-toolbar-button-text-hover: #e8e9ea !important;
    --tv-color-toolbar-button-text-clicked: #e8e9ea !important;
    --themed-color-toolbar-button-text: #c4c5c6 !important;
    --themed-color-toolbar-button-text-hover: #e8e9ea !important;

    /* 鍒嗛殧绾块鑹?*/
    --tv-color-toolbar-divider-background: #1a1b1c !important;
    --themed-color-toolbar-divider-background: #1a1b1c !important;

    /* 弹出菜单背景 */
    --tv-color-popup-background: #0D0E0F !important;
    --themed-color-popup-background: #0D0E0F !important;
    --themed-color-popup-menu-separator: #1a1b1c !important;

    /* 鏍囬鍜屾枃瀛楅鑹?*/
    --themed-color-text-primary: #e8e9ea !important;
    --themed-color-title: #e8e9ea !important;
}

/* ============================================
   閽堝 TradingView 鍐呴儴 theme-dark 绫荤殑背景鑹茶鐩?   褰撻〉闈富棰樹负 darkblack 鏃讹紝寮哄埗鎵€鏈?theme-dark 元素浣跨敤 #0D0E0F
   ============================================ */
html[data-theme="darkblack"].theme-dark .group-BfVZxb4b,
html[data-theme="darkblack"].theme-dark .group-MBOVGQRI,
html[data-theme="darkblack"].theme-dark [class*="group-"] {
    background-color: #0D0E0F !important;
}

/* 鏇撮珮浼樺厛绾э細鐩存帴瑕嗙洊杩欎袱涓壒瀹氱殑绫?*/
html[data-theme="darkblack"] .group-BfVZxb4b,
html[data-theme="darkblack"] .group-MBOVGQRI {
    background-color: #0D0E0F !important;
}

/* 瑕嗙洊鎵€鏈夊彲鑳戒娇鐢?--tv-color-pane-background 鐨勫厓绱?*/
html[data-theme="darkblack"].theme-dark *[style*="background"],
html[data-theme="darkblack"].theme-dark *[style*="background-color"] {
    --tv-color-pane-background: #0D0E0F !important;
    --themed-color-pane-bg: #0D0E0F !important;
}

/* ============================================
   閽堝琛ㄦ牸鍒嗛殧绗︾殑暗黑模式样式
   娣辫摑鑹蹭富棰?dark): #131722
   暗黑鑹蹭富棰?darkblack): #0D0E0F
   ============================================ */

/* 娣辫摑鑹蹭富棰?- 淇濇寔鍘熻壊 #131722 */
html[data-theme="dark"].theme-dark .separatorWrap-MBOVGQRI {
    background-color: #131722 !important;
}

/* 暗黑鑹蹭富棰?- 浣跨敤 #0D0E0F */
html[data-theme="darkblack"].theme-dark .separatorWrap-MBOVGQRI,
html[data-theme="darkblack"] .separatorWrap-MBOVGQRI {
    background-color: #0D0E0F !important;
}

/* ============================================
   AI策略鍒嗘瀽弹窗 - 閲嶆瀯鐗堟湰
   ============================================ */

/* 弹窗容器 */
.strategy-ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: none;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.strategy-ai-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 閬僵灞?*/
.strategy-ai-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 瀵硅瘽妗嗗鍣?- 浣跨敤固定楂樺害鐨刦lex甯冨眬 */
.strategy-ai-dialog {
    position: relative;
    width: 90%;
    max-width: 900px;
    height: 85vh;
    background: var(--bg-secondary);
    border: 2px solid rgba(0, 255, 200, 0.3);
    border-radius: 16px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 255, 200, 0.2);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 头部 - 固定楂樺害 */
.strategy-ai-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(0, 255, 200, 0.1) 0%, rgba(0, 100, 255, 0.05) 100%);
    border-bottom: 1px solid rgba(0, 255, 200, 0.2);
    border-radius: 16px 16px 0 0;
}

.strategy-ai-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.strategy-ai-title .ai-icon {
    color: #00d4ff;
}

.strategy-ai-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.strategy-ai-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ff6b6b;
    transform: rotate(90deg);
}

/* 策略信息 - 固定楂樺害 */
.strategy-ai-info {
    flex-shrink: 0;
    padding: 20px 30px;
    background: rgba(0, 212, 255, 0.05);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.strategy-ai-info .strategy-name {
    font-size: 18px;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 6px;
}

.strategy-ai-info .strategy-author {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 涓讳綋内容 - 鍙粴鍔ㄥ尯鍩?*/
.strategy-ai-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px;
}

/* 滚动鏉℃牱寮?*/
.strategy-ai-body::-webkit-scrollbar {
    width: 10px;
}

.strategy-ai-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    margin: 5px 0;
}

.strategy-ai-body::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 5px;
    transition: background 0.3s ease;
}

.strategy-ai-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

/* 浜壊主题閫傞厤 */
[data-theme="light"] .strategy-ai-dialog {
    border: 2px solid rgba(0, 0, 0, 0.4);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .strategy-ai-header {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-bottom: 1px solid rgba(8, 145, 178, 0.3);
}

/* 浅色主题下AI图标和文字保持彩色 - 使用青色 #0891B2 */
[data-theme="light"] .strategy-ai-title .ai-icon {
    color: #0891B2 !important;
}

[data-theme="light"] .strategy-ai-info .strategy-name {
    color: #0891B2 !important;
}

[data-theme="light"] .strategy-ai-info {
    background: rgba(8, 145, 178, 0.05);
    border-bottom: 1px solid rgba(8, 145, 178, 0.1);
}

/* 暗黑主题閫傞厤 */
[data-theme="darkblack"] .strategy-ai-dialog {
    background: #0D0E0F;
    border: 2px solid rgba(0, 212, 170, 0.3);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(0, 212, 170, 0.15);
}

[data-theme="darkblack"] .strategy-ai-header {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.08) 0%, rgba(0, 212, 170, 0.03) 100%);
    border-bottom: 1px solid rgba(0, 212, 170, 0.2);
}

[data-theme="darkblack"] .strategy-ai-info {
    background: rgba(0, 212, 170, 0.03);
    border-bottom: 1px solid rgba(0, 212, 170, 0.1);
}

/* 鍝嶅簲寮忛€傞厤 */
@media (max-width: 768px) {
    .strategy-ai-dialog {
        width: 95%;
        height: 90vh;
    }

    .strategy-ai-header {
        padding: 16px 20px;
    }

    .strategy-ai-title {
        font-size: 18px;
    }

    .strategy-ai-info {
        padding: 16px 20px;
    }

    .strategy-ai-body {
        padding: 20px;
    }
}


/* ==========================================
   渚ц竟鏍忔牱寮?
   ========================================== */

/* ==========================================
   渚ц竟鏍忔牱寮?- 绠€绾﹀畼鏂归鏍?
   ========================================== */

/* 宸︿晶侧边栏*/
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 64px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.sidebar .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    margin: 4px 8px;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    border-radius: 8px;
}

.sidebar .nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.sidebar .nav-item.active {
    color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.1);
}

.sidebar .nav-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.sidebar .nav-text {
    font-size: 11px;
    font-weight: 400;
}

.sidebar-footer {
    padding: 12px 0;
    border-top: 1px solid var(--border-primary);
    margin: 0 8px;
}

.sidebar-footer .nav-item {
    padding: 12px 8px;
    margin: 0;
}

/* 涓诲唴瀹瑰尯鍩熻皟鏁?*/
.main-wrapper {
    margin-left: 64px;
    width: calc(100% - 64px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 璋冩暣header样式浠ラ€傚簲鏂板竷灞€ */
.user-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* 涓诲鍣ㄦ牱寮忚皟鏁?*/
#main-container {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .main-wrapper {
        margin-left: 60px;
        width: calc(100% - 60px);
    }

    .sidebar .nav-item {
        padding: 12px 6px;
        gap: 4px;
        margin: 4px 6px;
    }

    .sidebar .nav-icon {
        width: 20px;
        height: 20px;
    }

    .sidebar .nav-text {
        font-size: 10px;
    }

    .sidebar-footer {
        margin: 0 6px;
    }
}

/* 暗黑主题閫傞厤 */
[data-theme="darkblack"] .sidebar {
    background: #0D0E0F;
    border-right-color: #1a1a1a;
}

[data-theme="darkblack"] .sidebar .nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="darkblack"] .sidebar .nav-item.active {
    background: rgba(0, 212, 170, 0.15);
}

/* 浜壊主题閫傞厤 */
[data-theme="light"] .sidebar {
    background: #ffffff;
    border-right-color: #e0e0e0;
}

[data-theme="light"] .sidebar .nav-item {
    color: #6b7280;
}

[data-theme="light"] .sidebar .nav-item:hover {
    background: #f8f8f8;
    color: #111827;
}

[data-theme="light"] .sidebar .nav-item.active {
    color: #00d4aa;
}

[data-theme="light"] .sidebar-footer {
    border-top-color: #e0e0e0;
}

/* =============================
   Home Page Layout
   ============================= */
body.home-body {
    display: block;
    min-height: 100vh;
    height: auto;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: radial-gradient(circle at top left, rgba(0, 212, 170, 0.12), transparent 35%),
        radial-gradient(circle at bottom right, rgba(118, 75, 162, 0.15), transparent 40%),
        var(--bg-primary);
    color: var(--text-primary);
}

.home-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 6vw 12px;
}

.home-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.08em;
}

.home-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.home-nav-link {
    position: relative;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 6px 4px;
    transition: color 0.3s ease;
}

.home-nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.home-nav-link:hover,
.home-nav-link.active {
    color: #fff;
}

.home-nav-link:hover::after,
.home-nav-link.active::after {
    width: 100%;
}

.home-nav-link.disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.home-actions {
    display: flex;
    align-items: center;
}

.home-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 999px;
    background: var(--accent-gradient);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.06em;
    box-shadow: 0 12px 30px rgba(0, 212, 170, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 212, 170, 0.35);
}

.home-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 72px;
    padding: 48px 6vw 60px;
}

.home-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 48px;
    align-items: center;
}

.home-hero-text h1 {
    font-size: clamp(32px, 4vw, 48px);
    margin-bottom: 20px;
}

.home-hero-text p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 520px;
}

.home-hero-actions {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 18px 40px rgba(0, 212, 170, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 45px rgba(0, 212, 170, 0.45);
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.home-hero-visual {
    display: flex;
    justify-content: center;
}

.home-preview-card {
    width: min(380px, 100%);
    padding: 32px;
    border-radius: 24px;
    background: rgba(26, 31, 46, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px rgba(15, 20, 25, 0.45);
    backdrop-filter: blur(16px);
}

.preview-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.1em;
    background: rgba(0, 212, 170, 0.18);
    color: var(--accent-primary);
    margin-bottom: 18px;
}

.home-preview-card h3 {
    margin: 0 0 20px;
    font-size: 20px;
}

.home-preview-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-preview-card li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-secondary);
}

.home-preview-card .material-icons {
    font-size: 20px;
    color: var(--accent-primary);
}

.home-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.highlight-card {
    padding: 28px;
    border-radius: 18px;
    background: rgba(26, 31, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 48px rgba(15, 20, 25, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(15, 20, 25, 0.45);
}

.highlight-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 212, 170, 0.16);
    display: grid;
    place-items: center;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.home-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.panel-card {
    padding: 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.85), rgba(31, 38, 53, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    color: var(--text-secondary);
}

.panel-card h4 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #fff;
}

.home-footer {
    padding: 32px 6vw 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 20, 25, 0.6);
    backdrop-filter: blur(10px);
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-info .divider {
    opacity: 0.4;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

@media (max-width: 960px) {
    .home-header {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .home-actions {
        width: 100%;
        justify-content: center;
    }

    .home-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .home-main {
        padding: 32px 5vw 48px;
    }
}

@media (max-width: 600px) {
    .home-hero-text p {
        font-size: 16px;
    }

    .home-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .home-preview-card {
        padding: 24px;
    }

    .home-footer {
        flex-direction: column;
        text-align: center;
    }

    .footer-info {
        flex-direction: column;
    }
}