/* TradingView风格的重置和基础样式 */
/* 版本: v20241218-069 - 股票列表滚动条UI优化完成 */
/* 更新时间: 2024-12-18 统一股票列表滚动条样式，消除横向滚动条，优化移动端体验 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
    background: #131722;
    color: #d1d4dc;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.unselectable {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.i-no-scroll {
    overflow: hidden;
}

/* 布局区域样式 */
.layout-with-border-radius {
    background: #131722;
}

.black-border-bigger-radius {
    border-radius: 6px;
}

/* 顶部左侧用户按钮区域 */
.layout__area--topleft {
    background: #2a2e39;
}

.topLeftButton {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topLeftButton .button {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.topLeftButton .userPic {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.notifications {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff5722;
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    line-height: 14px;
}

/* 顶部工具栏样式 */
.layout__area--top {
    background: #2a2e39;
    border-bottom: 1px solid #3a3e49;
}

.toolbar {
    height: 100%;
    display: flex;
    align-items: center;
}

.toolbar .inner {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 8px;
}

.toolbar .innerWrap {
    display: flex;
    align-items: center;
    gap: 1px;
    width: 100%;
}

.toolbar .group {
    display: flex;
    align-items: center;
    gap: 1px;
}

.toolbar .separatorWrap {
    width: 1px;
    height: 20px;
    margin: 0 8px;
}

.toolbar .separator {
    width: 1px;
    height: 100%;
    background: #434651;
}

.toolbar .fill {
    flex: 1;
}

/* 工具栏按钮样式 */
.toolbar .button {
    height: 28px;
    border: none;
    background: transparent;
    color: #b2b5be;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.toolbar .button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #d1d4dc;
}

.toolbar .button.active {
    background: #2962ff;
    color: white;
}

.toolbar .button .icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toolbar .button .icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.toolbar .button-text {
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

/* 符号搜索按钮 */
.symbol-button {
    min-width: 80px;
    text-transform: uppercase;
    font-weight: 500;
}

/* 时间间隔按钮组 */
.interval-group {
    display: flex;
    align-items: center;
    border-radius: 4px;
    overflow: hidden;
}

.interval-button {
    height: 28px;
    border: none;
    background: transparent;
    color: #b2b5be;
    cursor: pointer;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 400;
    border-radius: 0;
    transition: all 0.2s ease;
    min-width: 32px;
}

.interval-button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #d1d4dc;
}

.interval-button.active {
    background: #2962ff;
    color: white;
}

.menu-button {
    width: 16px;
    height: 28px;
    border: none;
    background: transparent;
    color: #b2b5be;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.menu-button:hover {
    color: #d1d4dc;
}

.menu-button .icon svg {
    width: 16px;
    height: 8px;
}

/* 左侧绘图工具栏 */
.layout__area--left {
    background: #2a2e39;
    border-right: 1px solid #3a3e49;
}

.drawingToolbar {
    height: 100%;
    padding: 8px 4px;
}

.drawingToolbar .inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

.drawingToolbar .group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tool-button {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #b2b5be;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.tool-button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #d1d4dc;
}

.tool-button.active {
    background: #2962ff;
    color: white;
}

.tool-button .icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-button .icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* 中心图表区域 */
.layout__area--center {
    background: #131722;
    display: flex;
    flex-direction: column;
}

.chart-container {
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    z-index: 0;
}

.chart-container-border {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0; /* 重要：确保flex子元素可以收缩 */
}

.chart-widget {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 400px; /* 设置最小高度确保图表可见 */
}

/* 图例样式 */
.legend {
    position: relative;
    top: 0;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(42, 46, 57, 0.9);
    padding: 8px 12px;
    border-radius: 0;
    backdrop-filter: blur(8px);
    flex-shrink: 0;
    border-bottom: 1px solid #3a3e49;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logoWrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.logo {
    width: 20px;
    height: 20px;
    background: #2962ff;
    color: white;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.title {
    background: none;
    border: none;
    color: #d1d4dc;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.title:hover {
    color: #2962ff;
}

.valuesWrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 16px;
}

.valueItem {
    display: flex;
    align-items: center;
    gap: 4px;
}

.valueTitle {
    color: #787b86;
    font-size: 12px;
    font-weight: 400;
}

.valueValue {
    color: #d1d4dc;
    font-size: 12px;
    font-weight: 500;
}

/* 横向图例布局样式 */
.legend-item-horizontal {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.legend-symbol {
    display: flex;
    align-items: center;
}

.legend-symbol .title {
    background: none;
    border: none;
    color: #d1d4dc;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    min-width: 80px;
}

.legend-symbol .title:hover {
    color: #2962ff;
}

.legend-interval {
    display: flex;
    align-items: center;
}

.legend-interval .title {
    background: none;
    border: none;
    color: #787b86;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.legend-interval .title:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #d1d4dc;
}

/* 复权选择下拉框 */
.adjustment-select {
    background: #2a2e39;
    border: 1px solid #434651;
    border-radius: 3px;
    color: #d1d4dc;
    font-size: 11px;
    padding: 2px 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.adjustment-select:hover {
    border-color: #2962ff;
    background: #363a45;
}

.adjustment-select:focus {
    outline: none;
    border-color: #2962ff;
    box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.2);
}

.adjustment-select option {
    background: #2a2e39;
    color: #d1d4dc;
}

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

.ohlc-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ohlc-label {
    color: #787b86;
    font-size: 11px;
    font-weight: 400;
    min-width: 12px;
}

.ohlc-value {
    color: #d1d4dc;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Consolas', 'Monaco', monospace;
}

.legend-change {
    display: flex;
    align-items: center;
    min-width: 120px; /* 固定最小宽度，防止位置变化 */
    justify-content: flex-end;
}

.change-value {
    font-size: 13px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
}

.change-value.positive {
    color: #f23645;
    background: rgba(248, 113, 113, 0.1);
}

.change-value.negative {
    color: #4caf50;
    background: rgba(74, 222, 128, 0.1);
}

/* 分析工具开关 */
.legend-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
    flex-shrink: 0; /* 防止收缩 */
}

.tool-switch {
    display: flex;
    align-items: center;
}

.switch-button {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #434651;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
    color: #787b86;
    min-height: 24px;
}

.switch-button:hover {
    border-color: #2962ff;
    background: rgba(41, 98, 255, 0.1);
    color: #d1d4dc;
}

.switch-button.active {
    border-color: #2962ff;
    background: rgba(41, 98, 255, 0.15);
    color: #2962ff;
}

.switch-button.active .switch-icon {
    color: #4ade80;
    font-weight: bold;
}

.switch-icon {
    font-size: 10px;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.switch-button:not(.active) .switch-icon {
    opacity: 0.3;
}

.switch-label {
    font-weight: 500;
    white-space: nowrap;
}

/* 主图表容器 */
.main-chart-container {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    min-height: 300px; /* 确保最小高度 */
    background: #131722;
}

#chart-container {
    flex: 1;
    height: 100%;
    min-height: 300px; /* 确保最小高度 */
    position: relative; /* 添加相对定位以支持Canvas叠加层 */
    overflow: visible; /* 允许标签显示在容器外 */
    min-width: 0 !important; /* 确保可以收缩 */
    width: auto !important; /* 自动宽度 */
    max-width: none !important; /* 无最大宽度限制 */
}

/* 斐波那契自定义标签样式 */
.fibonacci-label {
    position: absolute !important;
    z-index: 1000 !important;
    pointer-events: none !important;
    pointer-events: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif !important;
    user-select: none !important;
    transition: all 0.1s ease;
}

/* 斐波那契文本标签样式（精确定位） */
.fibonacci-text-label {
    position: absolute !important;
    z-index: 1000 !important;
    pointer-events: none !important;
    font-family: 'Courier New', monospace !important;
    font-size: 22px !important;
    font-weight: bold !important;
    user-select: none !important;
    transition: none;
    background: transparent !important;
    border: none !important;
    text-shadow: 
        1px 1px 2px rgba(0,0,0,0.9),
        -1px -1px 2px rgba(0,0,0,0.9),
        1px -1px 2px rgba(0,0,0,0.9),
        -1px 1px 2px rgba(0,0,0,0.9),
        0 0 4px rgba(0,0,0,0.8);
}

/* 右侧市场面板 */
.layout__area--right {
    background: #2a2e39;
    border-left: 1px solid #3a3e49;
}

.market-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.market-panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid #3a3e49;
}

.market-panel-header h3 {
    color: #d1d4dc;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.market-tabs {
    display: flex;
    gap: 1px;
    background: #1e2329;
    border-radius: 4px;
    padding: 2px;
}

.tab-button {
    flex: 1;
    height: 28px;
    border: none;
    background: transparent;
    color: #787b86;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: #d1d4dc;
}

.tab-button.active {
    background: #2962ff;
    color: white;
}

.market-panel-content {
    flex: 1;
    overflow: hidden;
}

.tab-content {
    height: 100%;
    overflow-y: auto;
    display: none;
}

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

.symbol-list {
    padding: 8px 0;
}

.symbol-item {
    padding: 12px 16px;
    border-bottom: none;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.symbol-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.symbol-info {
    flex: 1;
}

.symbol-name {
    color: #d1d4dc;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.symbol-desc {
    color: #787b86;
    font-size: 12px;
}

.symbol-price {
    text-align: right;
}

.price {
    color: #d1d4dc;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.change {
    font-size: 12px;
    font-weight: 500;
}

.change.positive {
    color: #f23645;
}

.change.negative {
    color: #4caf50;
}

/* 价格闪烁效果 */
@keyframes flash-positive {
    0% { background-color: rgba(242, 54, 69, 0); }
    50% { background-color: rgba(242, 54, 69, 0.3); }
    100% { background-color: rgba(242, 54, 69, 0); }
}

@keyframes flash-negative {
    0% { background-color: rgba(76, 175, 80, 0); }
    50% { background-color: rgba(76, 175, 80, 0.3); }
    100% { background-color: rgba(76, 175, 80, 0); }
}

.flash-positive {
    animation: flash-positive 1s ease-out;
    border-radius: 3px;
}

.flash-negative {
    animation: flash-negative 1s ease-out;
    border-radius: 3px;
}

.empty-state {
    padding: 32px 16px;
    text-align: center;
    color: #787b86;
}

.add-symbol-btn {
    margin-top: 16px;
    padding: 8px 16px;
    background: #2962ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
}

.add-symbol-btn:hover {
    background: #1e53e5;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10003;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #2a2e39;
    margin: 10% auto;
    padding: 0;
    border: 1px solid #3a3e49;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #3a3e49;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #d1d4dc;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.close {
    color: #787b86;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.close:hover {
    color: #d1d4dc;
}

.modal-body {
    padding: 24px;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: #1e2329;
    border: 1px solid #3a3e49;
    border-radius: 6px;
    color: #d1d4dc;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #2962ff;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #2962ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.login-btn:hover {
    background: #1e53e5;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .layout__area--right {
        width: 280px;
    }
    
    .layout__area--center {
        width: calc(100% - 336px);
    }
}

@media (max-width: 768px) {
    .layout__area--right {
        display: none;
    }
    
    .layout__area--center {
        width: calc(100% - 56px);
    }
    
    .toolbar .button-text {
        display: none;
    }
    
    .toolbar .button {
        min-width: 32px;
        padding: 0 4px;
    }
    
    .legend {
        position: static;
        margin-bottom: 8px;
        background: rgba(42, 46, 57, 0.95);
    }
}

/* 滚动条样式 */
.noScrollBar::-webkit-scrollbar,
.tab-content::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* 工具提示样式 */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
    margin-bottom: 4px;
}

[data-tooltip]:hover:before {
    opacity: 1;
}

/* 图表加载状态 */
.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #787b86;
    font-size: 14px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #3a3e49;
    border-top: 2px solid #2962ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* 深色主题特定样式 */
.theme-dark {
    --bg-primary: #131722;
    --bg-secondary: #2a2e39;
    --bg-tertiary: #1e2329;
    --border-color: #3a3e49;
    --text-primary: #d1d4dc;
    --text-secondary: #787b86;
    --accent-color: #2962ff;
    --accent-hover: #1e53e5;
    --success-color: #4caf50;
    --error-color: #f23645;
}

/* 图表特定样式优化 */
.tv-lightweight-charts {
    background: transparent !important;
}

/* 移动端基本布局优化 - 仅必要设置，不干预触摸事件 */
@media (max-width: 768px) {
    #chart-container {
        min-height: 400px !important; /* 确保移动端有足够的图表高度 */
    }
}

/* 确保图表完全填充容器，但排除龙虎榜收缩按钮 - 修复：移除强制宽度设置 */
#chart-container > div:not(.lhb-collapsed-button) {
    /* width: 100% !important; - 删除强制宽度，让flex布局自动处理 */
    height: 100% !important; /* 保留高度设置 */
}

/* 符号搜索模态框样式 */
.symbol-search-content {
    width: 600px;
    max-width: 90%;
    max-height: 80vh;
    margin: 5% auto;
}

/* 搜索模态框头部 */
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #3a3e49;
    position: relative;
}

/* 搜索模态框关闭按钮 - 移动到右上角 */
.search-header .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    z-index: 10;
}

.search-header .close-btn:hover {
    background: #333;
    color: #d1d4dc;
}

/* 市场选择器样式 */
.market-selector {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.market-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #b2b5be;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.market-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #d1d4dc;
}

.market-btn.active {
    background: #2962ff;
    color: white;
    box-shadow: 0 2px 4px rgba(41, 98, 255, 0.3);
}

.search-input-container {
    margin-bottom: 20px;
}

#symbol-search-input {
    width: 100%;
    padding: 12px 16px;
    background: #1e2329;
    border: 1px solid #3a3e49;
    border-radius: 6px;
    color: #d1d4dc;
    font-size: 16px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
}

#symbol-search-input:focus {
    outline: none;
    border-color: #2962ff;
}

.search-tabs {
    display: flex;
    gap: 2px;
    background: #1e2329;
    border-radius: 6px;
    padding: 2px;
}

.search-tab {
    flex: 1;
    height: 32px;
    border: none;
    background: transparent;
    color: #787b86;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 60px;
}

.search-tab:hover {
    color: #d1d4dc;
    background: rgba(255, 255, 255, 0.05);
}

.search-tab.active {
    background: #2962ff;
    color: white;
}

.search-results-container {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 123, 134, 0.4) transparent;
}

.search-results {
    min-height: 200px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

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

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: 600;
    font-size: 12px;
    color: white;
}

.search-result-icon.stock {
    background: #2962ff;
}

.search-result-icon.forex {
    background: #ff9800;
}

.search-result-icon.crypto {
    background: #4caf50;
}

.search-result-icon.index {
    background: #9c27b0;
}

.search-result-icon.fund {
    background: #f44336;
}

.search-result-info {
    flex: 1;
}

.search-result-symbol {
    font-size: 14px;
    font-weight: 600;
    color: #d1d4dc;
    margin-bottom: 2px;
}

.search-result-name {
    font-size: 12px;
    color: #787b86;
}

.search-result-meta {
    text-align: right;
    font-size: 12px;
}

.search-result-exchange {
    color: #787b86;
    margin-bottom: 2px;
}

.search-result-type {
    color: #2962ff;
    font-weight: 500;
}

/* 股票代码搜索结果样式 */
.stock-code-result {
    position: relative;
}

.add-stock-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: #2962ff;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(41, 98, 255, 0.3);
}

.add-stock-btn:hover {
    background: #1e53e5;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 8px rgba(41, 98, 255, 0.4);
}

.add-stock-btn svg {
    width: 16px;
    height: 16px;
}

.stock-code-result .search-result-info {
    padding-right: 50px; /* 为加号按钮留出空间 */
}

.search-hint {
    text-align: center;
    padding: 40px 20px;
    color: #787b86;
    font-size: 14px;
}

.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #787b86;
}

.search-no-results .icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.search-no-results .hint {
    font-size: 11px;
    color: #787b86;
    margin-top: 8px;
    opacity: 0.8;
}

/* 第一个搜索结果高亮 */
.search-result-item.first-result {
    background: rgba(41, 98, 255, 0.1);
    border-left: 3px solid #2962ff;
}

.search-result-item.first-result:hover {
    background: rgba(41, 98, 255, 0.15);
}

/* 匹配类型显示 */
.search-result-match {
    font-size: 10px;
    color: #787b86;
    margin-top: 2px;
    padding: 1px 4px;
    background: rgba(120, 123, 134, 0.1);
    border-radius: 2px;
    display: inline-block;
}

.search-loading {
    text-align: center;
    padding: 40px 20px;
    color: #787b86;
}

.search-loading .spinner {
    margin: 0 auto 16px;
}

/* 搜索结果滚动条 */
.search-results-container::-webkit-scrollbar {
    width: 6px;
}

.search-results-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.search-results-container::-webkit-scrollbar-thumb {
    background: rgba(120, 123, 134, 0.4);
    border-radius: 3px;
}

.search-results-container::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 123, 134, 0.6);
}

/* 搜索标签滚动条 */
.search-tabs::-webkit-scrollbar {
    height: 4px;
}

.search-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.search-tabs::-webkit-scrollbar-thumb {
    background: #434651;
    border-radius: 2px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .symbol-search-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .search-tabs {
        gap: 1px;
    }
    
    .search-tab {
        min-width: 50px;
        font-size: 11px;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
    
    .search-result-icon {
        width: 28px;
        height: 28px;
        margin-right: 10px;
    }
}

/* 主要布局容器 */
.chart-wrapper {
    width: 100%;
    height: 100vh;
    background: #1e222d;
    color: #d1d4dc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

.chart-header {
    flex-shrink: 0;
    background: #2a2e39;
    border-bottom: 1px solid #3a3e49;
    padding: 8px 16px;
    z-index: 10;
}

/* 默认隐藏移动端布局容器 */
.mobile-layout-container {
    display: none;
}

.toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
}

.symbol-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.symbol-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.symbol-selector:hover {
    background: rgba(255, 255, 255, 0.1);
}

.symbol-name {
    font-weight: 600;
    font-size: 14px;
    color: #d1d4dc;
}

.search-icon {
    width: 12px;
    height: 12px;
    stroke: #787b86;
}

.symbol-price {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    width: 180px;
}

.symbol-price .price {
    font-weight: 600;
    font-size: 16px;
    color: #d1d4dc;
    min-width: 60px;
    text-align: right;
}

.symbol-price .change {
    font-size: 12px;
    font-weight: 500;
    min-width: 110px;
    text-align: left;
}

.symbol-price .change.positive {
    color: #f23645;
}

.symbol-price .change.negative {
    color: #4caf50;
}

/* 旧样式已移至新位置，此处删除重复定义 */

.drawing-tools {
    display: flex;
    align-items: center;
    gap: 2px;
}

.tool-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #787b86;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 600;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #d1d4dc;
}

.tool-btn.active {
    background: #2962ff;
    color: white;
}

/* 旧样式已移至新位置，此处删除重复定义 */

.chart-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: #131722;
    /* 🎛️ 添加过渡动画，确保图表容器能够平滑调整 */
    transition: all 0.3s ease;
    position: relative;
}

.chart-container {
    flex: 1;
    height: 100%;
    position: relative;
    background: #1e222d;
    min-width: 0 !important; /* 确保可以收缩 */
    width: auto !important; /* 自动宽度 */
    max-width: none !important; /* 无最大宽度限制 */
}

