/* src/main/resources/static/css/style.css */

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

:root {
    /* 主题色 - 更现代的深色主题 */
    --bg-primary: #0F1419;
    --bg-secondary: #1A1F2E;
    --bg-tertiary: #252B3A;
    --bg-hover: #2D3443;
    --bg-card: #1E2432;

    /* 文字色 */
    --text-primary: #E8EAED;
    --text-secondary: #9AA0A6;
    --text-muted: #5F6368;
    --text-accent: #8AB4F8;

    /* 强调色 - 更柔和的配色 */
    --color-up: #F28B82;
    --color-down: #81C995;
    --color-primary: #8AB4F8;
    --color-primary-hover: #AECBFA;
    --color-warning: #FDD663;
    --color-danger: #EA4335;
    --color-success: #34A853;

    /* 边框 */
    --border-color: #2D3443;
    --border-color-light: #3A4150;
    --border-radius: 12px;
    --border-radius-sm: 8px;

    /* 阴影 - 更柔和的阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(138, 180, 248, 0.2);

    /* 间距 - 紧凑布局 */
    --spacing-xs: 2px;
    --spacing-sm: 4px;
    --spacing-md: 8px;
    --spacing-lg: 12px;
    --spacing-xl: 16px;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ==================== 顶部导航栏 ==================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    background: linear-gradient(135deg, #2A2A38 0%, #1E1E2E 100%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.logo {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

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

.header-right .user-info {
    margin-left: auto;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

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

.nav-btn .icon {
    font-size: 16px;
}

/* ==================== 主内容区布局 ==================== */
.main-container {
    display: flex;
    flex: 1;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    width: 100%;
    background: var(--bg-primary);
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    box-sizing: border-box;
    align-items: stretch;
}

.sidebar {
    width: 320px;
    min-width: 280px;
    max-width: 350px;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: var(--spacing-xs);
    box-sizing: border-box;
    box-shadow: var(--shadow);
    align-items: stretch;
}

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

.sidebar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

/* 侧边栏中的面板自动调整 */
.sidebar .panel:last-child {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 筛选面板特殊处理 - 自适应高度，不滚动 */
.sidebar .screen-panel {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

/* 搜索面板自适应高度，不滚动 */
.sidebar .search-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* 搜索面板头部：标题 + 输入框同一行 */
.sidebar .search-panel .search-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.sidebar .search-panel .search-header-row .panel-title {
    margin-bottom: 0;
    flex-shrink: 0;
}

.sidebar .search-panel .search-input-wrapper {
    flex: 1;
}

.sidebar .search-panel .search-input-wrapper .form-input {
    width: 100%;
}

/* 搜索结果区域 - 不滚动，全部显示 */
.sidebar .search-result {
    flex: 0 1 auto;
    min-height: auto;
    overflow: visible;
    max-height: none;
}

.content {
    flex: 1;
    min-width: 0; /* 允许flex收缩 */
    padding: var(--spacing-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    height: 100%;
    max-height: 100%;
}

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

.content::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

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

.content::-webkit-scrollbar-thumb:hover {
    background: var(--border-color-light);
}

.chart-sidebar {
    width: 420px;
    min-width: 380px;
    max-width: 480px;
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: var(--spacing-xs);
    box-sizing: border-box;
    box-shadow: var(--shadow);
    align-items: stretch;
}

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

.chart-sidebar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

/* ==================== 面板样式 ==================== */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-xs);
    flex-shrink: 0;
    min-height: 0;
    overflow: visible;
    box-sizing: border-box;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

/* 只有content区域的panel内部可以滚动 */
.content .panel .table-container {
    overflow-y: auto;
    overflow-x: auto;
}

.content .panel .data-stream {
    overflow-y: auto;
    overflow-x: hidden;
}

.panel:hover {
    border-color: var(--border-color-light);
    box-shadow: var(--shadow);
}

/* 侧边栏中的面板特殊处理 */
.sidebar .panel {
    padding: var(--spacing-md);
    margin-bottom: 0;
}

.sidebar .panel:last-child {
    margin-bottom: 0;
}

/* 右侧图表侧边栏中的面板布局 */
.chart-sidebar .panel {
    margin-bottom: 8px;
    flex-shrink: 0;
}

/* 右侧图表侧边栏中的图表面板保持原样 */
.chart-sidebar .chart-panel {
    flex-shrink: 0;
}

/* 右侧图表侧边栏中的信号面板保持原样 */
.chart-sidebar .signal-panel {
    flex-shrink: 0;
}

/* ==================== 紧凑布局样式 ==================== */
/* 同步面板紧凑布局 */
.sync-panel.compact {
    padding: 10px;
}

.sync-header {
    margin-bottom: 10px;
}

.sync-header .panel-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* 同步按钮区域 */
.sync-actions {
    margin-bottom: 10px;
}

.btn-sync {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    transition: all 0.3s;
}

.btn-sync:hover {
    background: #1976D2;
    border-color: #1976D2;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.5);
    transform: translateY(-1px);
}

.btn-sync:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.4);
}

.btn-sync .btn-icon {
    font-size: 16px;
    display: inline-block;
}

.btn-sync.syncing .btn-icon {
    animation: rotate 1.5s linear infinite;
}

.btn-sync:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-sync .btn-text {
    font-weight: 600;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sync-status.compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    margin-bottom: 4px;
}

.status-item-compact {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 3px 4px;
    background: var(--bg-secondary);
    border-radius: 3px;
    font-size: 11px;
}

.status-item-compact .status-label {
    color: var(--text-muted);
    font-size: 10px;
}

.status-item-compact .status-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 11px;
}

/* 表单紧凑布局 */
.form-row-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.form-group-compact {
    margin-bottom: 0;
}

.form-group-compact label {
    font-size: 13px;
    margin-bottom: 4px;
}

.form-group-compact .form-input,
.form-group-compact .form-select {
    padding: 7px 10px;
    font-size: 13px;
}

.radio-group-compact {
    display: flex;
    gap: 10px;
}

.radio-label-compact {
    font-size: 13px;
}

.btn-group-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    margin-top: 3px;
    flex-shrink: 0;
}

.btn-compact {
    padding: 3px 6px;
    font-size: 11px;
}

/* 股票信息紧凑布局 */
.stock-info-compact {
    margin-top: 8px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.stock-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.stock-name-compact {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.stock-code-compact {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Monaco', 'Consolas', monospace;
}

.stock-price-compact {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stock-change-compact {
    font-size: 13px;
    font-weight: 500;
}


.panel-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    letter-spacing: 0;
}

/* 侧边栏中的标题 */
.sidebar .panel-title {
    font-size: 15px;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xs);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border-color);
}

.panel-header .panel-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==================== 表单样式 ==================== */
.form-group {
    margin-bottom: 10px;
}

/* 侧边栏中的表单组 */
.sidebar .form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* 侧边栏中的标签 */
.sidebar .form-group label {
    font-size: 13px;
    margin-bottom: 4px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 4px 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s;
}

/* 侧边栏中的输入框 */
.sidebar .form-input,
.sidebar .form-select {
    padding: 8px 10px;
    font-size: 14px;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--color-primary);
    background: var(--bg-tertiary);
    box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.1);
    outline: none;
}

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

