/* style.css - GHALBE走势图样式文件 */

* {
    box-sizing: border-box;
}

body {
    background: #eef2f5;
    font-family: 'Segoe UI', 'Roboto', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 20px;
    position: relative;
        user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}
/* ===== A-B分标题下的两个按钮：笔记本 + 关联 ===== */
.btn-notebook,
.btn-link-result {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-left: 8px;
    padding: 5px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 999px;          /* 胶囊圆角 */
    cursor: pointer;
    color: #fff;
    transition: all 0.22s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    user-select: none;
}

/* 笔记本：青绿渐变 */
.btn-notebook {
    background: linear-gradient(135deg, #34d399, #10b981);
}
.btn-notebook:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
}
.btn-notebook:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.4);
}

/* 关联：紫色渐变 */
.btn-link-result {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}
.btn-link-result:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.4);
}
.btn-link-result:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(139, 92, 246, 0.4);
}

/* 小屏适配：文字缩小一点 */
@media (max-width: 480px) {
    .btn-notebook,
    .btn-link-result {
        padding: 4px 10px;
        font-size: 0.65rem;
    }
}


/* 豹子形态样式 - 紫色背景 */
.morphology-leopard {
    background: linear-gradient(135deg, #9333ea, #6b21a8) !important;
    color: #ffffff !important;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(251, 191, 36, 0.8);
}

/* 豹子号样式 - 紫色+金色边框+闪烁动画 */
.leopard-ball {
    background: linear-gradient(145deg, #9333ea, #6b21a8) !important;
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.9), 0 0 4px rgba(251, 191, 36, 0.8) !important;
    color: #ffffff !important;
    font-weight: bold;
    border: 2px solid #fbbf24 !important;
    animation: leopardPulse 1.5s ease-in-out infinite;
}

@keyframes leopardPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(147, 51, 234, 0.8), 0 0 3px rgba(251, 191, 36, 0.6);
    }
    50% {
        box-shadow: 0 0 16px rgba(147, 51, 234, 1), 0 0 8px rgba(251, 191, 36, 1);
    }
}
              .hit-digit-gold {
            color: #ffd700;
            font-weight: bold;
            font-size: 1.1rem;
            margin: 0 1px;
            background: rgba(255, 215, 0, 0.25);
            padding: 2px 4px;
            border-radius: 3px;
        }
input, textarea, [contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}


/* ===== 复制全部数据按钮样式 ===== */
.btn-copy-data {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
    letter-spacing: 0.3px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-copy-data:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.5);
    background: linear-gradient(145deg, #5a6fd6, #6a3f96);
}

.btn-copy-data:active {
    transform: translateY(0px);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
}

.btn-copy-data:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 复制成功状态 */
.btn-copy-data.copy-success {
    background: linear-gradient(145deg, #10b981, #059669) !important;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.5) !important;
    border: none !important;
    color: white !important;
}

/* 复制失败状态 */
.btn-copy-data.copy-error {
    background: linear-gradient(145deg, #ef4444, #dc2626) !important;
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.5) !important;
    border: none !important;
    color: white !important;
}

/* 按钮图标动画 */
.btn-copy-data .copy-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-copy-data:hover .copy-icon {
    transform: scale(1.15);
}

.btn-copy-data.copy-success .copy-icon {
    animation: copySuccessPop 0.4s ease;
}

@keyframes copySuccessPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.4); }
    70% { transform: scale(0.85); }
    100% { transform: scale(1); }
}

/* ==================== 水印层 ==================== */
.watermark-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.watermark-text {
    position: absolute;
    white-space: nowrap;
    font-size: 20px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.08);
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    letter-spacing: 3px;
    transform: rotate(-25deg);
    user-select: none;
    pointer-events: none;
}

/* ==================== 容器 ==================== */
.container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 28px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    padding: 20px 20px 30px 20px;
    position: relative;
    z-index: 1;
}

/* ==================== 标题 ==================== */
h1 {
    font-size: 1.9rem;
    margin: 0 0 16px 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: baseline;
    border-bottom: 2px solid #f1c40f;
    padding-bottom: 10px;
    color: #c0392b;
    letter-spacing: 2px;
}

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

/* ==================== 和尾5-9数字红色样式 ==================== */
.value-number.hewei-red {
    color: #e53e3e !important;
}

