        /* CSS变量定义 */
        :root {
            --annotation-button-size: 10px;
        }

body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background-color: #ffffff;
            color: #333;
            margin: 0;
            padding: 20px;
        }

        /* 通知系统样式 */
        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 9999;
            max-width: 350px;
            padding: 12px 20px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            opacity: 0;
            transform: translateY(-20px);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            pointer-events: none;
        }

        .notification.show {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .notification.success {
            background-color: #d4edda;
            color: #155724;
            border-left: 4px solid #28a745;
        }

        .notification.info {
            background-color: #d1ecf1;
            color: #0c5460;
            border-left: 4px solid #17a2b8;
        }

        .notification.warning {
            background-color: #fff3cd;
            color: #856404;
            border-left: 4px solid #ffc107;
        }

        .notification.error {
            background-color: #f8d7da;
            color: #721c24;
            border-left: 4px solid #dc3545;
        }

        /* AI分析按钮动画效果 */
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        @keyframes fadeInScale {
            0% {
                opacity: 0;
                transform: scale(0.8);
            }
            100% {
                opacity: 1;
                transform: scale(1);
            }
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
        }

        /* AI分析按钮状态样式 */
        .item-ai-analyze {
            transition: all 0.3s ease;
            border: none;
            border-radius: 4px;
            padding: 4px 8px;
            font-size: 12px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .item-ai-analyze:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .item-ai-analyze:disabled {
            cursor: not-allowed;
        }

        /* 成功状态 */
        .item-ai-analyze.success {
            background-color: #28a745 !important;
            color: white !important;
            animation: fadeInScale 0.5s ease;
        }

        /* 进行中状态 */
        .item-ai-analyze.processing {
            background-color: #007bff !important;
            color: white !important;
        }

        /* 队列中状态 */
        .item-ai-analyze.queued {
            background-color: #ffc107 !important;
            color: black !important;
        }

        /* 失败状态 */
        .item-ai-analyze.failed {
            background-color: #dc3545 !important;
            color: white !important;
            animation: shake 0.5s ease;
        }

        /* 重试状态 */
        .item-ai-analyze.retry {
            background-color: #ff9800 !important;
            color: white !important;
        }

        /* 批量分析进度指示器 */
        .batch-progress-indicator {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: linear-gradient(45deg, #667eea, #764ba2);
            color: white;
            padding: 12px 20px;
            border-radius: 25px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            font-size: 14px;
            font-weight: 500;
            z-index: 1000;
            transition: all 0.3s ease;
            display: none;
        }

        .batch-progress-indicator.visible {
            display: block;
            animation: fadeInScale 0.5s ease;
        }

        .batch-progress-indicator .progress-bar {
            width: 200px;
            height: 4px;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 2px;
            margin: 8px 0;
            overflow: hidden;
        }

        .batch-progress-indicator .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #4facfe, #00f2fe);
            border-radius: 2px;
            transition: width 0.3s ease;
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% { background-position: -200px 0; }
            100% { background-position: 200px 0; }
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: #fff;
            padding: 20px 40px;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            transition: margin-right 0.3s ease;
        }

        .container.sidebar-open {
            margin-right: 370px;
        }

        /* 头部布局 */
        .header-wrapper {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }

        .settings-toggle-btn {
            background: #3498db;
            color: white;
            border: none;
            padding: 10px 16px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .settings-toggle-btn:hover {
            background: #2980b9;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        }

        h1 {
            color: #2c3e50;
            text-align: center;
            margin-bottom: 30px;
        }

        .controls {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 30px;
            gap: 10px;
            flex-wrap: wrap;
        }

        #tickerInput {
            padding: 10px;
            font-size: 16px;
            border: 1px solid #ccc;
            border-radius: 4px;
            width: 250px;
        }

        #fetchBtn, #undoBtn, #redoBtn, .screenshot-btn {
            padding: 10px 20px;
            font-size: 16px;
            color: #fff;
            background-color: #3498db;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s;
            min-width: 80px;
        }

        #fetchBtn:hover, #undoBtn:hover:not(:disabled), #redoBtn:hover:not(:disabled), .screenshot-btn:hover {
            background-color: #2980b9;
        }

        #undoBtn:disabled, #redoBtn:disabled {
            background-color: #bdc3c7;
            cursor: not-allowed;
            opacity: 0.6;
        }

        .period-controls {
            display: flex;
            gap: 5px;
            margin-left: 15px;
        }

        .period-btn {
            padding: 8px 16px;
            font-size: 14px;
            border: 2px solid #3498db;
            background-color: transparent;
            color: #3498db;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .period-btn:hover {
            background-color: #3498db;
            color: white;
        }

        .period-btn.active {
            background-color: #3498db;
            color: white;
        }

        .algo-controls {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
            background-color: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
        }

        .algo-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .algo-group input[type="checkbox"] {
            margin-right: 5px;
            transform: scale(1.2);
        }

        .algo-group label {
            font-size: 14px; /* 调整字体大小以适应复选框 */
            color: #333;
            font-weight: 500;
            display: flex;
            align-items: center; /* 垂直居中对齐 */
            gap: 5px; /* 复选框和文本之间的间距 */
        }

        .algo-group input[type="number"] {
            width: 60px; /* 调整宽度 */
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 14px;
        }

        .chart-wrapper {
            position: relative;
            width: 100%;
            overflow: hidden;
            margin-top: 20px;
        }

        #chart-container {
            position: relative;
            border: 1px solid #e0e0e0;
            border-radius: 4px;
            background-color: #ffffff;
            width: 100%;
            height: 600px;
            outline: none; /* 移除默认焦点轮廓 */
        }

        /* 键盘焦点状态样式 - 移除边框，保持功能 */
        #chart-container:focus {
            outline: none;
        }

        #info-box-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            pointer-events: none;
        }

        .annotation-box {
            position: absolute;
            background: rgba(173, 216, 230, 0.8);
            border: 2px solid rgba(70, 130, 180, 0.8);
            border-radius: 8px;
            padding: 0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            font-size: 13px;
            color: #2c3e50;
            cursor: grab;
            pointer-events: all;
            z-index: 10;
            min-width: 100px;
            min-height: 40px;
            transition: transform 0.2s ease;
            user-select: none;
        }

        .annotation-box:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
        }

        /* 小图标样式 - 用于长时间跨度的手动注释 */
        .annotation-icon {
            position: absolute;
            width: 20px;
            height: 20px;
            background: #ff6b6b;
            border: 2px solid #ff5252;
            border-radius: 50%;
            cursor: pointer;
            pointer-events: all;
            z-index: 10;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .annotation-icon:hover {
            transform: scale(1.2);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            background: #ff5252;
        }

        .annotation-icon::before {
            content: '';
            width: 6px;
            height: 6px;
            background: white;
            border-radius: 50%;
            position: absolute;
        }

        /* 小图标内容容器 */
        .icon-content {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .annotation-content {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            padding: 8px 10px;
            background: rgba(255, 255, 255, 0.4);
            border-radius: 6px;
            height: calc(100% - 16px);
            position: relative;
        }

        .annotation-text {
            flex: 1;
            font-weight: 500;
            word-wrap: break-word;
            white-space: normal;
            line-height: 1.4;
            overflow-y: auto;
            height: 100%;
        }

        .annotation-close {
            background: #e74c3c;
            border: none;
            border-radius: 50%;
            width: var(--annotation-button-size);
            height: var(--annotation-button-size);
            cursor: pointer;
            position: absolute;
            top: -6px;
            right: -6px;
            color: white;
            font-size: calc(var(--annotation-button-size) * 0.6);
        }

        .annotation-edit {
            background: #3498db;
            border: none;
            border-radius: 50%;
            width: var(--annotation-button-size);
            height: var(--annotation-button-size);
            cursor: pointer;
            position: absolute;
            top: -6px;
            left: -6px;
            color: white;
            font-size: calc(var(--annotation-button-size) * 0.6);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .annotation-edit:hover {
            background: #2980b9;
        }

        .annotation-close:hover {
            background: #c0392b;
        }

        .resize-handle {
            position: absolute;
            bottom: 0;
            right: 0;
            width: 16px;
            height: 16px;
            cursor: nw-resize;
            color: #4682b4;
            font-size: 14px;
            display: flex;
            align-items: flex-end;
            justify-content: flex-end;
            padding: 2px;
        }

        .annotation-svg {
            position: absolute;
            pointer-events: none;
            z-index: 5;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: visible;
        }

        .annotation-arrow-line {
            stroke: #000000;
            stroke-width: 2;
            fill: none;
        }

        .annotation-arrow-head {
            fill: #000000;
            stroke: #000000;
            stroke-width: 1;
        }

        /* 底部控制面板 */
        .debug-panel {
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            padding: 20px;
            margin-top: 20px;
        }

        .debug-panel h3 {
            margin: 0 0 15px 0;
            color: #2c3e50;
            font-size: 18px;
        }

        .debug-controls {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }

        .debug-group {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .debug-group label {
            min-width: 100px;
            font-weight: 500;
        }

        .annotation-list-panel {
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            padding: 20px;
            margin-top: 20px;
            max-height: 700px; /* V5.8.4: 增加高度以显示更多注释（约20条） */
            display: flex;
            flex-direction: column;
        }

        .list-header {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid #dee2e6;
            flex-shrink: 0; /* 确保头部不会被压缩 */
        }

        .header-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .tab-container {
            display: flex;
            gap: 5px;
        }

        .tab-btn {
            background: #e9ecef;
            color: #495057;
            border: none;
            padding: 8px 16px;
            border-radius: 6px 6px 0 0;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.3s ease;
            border-bottom: 2px solid transparent;
        }

        .tab-btn.active {
            background: #3498db;
            color: white;
            border-bottom-color: #3498db;
        }

        .tab-btn:hover:not(.active) {
            background: #dee2e6;
            color: #2c3e50;
        }

        .tab-content {
            display: none;
            flex: 1;
            overflow-y: auto;
            min-height: 0;
        }

        .tab-content.active {
            display: flex;
            flex-direction: column;
        }

        .recycle-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding: 10px;
            background: #fff3cd;
            border: 1px solid #ffeaa7;
            border-radius: 6px;
        }

        .recycle-desc {
            margin: 0;
            font-size: 13px;
            color: #856404;
            flex: 1;
        }

        .refresh-btn {
            background: #ffc107;
            color: #212529;
            border: none;
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        .refresh-btn:hover {
            background: #e0a800;
            color: white;
        }

        .recycle-item {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            padding: 10px;
            margin-bottom: 10px;
            display: grid;
            grid-template-columns: 80px 80px 1fr 80px 80px 80px;
            gap: 10px;
            align-items: center;
            border-left: 4px solid #dc3545;
        }

        .recycle-item .deleted-date {
            font-size: 11px;
            color: #6c757d;
            font-style: italic;
        }

        .item-restore {
            background: #28a745;
            color: white;
            border: none;
            padding: 4px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
        }

        .item-restore:hover {
            background: #218838;
        }

        .item-permanent-delete {
            background: #dc3545;
            color: white;
            border: none;
            padding: 4px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
        }

        .item-permanent-delete:hover {
            background: #c82333;
        }

        .annotation-list {
            flex: 1;
            overflow-y: auto;
            min-height: 0; /* 允许flex子元素缩小 */
        }

        .list-header h3 {
            margin: 0;
            color: #2c3e50;
        }

        .header-actions {
            display: flex;
            gap: 10px;
        }

        /* V5.8.4: 时间筛选控制器样式 */
        .time-filter-section {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 12px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
        }

        .time-filter-quick {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .time-filter-quick label {
            color: white;
            font-weight: 600;
            font-size: 14px;
            white-space: nowrap;
        }

        .time-range-select {
            flex: 1;
            padding: 6px 12px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.95);
            color: #2c3e50;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .time-range-select:hover {
            background: white;
            border-color: rgba(255, 255, 255, 0.6);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .time-range-select:focus {
            outline: none;
            border-color: #ffd700;
            box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
        }

        .time-filter-custom {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            animation: slideDown 0.3s ease;
        }

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

        .time-filter-custom label {
            color: white;
            font-size: 13px;
            font-weight: 500;
            white-space: nowrap;
        }

        .date-input {
            padding: 5px 10px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.95);
            color: #2c3e50;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .date-input:hover {
            background: white;
            border-color: rgba(255, 255, 255, 0.5);
        }

        .date-input:focus {
            outline: none;
            border-color: #ffd700;
            box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
        }

        .apply-date-btn {
            padding: 5px 12px;
            background: #27ae60;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .apply-date-btn:hover {
            background: #229954;
            transform: translateY(-1px);
            box-shadow: 0 2px 6px rgba(39, 174, 96, 0.4);
        }

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

        .time-filter-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 10px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 6px;
            backdrop-filter: blur(5px);
        }

        .filter-status {
            color: white;
            font-size: 13px;
            font-weight: 600;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        }

        .add-btn {
            background: #27ae60;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
        }

        .export-btn {
            background: #3498db;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: background-color 0.2s ease;
        }

        .export-btn:hover {
            background: #2980b9;
        }

        .stock-data-helper {
            margin-top: 8px;
            text-align: left;
        }

        .fill-stock-data-btn {
            background: #e67e22;
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 13px;
            transition: background-color 0.2s ease;
            white-space: nowrap;
        }

        .fill-stock-data-btn:hover {
            background: #d35400;
        }

        .fill-stock-data-btn:disabled {
            background: #bdc3c7;
            cursor: not-allowed;
        }

        .sort-btn {
            background: #f8f9fa;
            color: #495057;
            border: 1px solid #dee2e6;
            padding: 8px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s ease;
            font-weight: 500;
        }

        .sort-btn:hover {
            background: #e9ecef;
            border-color: #adb5bd;
        }

        .sort-btn.active {
            background: #007bff;
            color: white;
            border-color: #007bff;
        }

        /* V4.8.3: 批量操作控制区域样式 */
        .batch-controls {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 6px;
            padding: 10px 15px;
            margin-top: 10px;
            display: flex;
            align-items: center;
            gap: 15px;
            flex-wrap: wrap;
        }

        .selected-count {
            font-weight: 500;
            color: #495057;
            font-size: 14px;
        }

        .select-all-btn {
            background: #6c757d;
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 13px;
            transition: background-color 0.2s ease;
        }

        .select-all-btn:hover {
            background: #5a6268;
        }

        .batch-analyze-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .batch-analyze-btn:hover:not(:disabled) {
            background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        .batch-analyze-btn:disabled {
            background: #e9ecef;
            color: #6c757d;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        /* 批量分析按钮处理中状态 - 复用现有彩虹动画 */
        .batch-analyze-btn.processing {
            border: 2px solid transparent;
            border-radius: 6px;
            position: relative;
        }

        .batch-analyze-btn.processing::before {
            content: '';
            position: absolute;
            top: -3px;
            left: -3px;
            right: -3px;
            bottom: -3px;
            background: conic-gradient(from 0deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3, #ff0000);
            border-radius: 8px;
            z-index: -1;
            animation: rainbow-border-rotate 2s linear infinite;
        }

        .batch-analyze-btn.processing::after {
            content: '';
            position: absolute;
            top: -1px;
            left: -1px;
            right: -1px;
            bottom: -1px;
            background: white;
            border-radius: 6px;
            z-index: -1;
        }

        .clear-selection-btn {
            background: #dc3545;
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 13px;
            transition: background-color 0.2s ease;
        }

        .clear-selection-btn:hover {
            background: #c82333;
        }


        
        /* 彩虹跑马灯加载动画 - 批量分析按钮 */
        .batch-analyze-btn.loading {
            position: relative;
            border: 2px solid transparent;
            border-radius: 6px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .batch-analyze-btn.loading::before {
            content: '';
            position: absolute;
            top: -3px;
            left: -3px;
            right: -3px;
            bottom: -3px;
            background: conic-gradient(from 0deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3, #ff0000);
            border-radius: 8px;
            z-index: -1;
            animation: rainbow-border-rotate 2s linear infinite;
        }
        
        .batch-analyze-btn.loading::after {
            content: '';
            position: absolute;
            top: -1px;
            left: -1px;
            right: -1px;
            bottom: -1px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 6px;
            z-index: 0;
        }
        
        /* 确保按钮文字在最上层 */
        .batch-analyze-btn.loading {
            z-index: 1;
            position: relative;
        }
        
        .batch-analyze-btn.loading * {
            position: relative;
            z-index: 2;
        }

        /* 注释项复选框样式 */
        .annotation-checkbox {
            width: 16px;
            height: 16px;
            margin: 0;
            cursor: pointer;
            accent-color: #3498db;
        }

        .annotation-item.selected {
            background: #e3f2fd;
            position: relative;
            border: 3px solid transparent;
            border-radius: 8px;
        }
        
        /* 选中项目的处理中状态 - 简洁的边框闪烁效果 */
        .annotation-item.selected.processing {
            border: 3px solid #667eea;
            animation: selected-item-pulse 1.5s ease-in-out infinite;
        }
        
        @keyframes selected-item-pulse {
            0% { 
                border-color: #667eea; 
                box-shadow: 0 0 0 rgba(102, 126, 234, 0.3);
            }
            50% { 
                border-color: #764ba2; 
                box-shadow: 0 0 15px rgba(118, 75, 162, 0.4);
            }
            100% { 
                border-color: #667eea;
                box-shadow: 0 0 0 rgba(102, 126, 234, 0.3);
            }
        }


        .annotation-item {
            background: white;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            padding: 10px;
            margin-bottom: 10px;
            display: grid;
            grid-template-columns: 80px 80px 1fr 120px 60px;
            gap: 10px;
            align-items: center;
        }

        .item-delete {
            background: #dc3545;
            color: white;
            border: none;
            padding: 4px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
        }

        .item-edit {
            background: #3498db;
            color: white;
            border: none;
            padding: 4px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            margin-right: 4px;
        }

        .item-edit:hover {
            background: #2980b9;
        }

        .item-delete:hover {
            background: #c82333;
        }
        
        /* AI分析按钮样式 */
        .item-ai-analyze {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 4px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            margin-right: 4px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        
        .item-ai-analyze:hover {
            background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
        }
        
        .item-ai-analyze:disabled {
            cursor: not-allowed;
            opacity: 0.7;
        }
        
        /* 彩虹跑马灯加载动画 - 只旋转边框，按钮内容保持稳定 */
        .item-ai-analyze.loading {
            position: relative;
            border: 2px solid transparent;
            border-radius: 6px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            /* 移除整个按钮的旋转动画 */
        }
        
        .item-ai-analyze.loading::before {
            content: '';
            position: absolute;
            top: -3px;
            left: -3px;
            right: -3px;
            bottom: -3px;
            background: conic-gradient(from 0deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3, #ff0000);
            border-radius: 8px;
            z-index: -1;
            animation: rainbow-border-rotate 2s linear infinite;
        }
        
        .item-ai-analyze.loading::after {
            content: '';
            position: absolute;
            top: -1px;
            left: -1px;
            right: -1px;
            bottom: -1px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 6px;
            z-index: -1;
        }
        
        @keyframes rainbow-border-rotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        /* 弹窗AI分析按钮的彩虹边框动画 */
        @keyframes rainbow-pulse {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .status {
            text-align: center;
            padding: 20px;
            font-size: 16px;
            color: #666;
        }

        .loading { color: #3498db; }
        .error { 
            color: #721c24; 
            background: #f8d7da; 
            padding: 15px; 
            border-radius: 6px; 
            border-left: 4px solid #dc3545;
            line-height: 1.6;
            font-size: 14px;
            margin: 10px 0;
        }
        .success { color: #27ae60; background: #f0f9f4; padding: 15px; border-radius: 4px; }

        /* 对话框样式 */
        .add-annotation-dialog {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .add-annotation-content {
            background: white;
            padding: 25px;
            border-radius: 8px;
            width: 400px;
            max-width: 90vw;
        }

        .add-form-group {
            margin-bottom: 15px;
        }

        .add-form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: 500;
        }

        .add-form-group input,
        .add-form-group textarea {
            width: 100%;
            padding: 8px;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 14px;
        }

        .add-dialog-buttons {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        .add-dialog-buttons button {
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        #saveAddAnnotation {
            background: #27ae60;
            color: white;
        }

        #cancelAddAnnotation {
            background: #6c757d;
            color: white;
        }

        /* Custom Scrollbar Styling */
        .annotation-text::-webkit-scrollbar {
            width: 5px;
        }
        .annotation-text::-webkit-scrollbar-track {
            background: transparent;
        }
        .annotation-text::-webkit-scrollbar-thumb {
            background-color: rgba(0, 0, 0, 0.2);
            border-radius: 10px;
            border: 1px solid transparent;
            background-clip: content-box;
        }
        .annotation-text::-webkit-scrollbar-thumb:hover {
            background-color: rgba(0, 0, 0, 0.4);
        }

        /* 右侧设置边栏 */
        .settings-sidebar {
            position: fixed;
            top: 0;
            right: -370px;
            width: 350px;
            height: 100vh;
            background: #ffffff;
            box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
            transition: right 0.3s ease;
            z-index: 1000;
            overflow-y: auto;
        }

        .settings-sidebar.open {
            right: 0;
        }

        .sidebar-content {
            padding: 20px;
            height: 100%;
        }

        .sidebar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid #e9ecef;
        }

        .sidebar-header h3 {
            margin: 0;
            color: #2c3e50;
            font-size: 18px;
        }

        .sidebar-close-btn {
            background: #e74c3c;
            color: white;
            border: none;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .sidebar-close-btn:hover {
            background: #c0392b;
            transform: scale(1.1);
        }

        .sidebar-section {
            margin-bottom: 30px;
            background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            border: 1px solid #e9ecef;
        }

        .sidebar-section h4 {
            margin: 0 0 15px 0;
            color: #2c3e50;
            font-size: 16px;
            font-weight: 600;
            border-bottom: 1px solid #dee2e6;
            padding-bottom: 8px;
        }

        /* 侧边栏内的控件样式 */
        .algo-controls-sidebar {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .algo-controls-sidebar .algo-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 12px;
            background: white;
            border-radius: 6px;
            border: 1px solid #dee2e6;
        }

        .algo-controls-sidebar .algo-group label {
            font-size: 13px;
            color: #495057;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .algo-controls-sidebar .algo-group input[type="checkbox"] {
            transform: scale(1.1);
        }

        .algo-controls-sidebar .algo-group input[type="number"] {
            width: 70px;
            padding: 6px 8px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            font-size: 13px;
        }

        .algo-controls-sidebar .algo-group select {
            padding: 6px 8px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            font-size: 13px;
            background: white;
        }

        /* 样式调试控件 */
        .debug-controls-sidebar {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .debug-controls-sidebar .debug-group {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px;
            background: white;
            border-radius: 6px;
            border: 1px solid #dee2e6;
        }

        .debug-controls-sidebar .debug-group label {
            min-width: 80px;
            font-weight: 500;
            font-size: 13px;
            color: #495057;
        }

        .debug-controls-sidebar .debug-group input[type="color"] {
            width: 40px;
            height: 30px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            cursor: pointer;
        }

        .debug-controls-sidebar .debug-group input[type="range"] {
            flex: 1;
        }

        .debug-controls-sidebar .debug-group span {
            min-width: 40px;
            font-size: 12px;
            color: #6c757d;
        }

        /* 响应式设计 */
        @media (max-width: 1600px) {
            .container.sidebar-open {
                margin-right: 360px;
            }
        }

        @media (max-width: 1200px) {
            .settings-sidebar {
                width: 320px;
                right: -330px;
            }

            .container.sidebar-open {
                margin-right: 330px;
            }
        }

        @media (max-width: 768px) {
            .settings-sidebar {
                width: 100vw;
                right: -100vw;
            }

            .settings-sidebar.open {
                right: 0;
            }

            .container.sidebar-open {
                margin-right: 0;
            }

            .header-wrapper {
                flex-direction: column;
                gap: 15px;
                align-items: center;
            }

            .settings-toggle-btn {
                position: fixed;
                top: 20px;
                right: 20px;
                z-index: 1001;
            }
        }
        .chart-legend-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            margin-top: 15px;
            padding: 10px;
            background-color: #f8f9fa;
            border-radius: 8px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            color: #333;
        }

        .legend-color-box {
            width: 25px;
            height: 15px;
            border-radius: 4px;
            opacity: 0.7;
        }

        /* V1.3: 市场阶段图例样式 */
        .chart-legend-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            margin-top: 15px;
            padding: 10px;
            background-color: #f8f9fa;
            border-radius: 8px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            color: #333;
        }

        .legend-color-box {
            width: 25px;
            height: 15px;
            border-radius: 4px;
            opacity: 0.7;
        }
/* 右键菜单样式 */
.annotation-context-menu,
.chart-context-menu {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 4px 0;
    min-width: 160px;
    font-size: 14px;
    z-index: 10000;
}

.context-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    color: #333;
    transition: background-color 0.15s;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.context-menu-item:hover {
    background-color: #f5f5f5;
}

.context-menu-item:active {
    background-color: #e9ecef;
}

/* 重点注释圆点样式 - 实心圆点 */
.annotation-icon .icon-content.favorite::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--favorite-color, #ff6b6b);
    border-radius: 50%;
    position: absolute;
}

/* 普通注释保持空心圆点 */
.annotation-icon .icon-content:not(.favorite)::before {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    position: absolute;
}

/* 内容不足时隐藏中间背景，保留边框 */
.annotation-icon.content-insufficient {
    background: transparent !important;
    /* 保留边框和阴影，只隐藏中间的淡色背景 */
}

/* 帮助按钮样式 */
.help-btn {
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%);
}

.help-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 使用说明弹窗样式 */
.help-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.help-dialog-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.help-dialog-header {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 20px 20px 0;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 0;
}

.help-dialog-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

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

.help-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.help-dialog-body {
    flex: 1;
    padding: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.help-textarea {
    width: 100%;
    height: 400px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.help-textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.help-dialog-buttons {
    display: flex;
    gap: 12px;
    padding: 0 20px 20px;
    justify-content: flex-end;
}

.help-reset-btn, .help-save-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-reset-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.help-reset-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.help-save-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.help-save-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1abc9c 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.help-save-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(40, 167, 69, 0.3);
}
