/*
@page-history.php 历史记录页面样式分离
原本内联于page-history.php，包含历史表格、卡片、加载动画等样式。
详细注释每一部分，便于维护和定位。
*/

.history-page {
    padding: 30px 0;
}
.page-title {
    margin-bottom: 20px;
    text-align: center;
}
.lottery-type-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.lottery-tab {
    border: none;
    background-color: #f5f5f5;
    padding: 10px 20px;
    margin: 0 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}
.lottery-tab.active {
    background-color: #e74c3c;
    color: white;
}
.history-table-container {
    overflow-x: auto;
}
.history-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.history-table th,
.history-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
}
.history-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}
.history-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.history-lottery-card {
    background-color: #fff;
    border-radius: 5px;
    padding: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.history-lottery-item-ball {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    background-color: #e74c3c;
    font-weight: bold;
    font-size: 13px;
    position: relative;
    margin-bottom: 16px;
}

.history-lottery-item-ball.custom-bg span {
    position: relative;
    z-index: 2;
    color: inherit !important;
}
.history-lottery-item-ball .ball-prefix-suffix {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    white-space: nowrap;
    color: #333;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.2;
    z-index: 5;
}
.history-lottery-item-ball.special {
    background-color: #3498db;
}
.history-lottery-item-ball.special.custom-bg {
    background-color: transparent !important;
    color: inherit !important;
    text-shadow: none !important;
}
.history-loading {
    text-align: center;
    padding: 20px 0;
}
.history-loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #e74c3c;
    animation: history-spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}
.history-load-info {
    text-align: center;
    padding: 10px 0;
    color: #666;
    font-size: 14px;
}
@keyframes history-spin {
    to { transform: rotate(360deg); }
}
@media (max-width: 767px) {
    .history-table th,
    .history-table td {
        padding: 8px 5px;
        font-size: 13px;
    }
    .history-lottery-item-ball {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 12px;
    }
}
@media (max-width: 480px) {
    .history-lottery-item-ball {
        width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 11px;
    }
}
