/* verbatim from pggame789/web/winner_table.php <style> */
.winner-table-section {
    background: linear-gradient(180deg, #3e3e3e 0%, #2a2a2a 100%);
    padding-top: 40px;
    padding-bottom: 40px;
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.winner-table-header {
    text-align: center;
    margin-bottom: 30px;
}

.winner-title {
    color: #FFD700;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.winner-title i {
    font-size: 32px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.winner-table-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    overflow: hidden;
}

.table-responsive {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.table-responsive::-webkit-scrollbar {
    display: none;
}

.table-responsive {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.winner-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    table-layout: fixed;
    min-width: 100%;
}

.winner-table tbody {
    display: table-row-group;
    overflow: hidden;
}

.winner-table thead th {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 15px;
    font-weight: bold;
    text-align: center;
    font-size: 16px;
    border: none;
    white-space: nowrap;
}

.winner-table thead th:nth-child(1) { width: 25%; }
.winner-table thead th:nth-child(2) { width: 30%; }
.winner-table thead th:nth-child(3) { width: 22%; }
.winner-table thead th:nth-child(4) { width: 23%; }

.winner-table thead th:first-child {
    border-radius: 10px 0 0 10px;
}

.winner-table thead th:last-child {
    border-radius: 0 10px 10px 0;
}

.winner-table tbody tr {
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 60px;
}

.winner-table tbody tr:hover {
    background: rgba(255, 215, 0, 0.15);
    transform: translateX(5px);
}

.winner-table tbody td {
    padding: 15px;
    color: #fff;
    text-align: center;
    border: none;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.winner-table tbody tr td:first-child {
    border-radius: 10px 0 0 10px;
}

.winner-table tbody tr td:last-child {
    border-radius: 0 10px 10px 0;
}

.player-name {
    color: #fff;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    max-width: 100%;
}

.player-name i {
    color: #FFD700;
    flex-shrink: 0;
}

.player-name span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.bet-amount {
    color: #87CEEB;
    font-weight: 500;
    white-space: nowrap;
}

.win-amount {
    color: #32CD32;
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
}

.game-name {
    color: #FFA500;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
}

.winner-table tbody tr.new-row {
    animation: slideUp 0.8s ease-out;
    position: relative;
    transform-origin: center;
}

.winner-table tbody tr.new-row::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 215, 0, 0.3) 50%, 
        transparent 100%);
    animation: highlight 1.5s ease-out;
    pointer-events: none;
    border-radius: 10px;
}

@keyframes highlight {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.winner-table tbody tr.remove-row {
    animation: slideOut 0.6s ease-out forwards;
}

@media (max-width: 768px) {
    .winner-title {
        font-size: 20px;
    }
    
    .winner-title i {
        font-size: 24px;
    }
    
    .winner-table thead th,
    .winner-table tbody td {
        padding: 10px 3px;
        font-size: 12px;
    }
    
    .player-name {
        font-size: 12px;
        gap: 4px;
    }
    
    .player-name i {
        font-size: 14px;
    }
    
    .win-amount {
        font-size: 13px;
    }
    
    .game-name {
        font-size: 11px;
    }
    
    .bet-amount {
        font-size: 12px;
    }
    
    .table-responsive {
        padding: 15px 10px;
    }
    
    .winner-table thead th:nth-child(1) { width: 25%; }
    .winner-table thead th:nth-child(2) { width: 30%; }
    .winner-table thead th:nth-child(3) { width: 22%; }
    .winner-table thead th:nth-child(4) { width: 23%; }
    
    .winner-table tbody tr {
        height: 50px;
    }
}

.loading-spinner {
    text-align: center;
    padding: 20px;
    color: #FFD700;
}

.loading-spinner i {
    font-size: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