/* ==================== 三态切换样式 ==================== */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 500;
}

.toggle-label {
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    padding: 2px 6px;
    border-radius: 20px;
}

.toggle-label.active {
    color: white;
    background: #f39c12;
    font-weight: bold;
}

.toggle-mode-group {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 40px;
}

.toggle-mode-btn {
    padding: 4px 14px;
    border-radius: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s;
}

.toggle-mode-btn.active {
    background: #f39c12;
    color: white;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.toggle-mode-btn:hover:not(.active) {
    background: #e2e8f0;
}

/* ==================== 游戏切换 ==================== */
.game-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
}

.game-label {
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.game-label.active {
    color: #10b981;
    font-weight: bold;
}

.game-slider {
    position: relative;
    width: 44px;
    height: 22px;
    background: #cbd5e1;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
}

.game-slider.active {
    background: #10b981;
}

.game-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 3px;
    transition: all 0.2s;
}

.game-slider.active::after {
    left: 23px;
}

/* ==================== 按钮 ==================== */
.btn-refresh {
    background: #2c3e66;
    border: none;
    color: white;
    padding: 6px 16px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
}

.btn-refresh:hover {
    background: #1e2f4b;
}

.btn-clear-cache {
    background: #ef4444;
    border: none;
    color: white;
    padding: 6px 16px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
}

.btn-clear-cache:hover {
    background: #dc2626;
}

.btn-screenshot {
    background: #10b981;
    border: none;
    color: white;
    padding: 6px 16px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
}

.btn-screenshot:hover {
    background: #059669;
}

/* ==================== 加载状态 ==================== */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c86a3;
}





/* 在 style.css 中添加或修改以下样式 */
.dist-item.missing-digit {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0 2px;
}



/* ==================== 组选分布图 - 只修改颜色 ==================== */

/* 0-4 非重复数字 - 橙色 #f59e0b */
.dist-item.active-number {
    background: #f59e0b !important;
    color: #ffffff !important;
    border: 1px solid #f59e0b !important;
    font-weight: 700 !important;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    padding: 0 2px;
}

/* 5-9 非重复数字 - 蓝色 #3b82f6 */
.dist-item.active-number-blue {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border: 1px solid #3b82f6 !important;
    font-weight: 700 !important;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    padding: 0 2px;
}

/* 重复数字（组三）- 红色 #dc2626 */
.dist-item.active-number-red {
    background: #dc2626 !important;
    color: white !important;
    border: 1px solid #dc2626 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.5) !important;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    padding: 0 2px;
}

/* 非重复数字 - 偶数（0,2,4,6,8）- 蓝色 */
.dist-item.active-number-even {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border: 1px solid #3b82f6 !important;
    font-weight: 700 !important;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    padding: 0 2px;
}

/* 非重复数字 - 奇数（1,3,5,7,9）- 橙色 */
.dist-item.active-number-odd {
    background: #f59e0b !important;
    color: #ffffff !important;
    border: 1px solid #f59e0b !important;
    font-weight: 700 !important;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    padding: 0 2px;
}

/* 重复数字（组三）- 红色 */
.dist-item.duplicate-dist {
    background: #dc2626 !important;
    color: white !important;
    border: 1px solid #dc2626 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.5) !important;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    padding: 0 2px;
}


/* 组选分布图容器样式 */
.group-distribution {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 4px 2px;
    justify-content: center;
    min-width: 120px;
}

.dist-item {
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    min-width: 19px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    padding: 0 2px;
    font-size: 0.7rem;
    /* background: #f9fafb; */
    /* border: 1px solid #e5e7eb; */
    color: #cccccc;
}

.dist-item:hover {
    transform: scale(1.1);
    z-index: 10;
}

.dist-item.line-selected {
    outline: 2px solid #f59e0b;
    outline-offset: 1px;
    border-radius: 50px;
}





/* ==================== 和差单元格 ==================== */
.sumdiff-cell {
    font-weight: 600;
    background: #fefce8;
    font-size: 0.7rem;
}

.sumdiff-red {
    color: #e53e3e;
    font-weight: bold;
}

.sumdiff-normal {
    color: #2c6e9e;
}

