* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
}

/* 容器样式 */
.container {
    max-width: 100%;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-x: auto;
}

/* 标题样式 */
.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #e74c3c;
    font-size: 24px;
    margin-bottom: 10px;
}

/* 控制面板样式 */
.control-panel {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.control-panel label {
    margin-right: 5px;
}

.control-panel select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* 图表容器样式 */
.chart-container {
    position: relative;
    overflow-x: auto;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch; /* 增加iOS滚动流畅度 */
}

/* 表格样式 */
.trend-table {
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
    min-width: 2000px;
    width: 100%;
    background-color: #fff;
}

.trend-table th,
.trend-table td {
    border: 1px solid #ddd;
    padding: 12px 8px;
    text-align: center;
    position: relative;
    min-width: 36px;
    height: 50px;
}

.trend-table th {
    background-color: #f2e9c8; /* 更改为浅米色背景 */
    font-weight: bold;
    white-space: nowrap;
    padding: 15px 8px;
    color: #333;
}

.trend-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 期号列样式 */
.trend-table td:first-child {
    color: #000;
    font-weight: bold;
}

/* 星期列样式 */
.trend-table td:nth-child(2) {
    color: #333;
}

/* 开奖号列样式 */
.trend-table td:nth-child(3) {
    color: #000;
    font-weight: bold;
}

/* 和值列样式 */
.trend-table td:nth-child(4) {
    color: #333;
}

/* 数字球样式 */
.ball {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

/* 数字球颜色 */
.ball-0, .ball-3, .ball-4, .ball-6, .ball-8 {
    background-color: #3498db; /* 蓝色 */
}

.ball-1, .ball-2, .ball-7, .ball-9 {
    background-color: #e74c3c; /* 红色 */
}

.ball-5 {
    background-color: #2ecc71; /* 绿色 */
}

/* 圆形数字样式（用于组选号码分布） */
.circle-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid #666;
    position: relative;
    z-index: 2;
}

/* 遗漏数字样式 */
.omit-number {
    color: #e57373; /* 红色系的遗漏数字 */
    font-size: 14px;
}

/* 走势单元格样式 */
.trend-cell {
    width: 36px;
    height: 50px;
    position: relative;
}

/* 命中单元格样式 */
.hit-cell {
    background-color: #f8f8f8;
}

/* 组选类型样式 */
.group-type {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.group-type-6 {
    background-color: #3498db;
    color: #fff;
}

.group-type-3 {
    background-color: #e74c3c;
    color: #fff;
}

.group-type-1 {
    background-color: #2ecc71;
    color: #fff;
}

/* 星期样式 */
.weekday {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    background-color: #f2f2f2;
    color: #333;
}

/* 和值样式 */
.sum-value {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

/* 走势连线样式 */
.trend-line-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

/* 表格列宽设置 */
/* 期号列 */
.trend-table td:first-child,
.trend-table th:first-child {
    min-width: 80px;
    max-width: 80px;
    width: 80px;
    font-weight: bold;
}

/* 星期列 */
.trend-table td:nth-child(2),
.trend-table th:nth-child(2) {
    min-width: 50px;
    max-width: 50px;
    width: 50px;
}

/* 开奖号列 */
.trend-table td:nth-child(3),
.trend-table th:nth-child(3) {
    min-width: 100px;
    max-width: 100px;
    width: 100px;
    font-weight: bold;
}

/* 和值列 */
.trend-table td:nth-child(4),
.trend-table th:nth-child(4) {
    min-width: 50px;
    max-width: 50px;
    width: 50px;
}

/* 数字位置列 - 百位/十位/个位/组选 */
.trend-table td.trend-cell {
    min-width: 36px;
    max-width: 36px;
    width: 36px;
}

/* 统计列 - 和尾 */
.trend-table td:nth-child(45),
.trend-table th:nth-child(45) {
    min-width: 50px;
    max-width: 50px;
    width: 50px;
    background-color: #f0f8ff;
    font-weight: bold;
}

/* 统计列 - 跨度 */
.trend-table td:nth-child(46),
.trend-table th:nth-child(46) {
    min-width: 50px;
    max-width: 50px;
    width: 50px;
    background-color: #f0f8ff;
    font-weight: bold;
}

/* 统计列 - 组选 */
.trend-table td:nth-child(47),
.trend-table th:nth-child(47) {
    min-width: 50px;
    max-width: 50px;
    width: 50px;
    background-color: #f0f8ff;
    font-weight: bold;
}

/* 统计列 - 奇偶比 */
.trend-table td:nth-child(48),
.trend-table th:nth-child(48) {
    min-width: 60px;
    max-width: 60px;
    width: 60px;
    background-color: #f0f8ff;
    font-weight: bold;
}

/* 统计列 - 大小比 */
.trend-table td:nth-child(49),
.trend-table th:nth-child(49) {
    min-width: 60px;
    max-width: 60px;
    width: 60px;
    background-color: #f0f8ff;
    font-weight: bold;
}

/* 统计列 - 012路 */
.trend-table td:nth-child(50),
.trend-table th:nth-child(50) {
    min-width: 60px;
    max-width: 60px;
    width: 60px;
    background-color: #f0f8ff;
    font-weight: bold;
}

/* 表头分隔样式 */
.trend-table th[colspan="10"] {
    border-left: 2px solid #ccc;
    border-right: 2px solid #ccc;
}

/* 数据列分隔样式 */
.trend-table td:nth-child(14),
.trend-table td:nth-child(24),
.trend-table td:nth-child(34),
.trend-table td:nth-child(44) {
    border-right: 2px solid #ccc;
}

/* 蓝色标记 */
.blue-mark {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #3498db;
    color: white;
    text-align: center;
    line-height: 20px;
    margin-right: 3px;
}

/* 红色标记 */
.red-mark {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #e74c3c;
    color: white;
    text-align: center;
    line-height: 20px;
    margin-right: 3px;
}

/* 绿色标记 */
.green-mark {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #2ecc71;
    color: white;
    text-align: center;
    line-height: 20px;
    margin-right: 3px;
}

/* 页脚样式 */
.footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #eee;
}

/* 修复移动端滚动提示样式 */
.scroll-hint {
    position: fixed !important;
    bottom: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background-color: rgba(0,0,0,0.7) !important;
    color: white !important;
    padding: 8px 15px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    z-index: 1000 !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease !important;
}

/* 移动端适配样式 */
@media (max-width: 768px) {
    body {
        padding: 0;
        margin: 0;
        background-color: #f5f5f5;
    }
    
    .container {
        padding: 0;
        box-shadow: none;
        border-radius: 0;
        overflow-x: hidden;
        background-color: #f5f5f5;
    }
    
    .header h1 {
        font-size: 20px;
        background-color: #fff;
        padding: 15px 0;
        margin: 0;
    }
    
    .control-panel {
        padding: 8px;
        background-color: #fff;
        margin-bottom: 10px;
    }
    
    /* 确保表格可以横向滚动 */
    .chart-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 0;
        width: 100%;
        max-width: 100vw;
        position: relative;
        background-color: #f5f5f5;
    }
    
    /* 保持表格最小宽度，确保在移动端可以滚动查看 */
    .trend-table {
        min-width: 1200px;
        font-size: 11px;
        table-layout: fixed;
    }
    
    .trend-table th,
    .trend-table td {
        padding: 8px 3px;
        height: 40px;
        min-width: 30px;
        border-color: #e0e0e0;
    }
    
    .trend-table th {
        background-color: #f2e9c8; /* 浅米色背景 */
        color: #333;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .ball {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 11px;
    }
    
    .circle-number {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 11px;
    }
    
    .trend-cell {
        width: 30px;
        height: 40px;
    }
    
    .omit-number {
        font-size: 11px;
        color: #e57373; /* 红色系的遗漏数字 */
    }
    
    .sum-value {
        font-size: 11px;
    }
    
    .weekday {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 11px;
    }
    
    /* 移除sticky，期号列随表格滑动 */
    .trend-table th:first-child,
    .trend-table th:nth-child(2),
    .trend-table th:nth-child(3),
    .trend-table th:nth-child(4),
    .trend-table td:first-child {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
        background-color: inherit !important;
    }
    
    .trend-table tr:nth-child(even) td:first-child {
        background-color: #f9f9f9;
    }
    
    /* 添加滚动提示 */
    .chart-container::before {
        content: "← 左右滑动查看更多 →";
        display: block;
        text-align: center;
        padding: 5px;
        background-color: #fff;
        color: #666;
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    /* 页脚样式调整 */
    .footer {
        margin-top: 0;
        padding: 10px 5px;
        font-size: 10px;
        background-color: #f5f5f5;
        border-top: none;
    }
    
    /* 期数选择器样式 */
    .period-selector {
        display: flex;
        justify-content: space-between;
        background-color: #fff;
        padding: 10px;
        border-top: 1px solid #e0e0e0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
    }
    
    .period-selector button {
        padding: 5px 10px;
        background-color: #f2e9c8;
        border: 1px solid #ddd;
        border-radius: 3px;
        color: #333;
        font-size: 12px;
    }
    
    .period-selector button.active {
        background-color: #e74c3c;
        color: #fff;
        border-color: #e74c3c;
    }
    
    /* 底部空间，防止内容被期数选择器遮挡 */
    .bottom-space {
        height: 50px;
    }
}

/* 小屏幕手机适配 */
@media (max-width: 480px) {
    body {
        padding: 0;
        margin: 0;
    }
    
    .container {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
    }
    
    .header h1 {
        font-size: 18px;
        margin-bottom: 0;
        padding: 10px 0;
    }
    
    .control-panel {
        padding: 5px;
        margin-bottom: 5px;
    }
    
    .control-panel select {
        padding: 3px 5px;
    }
    
    /* 进一步缩小元素尺寸 */
    .ball {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 10px;
    }
    
    .circle-number {
        width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 10px;
    }
    
    .trend-cell {
        width: 25px;
        height: 35px;
        padding: 2px !important;
    }
    
    .trend-table th,
    .trend-table td {
        padding: 5px 2px;
        min-width: 25px;
    }
    
    /* 滚动提示更明显 */
    .scroll-hint {
        position: fixed !important;
        bottom: 60px !important; /* 调整位置，避免被期数选择器遮挡 */
        left: 50% !important;
        transform: translateX(-50%) !important;
        background-color: rgba(0,0,0,0.7) !important;
        color: white !important;
        padding: 8px 15px !important;
        border-radius: 20px !important;
        font-size: 14px !important;
        z-index: 1000 !important;
        opacity: 1 !important;
        transition: opacity 0.3s ease !important;
    }
} 