/* 分析类页面公共样式 — 与 site 红金白底统一，供 3dfx / ssqfx 等引用 */

.analysis-page {
    --primary: #8b1a1a;
    --secondary: #c0392b;
    --accent: #f5a623;
    --danger: #dc2626;
    --text-muted: #666;
    --border-light: #eee;
    --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.06);
}

body.analysis-page {
    color: #333 !important;
}

.analysis-page .top {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px 24px;
    box-sizing: border-box;
}

.analysis-page .container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-lg, 0 4px 20px rgba(0, 0, 0, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #333;
    overflow: hidden;
    isolation: isolate;
    padding-bottom: 16px;
}

.analysis-page .page-header {
    margin: var(--space-md, 12px);
    padding: var(--space-lg, 16px);
    text-align: center;
    background: linear-gradient(135deg, rgba(139, 26, 26, 0.06), rgba(245, 166, 35, 0.1));
    border: 1px solid rgba(139, 26, 26, 0.12);
    border-radius: var(--radius-lg, 12px);
    color: #1a0a0a;
}

.analysis-page .page-header h1 {
    font-size: 1.65rem;
    margin-bottom: 0;
    font-weight: 700;
    color: var(--primary) !important;
}

.analysis-page .page-header h1 i {
    color: var(--secondary) !important;
}

.analysis-page .page-meta {
    color: var(--text-muted) !important;
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0;
}

.analysis-page .analysis-disclaimer {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 12px;
    padding: 10px 12px;
    background: rgba(139, 26, 26, 0.04);
    border-radius: 8px;
    border: 1px dashed rgba(139, 26, 26, 0.2);
}

.analysis-page .analysis-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 14px;
    margin: 0 12px;
}

.analysis-page .analysis-main {
    min-width: 0;
}

.analysis-page .analysis-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 900px) {
    .analysis-page .analysis-layout {
        grid-template-columns: 1fr;
    }
    .analysis-page .analysis-side-desktop {
        display: none;
    }
    .analysis-page .mobile-quick {
        display: grid;
    }
}

.analysis-page .analysis-panel {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-card);
}

.analysis-page .analysis-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-page .latest-result {
    background: linear-gradient(90deg, rgba(139, 26, 26, 0.04), rgba(245, 166, 35, 0.08));
    padding: 14px;
    border-radius: 10px;
    border-left: 4px solid var(--secondary);
}

.analysis-page .latest-result h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-page .control-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 12px;
}

.analysis-page .control-row-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.analysis-page .ctrl-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.analysis-page .ctrl-select,
.analysis-page .period-select {
    padding: 8px 12px;
    border: 1px solid #d0e2ff;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 0.88rem;
    cursor: pointer;
}

.analysis-page .period-range-hint {
    font-size: 0.78rem;
    color: var(--secondary);
    line-height: 1.45;
}

.analysis-page .control-row-main .btn-analyze {
    flex-shrink: 0;
}

.analysis-page .btn-analyze,
.analysis-page .btn.btn-primary {
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #8b1a1a, #c0392b);
    color: #fff;
    box-shadow: 0 2px 8px rgba(139, 26, 26, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.analysis-page .btn-analyze:hover,
.analysis-page .btn.btn-primary:hover {
    filter: brightness(1.06);
}

.analysis-page .analyze-card.is-loading .analyze-body {
    opacity: 0.5;
    pointer-events: none;
}

.analysis-page .card-loading-bar {
    display: none;
    height: 3px;
    background: rgba(139, 26, 26, 0.1);
    border-radius: 2px;
    margin-bottom: 10px;
    overflow: hidden;
}

.analysis-page .analyze-card.is-loading .card-loading-bar {
    display: block;
}

.analysis-page .card-loading-bar span {
    display: block;
    height: 100%;
    width: 40%;
    background: var(--secondary);
    animation: analysisLoadSlide 1s ease-in-out infinite;
}

@keyframes analysisLoadSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

.analysis-page .tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.analysis-page .tabs {
    display: flex;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 14px;
    gap: 4px;
}

.analysis-page .tab-btn {
    flex: 1;
    padding: 8px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: #666;
    border-radius: 6px;
    white-space: nowrap;
}

.analysis-page .tab-btn.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.analysis-page .tab-content {
    display: none;
}

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

.analysis-page .analysis-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    margin: 12px 0 8px;
    padding-left: 8px;
    border-left: 3px solid var(--secondary);
}

.analysis-page .stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.analysis-page .stat-card {
    background: #fafafa;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.analysis-page .stat-card.highlight {
    border-color: rgba(46, 125, 50, 0.35);
    box-shadow: inset 3px 0 0 #2e7d32;
}

.analysis-page .stat-card-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.analysis-page .stat-card-label .tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 4px;
    border-radius: 50%;
    background: rgba(139, 26, 26, 0.1);
    color: var(--secondary);
    font-size: 0.65rem;
    cursor: help;
}