.right-panel {
    width: 300px;
    background: #2a2e39;
    border-left: 1px solid #3a3e49;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s ease, border 0.3s ease, min-width 0.3s ease, max-width 0.3s ease; /* 增强transition */
    position: relative;
    flex-shrink: 0; /* 防止面板被压缩 */
    z-index: 1500;
}

/* 面板展开时内容的初始状态 - 确保有平滑过渡 */
.right-panel:not(.collapsed) .stock-list-selector,
.right-panel:not(.collapsed) .panel-section,
.right-panel:not(.collapsed) .stock-list-content {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.15s ease, visibility 0s ease;
}

/* 右侧面板收缩状态 - 修复：使用width来真正隐藏面板并释放空间 */
.right-panel.collapsed {
    width: 0;  /* 移除 !important 让transition正常工作 */
    min-width: 0; /* 允许面板完全收缩 */
    max-width: 0; /* 强制最大宽度也为0 */
    border-left: none; /* 收缩时移除边框 */
    border-right: none; /* 移除右边框 */
    overflow: hidden; /* 确保内容完全隐藏 */
    flex-shrink: 1; /* 允许收缩 */
    flex-basis: 0; /* 基础大小为0 */
    transition: width 0.3s ease, border 0.3s ease; /* 明确指定transition */
    /* 移除 visibility 和 opacity，让内容随着宽度平滑收缩 */
}

/* 面板收缩时内容淡出动画 - 使用更具体的选择器覆盖强制显示规则 */
.right-panel.collapsed .stock-list-selector,
.right-panel.collapsed .panel-section,
.right-panel.collapsed .stock-list-content,
.right-panel.collapsed .list-tabs,
.right-panel.collapsed .list-tab {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.15s ease, visibility 0s 0.15s !important;
}

/* 🎛️ 图表内容区域的flex布局确保正确响应面板状态变化 */
.chart-content {
    /* flex布局已经在基础样式中定义，无需额外调整 */
    /* 当面板width变为0时，图表容器会自动占用全部可用空间 */
}

/* 右侧面板切换按钮 */
.right-panel-toggle {
    position: fixed;
    right: 300px; /* 默认在面板左侧 */
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 80px;
    background: rgba(42, 46, 57, 0.95);
    border: 1px solid #3a3e49;
    border-right: none;
    border-radius: 10px 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    user-select: none;
}

/* 面板收缩时按钮位置调整 - 由JavaScript控制，此CSS规则已禁用 */
/*
.right-panel.collapsed + .right-panel-toggle,
.chart-content:has(.right-panel.collapsed) .right-panel-toggle {
    right: 0;
}
*/

/* 按钮内箭头样式 */
.right-panel-toggle .toggle-arrow {
    font-size: 12px;
    color: #d1d4dc;
    transition: all 0.2s ease;
    writing-mode: vertical-lr;
    text-orientation: mixed;
}

/* 悬停效果 */
.right-panel-toggle:hover {
    background: rgba(58, 62, 73, 0.95);
}

.right-panel-toggle:hover .toggle-arrow {
    color: #ffffff;
    transform: scale(1.1);
}

/* 桌面端专用 - 只在大屏幕显示 */
@media (max-width: 768px) {
    .right-panel-toggle {
        display: none !important;
    pointer-events: auto !important;

    pointer-events: auto !important;
    }
}

.panel-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0; /* 确保可以正确收缩 */
    width: 100%; /* 确保完全占据面板宽度 */
}

.panel-header {
    padding: 16px;
    border-bottom: 1px solid #3a3e49;
    font-weight: 600;
    font-size: 14px;
    color: #d1d4dc;
    background: #2a2e39;
    flex-shrink: 0;
}

.market-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.market-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid transparent;
}

.market-item:hover {
    background: rgba(255, 255, 255, 0.06);
    opacity: 1;
    border-left-color: rgba(41, 98, 255, 0.5);
    transform: translateX(2px);
}

.item-info {
    flex: 1;
}

.item-symbol {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #d1d4dc;
    margin-bottom: 2px;
}

.item-name {
    display: block;
    font-size: 11px;
    color: #787b86;
}

.item-price {
    text-align: right;
}

.item-price .price {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #d1d4dc;
    margin-bottom: 2px;
}

.item-price .change {
    display: block;
    font-size: 11px;
    font-weight: 500;
}

.item-price .change.positive {
    color: #f23645;
}

.item-price .change.negative {
    color: #4caf50;
}

/* 添加到自选股按钮 */
.add-to-watchlist-btn {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #b2b5be;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* 从市场行情删除按钮 */
.remove-from-market-btn,
.remove-stock-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #b2b5be;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
}

.add-to-watchlist-btn:hover {
    background: rgba(41, 98, 255, 0.2);
    color: #2962ff;
    transform: translateY(-50%) scale(1.1);
}

.remove-from-market-btn:hover,
.remove-stock-btn:hover {
    background: rgba(242, 54, 69, 0.2);
    color: #f23645;
    transform: translateY(-50%) scale(1.1);
}

.market-item:hover .add-to-watchlist-btn,
.market-item:hover .remove-from-market-btn,
.stock-item:hover .add-to-watchlist-btn,
.stock-item:hover .remove-from-market-btn,
.stock-item:hover .remove-stock-btn {
    opacity: 1;
}

.market-item:hover .item-price,
.stock-item:hover .item-price {
    margin-right: 76px; /* 为两个按钮留出空间 (24+8+24+8+12) */
}

/* ==================== 股票列表表头样式 ==================== */

/* 表头容器 */
.stock-list-header {
    position: sticky;
    top: 0;
    display: flex;
    height: 36px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    user-select: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding-left: 20px;
}

/* 表头列 */
.header-col {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
}

/* 表头序号列 - 绝对定位 */
.header-index {
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1;
}

/* 表头列宽度分配 */
.header-col.col-stock {
    flex: 1;
    min-width: 120px;
    justify-content: flex-start;
    padding-left: 0;
}

.header-col.col-stock .header-text {
    margin-left: 2px;
}

.header-col.col-price {
    flex: 0 0 75px;
    text-align: center;
    justify-content: center;
}

.header-col.col-change {
    flex: 0 0 100px;
    text-align: right;
    justify-content: flex-end;
    margin-left: -10px;
}

/* 表头悬停效果 */
.header-col:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

/* 激活状态的表头列 */
.header-col.active {
    color: #2962ff;
    background: rgba(41, 98, 255, 0.1);
}

.header-col.active:hover {
    background: rgba(41, 98, 255, 0.15);
}

/* 表头文字 */
.header-text {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.8);
}

/* 🔧 强制显示表头文字 - 修复桌面端看不到表头的问题 */
.stock-list-header .header-text {
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
}

/* 🔧 确保表头容器可见 */
.stock-list-header {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 排序指示器 */
.sort-indicator {
    font-size: 10px;
    font-style: normal;
    opacity: 0.5;
    margin-left: 4px;
    transition: all 0.2s ease;
    min-width: 8px;
    text-align: center;
}

.header-col:hover .sort-indicator {
    opacity: 0.8;
}

.header-col.active .sort-indicator {
    opacity: 1;
    color: #2962ff;
    transform: scale(1.1);
}

/* 表头点击效果 */
.header-col:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
}

/* 表头响应式设计 */
@media (max-width: 768px) {
    .stock-list-header {
        height: 44px; /* 增加移动端触摸区域 */
        font-size: 12px;
    }

    .header-col {
        padding: 0 12px;
        font-size: 12px;
    }

    .header-text {
        font-size: 12px;
    }


    .sort-indicator {
        font-size: 9px;
        margin-left: 3px;
    }

    /* 调整移动端列宽 */
    .header-col.col-stock {
        min-width: 100px;
    }

    .header-col.col-price {
        flex: 0 0 70px;
    }

    .header-col.col-change {
        flex: 0 0 85px;
    }
}

/* 表头加载动画 */
@keyframes headerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stock-list-header {
    animation: headerFadeIn 0.3s ease-out;
}

/* 排序动画 */
@keyframes sortPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.header-col.active .sort-indicator {
    animation: sortPulse 0.3s ease-out;
}

/* 性能优化和用户体验样式 */
.header-col.sorting {
    background: rgba(255, 255, 255, 0.08);
    opacity: 0.8;
}

.stock-list-header.loading {
    pointer-events: none;
    opacity: 0.7;
}

.stock-list-header.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #2962ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translateY(-50%);
}

.stock-list-header.error {
    background: rgba(244, 67, 54, 0.1);
    border-bottom-color: rgba(244, 67, 54, 0.3);
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* 浅色主题的性能优化样式 */
.theme-light .header-col.sorting {
    background: rgba(0, 0, 0, 0.08);
}

.theme-light .stock-list-header.loading::after {
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top: 2px solid #1976d2;
}

.theme-light .stock-list-header.error {
    background: rgba(244, 67, 54, 0.1);
    border-bottom-color: rgba(244, 67, 54, 0.3);
}

/* 防抖处理期间的视觉反馈 */
.header-col:not(.active):hover .sort-indicator::before,
.header-col.sorting .sort-indicator::before {
    content: none;
}

/* ==================== 股票项统一基础样式 ==================== */

/* 股票项统一基础样式 */
.stock-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 12px 20px;
    border-bottom: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid transparent;
}

.stock-item:hover {
    background: rgba(255, 255, 255, 0.06);
    opacity: 1;
    border-left-color: rgba(41, 98, 255, 0.5);
    transform: translateX(2px);
}

/* 只读股票项样式 - 继承基础样式 */
.stock-item.readonly-stock {
    /* 只读特殊样式可以在这里添加覆盖 */
}

.stock-basic-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stock-symbol-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-symbol {
    font-weight: 600;
    color: #d1d4dc;
    font-size: 13px;
}

.stock-name {
    color: #787b86;
    font-size: 12px;
}

.stock-price-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-price {
    font-weight: 600;
    color: #d1d4dc;
    font-size: 13px;
}

.stock-change {
    font-size: 12px;
}

.stock-change.positive {
    color: #4ade80;
}

.stock-change.negative {
    color: #f87171;
}

.readonly-indicator {
    display: flex;
    align-items: center;
}

.readonly-label {
    background: rgba(120, 123, 134, 0.2);
    color: #787b86;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
}

/* 只读列表空状态样式 */
.readonly-notice {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(41, 98, 255, 0.1);
    border: 1px solid rgba(41, 98, 255, 0.2);
    border-radius: 4px;
    text-align: center;
}

.readonly-notice span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* 只读访问通知样式 */
.readonly-access-notice {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(300px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(300px);
        opacity: 0;
    }
}

/* 只读tab样式 - 现代化橙色卡片设计，类似第三行按钮风格 */
.readonly-tab {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 10px !important;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.08) 0%, rgba(230, 126, 34, 0.04) 100%) !important;
    border: 1px solid rgba(243, 156, 18, 0.15) !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #f39c12 !important;
    min-width: 64px !important; /* 4个中文字符的宽度 */
    height: 24px !important;
    box-shadow: 
        0 2px 4px rgba(243, 156, 18, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    text-decoration: none !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

.readonly-tab:hover {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.12) 0%, rgba(230, 126, 34, 0.08) 100%) !important;
    border-color: rgba(243, 156, 18, 0.25) !important;
    color: #e67e22 !important;
    transform: translateY(-2px) !important;
    box-shadow: 
        0 4px 12px rgba(243, 156, 18, 0.15),
        0 2px 4px rgba(243, 156, 18, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.readonly-tab.active {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    border-color: #f39c12 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 
        0 6px 16px rgba(243, 156, 18, 0.4),
        0 2px 8px rgba(243, 156, 18, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .right-panel {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .chart-content {
        flex-direction: column;
    }
    
    /* 移动端右侧面板70%宽度展示 */
    .right-panel {
        position: fixed;
        top: 0;
        left: 30%;
        width: 70%;
        height: 100vh;
        z-index: 9999;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        border-left: none;
        background: #2a2e39;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    }

    .right-panel.open {
        transform: translateX(0);
    }

    /* 移动端返回按钮样式 - 已隐藏 */
    .mobile-back-header {
        display: none !important;
    }

    .mobile-back-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        background: none;
        border: none;
        color: #d1d4dc;
        font-size: 16px;
        cursor: pointer;
        padding: 8px 12px;
        border-radius: 6px;
        transition: background-color 0.2s ease;
    }

    .mobile-back-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .mobile-back-btn svg {
        flex-shrink: 0;
    }
}
    
    /* 移动端市场行情按钮优化 */
    .market-item:hover .item-price {
        margin-right: 80px; /* 移动端稍微多留一些空间 */
    }
    
    .add-to-watchlist-btn,
    .remove-from-market-btn {
        width: 28px; /* 移动端按钮稍大一些 */
        height: 28px;
    }
    
    .add-to-watchlist-btn {
        right: 48px; /* 调整间距 */
    }
    
    .toolbar-row {
        flex-wrap: wrap;
        height: auto;
        gap: 8px;
    }
    
    .symbol-info {
        order: 1;
        width: 100%;
    }
    
    .timeframe-selector {
        order: 2;
        flex: 1;
    }
    
    .drawing-tools {
        order: 3;
    }
}

/* 新的用户体系和UI布局样式 */

/* 新的布局结构 */
.top-toolbar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
    background: #2a2e39;
    border-bottom: 1px solid #3a3e49;
}

.bottom-toolbar-row {
    display: flex;
    align-items: flex-start;
    padding: 8px 12px;
    background: #2a2e39;
    border-bottom: 1px solid #3a3e49;
}

/* 用户头像 - 适应左侧工具列 */
.left-toolbar-column .user-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
    width: 100%;
}

.left-toolbar-column .user-avatar:hover {
    background-color: #333;
}

.left-toolbar-column .avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: all 0.2s;
}

.left-toolbar-column .user-avatar.logged-in .avatar-circle {
    background: #2962ff;
    color: white;
}

.left-toolbar-column .login-text {
    color: #888;
    font-size: 10px;
    text-align: center;
    transition: color 0.2s;
}

.left-toolbar-column .user-avatar.logged-in .login-text {
    color: #ffffff;
}

/* 绘图工具栏 - 适应左侧工具列 */
.left-toolbar-column .drawing-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    background: #2a2a2a;
    border-radius: 6px;
    width: 100%;
}

.left-toolbar-column .tool-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #b2b5be;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
}

.left-toolbar-column .tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #d1d4dc;
    transform: translateY(-1px);
}

.left-toolbar-column .tool-btn.active {
    background: #2962ff;
    color: white;
    box-shadow: 0 2px 8px rgba(41, 98, 255, 0.3);
}

.left-toolbar-column .tool-btn svg {
    width: 18px;
    height: 18px;
}

/* 主工具栏 */
.main-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1; /* 占据剩余空间 */
}

/* 桌面端工具栏元素顺序控制 - 确保正确排列 */
.main-toolbar .symbol-info {
    order: 1;
}

.main-toolbar .symbol-price {
    order: 2;
}

.main-toolbar .focus-info {
    order: 3;
}

.main-toolbar .legend-area {
    order: 4;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 在legend-area内部控制timeframe-selector和common-tools的顺序 */
.legend-area .timeframe-selector {
    order: 1;
    flex: none; /* 不占用剩余空间，保持紧凑 */
}

.legend-area .common-tools {
    order: 2;
}

.legend-area .analysis-tools {
    order: 3;
}

/* K线焦点信息 */
.focus-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    padding: 4px 8px;
    background: #2a2a2a;
    border-radius: 4px;
    font-size: 12px;
}

.focus-label {
    color: #888;
    font-weight: 500;
}

.focus-open, .focus-high, .focus-low, .focus-close {
    color: #d1d4dc;
    font-weight: 600;
    min-width: 40px;
}

/* 图例区域 - 水平布局 */
.legend-area {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 20px;
}

/* 更多工具栏样式 */
.more-toolbar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #3a3e49;
}

/* 白天模式的更多工具栏 */
.theme-light .more-toolbar {
    border-top-color: #ddd;
}

/* 白天模式的核心区域 */
.theme-light .left-toolbar-column {
    background: #f8f9fa;
    border-right-color: #dee2e6;
}

.theme-light .chart-header {
    background: #f8f9fa;
    border-bottom-color: #dee2e6;
}

.theme-light .right-panel {
    background: #f8f9fa !important;
    border-left-color: #dee2e6 !important;
}

/* 浅色主题 - 右侧面板切换按钮 */
.theme-light .right-panel-toggle {
    background: rgba(248, 249, 250, 0.95) !important;
    border-color: #dee2e6 !important;
}

.theme-light .right-panel-toggle .toggle-arrow {
    color: #495057 !important;
}

.theme-light .right-panel-toggle:hover {
    background: rgba(222, 226, 230, 0.95) !important;
}

.theme-light .right-panel-toggle:hover .toggle-arrow {
    color: #212529 !important;
}

/* 浅色主题 - 布局容器样式 */
.theme-light .layout__area--topleft {
    background: #f8f9fa;
}

.theme-light .layout__area--top {
    background: #f8f9fa;
    border-bottom-color: #dee2e6;
}

.theme-light .layout__area--left {
    background: #f8f9fa;
    border-right-color: #dee2e6;
}

.theme-light .layout__area--center {
    background: #ffffff;
}

.theme-light .layout__area--right {
    background: #f8f9fa !important;
    border-left-color: #dee2e6 !important;
}

.theme-light .main-toolbar {
    background: #f8f9fa;
}

/* 白天模式的用户头像 */
.theme-light .left-toolbar-column .user-avatar {
    background: #ffffff;
    border-color: #dee2e6;
}

.theme-light .left-toolbar-column .user-avatar:hover {
    background: #e9ecef;
}

/* 白天模式的绘图工具栏 */
.theme-light .left-toolbar-column .drawing-toolbar {
    background: #f8f9fa;
}

.theme-light .left-toolbar-column .tool-btn {
    background: transparent;
    color: #6c757d;
    border: 1px solid transparent;
}

.theme-light .left-toolbar-column .tool-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.theme-light .left-toolbar-column .tool-btn.active {
    background: #007bff;
    color: white;
}

.theme-light .more-toolbar {
    background: #f8f9fa;
    border-top-color: #dee2e6;
}

/* 统一按钮样式 - 时间选择器 */
.timeframe-selector {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 2px;
}

.theme-light .timeframe-selector {
    background: rgba(0, 0, 0, 0.05);
}


.timeframe-btn {
    height: 28px;
    border: none;
    background: transparent;
    color: #b2b5be;
    cursor: pointer;
    padding: 0 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.timeframe-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #d1d4dc;
}

.timeframe-btn.active {
    background: #2962ff;
    color: white;
}

.theme-light .timeframe-btn {
    color: #6c757d;
}

.theme-light .timeframe-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #495057;
}

.theme-light .timeframe-btn.active {
    background: #007bff;
    color: white;
}

/* 统一按钮样式 - 分析工具 */
.analysis-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 2px;
}

.theme-light .analysis-tools {
    background: rgba(0, 0, 0, 0.05);
}

/* 通用工具 */
.common-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(76, 175, 80, 0.08);
    border-radius: 6px;
    padding: 2px;
}

.theme-light .common-tools {
    background: rgba(76, 175, 80, 0.08);
}

