/* ═══════════════════════════════════════
   pages.css - Tech signals, trading, AI analysis
   Lines: 1199
   ═══════════════════════════════════════ */

/* ========== 技术信号页面样式 ========== */

.tech-signal-page { padding-bottom: 20px; }

.tech-signal-header { margin-bottom: 16px; }

.tech-input-row {
    display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap;
}
.tech-action-row {
    display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap;
}
.tech-input {
    flex: 1; min-width: 100px; padding: 8px 12px; border-radius: 8px;
    border: 1px solid var(--border-color); background: var(--bg-glass);
    color: var(--text-primary); font-size: 13px;
}
.tech-btn {
    padding: 8px 10px; border-radius: 8px; border: none;
    background: var(--primary); color: white; font-size: 12px;
    white-space: nowrap; flex-shrink: 0;
    font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tech-btn.batch { background: var(--warning); color: #333; }
.tech-btn.fullscan { background: #6c5ce7; color: #fff; }
.tech-btn.strategy { background: linear-gradient(135deg, #ff6b6b, #ffd93d); color: #1a1a2e; font-weight: 700; }
.tech-btn.rescan {
    background: transparent; border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-muted); font-size: 11px;
}
.tech-btn.rescan:hover { border-color: #ff6b6b; color: #ff6b6b; }
.tech-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.tech-legend {
    display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--text-secondary);
}
.legend-item { display: flex; align-items: center; gap: 3px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.s85 { background: #e74c3c; }
.dot.s80 { background: #e67e22; }
.dot.s75 { background: #f39c12; }
.dot.s70 { background: #27ae60; }
.dot.s65 { background: #2980b9; }
.dot.s60 { background: #8e44ad; }
.dot.s55 { background: #95a5a6; }

.tech-result-card {
    background: var(--bg-glass); border-radius: 16px;
    padding: 16px; margin-bottom: 16px;
    border: 1px solid var(--border-color);
}
.tech-result-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.tech-result-header h4 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0; }
.tech-result-actions {
    display: flex; gap: 8px; margin-bottom: 12px;
}
.tech-result-actions .watch-btn {
    padding: 6px 14px; font-size: 12px;
}
.signal-count { font-size: 12px; padding: 3px 10px; border-radius: 12px; background: var(--primary); color: white; font-weight: 600; }
.signal-count.none { background: var(--bg-secondary); color: var(--text-secondary); }

.tech-recommend-bar {
    margin-bottom: 14px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
}
.tech-recommend-bar.rec-buy { background: rgba(0, 206, 158, 0.08); }
.tech-recommend-bar.rec-sell { background: rgba(255, 68, 68, 0.08); }
.tech-recommend-bar.rec-watch { background: rgba(100, 149, 237, 0.08); }
.tech-recommend-label { font-size: 11px; color: var(--text-muted); margin-right: 8px; }
.tech-recommend-text { font-weight: 600; font-size: 14px; }
.tech-recommend-rate { margin-left: 8px; font-size: 12px; opacity: 0.9; }
.tech-recommend-reason { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }
.tech-holding-note {
    margin-top: 8px; padding: 6px 10px;
    background: rgba(255,152,0,0.08); border-radius: 6px;
    font-size: 12px; color: #e67e00; line-height: 1.5;
}

.tech-indicators {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px;
    padding: 10px; background: var(--bg-secondary); border-radius: 10px;
}
.indicator-group {
    display: flex; align-items: center; gap: 6px; font-size: 12px;
}
.ind-label { font-weight: 600; color: var(--text-secondary); min-width: 40px; }
.ind-val { padding: 2px 6px; border-radius: 4px; background: var(--bg-glass); font-family: monospace; font-size: 11px; }
.ind-val.pos { color: var(--danger); }
.ind-val.neg { color: var(--success); }
.ind-val.oversold { color: var(--success); font-weight: 600; }
.ind-val.overbought { color: var(--danger); font-weight: 600; }

.tech-signal-list { display: flex; flex-direction: column; gap: 8px; }

.tech-signal-item {
    padding: 12px; border-radius: 10px;
    background: var(--bg-secondary);
}

.sig-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sig-name { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.sig-strength { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: rgba(255,255,255,0.1); }
.sig-date { font-size: 11px; color: var(--text-secondary); }
.sig-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 4px; }
.sig-price { font-size: 12px; color: var(--text-secondary); font-family: monospace; }

.tech-batch-results { margin-top: 16px; }
.tech-batch-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; border-radius: 10px; margin-bottom: 6px;
    background: var(--bg-glass); border: 1px solid var(--border-color);
    cursor: pointer; transition: background 0.2s;
}
.tech-batch-item:active { background: var(--bg-secondary); }
.batch-stock-info { display: flex; gap: 8px; align-items: center; }
.batch-code { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.batch-name { font-size: 12px; color: var(--text-secondary); }
.batch-signals { display: flex; gap: 4px; flex-wrap: wrap; }
.batch-signal-tag {
    font-size: 11px; padding: 2px 8px; border-radius: 8px;
    font-weight: 600; color: white;
}
.batch-signal-tag.strength-85 { background: #e74c3c; }
.batch-signal-tag.strength-80 { background: #e67e22; }
.batch-signal-tag.strength-75 { background: #f39c12; }
.batch-signal-tag.strength-70 { background: #27ae60; }
.batch-signal-tag.strength-65 { background: #2980b9; }
.batch-signal-tag.strength-60 { background: #8e44ad; }
.batch-signal-tag.strength-55 { background: #95a5a6; }


/* ========== 模拟交易页面样式 ========== */

.sim-trade-page {
    padding-bottom: 20px;
}

.sim-stats-card {
    background: var(--bg-glass);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-glass);
}

.sim-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sim-stats-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

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

.sim-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sim-btn.auto {
    background: linear-gradient(135deg, #00ff88, #00ccff);
    color: #000;
}

.sim-btn.auto:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

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

.sim-btn.reset {
    background: rgba(255, 68, 68, 0.2);
    color: var(--danger);
}

.sim-btn.reset:hover {
    background: rgba(255, 68, 68, 0.3);
}

.sim-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.sim-stat-item {
    text-align: center;
    padding: 8px 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.sim-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-stat-item.profit .sim-stat-value {
    color: var(--success);
}

.sim-stat-item.loss .sim-stat-value {
    color: var(--danger);
}

.sim-stat-label {
    font-size: 10px;
    color: var(--text-muted);
}

.sim-stats-detail {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px solid var(--border-glass);
    font-size: 12px;
}

.sim-stats-detail .profit {
    color: var(--success);
}

.sim-stats-detail .loss {
    color: var(--danger);
}

/* 交易规则卡片（可折叠） */
.sim-rule-card {
    background: rgba(255, 170, 0, 0.08);
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.sim-rule-card.collapsible {
    cursor: pointer;
}

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

.sim-rule-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--warning);
    margin: 0;
}

.sim-rule-header .toggle-icon {
    font-size: 10px;
    color: var(--warning);
    transition: transform 0.2s;
}

.sim-rule-header .toggle-icon.expanded {
    transform: rotate(180deg);
}

.sim-rule-card ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.sim-rule-card li {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 3px 0;
    padding-left: 14px;
    position: relative;
}

.sim-rule-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--warning);
}

.sim-rule-card li strong {
    color: var(--text-primary);
}

/* 模拟交易区块 */
.sim-section {
    margin-bottom: 16px;
}
.sim-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.sim-section-header .section-title {
    margin: 0;
}
.sim-btn.refresh {
    background: rgba(108, 92, 231, 0.25);
    color: var(--primary);
    font-size: 12px;
}
.sim-btn.refresh:hover:not(:disabled) {
    background: rgba(108, 92, 231, 0.4);
}
.sim-btn.refresh:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sim-section .section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sim-section .badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.empty-tip {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 30px 20px;
    background: var(--bg-glass);
    border-radius: 12px;
}

/* 模拟持仓列表 */
.sim-positions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sim-position-item {
    background: var(--bg-glass);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-glass);
}

.sim-position-item:hover {
    background: var(--bg-glass-hover);
}

.sim-pos-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.sim-pos-code {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.sim-pos-name {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
}

.sim-pos-qty {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
}

.sim-pos-detail {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.sim-pos-detail .profit {
    color: var(--success);
    font-weight: 500;
}

.sim-pos-detail .loss {
    color: var(--danger);
    font-weight: 500;
}

/* 模拟交易记录列表 */
.sim-trades-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sim-trade-item {
    display: flex;
    gap: 12px;
    background: var(--bg-glass);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--border-glass);
}

.sim-trade-type {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.sim-trade-type.buy {
    background: rgba(0, 255, 136, 0.15);
    color: var(--success);
}

.sim-trade-type.sell {
    background: rgba(255, 68, 68, 0.15);
    color: var(--danger);
}

.sim-trade-content {
    flex: 1;
    min-width: 0;
}

.sim-trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.sim-trade-stock {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.sim-trade-rate {
    font-size: 11px;
    color: var(--success);
    background: rgba(0, 255, 136, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.sim-trade-detail {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.sim-trade-amount {
    font-weight: 500;
    color: var(--text-primary);
}

.sim-trade-reason {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* AI分析页面样式 */
.ai-analyze-page {
    padding: 16px 0;
}

.ai-input-section {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ai-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.scan-source-select, .model-select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 14px;
}

.model-select {
    max-width: 140px;
}

.model-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    margin-bottom: 10px;
}

/* 模型页面 */
.model-page {
    padding: 12px;
}

/* 信号体系各区块 */
.signal-system-section {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}
.signal-system-section.highlight-section {
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
}
.signal-system-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-glass);
}

/* 信号胜率排行 */
.signal-rank-list { display: flex; flex-direction: column; gap: 6px; }
.signal-rank-item {
    display: grid;
    grid-template-columns: 24px 72px 42px 1fr;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    font-size: 12px;
}
.signal-rank-item .rank-param {
    display: none;
}
.rank-badge {
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    color: #fff;
    background: #555;
}
.rank-1 .rank-badge { background: linear-gradient(135deg, #ff6b6b, #ffd93d); }
.rank-2 .rank-badge { background: linear-gradient(135deg, #00ce9e, #00b4d8); }
.rank-3 .rank-badge { background: linear-gradient(135deg, #748ffc, #9775fa); }
.rank-name { font-weight: 600; color: var(--text-primary); }
.rank-1 .rank-name { color: #ffd93d; }
.rank-2 .rank-name { color: #00ce9e; }
.rank-3 .rank-name { color: #748ffc; }
.rank-rate {
    font-weight: 700;
    color: #00ce9e;
    text-align: right;
}
.rank-desc { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 标准牛股启动顺序 */
.bull-flow {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 6px 0;
    flex-wrap: nowrap;
    justify-content: space-between;
}
.bull-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    flex: 1;
    min-width: 0;
    padding: 5px 2px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
}
.bull-num {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 700;
    flex-shrink: 0;
}
.bull-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}
.bull-hint {
    font-size: 8px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.1;
}
.bull-arrow {
    color: var(--text-muted);
    font-size: 10px;
    flex-shrink: 0;
}
.bull-note {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: center;
    font-style: italic;
}

/* 体系最强战法 */
.strategy-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.strategy-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
}
.strategy-step .step-icon { font-size: 16px; }
.strategy-step .step-action {
    font-size: 12px;
    font-weight: 700;
    min-width: 32px;
}
.strategy-step .step-rule {
    font-size: 12px;
    color: var(--text-secondary);
}
.step-watch .step-action { color: #748ffc; }
.step-buy .step-action { color: #ff6b6b; }
.step-add .step-action { color: #00ce9e; }
.step-hold .step-action { color: #ffd93d; }

/* 核心信号一句话总结 */
.signal-summary-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.signal-summary-item {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.summary-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.summary-tag.core {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}
.summary-tag.normal {
    background: rgba(0, 206, 158, 0.15);
    color: #00ce9e;
}
.summary-tag.aux {
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
}

/* 密码弹窗按钮 */
.password-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.password-buttons .btn-cancel {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.password-buttons .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.password-buttons .login-submit {
    flex: 1;
    margin-top: 0;
}

/* 股票组选择列表 */
.source-list {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.source-item {
    flex: 1;
    text-align: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: var(--text-secondary);
}

.source-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.source-item.active {
    border-color: var(--accent);
    background: rgba(0, 255, 136, 0.1);
    color: var(--text-primary);
}

.source-check {
    color: var(--accent);
    font-size: 14px;
}

.scan-action {
    margin-bottom: 12px;
}

.scan-btn-full {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.scan-btn-full:hover {
    background: rgba(255, 255, 255, 0.15);
}

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

.ai-stock-input {
    flex: 1;
    max-width: 180px;
    padding: 10px 12px;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 14px;
}

.ai-stock-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.ai-analyze-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.ai-analyze-btn.primary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.ai-analyze-btn.primary:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

.ai-quick-stocks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

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

.quick-stock-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
}

.quick-stock-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.ai-result-section {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-glass);
}

.ai-result-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.ai-result-time {
    font-size: 11px;
    color: var(--text-muted);
}

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

.ai-result-content strong {
    color: var(--text-primary);
}

/* AI思考过程样式 */
.ai-reasoning-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.ai-reasoning-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.ai-reasoning-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ai-reasoning-header .expand-icon {
    font-size: 10px;
    color: var(--text-muted);
}

.ai-reasoning-content {
    padding: 0 16px 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-muted);
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

/* AI加载指示器 */
.ai-loading-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.loading-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.ai-result-content .ai-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-glass);
}

.ai-result-content .ai-section-title:first-child {
    margin-top: 0;
}

.ai-result-content .ai-subsection-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 12px 0 6px 0;
}

.ai-result-content li {
    margin-left: 16px;
    list-style: disc;
}

.ai-history-section {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ai-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-history-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    cursor: pointer;
}

.ai-history-item:hover {
    background: var(--bg-glass-hover);
}

.history-stock {
    font-size: 13px;
    color: var(--text-primary);
}

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

.ai-empty-tip {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.ai-empty-tip .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ai-empty-tip p {
    font-size: 14px;
    margin-bottom: 8px;
}

.ai-empty-tip .sub-tip {
    font-size: 12px;
    color: var(--text-muted);
}

/* 基本面弹窗中的AI分析 */
.ai-analysis-section {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
}

.ai-analysis-content {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-height: 300px;
    overflow-y: auto;
}

.ai-close-btn {
    margin-top: 12px;
    padding: 8px 16px;
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
}

/* 7个信号状态列表 */
.signal-status-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.signal-status-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 10px 12px;
    transition: all 0.2s;
}

.signal-status-item.triggered {
    background: rgba(0, 200, 83, 0.08);
    border-color: rgba(0, 200, 83, 0.3);
}

.signal-status-item.inactive {
    opacity: 0.85;
}

.ss-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.ss-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ss-dot.s85 { background: #ff4444; }
.ss-dot.s80 { background: #ff6b35; }
.ss-dot.s75 { background: #4CAF50; }
.ss-dot.s70 { background: #2196F3; }
.ss-dot.s65 { background: #9C27B0; }
.ss-dot.s60 { background: #FF9800; }
.ss-dot.s55 { background: #607D8B; }

.ss-name {
    font-weight: 600;
    font-size: 13px;
    color: #fff;
}

.ss-strength {
    font-size: 11px;
    color: var(--text-muted);
}

.ss-badge {
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.ss-badge.active {
    background: rgba(0, 200, 83, 0.2);
    color: #00c853;
    border: 1px solid rgba(0, 200, 83, 0.4);
}

.ss-badge.wait {
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
}

.ss-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-left: 16px;
}


/* ═══════════════════════════════════════
   手机端响应式布局 (≤ 768px)
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    /* ── 模型页 ── */
    .model-page { padding: 8px; }

    /* 信号胜率排行 */
    .signal-rank-item {
        grid-template-columns: 22px 60px 38px 1fr;
        gap: 4px;
        padding: 5px 6px;
        font-size: 11px;
    }
    .rank-badge { width: 18px; height: 18px; font-size: 10px; }
    .rank-name { font-size: 11px; }
    .rank-rate { font-size: 11px; }
    .rank-desc { font-size: 10px; }

    /* 标准牛股启动顺序 - 改为网格换行 */
    .bull-flow {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }
    .bull-arrow { display: none; }
    .bull-step {
        flex: 0 0 calc(50% - 6px);
        max-width: calc(50% - 6px);
        padding: 6px 4px;
    }
    .bull-num { width: 14px; height: 14px; font-size: 8px; }
    .bull-label { font-size: 9px; }
    .bull-hint { font-size: 7px; }
    .bull-note { font-size: 9px; }

    /* 体系最强战法 */
    .strategy-step { padding: 6px 8px; gap: 6px; }
    .strategy-step .step-icon { font-size: 14px; }
    .strategy-step .step-action { font-size: 11px; min-width: 28px; }
    .strategy-step .step-rule { font-size: 11px; }

    /* 核心信号一句话总结 */
    .signal-summary-item { font-size: 11px; gap: 6px; }
    .summary-tag { font-size: 10px; padding: 1px 6px; }

    /* 信号体系区块 */
    .signal-system-section { padding: 10px; margin-bottom: 8px; }
    .signal-system-title { font-size: 13px; margin-bottom: 8px; }

    /* ── 技术信号页面 ── */
    .tech-input-row { gap: 4px; }
    .tech-input { padding: 6px 10px; font-size: 12px; min-width: 80px; }
    .tech-btn { padding: 6px 8px; font-size: 11px; }
    .tech-legend { font-size: 10px; gap: 6px; }

    .tech-result-card { padding: 12px; border-radius: 12px; }
    .tech-result-header h4 { font-size: 13px; }
    .signal-count { font-size: 11px; padding: 2px 8px; }

    .tech-recommend-bar { padding: 8px 10px; }
    .tech-recommend-text { font-size: 13px; }
    .tech-recommend-rate { font-size: 11px; }
    .tech-recommend-reason { font-size: 11px; }
    .tech-holding-note { padding: 5px 8px; font-size: 11px; }

    .tech-indicators { padding: 8px; gap: 8px; }
    .indicator-group { font-size: 11px; }
    .ind-label { min-width: 36px; font-size: 11px; }
    .ind-val { font-size: 10px; }

    .tech-signal-item { padding: 10px; }
    .sig-name { font-size: 13px; }
    .sig-strength { font-size: 11px; }
    .sig-desc { font-size: 11px; }
    .sig-price { font-size: 11px; }

    /* ── 模拟交易页面 ── */
    .sim-stats-card { padding: 12px; border-radius: 12px; }
    .sim-stats-header h4 { font-size: 14px; }
    .sim-btn { padding: 6px 12px; font-size: 12px; }
    .sim-stats-grid { gap: 4px; }
    .sim-stat-item { padding: 6px 2px; }
    .sim-stat-value { font-size: 12px; }
    .sim-stat-label { font-size: 9px; }
    .sim-stats-detail { font-size: 11px; gap: 10px; }

    .sim-rule-card { padding: 8px 10px; }
    .sim-rule-card h4 { font-size: 12px; }
    .sim-rule-card li { font-size: 10px; }

    .sim-position-item { padding: 10px; border-radius: 10px; }
    .sim-pos-header { gap: 6px; margin-bottom: 6px; }
    .sim-pos-code { font-size: 13px; }
    .sim-pos-name { font-size: 12px; }
    .sim-pos-qty { font-size: 11px; }
    .sim-pos-detail { font-size: 11px; gap: 10px; }

    .sim-trade-item { padding: 10px; gap: 8px; }
    .sim-trade-type { width: 24px; height: 24px; font-size: 11px; }
    .sim-trade-stock { font-size: 12px; }
    .sim-trade-rate { font-size: 10px; }
    .sim-trade-detail { font-size: 11px; }
    .sim-trade-reason { font-size: 10px; }
    .sim-trade-date { font-size: 10px; }

    .empty-tip { font-size: 12px; padding: 20px 16px; }

    /* ── AI分析（基本面弹窗中） ── */
    .ai-analysis-section { padding: 12px; }
    .ai-analysis-content { font-size: 12px; }

    /* ── 7个信号状态列表 ── */
    .signal-status-item { padding: 8px 10px; }
    .ss-name { font-size: 12px; }
    .ss-strength { font-size: 10px; }
    .ss-badge { font-size: 10px; padding: 1px 6px; }
    .ss-desc { font-size: 11px; padding-left: 14px; }

    /* ── 密码弹窗 ── */
    .password-buttons { gap: 8px; margin-top: 12px; }
    .password-buttons .btn-cancel { padding: 10px; font-size: 13px; }

    /* ── 扫描相关按钮和输入 ── */
    .source-list { gap: 6px; }
    .source-item { padding: 8px 10px; font-size: 12px; }
    .scan-btn-full { padding: 10px; font-size: 13px; }
    .ai-stock-input { padding: 8px 10px; font-size: 13px; }
    .ai-analyze-btn { padding: 8px 12px; font-size: 12px; }
}

/* 更窄屏幕额外优化 (≤ 400px) */
@media (max-width: 400px) {
    .signal-rank-item {
        grid-template-columns: 20px 54px 36px 1fr;
        gap: 3px;
        padding: 4px 4px;
        font-size: 10px;
    }
    .rank-badge { width: 16px; height: 16px; font-size: 9px; }

    .bull-step {
        flex: 0 0 calc(50% - 4px);
        max-width: calc(50% - 4px);
        padding: 4px 2px;
    }
    .bull-label { font-size: 8px; }
    .bull-hint { font-size: 7px; }

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