/* ========== Reset & Base ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
*:focus { outline: none; }

:root {
    --red: #e74c3c;
    --red-dark: #c0392b;
    --red-light: #ff6b6b;
    --blue: #3498db;
    --blue-dark: #2980b9;
    --blue-light: #5dade2;
    --bg: #f0f2f5;
    --card: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --text-lighter: #bdc3c7;
    --border: #e8e8e8;
    --border-dark: #d0d0d0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 10px;
    --radius-sm: 6px;
    --transition: all 0.25s ease;
    --green: #27ae60;
    --orange: #f39c12;
    --gray: #95a5a6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

/* ========== App Layout ========== */
.app {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100vh;
}
.app-body {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 16px;
    z-index: 10;
}
.content {
    flex: 1;
    min-width: 0;
}

/* ========== Header ========== */
.app-header {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: #fff;
    padding: 20px 24px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.header-right { text-align: right; }
.logo { display: flex; gap: 4px; }
.app-header h1 { font-size: 22px; font-weight: 700; }
.subtitle { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.latest-info {
    font-size: 12px;
    background: rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-block;
}

/* ========== Game Switch (双色球 / 大乐透) ========== */
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.game-switch {
    display: inline-flex;
    background: rgba(255,255,255,0.22);
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
}
.game-btn {
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    padding: 5px 16px;
    border-radius: 17px;
    cursor: pointer;
    transition: var(--transition);
}
.game-btn:hover { background: rgba(255,255,255,0.18); }
.game-btn.active {
    background: #fff;
    color: var(--red);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.game-btn[data-game="dlt"].active { color: #e67e22; }
.latest-info {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== Balls ========== */
.ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.red-ball { background: linear-gradient(135deg, var(--red-light), var(--red)); }
.blue-ball { background: linear-gradient(135deg, var(--blue-light), var(--blue)); }
.orange-ball { background: linear-gradient(135deg, #f5a623, #e67e22); }
.red-ball-sm, .blue-ball-sm, .orange-ball-sm {
    width: 28px; height: 28px; font-size: 11px;
}
.ball-lg { width: 36px; height: 36px; font-size: 16px; }
.ball-md { width: 30px; height: 30px; font-size: 14px; }
.ball-sm { width: 24px; height: 24px; font-size: 12px; }

/* ========== Tabs ========== */
.tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--card);
    padding: 8px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}
.tab {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
    width: 100%;
    text-align: left;
}
.tab:hover { background: #f5f5f5; color: var(--text); }
.tab.active {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    box-shadow: 0 2px 8px rgba(231,76,60,0.3);
}
.tab svg { flex-shrink: 0; }

/* ========== Tab Panels ========== */
.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ========== Panel Header ========== */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.panel-header h2 { font-size: 18px; font-weight: 600; }
.data-stats, .records-stats {
    font-size: 12px;
    color: var(--text-light);
    background: var(--card);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    box-shadow: 0 2px 8px rgba(231,76,60,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(231,76,60,0.4); }
.btn-outline {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border-dark);
}
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #229954; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========== History Controls ========== */
.history-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    background: var(--card);
    padding: 14px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}
.control-group { display: flex; align-items: center; gap: 8px; }
.control-group label { font-size: 13px; color: var(--text-light); white-space: nowrap; }
.select-dropdown {
    padding: 8px 12px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    max-width: 200px;
}
.select-dropdown:hover { border-color: var(--red); }

/* ========== Data Table ========== */
.table-wrap {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    background: #fafafa;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 2px solid var(--border);
    font-size: 12px;
    white-space: nowrap;
}
.data-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.data-table tbody tr:hover { background: #fff5f5; }
.data-table tbody tr.highlight { background: #fff0f0; }
.data-table .period-code { font-weight: 600; color: var(--text); }
.data-table .date-cell { color: var(--text-light); font-size: 12px; }
.ball-row { display: flex; gap: 4px; justify-content: center; align-items: center; }
.ball-row .separator { color: var(--text-lighter); margin: 0 4px; }

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.page-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-dark);
    background: var(--card);
    color: var(--text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: var(--transition);
}
.page-btn:hover { border-color: var(--red); color: var(--red); }
.page-btn.active { background: var(--red); color: #fff; border-color: var(--red); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-info { font-size: 12px; color: var(--text-light); margin: 0 8px; }

/* ========== Formula Tab ========== */
.latest-period-card {
    background: linear-gradient(135deg, #fff5f5, #fff);
    border: 1px solid #ffd5d5;
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.latest-period-card .label { font-size: 13px; color: var(--text-light); margin-bottom: 4px; }
.latest-period-card .period-code { font-size: 18px; font-weight: 700; color: var(--red); }
.latest-period-card .balls { display: flex; gap: 4px; align-items: center; }
.latest-period-card .separator { color: var(--text-lighter); margin: 0 6px; font-size: 18px; }

.formula-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

.formula-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid transparent;
}
.formula-card.active { border-color: var(--red); }
.formula-card.disabled { opacity: 0.55; }

.formula-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
}
.formula-header-left { display: flex; align-items: center; gap: 12px; }
.formula-num {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.formula-card.disabled .formula-num {
    background: var(--gray);
}
.formula-title { font-weight: 600; font-size: 15px; }
.formula-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/* Toggle Switch */
.toggle {
    position: relative;
    width: 44px; height: 24px;
    background: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.toggle::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.on { background: var(--red); }
.toggle.on::after { left: 22px; }

.formula-body {
    padding: 0 18px 16px;
    display: none;
}
.formula-card.active .formula-body { display: block; }

.formula-calc {
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text);
}
.calc-step { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.calc-label { color: var(--text-light); font-size: 12px; min-width: 80px; }
.calc-result {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
    width: 100%;
}
.calc-result .label { font-size: 12px; color: var(--text-light); }
.excluded-balls { display: flex; gap: 4px; flex-wrap: wrap; }

/* Combined Result */
.combined-result {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}
.combined-result h3 { font-size: 15px; margin-bottom: 12px; }
.combined-summary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.combined-block {
    flex: 1;
    min-width: 200px;
}
.combined-block .block-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}
.combined-balls { display: flex; gap: 4px; flex-wrap: wrap; }
.available-balls .ball { opacity: 0.4; }
.available-balls .ball.available { opacity: 1; }

/* ========== Generate Tab ========== */
.gen-info {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.gen-info .excluded-preview { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }

.bet-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

.bet-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    transition: var(--transition);
}
.bet-card:hover { box-shadow: var(--shadow-hover); }
.bet-card .bet-num { font-weight: 700; color: var(--red); font-size: 16px; }
.bet-card .bet-balls { display: flex; gap: 4px; align-items: center; }
.bet-card .separator { color: var(--text-lighter); margin: 0 6px; font-size: 16px; }
.bet-card .bet-checkbox {
    width: 20px; height: 20px;
    accent-color: var(--red);
    cursor: pointer;
}

.gen-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ========== Records Tab ========== */
.records-list { display: flex; flex-direction: column; gap: 12px; }

.record-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    transition: var(--transition);
}
.record-card:hover { box-shadow: var(--shadow-hover); }
.record-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.record-meta { display: flex; align-items: center; gap: 10px; }
.record-id { font-weight: 700; color: var(--red); font-size: 15px; }
.record-date { font-size: 12px; color: var(--text-light); }
.record-status {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-won { background: #d4edda; color: #155724; }
.status-lost { background: #f8d7da; color: #721c24; }
.status-checked { background: #d1ecf1; color: #0c5460; }

.record-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.record-balls { display: flex; gap: 4px; align-items: center; }
.record-balls .separator { color: var(--text-lighter); margin: 0 6px; }
.record-actions { display: flex; gap: 8px; }
.record-note { font-size: 12px; color: var(--text-light); margin-top: 8px; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}
.empty-state svg { margin-bottom: 12px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

/* ========== Modal ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--card);
    border-radius: var(--radius);
    width: 90%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}
.modal-lg { max-width: 580px; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}
.modal-hint { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.password-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-dark);
    border-radius: var(--radius-sm);
    font-size: 18px;
    letter-spacing: 6px;
    text-align: center;
    font-family: inherit;
    transition: var(--transition);
}
.password-input:focus { border-color: var(--red); }
.error-msg { color: var(--red); font-size: 12px; margin-top: 8px; display: none; }
.error-msg.show { display: block; }

/* ========== Ball Picker (Edit Modal) ========== */
.edit-section { margin-bottom: 18px; }
.edit-section > label { font-size: 14px; font-weight: 600; margin-bottom: 10px; display: block; }
.ball-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
}
.pick-ball {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--border-dark);
    background: var(--card);
    color: var(--text);
    transition: var(--transition);
}
.pick-ball:hover { border-color: var(--red); transform: scale(1.1); }
.pick-ball.selected { background: linear-gradient(135deg, var(--red-light), var(--red)); color: #fff; border-color: var(--red); }
.blue-picker .pick-ball.selected { background: linear-gradient(135deg, var(--blue-light), var(--blue)); color: #fff; border-color: var(--blue); }
.blue-picker .pick-ball:hover { border-color: var(--blue); }
.picker-hint { font-size: 12px; color: var(--text-light); margin-top: 8px; }

/* ========== Toast ========== */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--text);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 2000;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .app { padding: 10px; }
    .app-body { flex-direction: column; }
    .sidebar { width: 100%; position: static; }
    .tabs { flex-direction: row; overflow-x: auto; padding: 6px; }
    .tab { width: auto; min-width: 96px; justify-content: center; padding: 10px 12px; }
}
@media (max-width: 640px) {
    .app { padding: 10px; }
    .app-header { padding: 14px 16px; flex-direction: column; gap: 8px; align-items: flex-start; }
    .header-right { text-align: left; }
    .app-header h1 { font-size: 18px; }
    .panel-header h2 { font-size: 16px; }
    .history-controls { flex-direction: column; gap: 10px; }
    .control-group { width: 100%; }
    .select-dropdown { flex: 1; max-width: none; }
    .ball-lg { width: 30px; height: 30px; font-size: 14px; }
    .ball-md { width: 26px; height: 26px; font-size: 12px; }
    .bet-card { flex-direction: column; align-items: flex-start; }
    .ch-grid { grid-template-columns: 1fr; }
}

/* ========== Record: 开奖时间 & 同步徽标 ========== */
.record-draw {
    font-size: 12px;
    color: var(--blue-dark);
    background: #eaf4fb;
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    margin-top: 4px;
}
.record-draw .draw-code { font-weight: 600; }
.records-stats-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.sync-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
    background: #e8e8e8;
    color: var(--text-light);
    white-space: nowrap;
}
.sync-badge.online { background: #d4edda; color: #155724; }
.sync-badge.offline { background: #fff3cd; color: #856404; }

/* ========== 冷热号码 ========== */
.ch-overview {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.ch-ov-item {
    flex: 1;
    min-width: 130px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 16px;
    text-align: center;
}
.ch-ov-item .ov-num { font-size: 22px; font-weight: 700; color: var(--red); }
.ch-ov-item .ov-label { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.ch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.ch-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    margin-bottom: 14px;
}
.ch-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.ch-card h3 .range-tag { font-size: 11px; font-weight: 400; color: var(--text-light); background: #f0f0f0; padding: 2px 8px; border-radius: 10px; }
.ch-hot-card { border-top: 3px solid var(--red); }
.ch-cold-card { border-top: 3px solid var(--blue); }
.ch-sec-title { font-size: 13px; font-weight: 600; color: var(--text-light); margin: 10px 0 6px; }
.ch-hot-card .ch-sec-title { color: var(--red); }
.ch-cold-card .ch-sec-title { color: var(--blue); }
.ch-rows { display: flex; flex-direction: column; gap: 8px; }
.ch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: #fafafa;
    border-radius: var(--radius-sm);
}
.ch-row .ch-ball { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 13px; flex-shrink: 0; }
.ch-hot-card .ch-row .ch-ball { background: linear-gradient(135deg, var(--red-light), var(--red)); }
.ch-cold-card .ch-row .ch-ball { background: linear-gradient(135deg, var(--blue-light), var(--blue)); }
.ch-row .ch-name { font-weight: 600; flex: 1; font-size: 13px; }
.ch-row .ch-num { font-size: 12px; color: var(--text-light); }
.ch-row .ch-bar { flex: 2; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.ch-row .ch-bar-inner { height: 100%; border-radius: 4px; }
.ch-hot-card .ch-bar-inner { background: linear-gradient(90deg, #ffb3a7, var(--red)); }
.ch-cold-card .ch-bar-inner { background: linear-gradient(90deg, #a8d8f0, var(--blue)); }
.ch-row .ch-pct { font-size: 12px; font-weight: 600; min-width: 52px; text-align: right; }

.chart-card h3 { margin-bottom: 4px; }
.chart-tip { font-size: 12px; color: var(--text-lighter); margin-bottom: 8px; }
.chart-box { position: relative; width: 100%; }
.chart-box canvas { width: 100%; display: block; }

.ch-all-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
    padding: 2px;
}
.ch-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: #fafafa;
    border-radius: var(--radius-sm);
    padding: 8px 6px;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.ch-cell:hover { border-color: var(--red); }
.ch-cell-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px; color: #fff;
}
.ch-cell-num.red { background: linear-gradient(135deg, var(--red-light), var(--red)); }
.ch-cell-num.orange { background: linear-gradient(135deg, #f5a623, #e67e22); }
.ch-cell-num.blue { background: linear-gradient(135deg, var(--blue-light), var(--blue)); }
.ch-cell-count { font-size: 12px; font-weight: 600; }
.ch-cell-pct { font-size: 11px; color: var(--text-light); }

/* ========== DLT 杀号方法参数（固定加减法） ========== */
.method-params {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.method-params label { color: var(--text-light); font-size: 12px; }
.method-params select,
.method-params input[type="number"] {
    padding: 5px 10px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--card);
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
}
.method-params input[type="number"] { width: 68px; cursor: text; }
.method-params select:hover,
.method-params input[type="number"]:hover,
.method-params input[type="number"]:focus { border-color: var(--red); }

/* 综合排除中的“被多个方法重复排除”计数提示 */
.dup-tag {
    font-size: 11px;
    color: var(--orange);
    background: #fdf3e3;
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 4px;
    white-space: nowrap;
}