/* ==================== 差值单元格 ==================== */
.diff-cell {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.diff-red {
    color: #e53e3e;
    font-weight: bold;
}

.diff-normal {
    color: #dbdbdb;
}

.diff-item {
    display: inline-block;
    min-width: 18px;
    text-align: center;
    margin: 0 1px;
}

.position-cell {
    transition: all 0.1s;
}

/* ==================== 表格滚动容器 ==================== */
.table-scroll-container {
    max-height: 65vh;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
}

/* ==================== 趋势表格 ==================== */
.trend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.7rem;
    min-width: 1800px;
    font-family: system-ui, -apple-system, 'Segoe UI', monospace;
    background: white;
}

.trend-table thead {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
}

.trend-table th,
.trend-table td {
    border: 1px solid #e9eef3;
    padding: 6px 4px;
    text-align: center;
    vertical-align: middle;
}

.trend-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #1e293b;
    font-size: 0.7rem;
    border-bottom: 2px solid #e9eef3;
}

/* ==================== 期号列 ==================== */
.period-col {
    background: #fef5e7;
    font-weight: bold;
    color: #b45309;
    font-size: 0.7rem;
}

/* ==================== 分组分隔行 ==================== */
.group-separator td {
    border-top: 2px solid #ebebeb;
    border-bottom: 1px solid #f9f9f9;
    background-color: #fffaf0;
    height: 4px;
    padding: 0;
    line-height: 0;
}

/* ==================== 球组 ==================== */
.ball-group {
    display: flex;
    justify-content: center;
    gap: 3px;
    flex-wrap: wrap;
}