.analysis-btn {
    height: 28px;
    border: none;
    background: transparent;
    color: #b2b5be;
    cursor: pointer;
    padding: 0 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.analysis-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #d1d4dc;
}

.analysis-btn.active {
    background: #2962ff;
    color: white;
}

.analysis-btn .switch-icon {
    font-size: 10px;
    opacity: 0.7;
}

.analysis-btn.active .switch-icon {
    opacity: 1;
}

.theme-light .analysis-btn {
    color: #6c757d;
}

.theme-light .analysis-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #495057;
}

.theme-light .analysis-btn.active {
    background: #007bff;
    color: white;
}

/* 分析工具禁用状态 */
.analysis-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    /* 确保 disabled 按钮仍然可以接收点击事件以触发登录 */
    pointer-events: auto;
}

.analysis-btn.disabled:hover {
    background: transparent;
    transform: none;
}


/* 龙虎榜集成面板样式 */
.longhubang-integrated-panel {
    position: absolute;
    top: 20px;
    right: 80px; /* 距离右边缘80px，避免遮挡Y轴信息 */
    width: 20%; /* K线图容器的1/5宽度 */
    min-width: 320px;
    max-width: 360px; /* 减小最大宽度 */
    min-height: 0; /* 移除最小高度限制，完全由内容决定 */
    max-height: 80vh; /* 最大高度限制为视窗高度的80% */
    background: rgba(22, 27, 34, 0.95);
    border: 1px solid #30363d;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    backdrop-filter: blur(8px);
    user-select: none;
    font-size: 12px;
    cursor: move; /* 显示拖拽光标 */
    display: flex;
    flex-direction: column;
}

/* 数据少时自动调整高度 */
.longhubang-integrated-panel.compact {
    height: auto;
    min-height: 0 !important; /* 紧凑模式下完全移除最小高度限制 */
    /* max-height由JavaScript动态控制，不使用固定值 */
}

/* 数据多时固定高度启用滚动 */
.longhubang-integrated-panel.scrollable {
    height: auto; /* 改为auto，让JS控制实际高度，避免空白区域 */
    overflow: hidden;
}

/* 拖拽状态样式 */
.longhubang-integrated-panel.dragging {
    cursor: grabbing;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transform: scale(1.02);
    transition: none; /* 拖拽时禁用过渡动画 */
}

/* 面板标题栏可拖拽区域 */
.lhb-panel-header {
    cursor: grab;
    position: relative;
    z-index: 1002; /* 确保头部在最上层 */
}

.lhb-panel-header:active {
    cursor: grabbing;
}

/* 面板标题栏 */
.lhb-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #30363d;
    background: rgba(33, 38, 45, 0.8);
    border-radius: 8px 8px 0 0;
}

.lhb-panel-title {
    color: #e6edf3;
    font-size: 14px;
    font-weight: 600;
}

.lhb-panel-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lhb-panel-close {
    background: transparent;
    border: none;
    color: #7d8590;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lhb-panel-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e6edf3;
}

/* 游资名称选择区域 */
.lhb-investor-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    grid-gap: 4px;
    padding: 12px;
    border-bottom: 1px solid #30363d;
    max-height: 150px; /* 约5行的高度 */
    overflow-y: auto;
}

.lhb-investor-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    min-width: 60px;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid #30363d;
    border-radius: 4px;
    color: #e6edf3;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lhb-investor-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #58a6ff;
}

.lhb-investor-btn.selected {
    background: rgba(41, 98, 255, 0.2);
    border-color: #2962ff;
    color: #58a6ff;
}

.lhb-investor-btn.selected:hover {
    background: rgba(41, 98, 255, 0.3);
}

/* 统计表格区域 - 缩减高度到40% */
.lhb-statistics-section {
    padding: 8px; /* 减少内边距 */
    flex: 1 1 auto; /* 改为可伸缩，填充剩余空间 */
    overflow-y: auto;
    min-height: 0; /* 允许flex收缩 */
    /* 移除max-height限制，让容器自适应或由JS控制 */
}

/* 紧凑模式下的统计部分 */
.longhubang-integrated-panel.compact .lhb-statistics-section {
    max-height: none; /* 移除固定最大高度限制，让JS精确控制 */
    overflow-y: visible; /* 紧凑模式下不需要滚动 */
    flex: 0 0 auto; /* 确保不扩展填充 */
    min-height: 0; /* 允许收缩到最小 */
}

/* 滚动模式下的统计部分 */
.longhubang-integrated-panel.scrollable .lhb-statistics-section {
    max-height: none; /* 移除固定限制，让JS精确控制 */
    flex: 1 1 auto; /* 允许填充剩余空间 */
    overflow-y: auto;
}

.lhb-investor-stats {
    margin-bottom: 8px; /* 减少游资间距 */
    border: 1px solid #30363d;
    border-radius: 6px;
    overflow: hidden;
}

.lhb-investor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px; /* 减少内边距 */
    background: rgba(33, 38, 45, 0.6);
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 32px; /* 设置最小高度，确保紧凑显示 */
}

.lhb-investor-header:hover {
    background: rgba(33, 38, 45, 0.8);
}

.lhb-investor-name {
    color: #e6edf3;
    font-weight: 500;
    font-size: 12px;
}

.lhb-investor-summary {
    color: #7d8590;
    font-size: 11px;
}

.lhb-expand-toggle {
    color: #7d8590;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.lhb-expand-toggle.expanded {
    transform: rotate(180deg);
}

.lhb-investor-details {
    border-top: 1px solid #30363d;
    background: rgba(22, 27, 34, 0.7);
    display: none;
}

.lhb-investor-details.expanded {
    display: block;
    max-height: 120px; /* 限制展开表格的最大高度 */
    overflow-y: auto; /* 超出时允许滚动 */
}

/* 详细记录表格 */
.lhb-details-table {
    width: 100%;
    border-collapse: collapse;
}

.lhb-details-table th,
.lhb-details-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid #30363d;
    font-size: 11px;
}

.lhb-details-table th {
    background: rgba(33, 38, 45, 0.5);
    color: #7d8590;
    font-weight: 500;
}

.lhb-details-table td {
    color: #e6edf3;
}

/* 金额颜色 */
.lhb-details-table .lhb-amount-positive {
    color: #CD3232 !important; /* 正数红色 */
}

.lhb-details-table .lhb-amount-negative {
    color: #13A742 !important; /* 负数绿色 */
}

.lhb-amount-zero {
    color: #7d8590; /* 零值灰色 */
}

/* 游资摘要中的净额颜色 */
.lhb-investor-summary .lhb-amount-positive {
    color: #CD3232 !important; /* 正数红色 */
}

.lhb-investor-summary .lhb-amount-negative {
    color: #13A742 !important; /* 负数绿色 */
}

.lhb-investor-summary .lhb-amount-zero {
    color: #7d8590 !important; /* 零值灰色 */
}

/* 增强表格净额列颜色规则 */
.lhb-details-table td.lhb-amount-positive {
    color: #CD3232 !important; /* 正数红色 */
    font-weight: 500;
}

.lhb-details-table td.lhb-amount-negative {
    color: #13A742 !important; /* 负数绿色 */
    font-weight: 500;
}

.lhb-details-table td.lhb-amount-zero {
    color: #7d8590 !important; /* 零值灰色 */
    font-weight: 400;
}

/* 买入卖出金额列颜色规则 */
.lhb-details-table .lhb-buy-amount {
    color: #CD3232 !important; /* 买入红色 */
    font-weight: 500;
}

.lhb-details-table .lhb-sell-amount {
    color: #13A742 !important; /* 卖出绿色 */
    font-weight: 500;
}

/* 日期列样式 */
.lhb-date-cell {
    color: #58a6ff;
    font-family: monospace;
}

/* 滚动条样式 */
.lhb-investor-selection::-webkit-scrollbar,
.lhb-statistics-section::-webkit-scrollbar,
.lhb-investor-details.expanded::-webkit-scrollbar {
    width: 6px;
}

.lhb-investor-selection::-webkit-scrollbar-track,
.lhb-statistics-section::-webkit-scrollbar-track,
.lhb-investor-details.expanded::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.lhb-investor-selection::-webkit-scrollbar-thumb,
.lhb-statistics-section::-webkit-scrollbar-thumb,
.lhb-investor-details.expanded::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.lhb-investor-selection::-webkit-scrollbar-thumb:hover,
.lhb-statistics-section::-webkit-scrollbar-thumb:hover,
.lhb-investor-details.expanded::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .longhubang-integrated-panel {
        width: 85%; /* 减小宽度比例，更窄一些 */
        min-width: 280px;
        max-width: 340px; /* 减小最大宽度，适应6列布局 */
        max-height: 28vh; /* 减少到约50%（55vh * 0.5 ≈ 28vh） */
        top: 60px; /* 从10px改为60px，避开标题栏区域 */
        right: 10px;
        left: 50%;
        transform: translateX(-50%); /* 水平居中显示 */
        z-index: 1001; /* 确保在其他元素之上 */
    }
    
    /* 移动端专用6列网格布局 */
    .lhb-investor-selection {
        max-height: 100px; /* 减少高度以适应更紧凑的设计 */
        grid-template-columns: repeat(6, 1fr); /* 强制6列等宽布局 */
        grid-gap: 3px; /* 进一步减少间距以适应6列 */
        padding: 8px 6px; /* 减少内边距 */
    }

    .lhb-statistics-section {
        max-height: 140px; /* 移动端调整统计区域高度 */
        padding: 6px; /* 稍微减少内边距 */
    }

    /* 移动端游资按钮优化 - 更紧凑设计 */
    .lhb-investor-btn {
        font-size: 8px; /* 减小字体以适应6列 */
        min-width: 0; /* 移除最小宽度限制让6列自适应 */
        width: 100%; /* 强制填满网格单元格 */
        height: 13px; /* 减少到原来的40%（32px * 0.4 ≈ 13px） */
        padding: 1px 2px; /* 减少内边距以适应更小的高度 */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        justify-content: center;
        
        /* 移动端触摸优化 */
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        touch-action: manipulation;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    /* 移动端游资按钮触摸反馈 */
    .lhb-investor-btn:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.2) !important;
    }
    
    .lhb-investor-btn.selected:active {
        transform: scale(0.95);
        background: rgba(41, 98, 255, 0.4) !important;
    }
    
    /* 移动端面板拖拽优化 */
    .longhubang-integrated-panel {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        touch-action: pan-x pan-y;
    }
    
    /* 移动端面板标题栏触摸优化 */
    .lhb-panel-header {
        -webkit-tap-highlight-color: transparent;
        touch-action: pan-x pan-y;
        cursor: grab;
    }
    
    .lhb-panel-header:active {
        cursor: grabbing;
    }
    
    /* 移动端关闭按钮触摸优化 */
    .lhb-panel-close {
        min-width: 32px; /* 确保触摸目标足够大 */
        min-height: 32px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .lhb-panel-close:active {
        transform: scale(0.9);
    }
    
    /* 移动端面板标题调整 */
    .lhb-panel-header {
        padding: 6px 10px; /* 稍微减少标题栏内边距 */
    }
    
    .lhb-panel-title {
        font-size: 13px; /* 移动端标题字体稍小 */
    }
    
    /* 移动端统计表格滚动优化 */
    .lhb-statistics-section {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .lhb-statistics-section::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
}

/* 小屏幕移动设备进一步优化 */
@media (max-width: 480px) {
    .longhubang-integrated-panel {
        width: 90%; /* 小屏幕也减小宽度，保持一致 */
        min-width: 260px;
        max-width: 320px; /* 进一步减小最大宽度 */
        max-height: 30vh; /* 减少高度保持50%比例 */
        top: 5px;
        right: 5px;
    }
    
    .lhb-investor-selection {
        grid-gap: 4px; /* 小屏幕减少间距 */
        padding: 8px 6px;
        max-height: 120px;
    }
    
    .lhb-investor-btn {
        height: 28px; /* 小屏幕稍微减少高度 */
        font-size: 8px;
        padding: 1px 2px;
    }
    
    .lhb-statistics-section {
        max-height: 120px;
        padding: 4px;
    }
    
    .lhb-panel-header {
        padding: 4px 8px;
    }
    
    .lhb-panel-title {
        font-size: 12px;
    }
}

/* 移动端横屏模式优化 */
@media (max-width: 896px) and (orientation: landscape) {
    .longhubang-integrated-panel {
        max-height: 70vh; /* 横屏时增加可用高度 */
        width: 45%; /* 横屏时减少宽度给图表更多空间 */
        min-width: 320px;
        max-width: 400px;
    }
    
    .lhb-investor-selection {
        max-height: 160px; /* 横屏时可以显示更多行 */
    }
    
    .lhb-statistics-section {
        max-height: 180px;
    }
}

/* 龙虎榜K线标记样式 */
.lhb-marker {
    position: absolute;
    z-index: 900;
    pointer-events: none;
}

.lhb-marker-line {
    stroke: #2962ff;
    stroke-width: 1;
    opacity: 0.8;
}

.lhb-data-box {
    background: rgba(41, 98, 255, 0.95);
    border: 1px solid #2962ff;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 11px;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    min-width: 140px;
    max-width: 200px;
}

.lhb-date-header {
    font-size: 10px;
    color: #a0c4ff;
    text-align: center;
    padding-bottom: 4px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
}

.lhb-data-row {
    margin: 3px 0;
    padding: 2px 0;
}

.lhb-data-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 3px;
    margin-bottom: 3px;
}

.lhb-yzmc-name {
    color: white;
    font-weight: 500;
    font-size: 10px;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lhb-amounts {
    display: flex;
    gap: 6px;
    font-size: 9px;
}

.lhb-amount-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 30px;
}

.lhb-amount-label {
    color: #a0c4ff;
    font-size: 8px;
    margin-bottom: 1px;
}

.lhb-details-table .lhb-buy-amount {
    color: #CD3232 !important; /* 买入列红色 */
    font-weight: 500;
}

.lhb-details-table .lhb-sell-amount {
    color: #13A742 !important; /* 卖出列绿色 */
    font-weight: 500;
}

.lhb-net-amount {
    font-weight: 500;
}

.lhb-net-amount.positive {
    color: #ff4757;
}

.lhb-net-amount.negative {
    color: #2ed573;
}

.lhb-connect-line {
    pointer-events: none;
    z-index: 999;
}

.lhb-net-amount {
    font-weight: 500;
}

.lhb-net-amount.positive {
    color: #ff4757;
}

.lhb-net-amount.negative {
    color: #2ed573;
}

.lhb-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    text-align: center;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* === 龙虎榜分析面板 - 亮主题样式 === */
.theme-light .longhubang-integrated-panel {
    background: rgba(248, 249, 250, 0.95);
    border-color: #dee2e6;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.theme-light .lhb-panel-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom-color: #dee2e6;
}

.theme-light .lhb-panel-title {
    color: #212529;
}

.theme-light .lhb-panel-close {
    color: #6c757d;
}

.theme-light .lhb-panel-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #212529;
}

/* 收缩按钮样式 */
.lhb-panel-minimize {
    background: transparent;
    border: none;
    color: #7d8590;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px; /* 增加点击区域 */
    border-radius: 3px;
    transition: all 0.2s ease;
    min-width: 44px; /* 移动端最小触控尺寸 */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    position: relative;
    z-index: 1002; /* 确保按钮在最上层 */
}

.lhb-panel-minimize:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e6edf3;
}

.theme-light .lhb-panel-minimize {
    color: #6c757d;
}

.theme-light .lhb-panel-minimize:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #212529;
}

/* 游资选择区域 - 亮主题 */
.theme-light .lhb-investor-selection {
    border-bottom-color: #dee2e6;
}

.theme-light .lhb-investor-btn {
    background: #ffffff;
    color: #495057;
    border-color: #ced4da;
}

.theme-light .lhb-investor-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.theme-light .lhb-investor-btn.selected {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

.theme-light .lhb-investor-btn.selected:hover {
    background: #0056b3;
    border-color: #004085;
    color: #ffffff;
}

/* 统计区域 - 亮主题 */
.theme-light .lhb-statistics-section {
    background: #ffffff;
}

.theme-light .lhb-investor-stats {
    border-bottom-color: #e9ecef;
}

.theme-light .lhb-investor-header {
    background: #f8f9fa;
    border-color: #e9ecef;
}

.theme-light .lhb-investor-header:hover {
    background: #e9ecef;
}

.theme-light .lhb-investor-name {
    color: #212529;
}

.theme-light .lhb-investor-summary {
    color: #495057;
}

.theme-light .lhb-expand-toggle {
    color: #6c757d;
}

.theme-light .lhb-details-table {
    border-color: #e9ecef;
}

.theme-light .lhb-details-table th,
.theme-light .lhb-details-table td {
    border-color: #e9ecef;
    color: #495057;
}

.theme-light .lhb-details-table th {
    background: #f8f9fa;
    color: #212529;
}

/* 金额颜色保持红绿色 - 在亮主题下也不变 */
.theme-light .lhb-details-table .lhb-amount-positive,
.theme-light .lhb-investor-summary .lhb-amount-positive {
    color: #dc3545 !important; /* 买入保持红色 */
}

.theme-light .lhb-details-table .lhb-amount-negative,
.theme-light .lhb-investor-summary .lhb-amount-negative {
    color: #28a745 !important; /* 卖出保持绿色 */
}

.theme-light .lhb-amount-zero,
.theme-light .lhb-investor-summary .lhb-amount-zero {
    color: #6c757d !important;
}

.theme-light .lhb-date-cell {
    color: #495057;
}

/* 游资详细信息区域 - 亮主题 */
.theme-light .lhb-investor-details {
    background: #ffffff;
    border-top-color: #e9ecef;
}

/* 收缩状态下的圆形按钮 */
.lhb-collapsed-button {
    position: absolute !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(22, 27, 34, 0.95);
    border: 1px solid #30363d;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000 !important;
    backdrop-filter: blur(8px);
    cursor: move;
    display: none !important; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #e6edf3;
    user-select: none;
    transition: all 0.2s ease;
}

/* 收缩按钮完全由JavaScript控制位置，不使用CSS固定定位 */

/* 收缩按钮显示状态 */
.lhb-collapsed-button.show {
    display: flex !important; /* 只有添加show类时才显示 */
}

.lhb-collapsed-button:hover {
    background: rgba(33, 38, 45, 0.95);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.theme-light .lhb-collapsed-button {
    background: rgba(248, 249, 250, 0.95);
    border-color: #dee2e6;
    color: #212529;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.theme-light .lhb-collapsed-button:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 拖拽状态 */
.lhb-collapsed-button.dragging {
    cursor: grabbing;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
    transition: none;
}

.theme-light .lhb-collapsed-button.dragging {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 龙虎榜无数据提示 */
.lhb-no-data-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.lhb-no-data-message {
    background: rgba(22, 27, 34, 0.95);
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    max-width: 320px;
    user-select: none;
}

.lhb-no-data-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.lhb-no-data-text {
    font-size: 18px;
    font-weight: 600;
    color: #e6edf3;
    margin-bottom: 8px;
}

.lhb-no-data-subtext {
    font-size: 14px;
    color: #7d8590;
    line-height: 1.5;
}

/* 亮主题样式 */
.theme-light .lhb-no-data-overlay {
    background: rgba(255, 255, 255, 0.8);
}

.theme-light .lhb-no-data-message {
    background: rgba(248, 249, 250, 0.95);
    border-color: #dee2e6;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.theme-light .lhb-no-data-text {
    color: #212529;
}

.theme-light .lhb-no-data-subtext {
    color: #6c757d;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 通用功能按钮样式 */
.common-btn,
#ma-switch {
    height: 28px;
    border: none;
    background: transparent;
    color: #4caf50;
    cursor: pointer;
    padding: 0 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.common-btn:hover,
#ma-switch:hover {
    background: rgba(76, 175, 80, 0.1);
    color: #45a049;
}

.common-btn.active,
#ma-switch.active {
    background: #4caf50;
    color: white;
}

.common-btn .switch-icon,
#ma-switch .switch-icon {
    font-size: 10px;
    opacity: 0.7;
}

.common-btn.active .switch-icon,
#ma-switch.active .switch-icon {
    opacity: 1;
}

.theme-light .common-btn,
.theme-light #ma-switch {
    color: #4caf50;
}

