/* ============================================
   PLAYER STATISTICS PAGE STYLES
   Compatible with home-redesign.css theme
   ============================================ */


/* Player Hero Section */

.player-hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 3rem 0 2rem 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.player-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: heroGlow 20s linear infinite;
}

@keyframes heroGlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


/* Tournament Carousel */

.tournament-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-light);
}

.tournament-scroll::-webkit-scrollbar {
    height: 6px;
}

.tournament-scroll::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 10px;
}

.tournament-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.tournament-badge {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.tournament-badge:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}


/* Share Buttons - White Version for Hero */

.share-buttons-header-white {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.share-buttons-header-white:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.share-buttons-header-white .share-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}


/* Player Profile Card */

.player-profile-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(13, 71, 161, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.player-profile-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(13, 71, 161, 0.15);
}

.player-profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: 0 4px 16px rgba(13, 71, 161, 0.2);
}

.player-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    object-fit: cover;
}

.team-flag {
    width: 40px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}


/* Stats Section */

.stats-section {
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.stats-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stats-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.stats-table thead th {
    background: var(--bg-light);
    color: var(--text-dark);
    font-weight: 700;
    text-align: center;
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--border);
}

.stats-table tbody td {
    text-align: center;
    padding: 0.75rem 0.5rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.stats-table tbody tr:last-child td {
    border-bottom: none;
}

.stats-table tbody tr:hover {
    background: var(--bg-light);
}

.stats-table .highlight {
    color: var(--primary);
    font-weight: 700;
}


/* Stats Cards */

.stats-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(13, 71, 161, 0.12);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stats-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(13, 71, 161, 0.16);
}

.stats-card-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.stats-card-body {
    padding: 0;
}


/* Detailed Stats Table */

.detailed-stats-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

.detailed-stats-table thead th {
    background: var(--bg-light);
    color: var(--text-dark);
    font-weight: 700;
    text-align: center;
    padding: 1rem 0.75rem;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.detailed-stats-table tbody td {
    text-align: center;
    padding: 1rem 0.75rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.detailed-stats-table tbody tr:hover {
    background: var(--bg-light);
}

.detailed-stats-table .highlight {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}


/* Match Cell */

.match-cell {
    text-align: left !important;
    min-width: 250px;
}

.match-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid var(--border);
}

.match-link {
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.match-link:hover {
    color: var(--primary);
}


/* Sidebar Widget */

.sidebar-widget {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(13, 71, 161, 0.12);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    font-family: 'Oswald', sans-serif;
}


/* Quick Links */

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
}

.quick-link i {
    font-size: 1.25rem;
}


/* Animations */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out both;
}

.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */


/* Tablet */

@media (max-width: 1024px) {
    .player-profile-image {
        width: 120px;
        height: 120px;
    }
    .stats-table {
        min-width: 500px;
    }
    .detailed-stats-table {
        min-width: 700px;
    }
}


/* Mobile */

@media (max-width: 768px) {
    .player-hero {
        padding: 2rem 0 1.5rem 0;
    }
    .player-hero h1 {
        font-size: 2rem !important;
    }
    .share-buttons-header-white {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    .player-profile-card {
        padding: 1.5rem;
    }
    .player-profile-image {
        width: 100px;
        height: 100px;
    }
    .stats-header {
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
    }
    .stats-table {
        min-width: 450px;
    }
    .stats-table thead th,
    .stats-table tbody td {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }
    .detailed-stats-table {
        min-width: 650px;
    }
    .detailed-stats-table thead th,
    .detailed-stats-table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    .match-cell {
        min-width: 200px;
    }
    .match-flag {
        width: 20px;
        height: 15px;
    }
    .stats-card-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    .quick-link {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    .quick-link i {
        font-size: 1.1rem;
    }
    .tournament-scroll {
        gap: 0.5rem;
    }
    .tournament-badge {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .player-hero h1 {
        font-size: 1.75rem !important;
    }
    .player-hero p {
        font-size: 1rem !important;
    }
    .player-profile-card {
        padding: 1rem;
    }
    .player-profile-image {
        width: 90px;
        height: 90px;
        border-width: 3px;
    }
    .team-flag {
        width: 32px;
        height: 22px;
    }
    .stats-table {
        min-width: 400px;
    }
    .stats-table thead th,
    .stats-table tbody td {
        padding: 0.5rem 0.3rem;
        font-size: 0.75rem;
    }
    .detailed-stats-table {
        min-width: 600px;
    }
    .detailed-stats-table thead th,
    .detailed-stats-table tbody td {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }
    .match-cell {
        min-width: 180px;
    }
    .sidebar-widget {
        padding: 1rem;
    }
    .widget-title {
        font-size: 1.1rem;
    }
    .share-buttons-header-white {
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
    }
    .share-icon-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}


/* ============================================
   DARK MODE
   ============================================ */

[data-theme="dark"] .player-profile-card,
[data-theme="dark"] .stats-card,
[data-theme="dark"] .sidebar-widget {
    background: var(--bg-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .stats-section {
    border-color: var(--border);
}

[data-theme="dark"] .stats-table thead th,
[data-theme="dark"] .detailed-stats-table thead th {
    background: rgba(13, 71, 161, 0.1);
}

[data-theme="dark"] .stats-table tbody tr:hover,
[data-theme="dark"] .detailed-stats-table tbody tr:hover {
    background: rgba(13, 71, 161, 0.05);
}

[data-theme="dark"] .tournament-badge {
    background: rgba(13, 71, 161, 0.1);
    color: var(--text-dark);
}

[data-theme="dark"] .tournament-badge:hover {
    background: var(--primary-light);
}

[data-theme="dark"] .quick-link {
    background: rgba(13, 71, 161, 0.1);
}

[data-theme="dark"] .quick-link:hover {
    background: var(--primary-light);
}


/* ============================================
   TABLE HORIZONTAL SCROLL INDICATOR
   ============================================ */

.stats-table-container {
    position: relative;
}

.stats-table-container::after {
    content: '← Scroll →';
    position: absolute;
    bottom: -20px;
    right: 0;
    font-size: 0.75rem;
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

@media (max-width: 768px) {
    .stats-table-container::after {
        opacity: 1;
    }
}


/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .player-hero,
    .tournament-scroll,
    .share-buttons-header-white,
    .sidebar-widget,
    .back-to-top,
    .scroll-progress,
    header,
    footer {
        display: none !important;
    }
    .player-profile-card,
    .stats-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    body {
        background: white;
    }
}


/* End of Player Stats CSS */