/* 历史记录页面专用样式 */
.history-header {
    background: #fff;
    padding: 0.75rem;
    border-bottom: 2px solid #e60012;
    position: sticky;
    top: 0;
    z-index: 100;
}
.history-title {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}
.filter-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.filter-bar select {
    padding: 0.375rem 0.5rem;
    border: 1px solid #ddd;
    font-size: 0.875rem;
}
.filter-bar button {
    padding: 0.375rem 0.875rem;
    background: #e60012;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    height: 2rem;
    line-height: 1;
}
.filter-bar button:hover {
    background: #c4000d;
}
.back-link {
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
    margin-left: auto;
}

/* 统计信息 */
.stats-bar {
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

/* 历史记录列表 - 无间距 */
.history-list {
    background: #fff;
}

.history-item {
    border-bottom: 1px solid #eee;
    padding: 0.5rem 0.75rem;
}

/* 头部信息行 */
.history-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
}

.history-period {
    font-size: 0.875rem;
    font-weight: bold;
    color: #333;
}

.history-date {
    font-size: 0.75rem;
    color: #999;
}

/* 号码行 */
.history-balls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.125rem, 1vw, 0.25rem);
    margin-bottom: 0.5rem;
    flex-wrap: nowrap;
    width: 100%;
}

.history-ball {
    flex: 1;
    min-width: 0;
    aspect-ratio: 0.75;
    max-height: 4rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 1.25rem;
    line-height: 1;
    padding: 4px 2px;
}

.history-ball .num {
    font-size: clamp(1rem, 4.5vw, 1.25rem);
}

.history-ball .sxwx {
    font-size: clamp(0.625rem, 2.8vw, 0.75rem);
    margin-top: 6px;
    color: #000;
    background: #fff;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: normal;
    line-height: 1.2;
    white-space: nowrap;
    min-width: 2em;
    text-align: center;
}

.history-ball.red { background: #e60012; }
.history-ball.green { background: #34c759; }
.history-ball.blue { background: #007aff; }

.history-plus {
    font-size: clamp(0.75rem, 3vw, 1rem);
    color: #333;
    flex-shrink: 0;
    padding: 0 clamp(1px, 0.5vw, 4px);
    flex: 0 0 auto;
    font-weight: bold;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #fff;
    position: sticky;
    bottom: 0;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 0.375rem 0.75rem;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    font-size: 0.875rem;
    cursor: pointer;
}
.pagination a:hover {
    background: #f5f5f5;
}
.pagination .current {
    background: #e60012;
    color: #fff;
    border-color: #e60012;
}
.pagination .disabled {
    color: #ccc;
    pointer-events: none;
}

/* 空数据提示 */
.empty-tip {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

/* 加载中 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #999;
}