.theme-light .common-btn:hover,
.theme-light #ma-switch:hover {
    background: rgba(76, 175, 80, 0.1);
    color: #45a049;
}

.theme-light .common-btn.active,
.theme-light #ma-switch.active {
    background: #4caf50;
    color: white;
}

/* 右侧面板标签 */
.panel-tabs {
    display: flex;
    background: #2a2a2a;
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid #333;
}

.panel-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.panel-tab:first-child {
    border-radius: 6px 0 0 0;
}

.panel-tab:last-child {
    border-radius: 0 6px 0 0;
}

.panel-tab:hover {
    background: #333;
    color: #d1d4dc;
}

.panel-tab.active {
    background: #2962ff;
    color: white;
}

/* 隐藏面板 */
.hidden {
    display: none !important;
}

/* 自选股头部 */
.watchlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
}

.watchlist-count {
    color: #888;
    font-size: 12px;
}

/* clear-watchlist 样式已移除，现使用底部的一键清除按钮 */

/* 空自选股状态 */
.empty-watchlist {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-watchlist p {
    margin-bottom: 8px;
}

.empty-watchlist .hint {
    font-size: 12px;
    color: #666;
}

/* 市场行情项目添加按钮 */
.add-to-watchlist {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.2s;
}

.market-item:hover .add-to-watchlist {
    opacity: 1;
}

.add-to-watchlist:hover {
    background: #2962ff;
    color: white;
}

/* 登录模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10003;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 底部工具栏弹窗显示样式 */
.mouse-tools-popup.show,
.drawing-tools-popup.show,
.mobile-popup.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* 默认隐藏弹窗 */
.mouse-tools-popup,
.drawing-tools-popup,
.mobile-popup {
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-content {
    background-color: #1e1e1e;
    margin: 10% auto;
    padding: 0;
    border: 1px solid #333;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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

.modal-header h2 {
    color: #d1d4dc;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #333;
    color: #d1d4dc;
}

.modal-body {
    padding: 24px;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #d1d4dc;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #2962ff;
    box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.2);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary {
    flex: 1;
    padding: 12px 24px;
    background: #2962ff;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background: #1e4bd4;
}

.btn-secondary {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid #444;
    border-radius: 6px;
    color: #d1d4dc;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #333;
    border-color: #555;
}

.demo-accounts {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.demo-accounts p {
    color: #888;
    font-size: 12px;
    margin-bottom: 8px;
}

/* 登录模态框中的链接样式 */
.auth-links {
    margin-top: 15px;
    text-align: center;
}

.auth-links a {
    color: #2962ff;  /* 使用主题色蓝色 */
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.auth-links a:hover {
    color: #1e53e5;  /* 悬停时深一点的蓝色 */
    background: rgba(41, 98, 255, 0.1);  /* 淡蓝色背景 */
    text-decoration: underline;
}

.auth-links a:active {
    transform: scale(0.98);
}

.auth-links span {
    color: #787b86;  /* 分隔符使用次要文字颜色 */
    margin: 0 8px;
}

.demo-account {
    background: #2a2a2a;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #d1d4dc;
}

.demo-account span {
    margin-right: 12px;
}

/* ===== 均线配置模态框样式 ===== */

#ma-config-modal .modal-content {
    width: 500px;
    max-width: 90vw;
}

#ma-config-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #3a3e49;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-radius: 8px 8px 0 0;
}

#ma-config-modal .modal-header h3 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

#ma-config-modal .modal-body {
    padding: 20px;
    background: #2a2e39;
}


.ma-config-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0 20px;
}

.ma-config-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ma-config-label {
    font-size: 13px;
    color: #b2b5be;
}

.ma-config-input {
    width: 72px;
    padding: 4px 6px;
    border: 1px solid #3a3e49;
    border-radius: 4px;
    background: #1e222d;
    color: #d1d4dc;
    text-align: center;
    font-size: 13px;
}

.ma-config-input:focus {
    outline: none;
    border-color: #4caf50;
}

.ma-config-color {
    width: 42px;
    height: 26px;
    padding: 0;
    border: 1px solid #3a3e49;
    border-radius: 4px;
    background: #1e222d;
    cursor: pointer;
}

.ma-config-remove {
    width: 24px;
    height: 24px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #f16c6c;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ma-config-remove:hover {
    border-color: rgba(241, 108, 108, 0.4);
    background: rgba(241, 108, 108, 0.12);
}

.ma-config-empty {
    text-align: center;
    padding: 24px 0;
    color: #8f92a3;
}

.ma-config-empty-icon {
    font-size: 26px;
    margin-bottom: 6px;
}

.ma-config-empty-text {
    font-size: 14px;
    margin-bottom: 4px;
}

.ma-config-empty-hint {
    font-size: 12px;
    color: #6f7380;
}

.ma-add-btn {
    background: none;
    border: 1px dashed rgba(255, 255, 255, 0.4);
    color: #d1d4dc;
    padding: 6px 14px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ma-add-btn:hover {
    border-color: rgba(79, 201, 138, 0.8);
    background: rgba(79, 201, 138, 0.1);
}

#ma-config-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    background: #2a2e39;
    border-top: 1px solid #3a3e49;
    border-radius: 0 0 8px 8px;
}

.ma-btn-cancel {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid #434651;
    color: #b2b5be;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.ma-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #6a6d78;
}

.ma-btn-confirm {
    padding: 8px 20px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ma-btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* 白天模式下的均线模态框 */
.theme-light .ma-config-input {
    background: #f8f9fc;
    color: #2a2e39;
    border-color: #d1d4dc;
}

.theme-light .ma-config-color {
    background: #ffffff;
    border-color: #d1d4dc;
}

.theme-light .ma-config-remove {
    color: #d45c5c;
}

.theme-light .ma-add-btn {
    border-color: #c8ccd6;
    color: #4a4d57;
}

.theme-light .ma-add-btn:hover {
    background: rgba(79, 201, 138, 0.15);
    border-color: #4fc98a;
}

.theme-light .ma-config-empty-text {
    color: #5d606c;
}

.theme-light .ma-config-empty-hint {
    color: #8d909c;
}

.theme-light .ma-btn-cancel {
    border-color: #d1d4dc;
    color: #6c757d;
}

.theme-light .ma-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: #9ca3af;
}

/* 缓存清理对话框样式 */
#cache-clean-modal .modal-content {
    width: 580px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
}

#cache-clean-modal .modal-header {
    background: linear-gradient(135deg, #2a2e39 0%, #242833 100%);
    border-bottom: 1px solid #3a3e49;
    padding: 20px 24px;
}

#cache-clean-modal .modal-header h3 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

#cache-clean-modal .modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* 缓存信息部分 */
.cache-info-section {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(42, 46, 57, 0.3);
    border-radius: 8px;
    border: 1px solid #3a3e49;
}

.cache-info-section h4 {
    color: #d1d4dc;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.cache-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cache-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cache-stat-label {
    color: #b2b5be;
    font-size: 13px;
}

.cache-stat-value {
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
}

/* 清理选项 */
.cache-clean-options h4 {
    color: #d1d4dc;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.clean-option {
    margin-bottom: 16px;
    border: 1px solid #3a3e49;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.clean-option:hover {
    border-color: #4a4e59;
}

.clean-option-header {
    padding: 14px 16px;
    background: rgba(42, 46, 57, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
}

.clean-option input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.clean-option label {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.clean-option label strong {
    display: block;
    color: #ffffff;
    font-size: 13px;
    margin-bottom: 2px;
}

.clean-option-desc {
    color: #b2b5be;
    font-size: 12px;
}

.clean-option-details {
    padding: 14px 16px;
    background: rgba(30, 35, 41, 0.5);
    display: none;
}

.clean-option input[type="radio"]:checked + label + .clean-option-details,
.clean-option:has(input:checked) .clean-option-details {
    display: block;
}

.clean-option-details ul {
    margin: 0 0 8px 0;
    padding-left: 16px;
    list-style: none;
}

.clean-option-details li {
    color: #9ca3af;
    font-size: 12px;
    margin-bottom: 4px;
    position: relative;
}

.clean-option-details li::before {
    content: "•";
    color: #6b7280;
    position: absolute;
    left: -12px;
}

.clean-option-impact {
    color: #8b949e;
    font-size: 11px;
    font-style: italic;
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border-left: 3px solid #4a4e59;
}

/* 警告框 */
.cache-clean-warning {
    margin: 16px 0;
}

.warning-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(13, 148, 136, 0.1);
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: 6px;
}

.warning-icon {
    font-size: 16px;
    color: #0d9488;
}

.warning-text {
    color: #b2b5be;
    font-size: 12px;
}

/* 深度清理警告 */
.warning-box.deep {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
}

.warning-box.deep .warning-icon {
    color: #fbbf24;
}

/* 完全重置警告 */
.warning-box.full {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.warning-box.full .warning-icon {
    color: #ef4444;
}

/* 清理进度 */
.clean-progress {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #3a3e49;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0d9488 0%, #14b8a6 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    color: #b2b5be;
    font-size: 12px;
    text-align: center;
}

/* 清理结果 */
.clean-result {
    margin: 20px 0;
    padding: 16px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
}

.result-summary h4 {
    color: #22c55e;
    font-size: 14px;
    margin: 0 0 12px 0;
}

.result-stats {
    color: #b2b5be;
    font-size: 12px;
    line-height: 1.5;
}

/* 模态框底部 */
#cache-clean-modal .modal-footer {
    background: rgba(42, 46, 57, 0.3);
    border-top: 1px solid #3a3e49;
    padding: 16px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

#cache-clean-modal .btn-secondary,
#cache-clean-modal .btn-primary {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

#cache-clean-modal .btn-secondary {
    background: transparent;
    border-color: #4a4e59;
    color: #b2b5be;
}

#cache-clean-modal .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #6b7280;
    color: #d1d4dc;
}

#cache-clean-modal .btn-primary {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    color: #ffffff;
}

#cache-clean-modal .btn-primary:hover {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    transform: translateY(-1px);
}

#cache-clean-modal .btn-primary:disabled {
    background: #4a4e59;
    color: #6b7280;
    cursor: not-allowed;
    transform: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #cache-clean-modal .modal-content {
        width: 95vw;
        max-height: 90vh;
        margin: 2vh auto;
    }
    
    #cache-clean-modal .modal-body {
        padding: 16px;
        max-height: 70vh;
    }
    
    .cache-stats {
        font-size: 12px;
    }
    
    .clean-option-header {
        padding: 12px 14px;
    }
    
    .clean-option label strong {
        font-size: 12px;
    }
    
    .clean-option-desc {
        font-size: 11px;
    }
}

/* 新的应用布局 */
.app-layout {
    display: flex;
    height: 100vh;
    background: #1e222d;
}

/* 左侧工具列 */
.left-toolbar-column {
    width: 80px;
    background: #2a2e39;
    border-right: 1px solid #3a3e49;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    gap: 16px;
}

/* 右侧主内容区域 */
.main-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 图表头部 - 适应新布局 */
.main-content-area .chart-header {
    background: #2a2e39;
    border-bottom: 1px solid #3a3e49;
    padding: 8px 16px;
    flex-shrink: 0;
}

/* 主工具栏 - 适应新布局 */
.main-content-area .main-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

/* 图表内容区域 - 确保全屏 */
.main-content-area .chart-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.main-content-area .chart-container {
    flex: 1;
    background: #1e222d;
    position: relative;
    overflow: hidden;
}

/* 确保图表容器占满可用空间 */
#chart-container {
    flex: 1;
    height: 100%;
    background: #1e222d;
    min-width: 0 !important; /* 确保可以收缩 */
    width: auto !important; /* 自动宽度 */
    max-width: none !important; /* 无最大宽度限制 */
}

/* 数据范围分析结果显示 */
.data-range-results-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2a2e39;
    border: 1px solid #3a3e49;
    border-radius: 8px;
    padding: 20px;
    min-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
}

.data-range-results h3 {
    color: #d1d4dc;
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #1e222d;
    border-radius: 4px;
}

.stat-label {
    color: #888;
    font-size: 12px;
    font-weight: 500;
}

.stat-value {
    color: #d1d4dc;
    font-size: 13px;
    font-weight: 600;
}

.stat-value.positive {
    color: #f23645;
}

.stat-value.negative {
    color: #4caf50;
}

/* 绘图工具使用说明 */
.drawing-help {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #2a2e39;
    border: 1px solid #3a3e49;
    border-radius: 8px;
    padding: 12px 16px;
    max-width: 300px;
    font-size: 12px;
    color: #888;
    z-index: 999;
    display: none;
}

.drawing-help.show {
    display: block;
}

.drawing-help h4 {
    margin: 0 0 8px 0;
    color: #d1d4dc;
    font-size: 13px;
}

.drawing-help ul {
    margin: 0;
    padding-left: 16px;
}

.drawing-help li {
    margin-bottom: 4px;
    line-height: 1.4;
}

.drawing-help .shortcut {
    color: #2962ff;
    font-weight: 600;
}

/* 趋势线拖动相关样式 */
.chart-container.dragging {
    cursor: move !important;
}

.chart-container.drag-mode {
    cursor: crosshair;
}

.chart-container.endpoint-hover {
    cursor: move;
}

/* 拖动时的视觉反馈 */
.trendline-dragging {
    opacity: 0.7;
    transition: opacity 0.1s ease;
}

/* 端点拖动状态指示器 */
.drag-indicator {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(42, 46, 57, 0.95) !important;
    color: #d1d4dc !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    z-index: 10000 !important;
    pointer-events: none !important;
    border: 1px solid #434651 !important;
    backdrop-filter: blur(8px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif !important;
    white-space: nowrap !important;
    display: none !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
}

.drag-indicator.active {
    display: none !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 数据范围分析工具提示样式 */
.data-range-tooltip-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    pointer-events: none;
    animation: fadeInUp 0.3s ease-out;
}

.data-range-tooltip {
    background: rgba(19, 23, 34, 0.95);
    border: 1px solid #3a3e49;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.range-info-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-change {
    font-size: 16px;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.price-change.positive {
    color: #f23645;
}

.price-change.negative {
    color: #4caf50;
}

.range-details {
    font-size: 12px;
    color: #b2b5be;
    font-family: -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
}

.range-arrow {
    font-size: 24px;
    line-height: 1;
    opacity: 0.8;
}

.range-arrow.up-arrow {
    color: #4caf50;
}

.range-arrow.down-arrow {
    color: #f44336;
}

/* 智能定位数据框动画 */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 文本工具样式 */
.text-input-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.text-input-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-input-content {
    background: #2a2e39;
    border-radius: 8px;
    padding: 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid #434651;
}

.text-input-content h3 {
    color: #d1d4dc;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
}

.text-input-content textarea {
    width: 100%;
    background: #131722;
    border: 1px solid #434651;
    border-radius: 4px;
    color: #d1d4dc;
    padding: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 15px;
}

.text-input-content textarea:focus {
    outline: none;
    border-color: #2962ff;
    box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.2);
}

.text-input-content textarea::placeholder {
    color: #787b86;
}

.text-style-options {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(67, 70, 81, 0.3);
    border-radius: 4px;
    border: 1px solid #434651;
}

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

.style-group label {
    color: #d1d4dc;
    font-size: 12px;
    font-weight: 500;
}

.style-group select {
    background: #131722;
    border: 1px solid #434651;
    border-radius: 4px;
    color: #d1d4dc;
    padding: 6px 8px;
    font-size: 12px;
    font-family: inherit;
}

.style-group select:focus {
    outline: none;
    border-color: #2962ff;
    box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.2);
}

.style-group select option {
    background: #131722;
    color: #d1d4dc;
}

.text-input-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.text-input-buttons .btn-primary,
.text-input-buttons .btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.text-input-buttons .btn-primary {
    background: #2962ff;
    color: white;
}

.text-input-buttons .btn-primary:hover {
    background: #1e4bd6;
}

.text-input-buttons .btn-secondary {
    background: transparent;
    color: #b2b5be;
    border: 1px solid #434651;
}

.text-input-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #d1d4dc;
}

/* 图表上的文本标注样式 */
.chart-text-annotation {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: absolute !important; /* 在图表中绝对定位 */
    display: block !important; /* 改为block以便控制尺寸 */
    /* 移除固定最小尺寸，允许小尺寸 */
    border: 1px solid transparent !important; /* 默认透明边框，保持位置稳定 */
    box-sizing: border-box !important; /* 确保尺寸计算一致 */
    overflow: visible !important; /* 允许内容正常显示 */
}

/* 选中状态的边框 */
.chart-text-annotation.selected {
    border: 1px dashed rgba(41, 98, 255, 0.8) !important;
    border-radius: 2px;
    /* 选中时显示蓝色虚线边框 */
}

/* 移除调整大小的控制点样式 */

.chart-text-annotation .text-content {
    line-height: 1.4;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start; /* 顶部对齐 */
    justify-content: flex-start; /* 左对齐 */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal; /* 允许正常换行 */
    outline: none;
    border: none;
    background: transparent;
    box-sizing: border-box;
    padding: 8px;
    text-align: left; /* 文本左对齐 */
    /* 文本内容从左上角开始显示 */
}

.chart-text-annotation .text-delete-btn {
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    background: rgba(244, 67, 54, 0.9) !important;
    border: none !important;
    color: white !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 12px !important;
    line-height: 1 !important;
    display: none !important; /* 默认隐藏 */
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    text-shadow: none !important;
    z-index: 1003 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.chart-text-annotation .text-delete-btn:hover {
    background: rgba(244, 67, 54, 1);
    opacity: 1;
    transform: scale(1.1);
}

.chart-text-annotation.selected .text-delete-btn {
    display: flex !important; /* 选中时显示删除按钮 */
}

/* 调整大小控制点 */
.resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border: 1px solid #2196f3;
    z-index: 1002;
    display: none;
}

.resize-handle.top-left {
    top: -4px;
    left: -4px;
    cursor: nw-resize;
}

.resize-handle.top-right {
    top: -4px;
    right: -4px;
    cursor: ne-resize;
}

.resize-handle.bottom-left {
    bottom: -4px;
    left: -4px;
    cursor: sw-resize;
}

.resize-handle.bottom-right {
    bottom: -4px;
    right: -4px;
    cursor: se-resize;
}

/* 选中状态显示调整大小控制点 */
.chart-text-annotation.selected .resize-handle {
    display: block;
}