.form-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-row .form-group {
    flex: 1;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 15px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-label input {
    margin-right: 6px;
}

.radio-text.up {
    color: var(--color-up);
}

.radio-text.down {
    color: var(--color-down);
}

/* 复选框组 */
.checkbox-group-compact {
    display: flex;
    gap: 15px;
}

.checkbox-label-compact {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
}

.checkbox-label-compact input[type="checkbox"] {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-text.up {
    color: var(--color-up);
}

.checkbox-text.down {
    color: var(--color-down);
}

/* 筛选状态按钮 */
.screen-status {
    margin-top: 10px;
    text-align: center;
}

.btn-status {
    width: 100%;
    padding: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: default;
}

.btn-status:disabled {
    opacity: 1;
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

/* 侧边栏中的按钮 */
.sidebar .btn {
    padding: 8px 14px;
    font-size: 14px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: white;
    border: 1px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--color-primary-hover) 0%, var(--color-primary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #D32F2F;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* 侧边栏中的按钮组 */
.sidebar .btn-group {
    gap: 8px;
    margin-top: 8px;
}

.btn-group .btn {
    flex: 1;
}

/* ==================== 进度条 ==================== */
.progress-container {
    margin-top: 15px;
}

.progress-bar {
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(138, 180, 248, 0.5);
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== 表格样式 ==================== */
.table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 100%;
    width: 100%;
    flex: 1;
    min-height: 0;
}

.table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

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

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--border-color-light);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.data-table th {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--text-accent);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.data-table td {
    padding: 4px 6px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-size: 12px;
}

.data-table tbody tr {
    background: var(--bg-card);
    transition: all 0.2s ease;
}

.data-table tbody tr:nth-child(even) {
    background: var(--bg-secondary);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
    transform: translateX(2px);
    box-shadow: var(--shadow-sm);
}

.data-table tbody tr.selected {
    background: rgba(138, 180, 248, 0.15) !important;
    border-left: 4px solid var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.data-table tbody tr.empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.result-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.result-count-green {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-down); /* 绿色 */
}

/* 筛选结果标题 */
.result-header {
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border-color);
}

.result-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.result-count-badge {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-down);
    padding: 2px 8px;
    background: rgba(129, 201, 149, 0.1);
    border-radius: 4px;
}

/* 筛选结果进度信息 */
.result-progress-info {
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.progress-text {
    color: var(--text-secondary);
}

.match-count-green {
    color: var(--color-down); /* 绿色 */
    font-weight: 500;
}

/* 筛选结果列表容器 */
.result-list-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.result-list-container::-webkit-scrollbar {
    width: 6px;
}

.result-list-container::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.result-list-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.result-list-container::-webkit-scrollbar-thumb:hover {
    background: var(--border-color-light);
}

/* 筛选结果列表项 */
.result-list {
    padding: 0;
}

.result-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    background: var(--bg-card);
}

.result-item:hover {
    background: var(--bg-tertiary);
}

.result-item.selected {
    background: var(--bg-hover);
    border-left: 3px solid var(--color-primary);
    padding-left: 13px; /* 减去3px边框 */
}

.result-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.stock-code-bold {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
}

.stock-name {
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
}

.stock-status {
    font-size: 12px;
    color: var(--text-secondary);
}

.stock-status.loading {
    color: var(--color-primary);
}

.result-item-trend {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.trend-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.trend-badge.up {
    background: rgba(129, 201, 149, 0.2);
    color: var(--color-down);
}

.trend-badge.down {
    background: rgba(242, 139, 130, 0.2);
    color: var(--color-up);
}

.change-percent {
    font-size: 14px;
    font-weight: 600;
}

.result-item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

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

.realtime-price {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.arrow-up,
.arrow-down {
    font-size: 14px;
    line-height: 1;
    margin-left: 2px;
}

.empty-tip {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

/* 涨跌色 */
.up {
    color: var(--color-down) !important; /* 上涨用绿色 */
}

.down {
    color: var(--color-up) !important; /* 下跌用红色 */
}

/* ==================== 搜索结果 ==================== */
.search-result {
    max-height: 150px;
    overflow: hidden; /* 不允许滚动 */
}

/* 侧边栏中的搜索结果 - 已在上面定义，使用 flex: 1 自动调整，不允许滚动 */

.search-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 13px;
}

.search-item:hover {
    background: var(--bg-tertiary);
}

.search-item .code {
    color: var(--color-primary);
    font-size: 13px;
}

.search-item .name {
    color: var(--text-primary);
    font-size: 13px;
}

/* ==================== 股票信息卡片 ==================== */
.stock-info {
    text-align: center;
}

.stock-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.stock-code {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.stock-price {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

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

/* 侧边栏中的股票信息更紧凑 */
.sidebar .stock-info {
    padding: 5px 0;
}

.sidebar .stock-name {
    font-size: 16px;
    margin-bottom: 3px;
}

.sidebar .stock-code {
    font-size: 12px;
    margin-bottom: 6px;
}

.sidebar .stock-price {
    font-size: 20px;
    margin-bottom: 3px;
}

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

/* ==================== 图表区域 ==================== */
.chart-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: var(--spacing-sm);
}

.chart-header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    padding: var(--spacing-sm);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: var(--spacing-sm);
}

.chart-header {
    padding: var(--spacing-xs) var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.chart-stock-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    font-size: 14px;
}

.chart-stock-code {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Monaco', 'Consolas', monospace;
}

.chart-stock-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-stock-separator {
    color: var(--text-muted);
    margin: 0 var(--spacing-xs);
}

.chart-stock-trend {
    font-size: 14px;
    color: var(--text-secondary);
}

.chart-stock-change {
    font-size: 14px;
    font-weight: 600;
}

.chart-title-text {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--spacing-xs);
}

.chart-container {
    width: 100%;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    padding: 2px;
    overflow: hidden;
}

.kline-container {
    flex: 1;
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.kline-container .chart-container {
    flex: 1;
    min-height: 200px;
}

.volume-container {
    flex: 0 0 auto;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    margin-top: var(--spacing-xs);
}

.volratio-container {
    flex: 0 0 auto;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    margin-top: var(--spacing-xs);
}

.chart-title-small {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-sm);
    text-align: center;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xs);
    font-size: 11px;
    color: var(--text-secondary);
}

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

.legend-dot {
    font-size: 12px;
}

.legend-dot.vol-high {
    color: var(--color-up);
}

.legend-dot.vol-low {
    color: var(--text-muted);
}

.volume-container .chart-container,
.volratio-container .chart-container {
    flex: 1;
    min-height: 80px;
}

.chart-period {
    display: flex;
    gap: 5px;
}

.period-btn {
    padding: 4px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

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

/* ==================== 信号面板 ==================== */
.signal-panel {
    flex-shrink: 0;
}

.signal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.signal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.signal-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}


.signal-item.overall {
    grid-column: span 2;
    background: var(--bg-tertiary);
}

.signal-name {
    font-size: 13px;
    color: var(--text-secondary);
}

.signal-value {
    font-size: 13px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.signal-value.bullish {
    background: rgba(255, 68, 68, 0.2);
    color: var(--color-up);
}

.signal-value.bearish {
    background: rgba(0, 200, 81, 0.2);
    color: var(--color-down);
}

.signal-value.neutral {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* ==================== 弹窗样式 ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.3s ease;
}

.modal-content.modal-large {
    max-width: 900px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* ==================== 标签页 ==================== */
.chart-tabs,
.fund-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

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

.tab-content {
    display: none;
}

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

/* ==================== 指标汇总 ==================== */
.indicator-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

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

.summary-item .label {
    color: var(--text-secondary);
    font-size: 13px;
}

.summary-item .value {
    font-weight: 600;
    font-size: 13px;
}

/* ==================== 数据网格 ==================== */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--spacing-md);
}

.data-item {
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.data-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.data-item.large {
    grid-column: span 3;
}

.data-item .label {
    cursor: help;
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.data-item .value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

/* ==================== 评分样式 ==================== */
.score-container {
    display: flex;
    gap: 30px;
}

.total-score {
    text-align: center;
    flex-shrink: 0;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #64B5F6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.score-number {
    font-size: 36px;
    font-weight: 700;
    color: white;
}

.score-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.score-rating {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
}

.score-details {
    flex: 1;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.score-name {
    width: 80px;
    font-size: 13px;
    color: var(--text-secondary);
}

.score-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #64B5F6);
    transition: width 0.5s;
}

.score-value {
    width: 60px;
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==================== 新闻列表 ==================== */
.news-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.news-filter label {
    color: var(--text-secondary);
}

.news-filter .form-select {
    width: auto;
}

.news-list {
    max-height: 400px;
    overflow-y: auto;
}

.news-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.news-item:hover {
    background: var(--bg-secondary);
}

.news-item .title {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.news-item .meta {
    font-size: 12px;
    color: var(--text-muted);
}

.news-item .meta span {
    margin-right: 10px;
}

.news-detail {
    padding: 15px;
}

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

.detail-header h4 {
    flex: 1;
    font-size: 16px;
    line-height: 1.4;
}

.detail-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.detail-meta span {
    margin-right: 15px;
}

.detail-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ==================== 回测样式 ==================== */
.backtest-params {
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 20px;
}

.backtest-progress {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(30, 30, 46, 0.95) 100%);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 8px;
}

.backtest-progress .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.backtest-progress .progress-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
}

.backtest-progress .progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.backtest-progress .progress-status {
    font-size: 12px;
    color: var(--text-secondary);
}

.backtest-progress .progress-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.backtest-progress .detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 4px;
}

.backtest-progress .detail-label {
    font-size: 12px;
    color: var(--text-muted);
}

.backtest-progress .detail-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.backtest-result {
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 20px;
}

.backtest-result h4 {
    margin-bottom: 15px;
    font-size: 14px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.result-item {
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    text-align: center;
}

.result-item.primary {
    background: var(--color-primary);
}

.result-item .label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.result-item.primary .label {
    color: rgba(255, 255, 255, 0.8);
}

.result-item .value {
    font-size: 16px;
    font-weight: 600;
}

.result-item.primary .value {
    color: white;
}

.backtest-history h4 {
    margin-bottom: 10px;
    font-size: 14px;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 8px;
}

.history-item .info {
    flex: 1;
}

.history-item .name {
    font-size: 13px;
    font-weight: 500;
}

.history-item .date {
    font-size: 11px;
    color: var(--text-muted);
}

.history-item .result {
    text-align: right;
}

.history-item .return {
    font-size: 14px;
    font-weight: 600;
}

.history-item .status {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==================== 导出样式 ==================== */
.export-options {
    margin-bottom: 20px;
}

.export-item {
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 15px;
}

.export-item h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.export-item p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.export-files h4 {
    font-size: 14px;
    margin-bottom: 10px;
}

.file-list {
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-item .name {
    font-size: 13px;
    color: var(--text-primary);
}

.file-item .actions {
    display: flex;
    gap: 8px;
}

.file-item .actions a,
.file-item .actions button {
    font-size: 12px;
    color: var(--color-primary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}

.file-item .actions button {
    color: var(--color-danger);
}

/* ==================== Toast提示 ==================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

.toast.success {
    background: rgba(0, 200, 81, 0.9);
    border-color: var(--color-down);
}

.toast.error {
    background: rgba(244, 67, 54, 0.9);
    border-color: var(--color-danger);
}

/* ==================== 空状态 ==================== */
.empty-tip {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ==================== 登录界面 ==================== */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1E1E2E 0%, #2A2A38 50%, #1E1E2E 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-card {
    background: rgba(42, 42, 56, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 16px;
    padding: 50px 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    animation: slideIn 0.5s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    background: linear-gradient(135deg, #4A90E2 0%, #2196F3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.auth-subtitle .highlight {
    color: var(--color-primary);
    font-weight: 600;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.auth-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

.auth-form .form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.auth-form .form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(26, 26, 38, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.auth-form .form-input:focus {
    outline: none;
    border-color: #4A90E2;
    background: rgba(26, 26, 38, 0.8);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.auth-form .form-input.error {
    border-color: var(--color-danger);
    background: rgba(244, 67, 54, 0.05);
}

.auth-form .form-input::placeholder {
    color: var(--text-muted);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 20px;
    color: var(--color-danger);
    font-size: 13px;
    display: none;
}

.auth-error.show {
    display: block;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

.auth-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-footer {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.auth-tips {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.auth-tips code {
    background: rgba(74, 144, 226, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    color: #4A90E2;
    font-size: 11px;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1E1E2E 0%, #2A2A38 50%, #1E1E2E 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-card {
    background: rgba(42, 42, 56, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 16px;
    padding: 50px 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    animation: slideIn 0.5s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    font-size: 64px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

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

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    background: linear-gradient(135deg, #4A90E2 0%, #2196F3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.login-subtitle .highlight {
    color: var(--color-primary);
    font-weight: 600;
}

.login-form {
    margin-bottom: 30px;
}

.login-form .form-group {
    margin-bottom: 24px;
    position: relative;
}

.login-form .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.label-icon {
    font-size: 16px;
}

.login-form .form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(26, 26, 38, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s;
}

.login-form .form-input:focus {
    outline: none;
    border-color: #4A90E2;
    background: rgba(26, 26, 38, 0.8);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.login-form .form-input.error {
    border-color: var(--color-danger);
    background: rgba(244, 67, 54, 0.05);
}

.login-form .form-input.error:focus {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.login-form .form-input::placeholder {
    color: var(--text-muted);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.input-error {
    display: block;
    color: var(--color-danger);
    font-size: 12px;
    margin-top: 6px;
    min-height: 18px;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4A90E2;
}

.login-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 20px;
    color: var(--color-danger);
    font-size: 13px;
    display: none;
    align-items: center;
    gap: 8px;
}

.login-error.show {
    display: flex;
}

.login-error::before {
    content: '⚠️';
    font-size: 16px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-footer {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.login-tips {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.tip-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.tip-item code {
    background: rgba(74, 144, 226, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    color: #4A90E2;
    font-size: 11px;
}

/* 用户信息显示 */
.user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    margin-right: var(--spacing-sm);
    transition: all 0.3s ease;
}

.user-info:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color-light);
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-points {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
    padding: 2px 8px;
    background: rgba(138, 180, 248, 0.1);
    border-radius: var(--border-radius-sm);
}

.btn-logout {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ==================== 响应式布局 ==================== */
@media (max-width: 1600px) {
    .sidebar {
        width: 320px;
    }
    
    .content {
        max-width: 700px;
    }
    
    .chart-sidebar {
        width: 350px;
    }
}

@media (max-width: 1400px) {
    .sidebar {
        width: 300px;
    }
    
    .content {
        max-width: 600px;
    }
    
    .chart-sidebar {
        width: 320px;
    }
}
@media (max-width: 1600px) {
    .sidebar {
        width: 320px;
        min-width: 280px;
        max-width: 360px;
    }
    
    .chart-sidebar {
        width: 350px;
        min-width: 300px;
        max-width: 400px;
    }
    
    .content {
        max-width: calc(100% - 320px - 350px - 48px);
    }
}

@media (max-width: 1400px) {
    .sidebar {
        width: 300px;
        min-width: 250px;
        max-width: 320px;
    }
    
    .chart-sidebar {
        width: 320px;
        min-width: 280px;
        max-width: 350px;
    }
    
    .content {
        max-width: calc(100% - 300px - 320px - 48px);
    }
}

@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
        height: auto;
        max-height: calc(100vh - 60px);
    }

    .sidebar {
        width: 100%;
        max-width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .content {
        max-width: 100%;
        max-height: calc(60vh - 60px);
    }

    .chart-sidebar {
        width: 100%;
        max-width: 100%;
        max-height: calc(40vh - 60px);
        border-left: none;
        border-top: 1px solid var(--border-color);
    }

    .chart-panel {
        height: 300px;
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .header-right {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .data-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .score-container {
        flex-direction: column;
    }

    .indicator-summary {
        flex-wrap: wrap;
    }
}
/* ==================== 数据状态 ==================== */
.data-status {
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 10px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.status-item .label {
    color: var(--text-secondary);
    font-size: 13px;
}

.status-item .value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 13px;
}

.init-progress {
    margin-top: 10px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    text-align: center;
}

.init-progress .progress-text {
    color: var(--color-primary);
    font-size: 13px;
}
.toast.warning {
    background: rgba(255, 152, 0, 0.9);
    border-color: var(--color-warning);
}
/* ==================== 筛选进度面板 ==================== */
.screen-progress-panel {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(30, 30, 46, 0.95) 100%);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
}

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

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
}

.progress-percent {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
}

.progress-bar-wrapper {
    margin-bottom: 15px;
}

.progress-bar-wrapper .progress-bar {
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.progress-bar-wrapper .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #64B5F6, #2196F3);
    background-size: 200% 100%;
    border-radius: 5px;
    transition: width 0.3s ease;
    animation: progressShine 2s linear infinite;
}

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

.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-primary);
    border-radius: 6px;
    font-size: 13px;
}

.stat-item.highlight {
    background: rgba(0, 200, 81, 0.15);
    border: 1px solid rgba(0, 200, 81, 0.3);
}

.stat-item .stat-icon {
    font-size: 14px;
}

.stat-item .stat-label {
    color: var(--text-secondary);
    min-width: 60px;
    font-size: 13px;
}

.stat-item .stat-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
}

.stat-item.highlight .stat-value {
    color: var(--color-down);
    font-size: 16px;
}

.stat-item .stat-unit {
    color: var(--text-muted);
    font-size: 13px;
}

.progress-tip {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
}

/* 筛选完成状态 */
.screen-progress-panel.completed .progress-title {
    color: var(--color-down);
}

.screen-progress-panel.completed .progress-fill {
    background: var(--color-down);
    animation: none;
}

/* 筛选失败状态 */
.screen-progress-panel.failed .progress-title {
    color: var(--color-danger);
}

.screen-progress-panel.failed .progress-fill {
    background: var(--color-danger);
    animation: none;
}

/* 筛选提示 */
.screen-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 6px;
    margin-bottom: 15px;
}

.screen-tip .tip-icon {
    font-size: 16px;
}

.screen-tip .tip-text {
    font-size: 13px;
    color: var(--color-primary);
    line-height: 1.4;
}
/* 连续天数标签 */
.consecutive-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.consecutive-badge.up {
    background: rgba(255, 68, 68, 0.2);
    color: var(--color-up);
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.consecutive-badge.down {
    background: rgba(0, 200, 81, 0.2);
    color: var(--color-down);
    border: 1px solid rgba(0, 200, 81, 0.3);
}

.stock-code {
    font-family: 'Monaco', 'Consolas', monospace;
    color: var(--color-primary);
    font-weight: 500;
}

.stock-name-cell {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.font-bold {
    font-weight: 600;
}

/* 表格行悬停效果增强 */
.data-table tbody tr:hover {
    background: var(--bg-tertiary);
    cursor: pointer;
}

.data-table tbody tr.selected {
    background: rgba(33, 150, 243, 0.2) !important;
    border-left: 3px solid var(--color-primary);
}
/* ==================== 筛选进度面板样式 ==================== */
.screen-progress-panel {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15) 0%, rgba(30, 30, 46, 0.95) 100%);
    border: 1px solid rgba(33, 150, 243, 0.4);
    border-radius: 8px;
    animation: fadeInUp 0.3s ease;
}

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

.screen-progress-panel .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.screen-progress-panel .progress-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
}

.screen-progress-panel .progress-percent {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
}

.progress-bar-wrapper {
    margin-bottom: 15px;
}

.progress-bar-wrapper .progress-bar {
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar-wrapper .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1976D2, #2196F3, #64B5F6, #2196F3, #1976D2);
    background-size: 200% 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
    animation: progressShine 1.5s linear infinite;
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
}

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

.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid var(--border-color);
}

/* 侧边栏中的统计项更紧凑 */
.sidebar .stat-item {
    padding: 6px 8px;
    font-size: 13px;
    gap: 6px;
}

.sidebar .screen-panel .stat-item {
    padding: 4px 6px;
    font-size: 11px;
    gap: 4px;
}

/* 筛选面板中的进度面板 - 横向排列，类似数据同步 */
.sidebar .screen-panel .screen-progress-panel {
    margin-top: 10px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(30, 30, 46, 0.95) 100%);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    animation: fadeIn 0.3s ease;
}

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

/* 进度头部 - 横向排列 */
.sidebar .screen-panel .screen-progress-panel .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sidebar .screen-panel .screen-progress-panel .progress-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
}

.sidebar .screen-panel .screen-progress-panel .progress-percent {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
}

/* 进度条 */
.sidebar .screen-panel .screen-progress-panel .progress-bar-wrapper {
    margin-bottom: 8px;
}

.sidebar .screen-panel .screen-progress-panel .progress-bar-wrapper .progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.sidebar .screen-panel .screen-progress-panel .progress-bar-wrapper .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #64B5F6);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 统计信息 - 横向网格布局，类似数据同步 */
.sidebar .screen-panel .screen-progress-panel .progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.sidebar .screen-panel .screen-progress-panel .stat-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    text-align: center;
}

.sidebar .screen-panel .screen-progress-panel .stat-item.highlight {
    background: rgba(0, 200, 81, 0.15);
    border: 1px solid rgba(0, 200, 81, 0.3);
}

.sidebar .screen-panel .screen-progress-panel .stat-item .stat-icon {
    font-size: 16px;
    margin-bottom: 2px;
}

.sidebar .screen-panel .screen-progress-panel .stat-item .stat-label {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar .screen-panel .screen-progress-panel .stat-item .stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar .screen-panel .screen-progress-panel .stat-item.highlight .stat-value {
    color: var(--color-down);
    font-size: 15px;
    font-weight: 700;
}

.sidebar .screen-panel .screen-progress-panel .stat-item .stat-unit {
    font-size: 10px;
    color: var(--text-muted);
    display: inline-block;
    margin-left: 2px;
}

/* 提示文本 */
.sidebar .screen-panel .screen-progress-panel .progress-tip-text {
    margin-top: 6px;
    font-size: 10px;
    line-height: 1.3;
    color: var(--text-secondary);
    padding: 4px 6px;
    background: var(--bg-secondary);
    border-radius: 4px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-item.highlight {
    background: rgba(0, 200, 81, 0.15);
    border: 1px solid rgba(0, 200, 81, 0.4);
}

.stat-item .stat-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.stat-item .stat-label {
    color: var(--text-secondary);
    min-width: 55px;
    font-size: 13px;
}

.stat-item .stat-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
}

.stat-item.highlight .stat-value {
    color: var(--color-down);
    font-size: 18px;
}

.stat-item .stat-unit {
    color: var(--text-muted);
    font-size: 13px;
    margin-left: 4px;
}

.progress-tip-text {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 6px;
    background: var(--bg-secondary);
    border-radius: 4px;
    border: 1px dashed var(--border-color);
}

/* 侧边栏中的提示文本 */
.sidebar .progress-tip-text {
    padding: 6px;
    font-size: 12px;
}

/* 筛选完成状态 */
.screen-progress-panel.completed .progress-title {
    color: var(--color-down);
}

.screen-progress-panel.completed .progress-percent {
    color: var(--color-down);
}

.screen-progress-panel.completed .progress-fill {
    background: linear-gradient(90deg, #00C851, #00E676);
    animation: none;
    box-shadow: 0 0 10px rgba(0, 200, 81, 0.5);
}

/* 筛选失败状态 */
.screen-progress-panel.failed .progress-title {
    color: var(--color-danger);
}

.screen-progress-panel.failed .progress-fill {
    background: var(--color-danger);
    animation: none;
}

/* 筛选提示 */
.screen-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 6px;
    margin-bottom: 15px;
}

.screen-tip .tip-icon {
    font-size: 16px;
}

.screen-tip .tip-text {
    font-size: 13px;
    color: var(--color-primary);
    line-height: 1.4;
}

/* 连续天数标签 */
.consecutive-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.consecutive-badge.up {
    background: rgba(255, 68, 68, 0.2);
    color: var(--color-up);
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.consecutive-badge.down {
    background: rgba(0, 200, 81, 0.2);
    color: var(--color-down);
    border: 1px solid rgba(0, 200, 81, 0.3);
}

.stock-code {
    font-family: 'Monaco', 'Consolas', monospace;
    color: var(--color-primary);
    font-weight: 500;
}

.font-bold {
    font-weight: 600;
}