.ball {
    display: inline-flex;
    width: 26px;
    height: 26px;
    background: linear-gradient(145deg, #e67e22, #d35400);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

.ball-test {
    background: linear-gradient(145deg, #4a6fa5, #2c4e7a);
}

.ball-startup {
    background: linear-gradient(145deg, #4a6fa5, #2c4e7a);
}

.ball-test.group-three-red {
    background: linear-gradient(145deg, #e53e3e, #c53030);
    box-shadow: 0 0 5px rgba(229, 62, 62, 0.5);
}

.ball-startup.group-three-red {
    background: linear-gradient(145deg, #e53e3e, #c53030);
    box-shadow: 0 0 5px rgba(229, 62, 62, 0.5);
}

/* ==================== 位置网格 ==================== */
.position-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1px;
    white-space: nowrap;
    position: relative;
}

.digit-item {
    width: 21px;
    height: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: normal;
    color: #dbdbdb;
    border-radius: 3px;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    background: transparent;
}

.digit-item.highlight {
    background: #f39c12;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    transform: scale(1.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.digit-item.duplicate-digit {
    background: #e53e3e;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    transform: scale(1.02);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ==================== 画布 ==================== */
.line-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.table-wrapper {
    position: relative;
}

/* ==================== 页脚 ==================== */
.footer-note {
    margin-top: 24px;
    text-align: center;
    background: #f9fafb;
    border-radius: 24px;
    padding: 12px;
    font-size: 0.7rem;
    color: #4b5563;
}

/* ==================== 数值与奇偶 ==================== */
.value-with-oddeven {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
    border-radius: 5px;
}

.value-number {
    font-size: 0.7rem;
    font-weight: 600;
}

.value-oddeven {
    font-size: 0.55rem;
    font-weight: normal;
    margin-top: 2px;
}

.value-oddeven.odd {
    color: #e53e3e;
    font-size: 10px;
}

.value-oddeven.even {
    background: #07c160;
    width: 25px;
    padding: 0 5px;
    border-radius: 5px;
    color: #fff;
    margin-bottom: 2px;
}

/* ==================== 形态样式 ==================== */
.morphology-cell {
    font-weight: bold;
    font-size: 0.7rem;
}

.morphology-straight {
    color: #e53e3e;
    background: #fee2e2;
    border-radius: 4px;
}

.morphology-half {
    color: #f39c12;
    background: #fef3c7;
    border-radius: 4px;
}

.morphology-mixed {
    color: #10b981;
    background: #d1fae5;
    border-radius: 4px;
}

/* ==================== 分解功能 ==================== */
.decompose-section {
    margin-top: 20px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.decompose-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-decompose-add {
    background: #8195ff;
    border: none;
    color: white;
    padding: 6px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: 0.2s;
}

.btn-decompose-add:hover {
    background: #6a7ee0;
}

.decompose-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.decompose-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 4px 12px 4px 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.7rem;
    font-family: monospace;
    cursor: pointer;
}

.decompose-item-text .group-a {
    color: #8195ff;
    font-weight: bold;
}

.decompose-item-text .group-b {
    color: #e53e3e;
    font-weight: bold;
}

.decompose-item-del {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.decompose-item-del:hover {
    background: #dc2626;
}

.empty-decompose {
    color: #94a3b8;
    font-size: 0.7rem;
    padding: 8px 0;
}

/* ==================== 模态框 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-container {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    padding: 24px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 16px;
    text-align: center;
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 40px;
    font-size: 0.9rem;
    font-family: monospace;
    text-align: center;
    margin-bottom: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.modal-input:focus {
    border-color: #8195ff;
}

.modal-hint {
    font-size: 0.65rem;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-btn {
    padding: 8px 24px;
    border-radius: 40px;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

.modal-btn-confirm {
    background: #8195ff;
    color: white;
}

.modal-btn-confirm:hover {
    background: #6a7ee0;
}

.modal-btn-cancel {
    background: #e2e8f0;
    color: #475569;
}

.modal-btn-cancel:hover {
    background: #cbd5e1;
}

/* ==================== 预测区 ==================== */
.predict-digit {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #374151;
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.1s;
}

.predict-digit:hover {
    background: #cbd5e1;
    transform: scale(1.05);
}
/* ===== A-B分：预测区数字染色 ===== */
/* A组：浅绿底 + 深灰字 */
.predict-digit.decompose-a,
.predict-digit.decompose-a.selected,
.predict-digit.decompose-a.line-selected {
    background: #07c16057 !important;
    color: #374151 !important;
    border-color: #07c16057 !important;
}
/* ===== A-B分：只作用于组选0-9分布图 ===== */
/* A组：浅绿底 + 深灰字 */
.dist-item.decompose-a {
    background: #07c16057 !important;
    color: #374151 !important;
    border-color: #07c16057 !important;
}

/* B组：红底 + 白字 */
.dist-item.decompose-b {
    background: #f75a5a !important;
    color: #fff !important;
    border-color: #f75a5a !important;
}
/* B组：红底 + 白字 */
.predict-digit.decompose-b,
.predict-digit.decompose-b.selected,
.predict-digit.decompose-b.line-selected {
    background: #f75a5a !important;
    color: #fff !important;
    border-color: #f75a5a !important;
}
/* ===== A-B分：只作用于预测区的"组选"格 ===== */
.predict-digit.decompose-a {
    background: #07c16057 !important;
    color: #374151 !important;
    border-color: #07c16057 !important;
}
.predict-digit.decompose-b {
    background: #f75a5a !important;
    color: #fff !important;
    border-color: #f75a5a !important;
}

.predict-digit.selected {
    background: #07c160 !important;
    color: white !important;
    font-weight: bold !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

.predict-digit.line-selected {
    outline: 2px solid #10b981;
    outline-offset: 1px;
}

.predict-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 2px;
    white-space: nowrap;
}

.predict-row td {
    background: #f0f9ff;
}

.predict-label {
    background: #e0f2fe;
    font-weight: bold;
    color: #0369a1;
}

.btn-add-predict {
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-add-predict:hover:not(.disabled) {
    background: #0284c7;
    transform: scale(1.05);
}

.btn-add-predict.disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-remove-predict {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 6px;
}

.btn-remove-predict:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.predict-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.btn-ai-predict {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-ai-predict:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46a0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-ai-predict:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
}
.clear-lines-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.65rem;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s;
    display: none;
}

.clear-lines-btn:hover {
    background: #dc2626;
}

/* ==================== 冷热号面板 ==================== */
.hot-cold-highlight {
    outline: 3px solid #f59e0b !important;
    outline-offset: 2px !important;
    border-radius: 50% !important;
}






  /* AI预测面板样式 */
        .ai-predict-panel {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 20px;
            color: white;
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
        }
        
        .ai-predict-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        
        .ai-predict-title {
            font-size: 1.2rem;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .ai-badge {
            background: rgba(255, 255, 255, 0.2);
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }
        
        .ai-predict-numbers {
            display: flex;
            gap: 16px;
            justify-content: center;
            flex-wrap: wrap;
            margin: 20px 0;
        }
        
        .ai-number-card {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border-radius: 16px;
            padding: 20px;
            min-width: 140px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }
        
        .ai-number-card:hover {
            transform: translateY(-5px);
            background: rgba(255, 255, 255, 0.25);
            border-color: rgba(255, 255, 255, 0.5);
        }
        
        .ai-number-display {
            font-size: 3rem;
            font-weight: bold;
            letter-spacing: 8px;
            text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
            margin: 10px 0;
        }
        
        .ai-number-label {
            font-size: 0.85rem;
            opacity: 0.9;
            margin-bottom: 8px;
        }
        
        .ai-confidence {
            display: inline-block;
            background: rgba(255, 255, 255, 0.2);
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 0.75rem;
            margin-top: 8px;
        }
        
        .ai-analysis-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 12px;
            margin-top: 20px;
        }
        
        .ai-analysis-item {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 12px;
            text-align: center;
        }
        
        .ai-analysis-label {
            font-size: 0.75rem;
            opacity: 0.8;
            margin-bottom: 4px;
        }
        
        .ai-analysis-value {
            font-size: 1.1rem;
            font-weight: bold;
        }
        
        .ai-buttons {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-top: 16px;
            flex-wrap: wrap;
        }
        
        .ai-btn {
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: white;
            padding: 10px 20px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            font-weight: bold;
        }
        
        .ai-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }
        
        .ai-btn-primary {
            background: #ff6b6b;
            border-color: #ff6b6b;
        }
        
        .ai-btn-primary:hover {
            background: #ff5252;
        }
        
        .ai-hot-number {
            animation: glow 1.5s ease-in-out infinite;
        }
        
        @keyframes glow {
            0%, 100% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
            50% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.8); }
        }
        
        .ai-loading {
            text-align: center;
            padding: 20px;
            font-size: 1.1rem;
            animation: pulse 1s infinite;
        }
        
        .ai-error {
            text-align: center;
            padding: 20px;
            background: rgba(255, 0, 0, 0.2);
            border-radius: 12px;
            margin: 10px 0;
        }
        
        .ai-suggestion-list {
            margin-top: 16px;
            padding: 12px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 12px;
        }
        
        .ai-suggestion-item {
            padding: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .ai-suggestion-item:last-child {
            border-bottom: none;
        }
        
        .ai-suggestion-numbers {
            font-weight: bold;
            letter-spacing: 4px;
        }
        
        .ai-suggestion-reason {
            font-size: 0.75rem;
            opacity: 0.8;
        }
        
        /* 命中率统计样式 */
        .hit-rate-section {
            margin-top: 20px;
            padding: 16px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 12px;
        }
        
        .hit-rate-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            flex-wrap: wrap;
            gap: 8px;
        }
        
        .hit-rate-title {
            font-size: 1rem;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .hit-rate-summary {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 12px;
            margin-bottom: 16px;
        }
        
        .hit-rate-card {
            background: rgba(255, 255, 255, 0.15);
            border-radius: 12px;
            padding: 12px;
            text-align: center;
        }
        
        .hit-rate-value {
            font-size: 1.5rem;
            font-weight: bold;
            color: #ffd700;
        }
        
        .hit-rate-label {
            font-size: 0.75rem;
            opacity: 0.9;
            margin-top: 4px;
        }
        
        .hit-rate-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.85rem;
        }
        
        .hit-rate-table th {
            background: rgba(255, 255, 255, 0.2);
            padding: 8px;
            text-align: left;
            font-weight: bold;
        }
        
        .hit-rate-table td {
            padding: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .hit-rate-success {
            color: #4ade80;
            font-weight: bold;
        }
        
        .hit-rate-fail {
            color: #f87171;
            font-weight: bold;
        }
        
        .hit-rate-partial {
            color: #fbbf24;
            font-weight: bold;
        }
        
        .hit-rate-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: bold;
        }
        
        .hit-rate-badge-excellent {
            background: #4ade80;
            color: #14532d;
        }
        
        .hit-rate-badge-good {
            background: #60a5fa;
            color: #1e3a8a;
        }
        
        .hit-rate-badge-fair {
            background: #fbbf24;
            color: #78350f;
        }
        
        .hit-rate-badge-poor {
            background: #f87171;
            color: #7f1d1d;
        }
        
        