/* 统一的绘图对象删除按钮样式 */
/* 🔧 修复的绘图对象删除按钮样式 - 解决一闪而过问题 */
.drawing-delete-btn {
    position: absolute !important;
    background: rgba(244, 67, 54, 0.95) !important;
    border: 1px solid white !important; /* 增加边框提高可见性 */
    color: white !important;
    width: 24px !important; /* 稍微增大 */
    height: 24px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important; /* 🔧 关键修复：默认可见，而非0 */
    visibility: visible !important; /* 强制可见 */
    transition: transform 0.2s ease !important; /* 简化动画，避免影响显示 */
    text-shadow: none !important;
    z-index: 1002 !important; /* 提高层级 */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4) !important; /* 增强阴影 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    pointer-events: auto !important;
    user-select: none !important;
}

.drawing-delete-btn:hover {
    background: rgba(244, 67, 54, 1) !important;
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

/* 🔧 增强的显示状态类 - 确保选中时稳定可见 */
.drawing-delete-btn.visible,
.drawing-delete-btn.selected-state {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    z-index: 1003 !important;
    transform: none !important; /* 避免变形影响显示 */
}

/* 移动端删除按钮优化 */
@media screen and (max-width: 768px) {
    .drawing-delete-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 18px !important;
        /* 确保正圆形显示，移除padding避免变形 */
        padding: 0 !important;
        /* 更高的z-index确保在移动端可点击 */
        z-index: 10001 !important;
        /* 增强可见性 */
        background: rgba(244, 67, 54, 0.95) !important;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4) !important;
        /* 防止误触 */
        pointer-events: all !important;
        /* 触摸优化 */
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
    }
    
    .drawing-delete-btn:active {
        background: rgba(244, 67, 54, 1) !important;
        transform: scale(0.95) !important;
    }
}

/* 数据范围删除按钮样式统一 */
.data-box-close {
    background: rgba(244, 67, 54, 0.9) !important;
    border: none !important;
    color: white !important;
    font-size: 18px !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.data-box-close:hover {
    background: rgba(244, 67, 54, 1) !important;
    color: white !important;
    transform: scale(1.1) !important;
}

.data-range-close {
    background: rgba(244, 67, 54, 0.9) !important;
    border: none !important;
    color: white !important;
    font-size: 18px !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 28px !important;
    height: 28px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    line-height: 1 !important;
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    display: none !important;
}

.data-range-close:hover {
    background: rgba(244, 67, 54, 1) !important;
    color: white !important;
    transform: scale(1.08) !important;
}

.data-range-persistent-box .data-range-close {
    display: none !important;
}

.data-range-persistent-box.selected .data-range-close {
    display: flex !important;
}

/* 持久数据框样式 */
.data-range-persistent-box {
    position: absolute !important;
    background: rgba(42, 46, 57, 0.85) !important;
    border: 1px solid #434651 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    z-index: 100 !important;
    width: 300px !important;
    height: 160px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    min-height: 160px !important;
    max-height: 160px !important;
    overflow: hidden !important;
}

.data-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 4px 40px 2px 6px;
    border-bottom: 1px solid #434651;
    cursor: move;
    min-height: 32px;
}

.data-box-header h4 {
    margin: 0;
    color: #d1d4dc;
    font-size: 15px;
    font-weight: 600;
}

.data-box-content {
    padding: 4px 6px 4px 6px;
}

.price-change-main {
    margin-bottom: 6px;
    text-align: center;
}

.price-change-main .price-change {
    font-size: 16px;
    font-weight: 700;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.data-range-persistent-box .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.data-range-persistent-box .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.data-range-persistent-box .stat-label {
    color: #888;
    font-size: 11px;
    font-weight: 500;
}

.data-range-persistent-box .stat-value {
    color: #d1d4dc;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.data-range-persistent-box .stat-value.positive {
    color: #f23645;
}

.data-range-persistent-box .stat-value.negative {
    color: #4caf50;
}

/* 紧凑型统计数据样式 */
.data-range-persistent-box .stats-compact {
    margin-top: 4px;
}

.data-range-persistent-box .stat-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 4px;
    padding: 4px 6px;
    background: transparent;
    border: none;
    gap: 8px;
}



.data-range-persistent-box .stat-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.data-range-persistent-box .stat-row:last-child {
    margin-bottom: 0;
}

.data-range-persistent-box .stat-row .stat-item {
    font-size: 13px;
    color: #e8eaed;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

/* 默认是蓝色（第一行：最高价、最低价） */
.data-range-persistent-box .stat-row .stat-item:before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: radial-gradient(circle, #2962ff, #1e4ba0);
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(41, 98, 255, 0.4), inset 0 0 2px rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

/* 第二行左侧（K线数量）的颜色 - 绿色 */
.data-range-persistent-box .stat-row:nth-child(2) .stat-item:first-child:before {
    background: radial-gradient(circle, #4caf50, #2e7d32);
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.4), inset 0 0 2px rgba(255, 255, 255, 0.3);
}

/* 第二行右侧（成交量）的颜色 - 绿色 */
.data-range-persistent-box .stat-row:nth-child(2) .stat-item:nth-child(2):before {
    background: radial-gradient(circle, #4caf50, #2e7d32);
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.4), inset 0 0 2px rgba(255, 255, 255, 0.3);
}

/* 亮色主题 - 数据范围分析框样式 */
.theme-light .data-range-persistent-box {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #333333 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.theme-light .data-box-header {
    border-bottom-color: #333333;
}

.theme-light .data-box-header h4 {
    color: #000000;
}

.theme-light .data-range-persistent-box .stat-label {
    color: #000000;
}

.theme-light .data-range-persistent-box .stat-value {
    color: #000000;
}

.theme-light .data-range-persistent-box .stat-row .stat-item {
    color: #000000;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.theme-light .data-range-persistent-box .stat-row:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* 隐藏/显示绘图按钮样式 */
#toggle-drawings {
    transition: all 0.2s ease;
}

#toggle-drawings:hover {
    background: rgba(255, 167, 38, 0.1);
    transform: scale(1.05);
}

/* 图表区域鼠标悬停提示 */
.chart-container {
    position: relative;
}


.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 0;
}

.chart-container:hover::before {
    opacity: 0.02;
    background: radial-gradient(circle at center, rgba(41, 98, 255, 0.1) 0%, transparent 70%);
}

/* 图表搜索激活状态 - 已移除提示文字，改为全局键盘监听 */

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-5px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-5px); }
}

/* 白天模式样式 */
.theme-light {
    --background-color: #ffffff;
    --text-color: #131722;
    --border-color: #e0e3eb;
    --hover-color: rgba(0, 0, 0, 0.05);
    --active-color: #2962ff;
    --panel-background: #f8f9fa;
    --chart-background: #ffffff;
}

.theme-light html, 
.theme-light body {
    background: var(--background-color);
    color: var(--text-color);
}

.theme-light .toolbar {
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

.theme-light .toolbar .button {
    color: var(--text-color);
}

.theme-light .toolbar .button:hover {
    background: var(--hover-color);
}

.theme-light .drawingToolbar {
    background: var(--background-color);
    border-right: 1px solid var(--border-color);
}

.theme-light .tool-button {
    color: var(--text-color);
}

.theme-light .tool-button:hover {
    background: var(--hover-color);
}

.theme-light .chart-container {
    background: var(--chart-background);
}

.theme-light .legend {
    background: var(--chart-background);
    color: var(--text-color);
}

.theme-light .market-panel {
    background: var(--panel-background);
    border-left: 1px solid var(--border-color);
}

.theme-light .market-panel-header {
    background: var(--panel-background);
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.theme-light .symbol-item {
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.theme-light .symbol-item:hover {
    background: var(--hover-color);
}

.theme-light .timeframe-btn {
    color: var(--text-color);
}

.theme-light .timeframe-btn:hover {
    background: var(--hover-color);
}

.theme-light .switch-button {
    color: var(--text-color);
}

.theme-light .switch-button:hover {
    background: var(--hover-color);
}

.theme-light .modal-content {
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.theme-light .text-input-content {
    background: var(--background-color);
    color: var(--text-color);
}

.theme-light .chart-text-annotation {
    color: var(--text-color);
}

.theme-light .chart-text-annotation.selected {
    border-color: var(--active-color);
}

/* 白天模式的面板标签 */
.theme-light .panel-tabs {
    background: #e9ecef;
    border-bottom-color: #dee2e6;
}

.theme-light .panel-tab {
    color: #6c757d;
}

.theme-light .panel-tab:hover {
    background: #dee2e6;
    color: #495057;
}

.theme-light .panel-tab.active {
    background: #007bff;
    color: white;
}

/* 白天模式的市场行情和股票项 */
.theme-light .market-item,
.theme-light .stock-item {
    border-bottom-color: rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.02);
    border-left-color: transparent;
}

.theme-light .market-item:hover,
.theme-light .stock-item:hover {
    background: rgba(0, 0, 0, 0.06);
    border-left-color: rgba(41, 98, 255, 0.5);
}

/* 浅色主题的表头样式 */
.theme-light .stock-list-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-light .header-col {
    color: #000000 !important;
}

.theme-light .header-col .header-text {
    color: #000000 !important;
}

.theme-light .header-index {
    color: #000000 !important;
}

.theme-light .header-col:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.9);
}

.theme-light .header-col.active {
    color: #1976d2;
    background: rgba(25, 118, 210, 0.1);
}

.theme-light .header-col.active:hover {
    background: rgba(25, 118, 210, 0.15);
}

.theme-light .header-col.active .sort-indicator {
    color: #1976d2;
}

.theme-light .header-col:active {
    background: rgba(0, 0, 0, 0.1);
}

/* 白天模式的自选股 */
.theme-light .watchlist-header {
    background: #e9ecef;
    border-bottom-color: #dee2e6;
}

.theme-light .empty-watchlist {
    color: #6c757d;
}

/* 白天模式的复权选择器 */
.theme-light .adjustment-select {
    background: #fff;
    color: #495057;
    border-color: #ced4da;
}

.theme-light .adjustment-select:hover {
    border-color: #adb5bd;
}

.theme-light .adjustment-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 白天模式的焦点信息 */
.theme-light .focus-info {
    background: #e9ecef;
    color: #495057;
}

.theme-light .focus-label {
    color: #6c757d;
}

.theme-light .focus-open,
.theme-light .focus-high,
.theme-light .focus-low,
.theme-light .focus-close {
    color: #212529;
}

/* 白天模式的股票价格信息 */
.theme-light .symbol-price .price {
    color: #212529;
}

.theme-light .symbol-price .change.positive {
    color: #f23645;
}

.theme-light .symbol-price .change.negative {
    color: #4caf50;
}

/* 白天模式的股票选择器 */
.theme-light .symbol-selector {
    background: #fff;
    border-color: #ced4da;
    color: #495057;
}

.theme-light .symbol-selector:hover {
    border-color: #adb5bd;
}

.theme-light .symbol-name {
    color: #212529;
}

/* clear-watchlist 白天主题样式已移除 */

/* 白天模式的添加按钮 */
.theme-light .add-to-watchlist {
    color: #6c757d;
}

.theme-light .add-to-watchlist:hover {
    background: #007bff;
    color: white;
}

.theme-light .chart-header {
    background: #f8f9fa;
    border-bottom-color: #dee2e6;
}

/* 确保主内容区域的chart-header也应用白天模式 */
.theme-light .main-content-area .chart-header {
    background: #f8f9fa;
    border-bottom-color: #dee2e6;
}

.theme-light .right-panel {
    background: #f8f9fa !important;
    border-left-color: #dee2e6 !important;
}

/* 浅色主题 - 股票列表容器背景样式 */
.theme-light .panel-section {
    background: #f8f9fa;
}

.theme-light .stock-list-content {
    background: #f8f9fa;
}

.theme-light .market-list {
    background: #f8f9fa;
}

/* 白天模式的复权选择器选项 */
.theme-light .adjustment-select option {
    background: #fff;
    color: #495057;
}

/* 白天模式的添加到自选股按钮 */
.theme-light .add-to-watchlist-btn {
    background: rgba(0, 0, 0, 0.1);
    color: #6c757d;
}

.theme-light .add-to-watchlist-btn:hover {
    background: rgba(41, 98, 255, 0.2);
    color: #2962ff;
}

/* 新增：面板底部操作区样式 */
.panel-footer {
    margin-top: 0; /* 🔧 修复：避免在flex布局中创建自动margin空间 */
    padding: 0;
    border-top: none;
    background: transparent;
    display: none; /* 默认隐藏底部操作区避免空白 */
}

.import-section {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.import-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(58, 62, 73, 0.5);
    border-radius: 4px;
    background: #2a2e39;
    color: #d1d4dc;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s ease;
}

.import-input:focus {
    border-color: #2962ff;
}

.import-input::placeholder {
    color: #787b86;
}

/* 桌面端：优化按钮布局和边距 */
@media (min-width: 769px) {
    .panel-footer .import-section {
        justify-content: center;  /* 居中对齐 */
        padding: 0 20px;  /* 增加到20px，提升边界感 */
    }

    .import-input {
        flex: 0 0 70%;  /* 减小到70% */
        max-width: 70%;
    }

    .import-btn {
        flex: 0 0 15%; /* 保持15% */
    }

    /* 新增：一键操作按钮也居中并缩短宽度 */
    .panel-footer .action-section {
        justify-content: center;
        padding: 0 20px;  /* 与上面保持一致的边距 */
        max-width: 90%;  /* 限制最大宽度 */
        margin: 0 auto;  /* 居中 */
    }

    .action-btn {
        flex: 0 0 40%;  /* 每个按钮占40%，中间留20%间隙 */
        max-width: 150px;  /* 限制按钮最大宽度 */
    }
}

.import-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: #2962ff;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.import-btn:hover {
    background: #1e4db7;
}

.action-section {
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(58, 62, 73, 0.5);
    border-radius: 4px;
    background: transparent;
    color: #d1d4dc;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.clear-btn:hover {
    background: rgba(244, 67, 54, 0.1);
    border-color: #f44336;
    color: #f44336;
}

.copy-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
    color: #4caf50;
}

/* 调整面板布局以适应底部操作区 */
.panel-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.market-list,
.watchlist-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* 确保自选股面板也能正确显示底部操作区 */
#watchlist-panel .watchlist-list {
    flex: 1;
}

/* ===== 股票列表选择器样式 ===== */

/* 主容器 */
.stock-list-selector {
    position: relative;
    background: #2a2e39;
    border-bottom: none;
    z-index: 10;
}

/* 固定标题栏 */
.list-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-bottom: none;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

/* 当前列表显示 - 优化为输入框内文本风格 */
.current-list-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    height: 36px;
}

.current-list-display .list-name {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 36px;
    user-select: none;
    cursor: default;
}

/* 新增列表按钮 - 现代蓝色按钮风格 */
.add-list-btn {
    padding: 4px 8px;
    background: rgba(58, 62, 73, 0.6);
    border: 1px solid rgba(58, 62, 73, 0.8);
    border-radius: 4px;
    color: #d1d4dc;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 2px 8px rgba(66, 133, 244, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.add-list-btn:hover {
    background: rgba(58, 62, 73, 0.8);
    border-color: rgba(58, 62, 73, 1);
    color: #ffffff;
    transform: translateY(-1px);
}

.add-list-btn:active {
    transform: translateY(0);
    background: rgba(58, 62, 73, 1);
}

/* 第二行：只读tabs行样式 */
.readonly-tabs-row {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border-bottom: none;
    align-items: center;
    min-height: 40px;
}

/* 重复的readonly-tab样式已移除，使用前面定义的样式 */

/* 第三行：活动tabs行样式 */
.active-tabs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 12px;
    background: transparent;
    border-bottom: none;
}

/* 统一标签容器 - 横向滚动 */
.unified-tabs-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.unified-tabs-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.unified-tabs-row {
    display: flex !important;
    gap: 2px !important;
    align-items: center !important;
    min-width: fit-content !important;
    height: 28px !important;
    padding: 12px 16px !important;
}

/* tab标签栏 - 重构为第三行活动tabs样式 - 现代化设计 */
body #list-tabs.list-tabs,
body .list-tabs,
#list-tabs.list-tabs,
.stock-list-selector .list-tabs,
.active-tabs-row,
.unified-tabs-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 2px !important;
    padding: 12px 16px !important;
    background: linear-gradient(135deg, #2a2e39 0%, #242833 100%) !important;
    border: none !important;
    border-bottom: 1px solid rgba(58, 62, 73, 0.6) !important;
    border-radius: 6px 6px 0 0 !important;
    min-height: 44px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* 专门覆盖hidden类的强制显示规则 - 简化高优先级 */
#list-tabs.list-tabs.hidden,
.list-tabs.hidden {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* tab按钮样式 - 统一尺寸设计 - 最高优先级强制生效 */
body .list-tabs .list-tab,
body #list-tabs .list-tab,
.stock-list-selector .list-tabs .list-tab,
#list-tabs .list-tab,
.unified-tabs-row .list-tab {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 8px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #b2b5be !important;
    text-decoration: none !important;
    min-width: 36px !important;
    height: 28px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1001 !important;
    transform: translateY(0) !important;
    letter-spacing: 0.3px !important;
}

/* 覆盖hidden类的tab按钮显示规则 - 简化高优先级选择器 */
.list-tabs .list-tab.hidden,
#list-tabs .list-tab.hidden {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hover效果 - 简化高优先级选择器 */
.list-tabs .list-tab:hover,
#list-tabs .list-tab:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border: none !important;
    color: #d1d4dc !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Active效果 - 简化高优先级选择器 */
.list-tabs .list-tab.active,
#list-tabs .list-tab.active {
    background: #2962ff !important;
    border: none !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Active状态下的文字发光效果 */
.list-tab.active .list-tab-name {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* AI、行业、指数按钮的暗黄色样式 - 提高CSS特异性优先级 */
.unified-tabs-row .list-tab[data-list-id="ai_low"],
.unified-tabs-row .list-tab[data-list-id="industry"],
.unified-tabs-row .list-tab[data-list-id="indices"],
#list-tabs .list-tab[data-list-id="ai_low"],
#list-tabs .list-tab[data-list-id="industry"],
#list-tabs .list-tab[data-list-id="indices"] {
    color: #d4a574 !important;
}

.unified-tabs-row .list-tab[data-list-id="ai_low"]:hover,
.unified-tabs-row .list-tab[data-list-id="industry"]:hover,
.unified-tabs-row .list-tab[data-list-id="indices"]:hover,
#list-tabs .list-tab[data-list-id="ai_low"]:hover,
#list-tabs .list-tab[data-list-id="industry"]:hover,
#list-tabs .list-tab[data-list-id="indices"]:hover {
    color: #e6c79a !important;
    background: rgba(212, 165, 116, 0.1) !important;
}

.unified-tabs-row .list-tab[data-list-id="ai_low"].active,
.unified-tabs-row .list-tab[data-list-id="industry"].active,
.unified-tabs-row .list-tab[data-list-id="indices"].active,
#list-tabs .list-tab[data-list-id="ai_low"].active,
#list-tabs .list-tab[data-list-id="industry"].active,
#list-tabs .list-tab[data-list-id="indices"].active {
    color: #d4a574 !important;
    background: #2962ff !important;
}

