/* 历史走势页面样式 - Web端 */

/* 主内容区域 */
.history-main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px;
    background: #f5f5f5;
    min-height: calc(100vh - 70px);
}

/* 页面标题 */
.history-page-header {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.history-page-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* 彩种选择 */
.lottery-selector {
    position: relative;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.lottery-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.lottery-select-btn:hover {
    border-color: #3066FF;
}

.lottery-select-btn span {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    color: #666;
    transition: transform 0.3s;
}

.lottery-select-btn.active .dropdown-icon {
    transform: rotate(180deg);
}

.lottery-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 15px;
    right: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 200;
    max-height: 300px;
    overflow-y: auto;
}

.lottery-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    font-size: 14px;
}

.lottery-dropdown-item:last-child {
    border-bottom: none;
}

.lottery-dropdown-item:hover {
    background: #f5f5f5;
}

.lottery-dropdown-item.active {
    background: #e3f2fd;
    color: #1976d2;
}

/* 历史记录容器 */
.history-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.history-list {
    width: 100%;
}

/* 历史记录项 */
.history-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 12px;
}

.history-item:last-child {
    border-bottom: none;
}

.period-number {
    font-size: 14px;
    min-width: 80px;
    flex-shrink: 0;
    font-weight: 700;
    color: #333;
}

.result-numbers {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 0;
    flex-wrap: wrap;
}

.result-number-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 50px;
    margin: 0 4px;
}

.number-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.number-circle.red {
    background: #FF0000;
}

.number-circle.blue {
    background: #0000FF;
}

.number-circle.green {
    background: #008000;
}

.zodiac-text {
    font-size: 12px;
    font-weight: 600;
    color: #000;
    margin-top: -2px;
}

.separator {
    font-size: 16px;
    color: #999;
    padding: 0 4px;
    font-weight: 600;
}

.result-classification {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    min-width: 50px;
    text-align: center;
    margin-left: 12px;
}

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3066FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 16px;
    font-size: 14px;
    color: #999;
}

/* 无数据 */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
}

/* 视图切换 */
.view-tabs-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.view-tabs {
    display: flex;
    gap: 12px;
}

.view-tab {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.view-tab:hover {
    border-color: #3066FF;
}

.view-tab.active {
    background: #3066FF;
    color: white;
    border-color: #3066FF;
}

/* 表格容器 */
.history-table-container {
    background: white;
    overflow-x: auto;
    width: 100%;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 14px;
}

/* 澳门赛车表格 - 确保单元格紧密排列，无额外间距 */
.history-table-container[data-lottery="ampk10"] .history-table {
    border-spacing: 0;
}

/* 澳门赛车表格更紧凑 */
.history-table-container[data-lottery="ampk10"] .history-table {
    border-spacing: 0;
}

.history-table th:first-child,
.history-table td:first-child {
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 10;
    min-width: 80px;
}

.history-table thead th:first-child {
    background: #f8f8f8;
    z-index: 11;
}

.history-table th {
    background: #f8f8f8;
    padding: 8px 4px;
    text-align: center;
    font-weight: 700;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}

.history-table td {
    padding: 8px 4px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    vertical-align: middle;
}

/* 号码列的间距 - 减小左右padding，保持上下padding和号码框尺寸 */
.history-table td.number-column {
    padding: 10px 0px !important;
}

/* 澳门赛车号码列间距更小 - 左右padding为0，只保留上下padding，并减小上下padding */
.history-table-container[data-lottery="ampk10"] .history-table td.number-column {
    padding: 8px 0px !important;
}

/* 澳门赛车第一个号码列 - 减小左边距，让期号和第一个号码更近 */
.history-table-container[data-lottery="ampk10"] .history-table td.number-column:first-of-type {
    padding-left: 0px !important;
}

/* 十二生肖号码列间距更小 - 左右padding为0，只保留上下padding，并减小上下padding */
.history-table-container[data-lottery="am12"] .history-table td.number-column {
    padding: 8px 0px !important;
}

/* 十二生肖第一个号码列 - 减小左边距，让期号和第一个号码更近 */
.history-table-container[data-lottery="am12"] .history-table td.number-column:first-of-type {
    padding-left: 0px !important;
}

/* 澳门赛车表格其他列保持正常padding */
.history-table-container[data-lottery="ampk10"] .history-table th:not(:has(.number-cell)),
.history-table-container[data-lottery="ampk10"] .history-table td:not(.number-column) {
    padding: 10px 4px;
}

/* 期号列 */
.history-table td.period-number {
    padding: 10px 6px !important;
}

/* 澳门赛车期号列 - 减小右边距，让期号和号码更近 */
.history-table-container[data-lottery="ampk10"] .history-table td.period-number {
    padding: 10px 2px 10px 6px !important;
}

/* 澳门赛车期号列 - 减小右边距，让期号和号码更近 */
.history-table-container[data-lottery="ampk10"] .history-table td.period-number {
    padding: 10px 4px 10px 6px !important;
}

/* 十二生肖期号列 - 减小右边距，让期号和号码更近 */
.history-table-container[data-lottery="am12"] .history-table td.period-number {
    padding: 10px 4px 10px 6px !important;
}

/* 冠亚和列 */
.history-table td.sum-cell {
    padding: 10px 4px !important;
}

/* 龙虎列 */
.history-table td.dragon-tiger-cell {
    padding: 10px 2px !important;
}

.history-table tbody tr:hover {
    background: #f8f8f8;
}

/* 号码单元格 */
.number-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    font-weight: 700;
    color: white;
    font-size: 16px;
    margin: 0 auto;
}