.analysis-page .stat-card-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
}

.analysis-page .stat-card-value.hot { color: #c0392b; }
.analysis-page .stat-card-value.cold { color: #2980b9; }
.analysis-page .stat-card-value.warn { color: #d97706; }

.analysis-page .summary-card {
    background: #fff;
    border: 1px solid rgba(139, 26, 26, 0.12);
    border-radius: 14px;
    margin: 0 var(--space-md, 12px) 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.analysis-page .summary-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px 12px;
    background: linear-gradient(135deg, rgba(139, 26, 26, 0.07), rgba(245, 166, 35, 0.1));
    border-bottom: 1px solid rgba(139, 26, 26, 0.08);
}

.analysis-page .summary-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-page .summary-card-title i {
    font-size: 0.9rem;
    color: var(--secondary);
    opacity: 0.9;
}

.analysis-page .summary-card-hint {
    font-size: 0.72rem;
    color: #999;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(139, 26, 26, 0.1);
}

.analysis-page .summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.analysis-page .summary-tile {
    padding: 12px 14px;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    min-height: 72px;
}

.analysis-page .summary-tile:nth-child(2n) {
    border-right: none;
}

.analysis-page .summary-tile:nth-last-child(-n + 2) {
    border-bottom: none;
}

.analysis-page .summary-tile-red {
    background: linear-gradient(180deg, rgba(192, 57, 43, 0.04), transparent);
}

.analysis-page .summary-tile-blue {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.04), transparent);
}

.analysis-page .summary-tile-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.analysis-page .summary-tile-label .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.analysis-page .summary-tile-label .dot.red {
    background: var(--secondary, #c0392b);
}

.analysis-page .summary-tile-label .dot.blue {
    background: #2563eb;
}

.analysis-page .summary-tile-balls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    min-height: 28px;
}

.analysis-page .summary-tile-dantiao {
    gap: 6px;
}

.analysis-page .summary-plus {
    font-size: 0.85rem;
    font-weight: 700;
    color: #bbb;
    margin: 0 2px;
}

.analysis-page .summary-empty {
    font-size: 0.82rem;
    color: #ccc;
}

@media (max-width: 520px) {
    .analysis-page .summary-grid {
        grid-template-columns: 1fr;
    }

    .analysis-page .summary-tile {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .analysis-page .summary-tile:last-child {
        border-bottom: none;
    }
}

.analysis-page .mobile-quick {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.analysis-page .mobile-quick-item {
    background: #fafafa;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.analysis-page .mobile-quick-item strong {
    display: block;
    color: var(--primary);
    font-size: 0.88rem;
    margin-top: 4px;
}

.analysis-page .pattern-group { margin-bottom: 14px; }
.analysis-page .pattern-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.analysis-page .pair-section {
    margin-bottom: 8px;
}

.analysis-page .pair-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.analysis-page .pair-section-hint {
    font-size: 0.68rem;
    font-weight: 500;
    color: #999;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f5f5f5;
    border: 1px solid #eee;
}

.analysis-page .pair-chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 6px;
    margin: 0 var(--space-md, 12px) 10px;
}

.analysis-page .pair-item {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    padding: 6px 8px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    min-width: 0;
}

.analysis-page .pair-item-empty {
    grid-column: 1 / -1;
    justify-content: center;
    color: #999;
    font-size: 0.75rem;
    padding: 10px;
}

.analysis-page .pair-rank {
    font-size: 0.62rem;
    color: #ccc;
    font-weight: 700;
    width: 11px;
    flex-shrink: 0;
    line-height: 1.5;
    padding-top: 1px;
}

.analysis-page .pair-body {
    flex: 1;
    min-width: 0;
}

.analysis-page .pair-numline {
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 1.3;
}

.analysis-page .pair-ball {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--secondary);
}

.analysis-page .pair-dash {
    font-size: 0.7rem;
    color: #ccc;
}

.analysis-page .pair-cnt {
    margin-left: auto;
    padding-left: 4px;
    font-size: 0.68rem;
    color: #888;
    font-weight: 600;
    white-space: nowrap;
}

.analysis-page .pair-cnt small {
    font-size: 0.58rem;
    font-weight: 500;
    color: #aaa;
}

.analysis-page .pair-bar {
    height: 3px;
    margin-top: 4px;
    background: rgba(139, 26, 26, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.analysis-page .pair-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #c0392b, #f5a623);
    border-radius: 2px;
}

.analysis-page .charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.analysis-page .charts-grid.compact { margin-bottom: 12px; }

/* 概览：红球 33 柱占宽，奇偶饼图收窄 */
.analysis-page .charts-grid.charts-overview-split {
    grid-template-columns: minmax(0, 2.35fr) minmax(118px, 0.72fr);
    gap: 10px;
}

.analysis-page .charts-overview-split .chart-card {
    min-width: 0;
}

.analysis-page .charts-overview-split .chart-card-oe {
    min-width: 0;
}

.analysis-page .charts-overview-split .chart-card-oe .chart-canvas-wrap {
    overflow: hidden;
}

.analysis-page .charts-overview-split .chart-canvas-red-freq {
    height: 200px;
}

.analysis-page .charts-overview-split .chart-canvas-oe {
    height: 200px;
}

@media (max-width: 900px) {
    .analysis-page .charts-grid.charts-overview-split {
        grid-template-columns: minmax(0, 1.85fr) minmax(108px, 0.88fr);
    }
}

@media (max-width: 650px) {
    .analysis-page .charts-grid { grid-template-columns: 1fr; }
    .analysis-page .charts-grid.charts-overview-split {
        grid-template-columns: 1fr;
    }
    .analysis-page .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

.analysis-page .chart-card {
    background: #fafafa;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px;
}

.analysis-page .chart-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-align: center;
}

.analysis-page .chart-subtitle {
    margin: 0 0 6px;
    padding: 0 4px;
    font-size: 0.65rem;
    line-height: 1.35;
    color: #999;
    text-align: center;
}

.analysis-page .chart-canvas-wrap {
    position: relative;
    height: 180px;
}

.analysis-page .stat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    margin-bottom: 14px;
}

.analysis-page .stat-table th {
    background: rgba(139, 26, 26, 0.08);
    color: var(--primary);
    padding: 8px;
    text-align: center;
    border: 1px solid var(--border-light);
}

.analysis-page .stat-table td {
    padding: 6px 8px;
    text-align: center;
    border: 1px solid var(--border-light);
    color: #444;
}

.analysis-page .stat-table tr:hover td {
    background: rgba(139, 26, 26, 0.03);
}

.analysis-page .stat-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
}