.unified-tabs-row .list-tab[data-list-id="ai_low"].active .list-tab-name,
.unified-tabs-row .list-tab[data-list-id="industry"].active .list-tab-name,
.unified-tabs-row .list-tab[data-list-id="indices"].active .list-tab-name,
#list-tabs .list-tab[data-list-id="ai_low"].active .list-tab-name,
#list-tabs .list-tab[data-list-id="industry"].active .list-tab-name,
#list-tabs .list-tab[data-list-id="indices"].active .list-tab-name {
    text-shadow: 0 0 8px rgba(212, 165, 116, 0.6);
}

.list-tab-content {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.list-tab-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
}

/* 用户tab删除按钮 */
.delete-tab-btn {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f44336;
    border: 1px solid #2a2e39;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 8px;
    line-height: 1;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.8);
}

.list-tab:hover .delete-tab-btn {
    opacity: 1;
    transform: scale(1);
}

.delete-tab-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.delete-tab-btn svg {
    width: 8px;
    height: 8px;
}

/* 🔒 登录限制相关样式 */
.list-tab.login-required {
    opacity: 0.6;
    position: relative;
}

.list-tab.login-required:hover {
    opacity: 0.8;
    background: #2a2e39;
}

.list-tab.login-required .list-tab-name {
    color: #9ca3af;
}

/* AI、行业、指数按钮在login-required状态下仍保持暗黄色 - 最高优先级 */
.list-tab.login-required[data-list-id="ai_low"] .list-tab-name,
.list-tab.login-required[data-list-id="industry"] .list-tab-name,
.list-tab.login-required[data-list-id="indices"] .list-tab-name,
.unified-tabs-row .list-tab.login-required[data-list-id="ai_low"] .list-tab-name,
.unified-tabs-row .list-tab.login-required[data-list-id="industry"] .list-tab-name,
.unified-tabs-row .list-tab.login-required[data-list-id="indices"] .list-tab-name,
#list-tabs .list-tab.login-required[data-list-id="ai_low"] .list-tab-name,
#list-tabs .list-tab.login-required[data-list-id="industry"] .list-tab-name,
#list-tabs .list-tab.login-required[data-list-id="indices"] .list-tab-name {
    color: #d4a574 !important;
}

/* 白天模式下AI、行业、指数按钮在login-required状态的样式 */
.theme-light .list-tab.login-required[data-list-id="ai_low"] .list-tab-name,
.theme-light .list-tab.login-required[data-list-id="industry"] .list-tab-name,
.theme-light .list-tab.login-required[data-list-id="indices"] .list-tab-name,
.theme-light .unified-tabs-row .list-tab.login-required[data-list-id="ai_low"] .list-tab-name,
.theme-light .unified-tabs-row .list-tab.login-required[data-list-id="industry"] .list-tab-name,
.theme-light .unified-tabs-row .list-tab.login-required[data-list-id="indices"] .list-tab-name,
.theme-light #list-tabs .list-tab.login-required[data-list-id="ai_low"] .list-tab-name,
.theme-light #list-tabs .list-tab.login-required[data-list-id="industry"] .list-tab-name,
.theme-light #list-tabs .list-tab.login-required[data-list-id="indices"] .list-tab-name {
    color: #d4a574 !important;
}


/* 移动端适配 - 标题栏和tab */
@media (max-width: 768px) {
    /* 移动端标题栏适配 */
    .list-title-bar {
        padding: 8px 12px;
        border-radius: 6px;
        margin: 4px;
    }
    
    .current-list-display {
        height: 32px;
    }
    
    .current-list-display .list-name {
        font-size: 13px;
        line-height: 32px;
    }
    
    .add-list-btn {
        padding: 6px 12px;
        height: 32px;
        font-size: 12px;
        border-radius: 5px;
    }
    
    /* 移动端tab适配 */
    .list-tabs {
        padding: 6px 8px;
        gap: 3px;
        flex-wrap: wrap;
    }
    
    .list-tab {
        padding: 4px 8px;
        font-size: 11px;
        min-width: auto;
    }
    
    .list-tab-name {
        font-size: 11px;
    }
    
    .delete-tab-btn {
        width: 14px;
        height: 14px;
        font-size: 9px;
        top: -3px;
        right: -3px;
    }
    
    .list-title-bar {
        padding: 10px 12px;
    }
    
    .current-list-display .list-name {
        font-size: 14px;
    }
    
    .add-list-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* 股票数量统计栏 */
.stock-count-bar {
    padding: 8px 16px;
    background: transparent;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stock-count {
    font-size: 12px;
    color: #787b86;
}

/* 只读指示器 */
.readonly-indicator {
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    border-radius: 3px;
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.stock-list-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden; /* 完全禁用横向滚动 */
    scrollbar-gutter: stable; /* 为滚动条预留稳定空间，避免布局跳动 */
    min-height: 0; /* 确保可以正确收缩 */
    width: 100%; /* 占据全部可用宽度 */
}

/* 🎨 统一的股票列表滚动条样式 - TradingView风格 */
.stock-list-content::-webkit-scrollbar {
    width: 6px;
}

.stock-list-content::-webkit-scrollbar-track {
    background: rgba(30, 35, 41, 0.3);
    border-radius: 3px;
}

.stock-list-content::-webkit-scrollbar-thumb {
    background: rgba(67, 70, 81, 0.6);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.stock-list-content::-webkit-scrollbar-thumb:hover {
    background: rgba(106, 109, 120, 0.8);
}

.stock-list-content::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox 滚动条样式 */
.stock-list-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(67, 70, 81, 0.6) rgba(30, 35, 41, 0.3);
}

/* 🚀 渐进式加载样式 */
.loading-progress {
    padding: 16px;
    background: rgba(42, 46, 57, 0.8);
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-text {
    font-size: 13px;
    color: #d1d4dc;
    font-weight: 500;
}

.progress-count {
    font-size: 12px;
    color: #787b86;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2962ff 0%, #1e4bb8 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progressive-stock-list {
    /* 渐进式加载的股票列表容器 */
}

.empty-stock-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-message {
    font-size: 14px;
    font-weight: 500;
    color: #787b86;
    margin-bottom: 8px;
    text-align: center;
}

.empty-hint {
    font-size: 12px;
    color: #555;
    opacity: 0.8;
    text-align: center;
}

/* ===== 创建列表模态框样式 ===== */

.create-list-modal .modal-content {
    width: 420px;
    max-width: 90vw;
}

.create-list-content .modal-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.create-list-form {
    margin-bottom: 24px;
}

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

.create-list-form label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #d1d4dc;
    margin-bottom: 6px;
}

.create-list-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(58, 62, 73, 0.5);
    border-radius: 4px;
    background: #2a2e39;
    color: #d1d4dc;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

.create-list-form input:focus {
    border-color: #2962ff;
}

.create-list-form input::placeholder {
    color: #787b86;
}

.input-hint {
    font-size: 11px;
    color: #787b86;
    margin-top: 4px;
}

/* 用户信息模态框样式 */
.user-info-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #1e222d;
    border-radius: 6px;
    border: 1px solid #2a2e39;
}

.user-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.user-info-item:last-child {
    margin-bottom: 0;
}

.user-info-item label {
    font-weight: 500;
    color: #b2b5be;
    min-width: 80px;
}

.user-info-item span {
    font-weight: 600;
    color: #ffffff;
    text-align: right;
}

.renewal-section {
    margin-top: 20px;
}

.renewal-section h3 {
    margin-bottom: 16px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #2a2e39;
    padding-bottom: 8px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .user-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .user-info-item label {
        min-width: auto;
        font-size: 13px;
    }

    .user-info-item span {
        text-align: left;
        font-size: 14px;
    }

    .renewal-section h3 {
        font-size: 15px;
    }
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-primary {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background: #2962ff;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background: #1e4db7;
}

.btn-secondary {
    flex: 1;
    padding: 10px 20px;
    border: 1px solid rgba(58, 62, 73, 0.5);
    border-radius: 4px;
    background: transparent;
    color: #d1d4dc;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.create-list-tips {
    border-top: 1px solid rgba(58, 62, 73, 0.3);
    padding-top: 16px;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.tip-icon {
    font-size: 14px;
    margin-top: 1px;
    flex-shrink: 0;
}

.tip-text {
    font-size: 11px;
    color: #787b86;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .symbol-search-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .search-tabs {
        gap: 1px;
    }
    
    .search-tab {
        min-width: 50px;
        font-size: 11px;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
    
    .search-result-icon {
        width: 28px;
        height: 28px;
        margin-right: 10px;
    }
}

.theme-light .add-to-watchlist-btn:hover {
    background: rgba(41, 98, 255, 0.2);
    color: #2962ff;
}


/* 白天主题：面板底部操作区样式 */
.theme-light .panel-footer {
    border-top: none;
    background: #ffffff;
    display: none; /* 浅色主题也默认隐藏 */
}

.theme-light .import-input {
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #ffffff;
    color: #2a2e39;
}

.theme-light .import-input:focus {
    border-color: #2962ff;
}

.theme-light .import-input::placeholder {
    color: #666;
}

.theme-light .import-btn {
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #ffffff;
    color: #000000;
}

.theme-light .import-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.3);
    color: #000000;
}

.theme-light .action-btn {
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #ffffff;
    color: #000000;
}

.theme-light .action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.3);
}

.theme-light .clear-btn:hover {
    background: rgba(244, 67, 54, 0.1);
    border-color: #f44336;
    color: #f44336;
}

.theme-light .copy-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
    color: #4caf50;
}

/* ===== 浅色主题 - 股票列表选择器样式 ===== */

.theme-light .stock-list-selector {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-light .list-title-bar {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-light .current-list-display .list-name {
    color: #131722;
}

.theme-light .add-list-btn {
    background: #2962ff;
    color: #ffffff;
}

.theme-light .add-list-btn:hover {
    background: #1e4db8;
    box-shadow: 0 2px 4px rgba(41, 98, 255, 0.3);
}

/* 浅色主题 - 统一标签容器 */
.theme-light .unified-tabs-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 浅色主题 - 现代化tab容器 - 超高优先级特异性 */
body.theme-light #list-tabs.list-tabs,
body.theme-light .list-tabs,
body.theme-light .unified-tabs-row,
body.theme-light .stock-list-selector .list-tabs,
body.theme-light .active-tabs-row,
.theme-light body #list-tabs.list-tabs,
.theme-light body .list-tabs,
.theme-light body .unified-tabs-row,
.theme-light body .stock-list-selector .list-tabs,
.theme-light body .active-tabs-row,
html.theme-light body #list-tabs.list-tabs,
html.theme-light body .list-tabs,
html.theme-light body .unified-tabs-row {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    color: #2a2e39 !important;
}

/* 浅色主题 - 现代化tab按钮 - 超高优先级特异性 */
body.theme-light #list-tabs .list-tab,
body.theme-light .list-tab,
.theme-light body #list-tabs .list-tab,
.theme-light body .list-tab,
.theme-light body .list-tabs .list-tab,
.theme-light body .stock-list-selector .list-tabs .list-tab,
html.theme-light body #list-tabs .list-tab,
html.theme-light body .list-tab {
    background: transparent !important;
    border: none !important;
    color: #4a5568 !important;
    box-shadow: none !important;
}

/* 浅色主题 - Hover效果 - 超高优先级特异性 */
body.theme-light #list-tabs .list-tab:hover,
body.theme-light .list-tab:hover,
.theme-light body #list-tabs .list-tab:hover,
.theme-light body .list-tab:hover,
.theme-light body .list-tabs .list-tab:hover,
.theme-light body .stock-list-selector .list-tabs .list-tab:hover,
html.theme-light body #list-tabs .list-tab:hover,
html.theme-light body .list-tab:hover,
.theme-light .list-tabs .list-tab:hover,
.theme-light #list-tabs .list-tab:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    border: none !important;
    color: #2d3748 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 浅色主题 - Active效果 - 超高优先级特异性 */
body.theme-light #list-tabs .list-tab.active,
body.theme-light .list-tab.active,
.theme-light body #list-tabs .list-tab.active,
.theme-light body .list-tab.active,
.theme-light body .list-tabs .list-tab.active,
.theme-light body .stock-list-selector .list-tabs .list-tab.active,
html.theme-light body #list-tabs .list-tab.active,
html.theme-light body .list-tab.active,
.theme-light .list-tabs .list-tab.active,
.theme-light #list-tabs .list-tab.active {
    background: #2962ff !important;
    border: none !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* 浅色主题 - Active状态文字发光 */
.theme-light .list-tab.active .list-tab-name {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* 移除冲突的简化样式，使用上面更完善的渐变设计 */

.theme-light .list-tab-name {
    color: inherit;
}

/* 浅色主题 - AI、行业、指数按钮暗黄色样式 - 提高CSS特异性优先级 */
.theme-light .unified-tabs-row .list-tab[data-list-id="ai_low"],
.theme-light .unified-tabs-row .list-tab[data-list-id="industry"],
.theme-light .unified-tabs-row .list-tab[data-list-id="indices"],
.theme-light #list-tabs .list-tab[data-list-id="ai_low"],
.theme-light #list-tabs .list-tab[data-list-id="industry"],
.theme-light #list-tabs .list-tab[data-list-id="indices"] {
    color: #d4a574 !important;
}

.theme-light .unified-tabs-row .list-tab[data-list-id="ai_low"]:hover,
.theme-light .unified-tabs-row .list-tab[data-list-id="industry"]:hover,
.theme-light .unified-tabs-row .list-tab[data-list-id="indices"]:hover,
.theme-light #list-tabs .list-tab[data-list-id="ai_low"]:hover,
.theme-light #list-tabs .list-tab[data-list-id="industry"]:hover,
.theme-light #list-tabs .list-tab[data-list-id="indices"]:hover {
    color: #e6c79a !important;
    background: rgba(212, 165, 116, 0.1) !important;
}

.theme-light .unified-tabs-row .list-tab[data-list-id="ai_low"].active,
.theme-light .unified-tabs-row .list-tab[data-list-id="industry"].active,
.theme-light .unified-tabs-row .list-tab[data-list-id="indices"].active,
.theme-light #list-tabs .list-tab[data-list-id="ai_low"].active,
.theme-light #list-tabs .list-tab[data-list-id="industry"].active,
.theme-light #list-tabs .list-tab[data-list-id="indices"].active {
    color: #d4a574 !important;
    background: #2962ff !important;
}

.theme-light .unified-tabs-row .list-tab[data-list-id="ai_low"].active .list-tab-name,
.theme-light .unified-tabs-row .list-tab[data-list-id="industry"].active .list-tab-name,
.theme-light .unified-tabs-row .list-tab[data-list-id="indices"].active .list-tab-name,
.theme-light #list-tabs .list-tab[data-list-id="ai_low"].active .list-tab-name,
.theme-light #list-tabs .list-tab[data-list-id="industry"].active .list-tab-name,
.theme-light #list-tabs .list-tab[data-list-id="indices"].active .list-tab-name {
    text-shadow: 0 0 8px rgba(212, 165, 116, 0.6);
}

.theme-light .delete-tab-btn {
    background: #f44336;
    border: 1px solid #ffffff;
}

.theme-light .delete-list-btn {
    color: #f44336;
}

.theme-light .delete-list-btn:hover {
    background: rgba(244, 67, 54, 0.1);
}

/* 浅色主题 - 只读tabs行容器 */
.theme-light .readonly-tabs-row {
    border-bottom-color: rgba(0, 0, 0, 0.15);
}

/* 浅色主题 - 只读tab样式 */
.theme-light .readonly-tab {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.06) 0%, rgba(230, 126, 34, 0.03) 100%) !important;
    border: 1px solid rgba(243, 156, 18, 0.2) !important;
    color: #d68910 !important;
    box-shadow: 
        0 2px 4px rgba(243, 156, 18, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

.theme-light .readonly-tab:hover {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(230, 126, 34, 0.06) 100%) !important;
    border-color: rgba(243, 156, 18, 0.3) !important;
    color: #b7750f !important;
    box-shadow: 
        0 4px 12px rgba(243, 156, 18, 0.12),
        0 2px 4px rgba(243, 156, 18, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.theme-light .readonly-tab.active {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    border-color: #f39c12 !important;
    color: #ffffff !important;
    box-shadow: 
        0 6px 16px rgba(243, 156, 18, 0.3),
        0 2px 8px rgba(243, 156, 18, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.theme-light .list-separator {
    background: rgba(0, 0, 0, 0.1);
}

.theme-light .empty-message {
    color: #666;
}

.theme-light .empty-hint {
    color: #999;
}

.theme-light .list-status {
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-light .stock-count {
    color: #666;
}

.theme-light .list-type-badge {
    background: rgba(0, 0, 0, 0.08);
    color: #666;
}

.theme-light .stock-count-bar {
    background: transparent;
    border-bottom: none;
}

.theme-light .stock-count {
    color: #666;
}

/* 浅色主题 - 股票列表选择器 */
.theme-light .stock-list-selector {
    background: #f8f9fa;
    border-bottom: none;
}

/* 🎨 浅色主题 - 股票列表滚动条样式 */
.theme-light .stock-list-content::-webkit-scrollbar {
    width: 6px;
}

.theme-light .stock-list-content::-webkit-scrollbar-track {
    background: rgba(220, 220, 220, 0.4);
    border-radius: 3px;
}

.theme-light .stock-list-content::-webkit-scrollbar-thumb {
    background: rgba(160, 160, 160, 0.6);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.theme-light .stock-list-content::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 120, 120, 0.8);
}

.theme-light .stock-list-content::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox 浅色主题滚动条样式 */
.theme-light .stock-list-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(160, 160, 160, 0.6) rgba(220, 220, 220, 0.4);
}

/* 浅色主题 - 创建列表模态框 */
.theme-light .create-list-form input {
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #ffffff;
    color: #131722;
}

.theme-light .create-list-form input:focus {
    border-color: #2962ff;
}

.theme-light .create-list-form input::placeholder {
    color: #666;
}

.theme-light .input-hint {
    color: #666;
}

.theme-light .btn-secondary {
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #131722;
}

.theme-light .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.3);
}

.theme-light .create-list-tips {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-light .tip-text {
    color: #666;
}

/* 图表右键菜单样式 */
.chart-context-menu {
    background: #2a2e39;
    border: 1px solid #434651;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 4px 0;
    min-width: 180px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    color: #d1d4dc;
    user-select: none;
    pointer-events: auto;
}

.context-menu-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

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

.context-menu-icon {
    margin-right: 8px;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.context-menu-text {
    flex: 1;
    white-space: nowrap;
}

.context-menu-separator {
    height: 1px;
    background: #434651;
    margin: 4px 0;
}

/* 白色主题的右键菜单 */
.theme-light .chart-context-menu {
    background: #ffffff;
    border-color: #e0e3eb;
    color: #131722;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-light .context-menu-item:hover {
    background: #f0f3fa;
}

.theme-light .context-menu-separator {
    background: #e0e3eb;
}

/* 图表鼠标样式控制 - 使用更强的选择器 */
.chart-container.arrow-mode,
.chart-container.arrow-mode *,
.chart-container.arrow-mode canvas,
.chart-container.arrow-mode .tv-lightweight-charts {
    cursor: default !important;
}

.chart-container.crosshair-mode,
.chart-container.crosshair-mode *,
.chart-container.crosshair-mode canvas,
.chart-container.crosshair-mode .tv-lightweight-charts {
    cursor: crosshair !important;
}

/* 确保覆盖LightweightCharts的默认样式 */
.arrow-mode .tv-lightweight-charts,
.arrow-mode .tv-lightweight-charts * {
    cursor: default !important;
}

.crosshair-mode .tv-lightweight-charts,
.crosshair-mode .tv-lightweight-charts * {
    cursor: crosshair !important;
}

/* 白鼠标工具按钮样式 */
.arrow-tool {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.arrow-tool svg {
    transform: scale(1.5);
    transform-origin: center center;
    position: relative;
    left: 0;
    top: 0;
}

/* 确保按钮内容居中 */
.tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

/* 主题适配 - 市场选择器 */
.theme-light .market-selector {
    background: rgba(0, 0, 0, 0.05);
}

.theme-light .market-btn {
    color: #6a6d78;
}

.theme-light .market-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #2a2e39;
}

.theme-light .market-btn.active {
    background: #2962ff;
    color: white;
}

/* 选中股票内发光蓝色高亮效果 */
.market-item.active, .watchlist-item.active {
    box-shadow: 0 0 0 2px #2962ff inset;
    border-radius: 6px;
    z-index: 2;
}
.theme-light .market-item.active, .theme-light .watchlist-item.active {
    box-shadow: 0 0 0 2px #2962ff33 inset;
    border-radius: 6px;
    z-index: 2;
}

/* 时间框架选择器 */
.timeframe-selector {
    display: flex;
    align-items: center;
    gap: 4px;
}

.timeframe-btn {
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
    background: var(--button-bg);
    color: var(--text-color);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.timeframe-btn:hover {
    background: var(--button-hover-bg);
}

.timeframe-btn.active {
    background: var(--accent-color);
    color: var(--button-text);
    border-color: var(--accent-color);
}

/* 刷新价格按钮 */
.refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
    background: var(--button-bg);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: var(--button-hover-bg);
    transform: rotate(30deg);
}

.refresh-btn svg {
    width: 14px;
    height: 14px;
}

/* 统一股票列表UI样式 */
.unified-stock-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
    position: relative;
}

.unified-stock-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(2px);
}

.unified-stock-item.active {
    background: rgba(41, 98, 255, 0.15);
    border-left: 3px solid #2962ff;
}

/* 主要内容区域 - 占据大部分空间 */
.stock-main-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-right: 8px;
}