/* 澳门赛车号码框保持原尺寸，增大间距 */
.history-table-container[data-lottery="ampk10"] .number-cell {
    width: 35px;
    height: 35px;
    font-size: 16px;
    margin: 0 -10px;
    padding: 0;
    box-sizing: border-box;
}

/* 十二生肖号码框保持原尺寸，增大间距 */
.history-table-container[data-lottery="am12"] .number-cell {
    width: 35px;
    height: 35px;
    font-size: 16px;
    margin: 0 0px;
    padding: 0;
    box-sizing: border-box;
}


.history-table-container[data-lottery="amss"] .number-cell {
    border-radius: 50%;
}

/* 和值、大小单双、龙虎 */
.sum-value {
    font-weight: 700;
    color: #333;
    font-size: 18px;
}

/* 澳门赛车冠亚和数字字体更大 */
.history-table-container[data-lottery="ampk10"] .sum-value {
    font-size: 20px !important;
    font-weight: 700;
}

/* 十二生肖冠亚和数字字体更大 */
.history-table-container[data-lottery="am12"] .sum-value {
    font-size: 20px !important;
    font-weight: 700;
}

.sum-cell {
    padding: 12px 8px;
    vertical-align: middle;
}

.size-indicator {
    font-weight: 700;
    font-size: 14px;
}

.size-indicator.small {
    color: #3066FF;
}

.size-indicator.large {
    color: #FF2600;
}

.parity-indicator {
    font-weight: 700;
    font-size: 14px;
}

.parity-indicator.odd {
    color: #3066FF;
}

.parity-indicator.even {
    color: #FF2600;
}

.dragon-tiger {
    font-weight: 700;
    font-size: 14px;
}

.dragon-tiger.dragon {
    color: #FF2600;
}

.dragon-tiger.tiger {
    color: #3066FF;
}

.dragon-tiger.tie {
    color: #3066FF;
}

/* 加拿大28信息行 */
.jnd28-info-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
    font-size: 14px;
}

.jnd28-info-row span {
    font-weight: 600;
}

/* 分类列 */
.history-table th.classification-header,
.history-table td.classification-cell {
    padding: 12px 6px;
    font-size: 12px;
    min-width: 50px;
}