.analysis-page .stat-num.red {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

.analysis-page .stat-num.blue {
    background: rgba(47, 95, 212, 0.15);
    color: #2f5fd4;
}

.analysis-page .recommend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 600px) {
    .analysis-page .recommend-grid { grid-template-columns: 1fr; }
}

.analysis-page .recommend-panel {
    background: #fafafa;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px;
}

.analysis-page .recommend-panel.red { border-color: rgba(231, 76, 60, 0.25); }
.analysis-page .recommend-panel.blue { border-color: rgba(47, 95, 212, 0.25); }

.analysis-page .recommend-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.analysis-page .recommend-label .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.analysis-page .recommend-label .dot.red { background: #e74c3c; }
.analysis-page .recommend-label .dot.blue { background: #2f5fd4; }

.analysis-page .recommend-balls {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.analysis-page .action-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.analysis-page .btn-action {
    background: #f0f4f8;
    border: 1px solid #dde5ed;
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.analysis-page .btn-action.gold {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.2), rgba(245, 166, 35, 0.08));
    border-color: rgba(245, 166, 35, 0.4);
    color: #8b5a00;
}

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

.analysis-page .history-item {
    background: #fafafa;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px 12px;
}

.analysis-page .history-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.analysis-page .history-period {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
}

.analysis-page .history-status {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.analysis-page .history-status.ok {
    background: rgba(39, 174, 96, 0.12);
    color: #27ae60;
}

.analysis-page .history-status.wait {
    background: #eee;
    color: #666;
}

.analysis-page .history-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.analysis-page .zone-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.analysis-page .zone-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-page .zone-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 72px;
    flex-shrink: 0;
}

.analysis-page .zone-bar-wrap {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.analysis-page .zone-pct {
    font-size: 0.72rem;
    color: var(--text-muted);
    width: 36px;
    text-align: right;
}

.analysis-page .hezhi-display {
    text-align: center;
    padding: 8px;
}

.analysis-page .hezhi-val {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.analysis-page .hezhi-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.analysis-page .hezhi-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 10px;
    background: rgba(139, 26, 26, 0.08);
    color: var(--secondary);
    margin-top: 6px;
    display: inline-block;
}

.analysis-page .miss-rank {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.analysis-page .miss-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    background: #fafafa;
    border-radius: 6px;
}

.analysis-page .miss-val {
    font-size: 0.78rem;
    font-weight: 700;
    min-width: 28px;
    text-align: right;
}

.analysis-page .miss-bar-wrap {
    width: 50px;
    height: 5px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.analysis-page .toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    z-index: 1001;
    display: none;
    font-size: 0.85rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.analysis-page .toast.show { display: block; }

.analysis-page .loading {
    display: none;
}

/* 推荐回测 — 卡片 + 胶囊 */
.analysis-page .backtest-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.analysis-page .backtest-panel { margin: 0; }

.analysis-page .backtest-hint {
    margin: 0;
    padding: 14px 16px;
    font-size: 0.85rem;
    color: #666;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 999px;
    line-height: 1.55;
    text-align: center;
}

/* 概览大卡片 */
.analysis-page .backtest-overview-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.analysis-page .backtest-overview-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.analysis-page .backtest-overview-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-page .bt-meta-caps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.analysis-page .bt-meta-cap {
    display: inline-block;
    font-size: 0.72rem;
    padding: 4px 12px;
    border-radius: 999px;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    color: #555;
    white-space: nowrap;
}

.analysis-page .bt-meta-cap.accent {
    background: rgba(139, 26, 26, 0.08);
    border-color: rgba(139, 26, 26, 0.2);
    color: var(--primary);
    font-weight: 600;
}

.analysis-page .bt-meta-cap.muted {
    background: transparent;
    border-color: transparent;
    color: #999;
    padding-left: 0;
}

.analysis-page .bt-group-card {
    background: linear-gradient(135deg, rgba(139, 26, 26, 0.03), rgba(245, 166, 35, 0.05));
    border: 1px solid rgba(139, 26, 26, 0.1);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
}

.analysis-page .bt-group-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(139, 26, 26, 0.15);
}

.analysis-page .bt-capsule-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.analysis-page .bt-capsule {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 6px 4px 6px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    font-size: 0.75rem;
    color: #444;
    line-height: 1;
}

.analysis-page .bt-capsule.is-good {
    border-color: rgba(245, 166, 35, 0.65);
    background: linear-gradient(135deg, #fffef8, #fff);
    box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.25);
}

.analysis-page .bt-capsule-label {
    padding-right: 8px;
    border-right: 1px solid #eee;
    margin-right: 8px;
    color: #666;
    max-width: 5.5em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analysis-page .bt-capsule-mid {
    font-weight: 700;
    color: var(--primary);
    padding-right: 8px;
}

.analysis-page .bt-capsule-rate {
    font-weight: 800;
    color: #fff;
    background: var(--secondary);
    padding: 4px 10px;
    border-radius: 999px;
    margin-right: 4px;
    min-width: 2.8em;
    text-align: center;
}

.analysis-page .bt-capsule.is-good .bt-capsule-rate {
    background: linear-gradient(135deg, #d97706, #f5a623);
}

.analysis-page .bt-legend {
    margin: 4px 0 0;
    font-size: 0.7rem;
    color: #999;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.analysis-page .bt-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(245, 166, 35, 0.7);
    flex-shrink: 0;
}

/* 逐期卡片区 */
.analysis-page .backtest-detail-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.analysis-page .backtest-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.analysis-page .backtest-detail-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.analysis-page .backtest-detail-count {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.analysis-page .backtest-detail-list { min-width: 0; }

.analysis-page .bt-period-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.analysis-page .bt-period-card {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s;
}

.analysis-page .bt-period-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.analysis-page .bt-period-card.is-highlight {
    border-color: rgba(46, 125, 50, 0.35);
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.05), #fafafa);
}

.analysis-page .bt-period-card.is-pending {
    border-style: dashed;
    background: #fff;
    box-shadow: none;
}

.analysis-page .bt-period-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.analysis-page .bt-period-pill {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #8b1a1a, #c0392b);
    padding: 5px 14px;
    border-radius: 999px;
}

.analysis-page .bt-status-cap {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
}

.analysis-page .bt-status-cap.ok {
    background: rgba(39, 174, 96, 0.12);
    color: #1e8449;
    border: 1px solid rgba(39, 174, 96, 0.25);
}

.analysis-page .bt-status-cap.wait {
    background: #f5f5f5;
    color: #888;
    border: 1px solid #e0e0e0;
}

.analysis-page .bt-draw-capsule {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 12px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 999px;
    max-width: 100%;
}

.analysis-page .bt-draw-tag {
    font-size: 0.68rem;
    color: #999;
    padding-right: 8px;
    margin-right: 4px;
    border-right: 1px solid #eee;
}

.analysis-page .bt-result-caps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.analysis-page .bt-result-cap {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e5e5;
    color: #555;
}

.analysis-page .bt-result-cap.hit {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
    color: #c0392b;
}

.analysis-page .bt-result-cap.prize {
    background: rgba(245, 166, 35, 0.12);
    border-color: rgba(245, 166, 35, 0.35);
    color: #8b5a00;
}

.analysis-page .bt-pending-block--top {
    margin-top: 0;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #ddd;
    border-top: none;
    padding-top: 0;
}

.analysis-page .bt-verified-block {
    margin-bottom: 10px;
}

.analysis-page .bt-verified-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(139, 26, 26, 0.08);
    border: 1px solid rgba(139, 26, 26, 0.15);
}

.analysis-page .bt-pending-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    padding: 4px 12px;
    border-radius: 999px;
    background: #f5f5f5;
    margin-bottom: 10px;
}

.analysis-page .bt-pending-text {
    margin: 0;
    font-size: 0.8rem;
    color: #999;
}

/* 遗漏 Tab：红球 | 蓝球 两列 */
.analysis-page .miss-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 0 var(--space-md, 12px);
}

.analysis-page .miss-col {
    min-width: 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-light, #eee);
    border-radius: var(--radius-md, 10px);
    box-shadow: var(--shadow-card);
}

.analysis-page .miss-col-red {
    border-top: 3px solid var(--secondary, #c0392b);
}

.analysis-page .miss-col-blue {
    border-top: 3px solid #2563eb;
}

.analysis-page .miss-col-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a0a0a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.analysis-page .miss-col-title .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.analysis-page .miss-col-title .dot.red {
    background: var(--secondary, #c0392b);
}

.analysis-page .miss-col-title .dot.blue {
    background: #2563eb;
}

.analysis-page .miss-summary.stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.analysis-page .stat-card-label .stat-card-hint {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: #999;
    margin-top: 2px;
}

.analysis-page .miss-table-wrap {
    overflow-x: auto;
}

.analysis-page .miss-rank-table {
    margin-top: 0;
    font-size: 0.82rem;
}

.analysis-page .miss-rank-table .miss-td-val {
    text-align: left;
    padding-left: 12px;
    font-weight: 600;
    color: var(--primary);
}

.analysis-page .ball-col-charts {
    grid-template-columns: 1fr;
    margin-bottom: 10px;
}

@media (max-width: 720px) {
    .analysis-page .miss-two-col {
        grid-template-columns: 1fr;
    }
}