/* 股票序号样式 - 绝对定位在左侧边缘 */
.stock-index {
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    font-weight: 500;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    line-height: 1;
}

/* 左侧信息区域 */
.stock-left-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-left: 6px;
}

/* 股票代码 - 左上 */
.stock-code {
    font-weight: 600;
    font-size: 13px;
    color: #d1d4dc;
    line-height: 1.2;
}

/* 股票名称 - 左下 */
.stock-name {
    font-size: 11px;
    color: #787b86;
    line-height: 1.2;
}

/* 右侧价格区域 */
.stock-right-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

/* 当前价格 - 右上 */
.stock-current-price {
    font-weight: 600;
    font-size: 13px;
    color: #d1d4dc;
    line-height: 1.2;
}

/* 涨跌额/涨跌幅 - 右下 */
.stock-change-info {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

.stock-change-info.positive {
    color: #f23645; /* 涨：红色 */
}

.stock-change-info.negative {
    color: #4caf50; /* 跌：绿色 */
}

.stock-change-info.neutral {
    color: #787b86; /* 中性：灰色 */
}

/* 按钮区域 - 垂直排列 */
.stock-button-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.unified-stock-item:hover .stock-button-area {
    opacity: 1;
}

/* 统一按钮样式 */
.unified-stock-btn {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* 添加按钮样式 */
.unified-add-btn {
    background: rgba(41, 98, 255, 0.1);
    color: #2962ff;
}

.unified-add-btn:hover {
    background: rgba(41, 98, 255, 0.2);
    transform: scale(1.1);
}

/* 删除按钮样式 */
.unified-delete-btn {
    background: rgba(242, 54, 69, 0.1);
    color: #f23645;
}

.unified-delete-btn:hover {
    background: rgba(242, 54, 69, 0.2);
    transform: scale(1.1);
}

/* 按钮占位符样式 - 统一按钮区域高度 */
.button-spacer {
    width: 20px;
    height: 20px;
    visibility: hidden; /* 占位但不显示 */
}

/* 统一按钮容器高度 */
.stock-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 44px; /* 确保至少能容纳2个按钮的高度 (20px + 4px + 20px) */
    justify-content: flex-start;
    align-items: center;
}

/* 浅色主题 - 统一股票列表样式 */
.theme-light .unified-stock-item {
    background: rgba(0, 0, 0, 0.02);
    border-left-color: transparent;
}

.theme-light .unified-stock-item:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: translateX(2px);
    border-left-color: rgba(41, 98, 255, 0.5);
}

.theme-light .unified-stock-item.active {
    background: rgba(41, 98, 255, 0.15);
    border-left: 3px solid #2962ff;
}

/* 浅色主题 - 统一股票信息颜色 */
.theme-light .stock-code,
.theme-light .stock-current-price {
    color: #2a2e39;
}

.theme-light .stock-name {
    color: #6b7280;
}

.theme-light .stock-index {
    color: rgba(0, 0, 0, 0.3);
}

/* 资源更新通知样式 */
.update-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2196f3;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.update-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.update-notification button {
    background-color: white;
    color: #2196f3;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
}

.update-notification button:hover {
    background-color: #f5f5f5;
}

/* 暗黑模式下的样式 */
.theme-dark .update-notification {
    background-color: #1e88e5;
}

.theme-dark .update-notification button {
    background-color: #333;
    color: #fff;
}

.theme-dark .update-notification button:hover {
    background-color: #444;
}

/* 设备检测调试信息样式 */
.device-debug-info {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 12px;
    z-index: 9999;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.debug-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #4CAF50;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.debug-content {
    line-height: 1.4;
}

.debug-content div {
    margin-bottom: 3px;
}

.debug-close-btn {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
}

.debug-close-btn:hover {
    color: #f44336;
}

/* 移动端分析工具按钮样式 */
.mobile-analysis-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #d1d4dc;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    width: 40px;
    min-width: 40px;
    min-height: 48px;
    gap: 4px;
}

/* 移动端通用工具按钮样式 */
.mobile-common-btn,
#mobile-ma-switch {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    width: 40px;
    min-width: 40px;
    min-height: 48px;
    gap: 4px;
}

.mobile-common-btn:hover,
#mobile-ma-switch:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.4);
}

.mobile-common-btn.active,
#mobile-ma-switch.active {
    background: #4caf50 !important;
    border-color: #4caf50 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3) !important;
}

.mobile-common-btn.active:hover,
#mobile-ma-switch.active:hover {
    background: #45a049 !important;
    border-color: #45a049 !important;
}

.mobile-analysis-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    /* 移除动画效果，简化交互 */
}

/* 移动端分析按钮激活状态 - 使用统一的蓝色，增强优先级 */
.mobile-analysis-btn.active {
    background: #2962ff !important;
    border-color: #2962ff !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(41, 98, 255, 0.3) !important;
}

.mobile-analysis-btn.active:hover {
    background: #1e4bb8 !important;
    border-color: #1e4bb8 !important;
    /* 移除动画效果，简化交互 */
}

/* 移动端分析按钮disabled状态 - 阻止所有交互样式 */
.mobile-analysis-btn.disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: auto; /* 保持可点击以触发登录 */
}

.mobile-analysis-btn.disabled:hover,
.mobile-analysis-btn.disabled:focus,
.mobile-analysis-btn.disabled:active {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 移动端分析按钮焦点控制 - 防止触摸焦点问题 */
.mobile-analysis-btn:focus,
.mobile-analysis-btn:active {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* 确保激活状态的按钮focus时保持一致 */
.mobile-analysis-btn.active:focus,
.mobile-analysis-btn.active:active {
    background: #2962ff !important;
    border-color: #2962ff !important;
    color: white !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(41, 98, 255, 0.3) !important;
}

/* disabled状态下的focus管理优先级最高 */
.mobile-analysis-btn.disabled:focus,
.mobile-analysis-btn.disabled:active,
.mobile-analysis-btn.disabled:hover {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 移动端分析按钮内部元素 - 简化版本 */
.mobile-switch-icon {
    font-size: 14px;
    font-weight: bold;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    color: inherit; /* 继承父元素颜色，确保一致性 */
}

.mobile-analysis-btn.active .mobile-switch-icon {
    opacity: 1 !important;
    color: #ffffff !important;
}

.mobile-switch-label {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

/* ================================
   移动端主题切换完整支持 
   ================================ */

/* 移动端顶部工具栏主题 */
.theme-light .mobile-row-1 {
    background: #f7f8fa !important;
    border-bottom-color: #e0e3eb !important;
}

.theme-light .mobile-row-2 {
    background: #ffffff !important;
    border-bottom-color: #e0e3eb !important;
}

.theme-light .mobile-layout-container {
    background: #f7f8fa !important;
}

/* 移动端搜索区域主题 */
.theme-light .mobile-search-area {
    background: #ffffff !important;
    border-color: #d1d4dc !important;
    color: #2a2e39 !important;
}

.theme-light .mobile-search-area:hover {
    background: #f0f0f0 !important;
    border-color: #9ca3af !important;
}

.theme-light .mobile-search-text {
    color: #6b7280 !important;
}

/* 移动端价格信息样式 */
.mobile-price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 120px;
    width: 120px;
    gap: 2px;
}

.mobile-price {
    font-weight: 600;
    font-size: 16px;
    color: #d1d4dc;
    min-width: 50px;
    text-align: right;
}

.mobile-change {
    font-size: 12px;
    font-weight: 500;
    min-width: 90px;
    text-align: right;
}

.mobile-change.positive {
    color: #f23645;
}

.mobile-change.negative {
    color: #4caf50;
}

/* 移动端价格信息主题 */
.theme-light .mobile-price {
    color: #2a2e39 !important;
}

.theme-light .mobile-change {
    color: #2a2e39 !important;
}

.theme-light .mobile-change.positive {
    color: #f23645 !important;
}

.theme-light .mobile-change.negative {
    color: #4caf50 !important;
}

.theme-light .mobile-ohlc-label {
    color: #6b7280 !important;
}

.theme-light .mobile-ohlc-value {
    color: #2a2e39 !important;
}

/* 移动端时间周期按钮主题 */
.theme-light .mobile-timeframe-btn {
    background: #ffffff !important;
    color: #2a2e39 !important;
    border-color: #d1d4dc !important;
}

.theme-light .mobile-timeframe-btn:hover {
    background: #f0f0f0 !important;
    border-color: #9ca3af !important;
}

.theme-light .mobile-timeframe-btn.active {
    background: #2962ff !important;
    color: white !important;
    border-color: #2962ff !important;
}

/* 移动端复权选择器主题 */
.theme-light .mobile-adjustment-select {
    background: #ffffff !important;
    color: #2a2e39 !important;
    border-color: #d1d4dc !important;
}

.theme-light .mobile-adjustment-select:hover {
    background: #f0f0f0 !important;
    border-color: #9ca3af !important;
}

/* 移动端底部工具栏主题 */
/* 暗色主题（默认）*/
.mobile-bottom-toolbar {
    background: #1e222d;
    border-top: 1px solid #2a2e39;
}

.bottom-tool-btn {
    color: #d1d4dc;
    background: transparent;
    border: none;
}

.bottom-tool-btn:hover,
.bottom-tool-btn.active {
    background: #2962ff;
    color: white;
}

/* 浅色主题 */
.theme-light .mobile-bottom-toolbar {
    background: #f7f8fa !important;
    border-top-color: #e0e3eb !important;
}

.theme-light .bottom-tool-btn {
    color: #2a2e39 !important;
}

.theme-light .bottom-tool-btn:hover,
.theme-light .bottom-tool-btn.active {
    background: #2962ff !important;
    color: white !important;
}

/* 移动端汉堡菜单主题 */
.theme-light .hamburger-dropdown {
    background: #ffffff !important;
    border-color: #e0e3eb !important;
}

.theme-light .hamburger-menu-section {
    border-bottom-color: #e0e3eb !important;
}

.theme-light .hamburger-section-title {
    color: #6b7280 !important;
}

.theme-light .hamburger-tool-btn {
    background: #f7f8fa !important;
    color: #2a2e39 !important;
    border-color: #d1d4dc !important;
}

.theme-light .hamburger-tool-btn:hover {
    background: #e0e3eb !important;
    border-color: #9ca3af !important;
}

.theme-light .hamburger-tool-btn.active {
    background: #2962ff !important;
    color: white !important;
    border-color: #2962ff !important;
}

.theme-light .hamburger-user-info {
    background: #f7f8fa !important;
    border-color: #e0e3eb !important;
}

.theme-light .hamburger-user-info:hover {
    background: #e0e3eb !important;
}

.theme-light .hamburger-user-name {
    color: #2a2e39 !important;
}

.theme-light .hamburger-user-status {
    color: #6b7280 !important;
}

.theme-light .hamburger-option-btn {
    color: #2a2e39 !important;
}

.theme-light .hamburger-option-btn:hover {
    background: #e0e3eb !important;
}

/* 移动端汉堡菜单按钮主题 */
.theme-light .mobile-layout-container .hamburger-menu-btn {
    color: #2a2e39 !important;
}

.theme-light .mobile-layout-container .hamburger-menu-btn:hover,
.theme-light .mobile-layout-container .hamburger-menu-btn.active {
    background: #e0e3eb !important;
    color: #2962ff !important;
}

/* 移动端用户头像主题 */
.theme-light .mobile-user-avatar .avatar-circle {
    background: #2962ff !important;
}

.theme-light .mobile-user-avatar:hover .avatar-circle {
    background: #1e4bb8 !important;
}

.theme-light .mobile-switch-icon {
    background: #e0e3eb !important;
    color: #6b7280 !important;
}

/* 白天模式适配 - 统一使用失衡区蓝色 */
.theme-light .mobile-analysis-btn {
    background: #ffffff !important;
    border-color: #d1d4dc !important;
    color: #2a2e39 !important;
}

.theme-light .mobile-analysis-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.theme-light .mobile-analysis-btn.active {
    background: #2962ff !important;
    border-color: #2962ff !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(41, 98, 255, 0.3) !important;
}

.theme-light .mobile-analysis-btn.active:hover {
    background: #1e4bb8 !important;
    border-color: #1e4bb8 !important;
}

/* 白色主题下激活状态的图标颜色 - 简化版本 */
.theme-light .mobile-analysis-btn.active .mobile-switch-icon {
    opacity: 1 !important;
    color: #ffffff !important;
}

/* 移动端删除按钮动画 */
@keyframes deleteButtonAppear {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.4);
    }
    100% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes deleteButtonPulse {
    0% {
        transform: scale(1.2);
        box-shadow: 0 4px 8px rgba(0,0,0,0.6);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 6px 12px rgba(255,17,68,0.8);
    }
    100% {
        transform: scale(1.2);
        box-shadow: 0 4px 8px rgba(0,0,0,0.6);
    }
}

/* 删除按钮hover效果增强 */
.drawing-delete-btn:hover {
    animation: deleteButtonPulse 1s ease-in-out infinite;
}

/* 移动端删除提示样式 */
.mobile-delete-hint {
    font-family: -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 移动端隐藏桌面专用元素 */
@media only screen and (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    /* 确保设备检测调试信息在移动端完全不可见 */
    .device-debug-info {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* 只读列表特殊样式 - 隐藏底部功能但保持布局 */
/* 当激活的是AI、行业或指数列表时，隐藏底部操作区 */
#stock-list-panel[data-active-list="ai_low"] .panel-footer,
#stock-list-panel[data-active-list="industry"] .panel-footer,
#stock-list-panel[data-active-list="indices"] .panel-footer {
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* 行业列表股票项隐藏添加按钮但保持占位 */
#stock-list-panel[data-active-list="industry"] .add-to-watchlist-btn,
#stock-list-panel[data-active-list="industry"] .unified-add-btn {
    visibility: hidden !important;
    /* 保持按钮的尺寸占位，只是不可见 */
}

/* 确保行业列表中的删除按钮仍然可见 */
#stock-list-panel[data-active-list="industry"] .remove-from-market-btn,
#stock-list-panel[data-active-list="industry"] .remove-stock-btn,
#stock-list-panel[data-active-list="industry"] .unified-delete-btn {
    visibility: visible !important;
}

/* ================================
   流量统计面板样式
   ================================ */
.traffic-stats-panel {
    margin-top: 4px;
    padding: 6px 16px 4px 16px;
    border-top: 1px solid rgba(58, 62, 73, 0.3);
    background: rgba(58, 62, 73, 0.05);
    border-radius: 0 0 8px 8px;
    transition: all 0.3s ease;
}

.traffic-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
}

.traffic-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-size: 10px;
    color: #787b86;
    font-weight: 500;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    color: #2962ff;
    font-family: 'Consolas', 'Monaco', monospace;
}


/* 浅色主题适配 */
.theme-light .traffic-stats-panel {
    background: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-light .stat-label {
    color: #666;
}

/* 移动端响应式布局 */
@media (max-width: 768px) {
    .traffic-stats-panel {
        padding: 4px 12px 3px 12px;
        margin-top: 2px;
    }
    
    /* 移动端流量统计 - 移除单列覆盖，让mobile.css的3列布局生效 */
    .traffic-stats-grid {
        /* grid-template-columns: 1fr; 注释掉单列布局，使用mobile.css的3列设置 */
        gap: 6px;
        margin-bottom: 0;
    }
    
    .traffic-stat-item {
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 13px;
    }
}

/* 超小屏适配 */
@media (max-width: 480px) {
    .traffic-stats-panel {
        padding: 3px 10px 2px 10px;
    }
    
    .stat-value {
        font-size: 12px;
    }
}

/* ================================
   桌面端.right-panel优化 - 消除不必要的底部空白
   使用高优先级选择器覆盖mobile.css中的冲突规则
   ================================ */
@media (min-width: 769px) {
    body .right-panel,
    body.pwa-fullscreen .right-panel,
    body:not(.pwa-fullscreen) .right-panel {
        padding-bottom: 0 !important;
    }

    /* 桌面端隐藏移动端返回按钮 */
    .mobile-back-header {
        display: none !important;
    }
}

/* ================================
   移动端股票列表按钮优化 - 强制覆盖基础样式
   ================================ */
@media only screen and (max-width: 768px) {
    /* 强制缩小按钮到8px */
    .unified-stock-btn,
    .unified-add-btn,
    .unified-delete-btn {
        width: 8px !important;
        height: 8px !important;
        font-size: 6px !important;
        line-height: 1 !important;
        padding: 0 !important;
        min-width: 8px !important;
        min-height: 8px !important;
    }
    
    /* 调整按钮容器高度 */
    .stock-action-buttons {
        min-height: 18px !important;
        gap: 2px !important;
    }
    
    /* 确保hover时不会变大 */
    .unified-add-btn:hover,
    .unified-delete-btn:hover {
        transform: none !important;
    }
}

/* 已删除龙虎榜模态框相关样式 - 现在使用集成面板 */

/* 龙虎榜信息面板样式 */
.longhubang-info-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 400px;
    max-width: calc(100vw - 40px);
    background: #1e222d;
    border: 1px solid #373a43;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #d1d4dc;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    animation: panelSlideIn 0.3s ease-out;
}

@keyframes panelSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.longhubang-info-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #373a43;
    background: #1e222d;
    border-radius: 8px 8px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.longhubang-info-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #d1d4dc;
    margin: 0;
}

