/* Player Statistics Page Styling - RobotBets Theme */

.player-stats-page {
    background: #0a0e1a;
    color: #e0e6ed;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00d4ff 0%, #0078ff 50%, #7000ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.page-header .subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

/* Filters Container */
.filters-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 120, 255, 0.1);
    position: relative;
    z-index: 2;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-select,
.filter-input {
    background: rgba(10, 14, 26, 0.8);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #e0e6ed;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

.filter-select:hover,
.filter-input:hover {
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.filter-select:focus,
.filter-input:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.filter-select option {
    background: #0a0e1a;
    color: #e0e6ed;
}

/* Filter Buttons */
.filters-container .btn {
    grid-column: span 1;
    margin-top: 22px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn {
    background: linear-gradient(135deg, #0078ff 0%, #00d4ff 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 120, 255, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 120, 255, 0.5);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #00d4ff;
    border: 2px solid rgba(0, 212, 255, 0.3);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #00d4ff;
}

/* Stats Tabs */
.stats-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(0, 212, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tab-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
    color: #00d4ff;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #0078ff 0%, #00d4ff 100%);
    border-color: #00d4ff;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

/* Stats Content */
.stats-content {
    position: relative;
    z-index: 2;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Table Container */
.table-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 120, 255, 0.1);
}

/* Stats Table */
.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table thead {
    background: linear-gradient(135deg, rgba(0, 120, 255, 0.2) 0%, rgba(0, 212, 255, 0.1) 100%);
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.stats-table thead th {
    padding: 20px 15px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 700;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.stats-table thead th.sortable:hover {
    background: rgba(0, 212, 255, 0.15);
}

.stats-table thead th.sortable::after {
    content: '⇅';
    margin-left: 8px;
    opacity: 0.5;
    font-size: 0.9rem;
}

.stats-table thead th.sorted-asc::after {
    content: '↑';
    opacity: 1;
    color: #00d4ff;
}

.stats-table thead th.sorted-desc::after {
    content: '↓';
    opacity: 1;
    color: #00d4ff;
}

.stats-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.stats-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.05);
    border-left: 3px solid #00d4ff;
}

.stats-table tbody td {
    padding: 18px 15px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.stats-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Player Cell */
.player-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0078ff 0%, #00d4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.player-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 212, 255, 0.4);
    background: rgba(10, 14, 26, 0.8);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.player-photo:hover {
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    transform: scale(1.1);
}

.player-info {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-weight: 600;
    color: #fff;
}

.player-number {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.player-flag {
    font-size: 0.7rem;
    color: rgba(0, 212, 255, 0.8);
    margin-left: 8px;
}

/* Team Badge */
.team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-badge {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
}

/* Stat Highlights */
.stat-highlight {
    font-weight: 700;
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.stat-good {
    color: #00ff88;
}

.stat-average {
    color: #ffa500;
}

.stat-poor {
    color: #ff4444;
}

/* Position Badge */
.position-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-goalkeeper {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.position-defender {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.position-midfielder {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.position-attacker {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Rating */
.rating {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
}

.rating-excellent {
    background: linear-gradient(135deg, #00ff88 0%, #00d4a0 100%);
    color: #0a0e1a;
}

.rating-good {
    background: linear-gradient(135deg, #00d4ff 0%, #0078ff 100%);
    color: #fff;
}

.rating-average {
    background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
    color: #fff;
}

.rating-poor {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: #fff;
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* No Data */
.no-data {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    margin: 40px 0;
}

.no-data-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-data h3 {
    font-size: 1.8rem;
    color: #00d4ff;
    margin-bottom: 10px;
}

.no-data p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 20px;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #0078ff 0%, #00d4ff 100%);
    border-color: #00d4ff;
    color: #fff;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .filters-container {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
        padding: 20px;
    }

    .stats-tabs {
        gap: 8px;
    }

    .tab-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.5rem;
    }

    .filters-container {
        grid-template-columns: 1fr;
    }

    .stats-table {
        font-size: 0.85rem;
    }

    .stats-table thead th,
    .stats-table tbody td {
        padding: 12px 8px;
    }

    .player-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    /* Hide less important columns on mobile */
    .stats-table th:nth-child(n+7),
    .stats-table td:nth-child(n+7) {
        display: none;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 0.8rem;
    }

    .stats-table th:nth-child(n+5),
    .stats-table td:nth-child(n+5) {
        display: none;
    }
}