.longhubang-info-panel-close {
    background: none;
    border: none;
    color: #868993;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.longhubang-info-panel-close:hover {
    background: rgba(134, 137, 147, 0.1);
    color: #d1d4dc;
}

.longhubang-info-panel-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(100vh - 120px);
}

.date-group {
    margin-bottom: 24px;
    border: 1px solid #373a43;
    border-radius: 6px;
    overflow: hidden;
}

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

.date-header {
    background: #2a2e39;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #d1d4dc;
    border-bottom: 1px solid #373a43;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
}

.records-table th,
.records-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(55, 58, 67, 0.5);
    font-size: 13px;
}

.records-table th {
    background: #1e222d;
    font-weight: 600;
    color: #868993;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.records-table tr:last-child td {
    border-bottom: none;
}

.records-table tr:hover {
    background: rgba(42, 46, 57, 0.3);
}

.buy-amount, .buy-percentage {
    color: #4caf50;
}

.sell-amount, .sell-percentage {
    color: #f44336;
}

.net-amount {
    font-weight: 600;
}

.net-amount.positive {
    color: #4caf50;
}

.net-amount.negative {
    color: #f44336;
}

.net-amount.zero {
    color: #868993;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .longhubang-info-panel {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    
    .longhubang-info-panel-header {
        padding: 12px 16px;
    }
    
    .longhubang-info-panel-body {
        padding: 12px 16px;
        max-height: calc(100vh - 80px);
    }
    
    .records-table {
        font-size: 12px;
    }
    
    .records-table th,
    .records-table td {
        padding: 8px 12px;
    }
    
    .date-header {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .longhubang-info-panel {
        top: 5px;
        right: 5px;
        left: 5px;
    }
    
    .records-table {
        font-size: 11px;
    }
    
    .records-table th,
    .records-table td {
        padding: 6px 8px;
    }
    
    .longhubang-info-panel-body {
        max-height: calc(100vh - 70px);
    }
}

/* 滚动条样式 - 信息面板 */
.longhubang-info-panel-body::-webkit-scrollbar {
    width: 6px;
}

.longhubang-info-panel-body::-webkit-scrollbar-track {
    background: rgba(55, 58, 67, 0.3);
    border-radius: 3px;
}

.longhubang-info-panel-body::-webkit-scrollbar-thumb {
    background: rgba(134, 137, 147, 0.4);
    border-radius: 3px;
}

.longhubang-info-panel-body::-webkit-scrollbar-thumb:hover {
    background: rgba(134, 137, 147, 0.6);
}

/* 龙虎榜数据框样式（新版多数据框系统） */
.longhubang-databox {
    position: fixed;
    background: #1e222d;
    border: 1px solid #373a43;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #d1d4dc;
    min-width: 200px;
    max-width: 300px;
    font-size: 12px;
    animation: databoxFadeIn 0.3s ease-out;
}

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

.databox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #2a2e39;
    border-bottom: 1px solid #373a43;
    border-radius: 6px 6px 0 0;
}

.databox-date {
    font-weight: 600;
    color: #4a9eff;
    font-size: 13px;
}

.databox-close {
    background: none;
    border: none;
    color: #868993;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s;
    line-height: 1;
}

.databox-close:hover {
    background: rgba(134, 137, 147, 0.1);
    color: #d1d4dc;
}

.databox-content {
    padding: 8px 12px;
}

/* 旧版数据框记录样式（保留兼容性） */
.databox-record {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(55, 58, 67, 0.3);
}

.databox-record:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* 新版紧凑型数据框记录样式 */
.databox-record-compact {
    margin-bottom: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(55, 58, 67, 0.2);
}

.databox-record-compact:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.record-line1 {
    display: flex;
    align-items: baseline;
    margin-bottom: 2px;
}

.record-yzmc {
    font-weight: 600;
    color: #d1d4dc;
    font-size: 11px;
    margin-right: 4px;
}

.record-yyb {
    font-size: 9px;
    color: #868993;
    font-weight: 400;
}

.record-line2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    gap: 8px;
}

.record-amounts {
    display: flex;
    gap: 8px;
    margin-bottom: 2px;
}

.buy-amount {
    color: #4caf50;
    font-size: 10px;
    font-weight: 500;
}

.sell-amount {
    color: #f44336;
    font-size: 10px;
    font-weight: 500;
}

.record-net {
    font-weight: 600;
    font-size: 10px;
}

.record-net.positive {
    color: #4caf50;
}

.record-net.negative {
    color: #f44336;
}

.record-net.zero {
    color: #868993;
}

/* 新版3行标准格式数据框 */
.databox-content-standard {
    padding: 0;
}

.databox-record-standard {
    margin-bottom: 0;
}

/* 第一行：游资名称（左） + 日期+关闭按钮（右） */
.record-row1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(55, 58, 67, 0.3);
}

.record-yzmc-left {
    font-weight: 600;
    color: #d1d4dc;
    font-size: 12px;
}

.record-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.record-date-right {
    font-weight: 500;
    color: #4a9eff;
    font-size: 11px;
}

.databox-close-new {
    background: none;
    border: none;
    color: #868993;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 2px;
    transition: all 0.2s;
    line-height: 1;
    margin-left: 2px;
}

.databox-close-new:hover {
    background: rgba(134, 137, 147, 0.1);
    color: #d1d4dc;
}

/* 第二行：字段标题 */
.record-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin: 4px 0 2px 0;
    padding: 2px 0;
}

.field-buy, .field-sell, .field-net {
    text-align: center;
    font-size: 10px;
    color: #868993;
    font-weight: 500;
}

/* 第三行：金额数据 */
.record-row3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 2px;
}

.amount-buy, .amount-sell, .amount-net {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
}

.amount-buy {
    color: #4caf50;
}

.amount-sell {
    color: #f44336;
}

.amount-net.positive {
    color: #4caf50;
}

.amount-net.negative {
    color: #f44336;
}

.amount-net.zero {
    color: #868993;
}

/* 响应式设计 - 数据框 */
@media (max-width: 768px) {
    .longhubang-databox {
        min-width: 160px;
        max-width: 220px;
        font-size: 10px;
        padding: 6px 10px;
    }
    
    .record-yzmc-left {
        font-size: 11px;
    }
    
    .record-date-right {
        font-size: 10px;
    }
    
    .field-buy, .field-sell, .field-net {
        font-size: 9px;
    }
    
    .amount-buy, .amount-sell, .amount-net {
        font-size: 10px;
    }
}

/* 🆕 复制图像备用方案模态框样式 */
.copy-alternative-modal, .data-url-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
}

.copy-alternative-content, .data-url-content {
    background: #1e222d;
    border-radius: 8px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid #434651;
}

.copy-alternative-header, .data-url-header {
    background: #2a2e39;
    padding: 16px 20px;
    border-bottom: 1px solid #434651;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.copy-alternative-header h3, .data-url-header h3 {
    margin: 0;
    color: #d1d4dc;
    font-size: 16px;
    font-weight: 600;
}

.copy-alternative-close, .data-url-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #868993;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.copy-alternative-close:hover, .data-url-close:hover {
    background: #434651;
    color: #d1d4dc;
}

.copy-alternative-body, .data-url-body {
    padding: 20px;
}

.copy-alternative-body p, .data-url-body p {
    color: #868993;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.copy-alternative-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.copy-alternative-btn {
    background: #2962ff;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.copy-alternative-btn:hover {
    background: #1e53e5;
    transform: translateY(-1px);
}

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

.copy-alternative-tips {
    background: #2a2e39;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #2962ff;
}

.copy-alternative-tips small {
    color: #868993;
    line-height: 1.4;
}

/* 数据URL模态框特殊样式 */
.data-url-textarea {
    width: 100%;
    min-height: 120px;
    background: #2a2e39;
    border: 1px solid #434651;
    border-radius: 6px;
    padding: 12px;
    color: #d1d4dc;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    line-height: 1.4;
    resize: vertical;
    margin-bottom: 12px;
    word-break: break-all;
}

.data-url-textarea:focus {
    outline: none;
    border-color: #2962ff;
    box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.2);
}

.data-url-select-all {
    background: #434651;
    color: #d1d4dc;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.data-url-select-all:hover {
    background: #4a4e5a;
}

/* 白色主题样式 */
.theme-light .copy-alternative-content,
.theme-light .data-url-content {
    background: #ffffff;
    border-color: #e0e3eb;
}

.theme-light .copy-alternative-header,
.theme-light .data-url-header {
    background: #f8f9fb;
    border-bottom-color: #e0e3eb;
}

.theme-light .copy-alternative-header h3,
.theme-light .data-url-header h3 {
    color: #131722;
}

.theme-light .copy-alternative-close,
.theme-light .data-url-close {
    color: #868993;
}

.theme-light .copy-alternative-close:hover,
.theme-light .data-url-close:hover {
    background: #e0e3eb;
    color: #131722;
}

.theme-light .copy-alternative-body p,
.theme-light .data-url-body p {
    color: #131722;
}

.theme-light .copy-alternative-tips {
    background: #f8f9fb;
    border-left-color: #2962ff;
}

.theme-light .copy-alternative-tips small {
    color: #868993;
}

.theme-light .data-url-textarea {
    background: #f8f9fb;
    border-color: #e0e3eb;
    color: #131722;
}

.theme-light .data-url-textarea:focus {
    border-color: #2962ff;
}

.theme-light .data-url-select-all {
    background: #e0e3eb;
    color: #131722;
}

.theme-light .data-url-select-all:hover {
    background: #d1d4dc;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .copy-alternative-content, .data-url-content {
        width: 95%;
        margin: 10px;
    }
    
    .copy-alternative-body, .data-url-body {
        padding: 16px;
    }
    
    .copy-alternative-options {
        gap: 10px;
    }
    
    .copy-alternative-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* ============ Toast中心显示样式 ============ */
.toast-container-center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.toast-center {
    background: rgba(40, 44, 52, 0.95);
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    pointer-events: auto;
}

.toast-center.show {
    opacity: 1;
    transform: scale(1);
}

/* Toast类型样式 */
.toast-center.toast-info {
    background: rgba(40, 44, 52, 0.95);
}

.toast-center.toast-success {
    background: rgba(46, 160, 67, 0.95);
}

.toast-center.toast-warning {
    background: rgba(243, 156, 18, 0.95);
}

.toast-center.toast-error {
    background: rgba(231, 76, 60, 0.95);
}

/* 亮色主题适配 */
.theme-light .toast-center {
    background: rgba(255, 255, 255, 0.98);
    color: #212529;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-light .toast-center.toast-info {
    background: rgba(255, 255, 255, 0.98);
    color: #212529;
}

.theme-light .toast-center.toast-success {
    background: rgba(212, 237, 218, 0.98);
    color: #155724;
}

.theme-light .toast-center.toast-warning {
    background: rgba(255, 243, 205, 0.98);
    color: #856404;
}

.theme-light .toast-center.toast-error {
    background: rgba(248, 215, 218, 0.98);
    color: #721c24;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .toast-center {
        padding: 12px 20px;
        font-size: 13px;
        max-width: 80vw;
    }
}

/* =============== 高亮日期功能样式 =============== */

/* 高亮按钮特殊样式 */
#highlight-btn,
#hamburger-highlight {
    position: relative;
}

/* 高亮按钮星形图标动画 */
#highlight-btn svg,
#hamburger-highlight svg {
    transition: transform 0.3s ease, filter 0.3s ease;
}

#highlight-btn:hover svg,
#hamburger-highlight:hover svg {
    transform: scale(1.1) rotate(18deg);
    filter: drop-shadow(0 0 4px rgba(255, 235, 59, 0.6));
}

/* 深色主题下的高亮按钮 */
#highlight-btn:hover svg {
    filter: drop-shadow(0 0 4px rgba(33, 150, 243, 0.6));
}

/* 浅色主题下的高亮按钮 */
.theme-light #highlight-btn:hover svg,
.theme-light #hamburger-highlight:hover svg {
    filter: drop-shadow(0 0 4px rgba(255, 193, 7, 0.8));
}

/* 高亮按钮激活状态 */
#highlight-btn.active,
#hamburger-highlight.active {
    background: rgba(255, 235, 59, 0.2) !important;
    color: #ffc107 !important;
}

.theme-light #highlight-btn.active,
.theme-light #hamburger-highlight.active {
    background: rgba(255, 193, 7, 0.2) !important;
    color: #ff8f00 !important;
}

/* 汉堡菜单中的高亮按钮样式 */
#hamburger-highlight .hamburger-option-label {
    font-weight: 600;
}

#hamburger-highlight:hover {
    background: rgba(255, 235, 59, 0.1);
}

.theme-light #hamburger-highlight:hover {
    background: rgba(255, 193, 7, 0.1);
}

/* 高亮日期指示器样式 (预留，LightweightCharts使用系列实现) */
.highlight-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

/* 深色主题高亮颜色 */
.highlight-indicator {
    background: linear-gradient(90deg,
        rgba(33, 150, 243, 0.1) 0%,
        rgba(33, 150, 243, 0.2) 50%,
        rgba(33, 150, 243, 0.1) 100%);
    border-left: 1px solid rgba(33, 150, 243, 0.4);
    border-right: 1px solid rgba(33, 150, 243, 0.4);
}

/* 浅色主题高亮颜色 */
.theme-light .highlight-indicator {
    background: linear-gradient(90deg,
        rgba(255, 193, 7, 0.1) 0%,
        rgba(255, 193, 7, 0.2) 50%,
        rgba(255, 193, 7, 0.1) 100%);
    border-left: 1px solid rgba(255, 193, 7, 0.5);
    border-right: 1px solid rgba(255, 193, 7, 0.5);
}

/* 高亮日期悬停效果 */
.highlight-indicator:hover {
    opacity: 0.5;
}

/* 高亮日期工具提示 */
.highlight-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.theme-light .highlight-tooltip {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.highlight-indicator:hover .highlight-tooltip {
    opacity: 1;
}

/* 高亮配置模态框样式 */
.highlight-config-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.highlight-config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.highlight-config-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.highlight-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.highlight-color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.highlight-date-text {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.highlight-remove-btn {
    background: transparent;
    border: none;
    color: #ff4757;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    line-height: 1;
}

.highlight-remove-btn:hover {
    background: rgba(255, 71, 87, 0.2);
    transform: scale(1.1);
}

.highlight-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.highlight-empty-state .empty-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.highlight-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    margin-top: 15px;
}

.highlight-add-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2962ff, #1e88e5);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.highlight-add-btn:hover {
    background: linear-gradient(135deg, #1e88e5, #1976d2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 98, 255, 0.3);
}

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

.highlight-add-icon {
    font-size: 16px;
    line-height: 1;
}


.highlight-input-field {
    margin-bottom: 20px;
}

.highlight-input-label {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.highlight-date-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.highlight-date-input:focus {
    outline: none;
    border-color: #2962ff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(41, 98, 255, 0.2);
}

.highlight-date-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.highlight-input-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.highlight-input-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.highlight-input-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.highlight-input-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.highlight-input-confirm {
    background: #2962ff;
    color: white;
}

.highlight-input-confirm:hover {
    background: #1e88e5;
    transform: translateY(-1px);
}

.highlight-input-confirm:disabled {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
}

/* 浅色主题适配 */
.theme-light .highlight-config-item {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-light .highlight-config-item:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.theme-light .highlight-color-indicator {
    border-color: rgba(0, 0, 0, 0.3);
}

.theme-light .highlight-date-text {
    color: rgba(0, 0, 0, 0.9);
}

.theme-light .highlight-empty-state {
    color: rgba(0, 0, 0, 0.6);
}

.theme-light .highlight-actions {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.theme-light .highlight-input-content {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-light .highlight-input-title {
    color: #333;
}

.theme-light .highlight-input-label {
    color: rgba(0, 0, 0, 0.8);
}

.theme-light .highlight-date-input {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
    color: #333;
}

.theme-light .highlight-date-input:focus {
    background: rgba(0, 0, 0, 0.1);
    border-color: #2962ff;
    box-shadow: 0 0 0 3px rgba(41, 98, 255, 0.1);
}

.theme-light .highlight-date-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.theme-light .highlight-input-cancel {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.8);
}

.theme-light .highlight-input-cancel:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .highlight-input-content {
        max-width: 320px;
        padding: 20px;
    }

    .highlight-config-list {
        max-height: 250px;
    }

    .highlight-config-item {
        padding: 10px 12px;
    }

    .highlight-date-text {
        font-size: 13px;
    }

    .highlight-add-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* 高亮叠加层样式 */
.highlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 让鼠标事件穿透到图表 */
    z-index: 10; /* 确保在图表上方，但在其他UI元素下方 */
}

.highlight-bar {
    position: absolute;
    top: 0;
    width: 8px; /* 默认宽度，会动态调整 */
    height: 100%;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* 主题适配 */
.theme-light .highlight-overlay {
    /* 浅色主题下的特殊处理（如果需要） */
}

/* 模态框底部按钮样式 */
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.highlight-btn-cancel,
.highlight-btn-confirm {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.highlight-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.highlight-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.highlight-btn-confirm {
    background: #2962ff;
    color: white;
}

.highlight-btn-confirm:hover {
    background: #1e88e5;
    transform: translateY(-1px);
}

/* 浅色主题适配 */
.theme-light .modal-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.theme-light .highlight-btn-cancel {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.8);
}

.theme-light .highlight-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

/* 亮色主题下的链接样式 */
.theme-light .auth-links a {
    color: #1976d2;  /* 亮色主题下使用稍深的蓝色 */
}

.theme-light .auth-links a:hover {
    color: #1565c0;  /* 悬停时更深的蓝色 */
    background: rgba(25, 118, 210, 0.1);
}

.theme-light .auth-links span {
    color: #666;  /* 亮色主题下的分隔符颜色 */
}

/* 高亮日期输入对话框样式 */
.highlight-input-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10002;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.highlight-input-content {
    background: var(--modal-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    min-width: 350px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.highlight-input-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
}

.highlight-input-field {
    margin-bottom: 24px;
}

.highlight-input-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-color-secondary);
    font-weight: 500;
}

.highlight-date-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    box-sizing: border-box;
    transition: all 0.2s;
}

.highlight-date-input:focus {
    outline: none;
    border-color: #2962ff;
    box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.2);
}

.highlight-date-input::placeholder {
    color: var(--text-color-muted);
    font-size: 13px;
}

.highlight-input-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.highlight-input-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.highlight-input-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.highlight-input-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.highlight-input-confirm {
    background: #2962ff;
    color: white;
}

.highlight-input-confirm:hover {
    background: #1e4ed8;
    transform: translateY(-1px);
}

.highlight-input-confirm:active {
    transform: translateY(0);
}

/* 亮色主题适配 */
.theme-light .highlight-input-cancel {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.theme-light .highlight-input-cancel:hover {
    background: rgba(0, 0, 0, 0.15);
    color: rgba(0, 0, 0, 0.9);
}

/* =============== 高亮日期功能样式结束 =============== */
