/* ==========================================================================
   KSPL STATS PAGE SPECIFIC STYLING (PREMIUM LIGHT REDESIGN)
   ========================================================================== */
.stats-page-container {
    padding-top: 130px;
    padding-bottom: 90px;
    min-height: 90vh;
}

/* Stats Hero Banner Card */
.stats-hero-card {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 36px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 45px;
    box-shadow: var(--elevated-shadow);
    overflow: hidden;
}

/* Glimmer background effects in Hero Card */
.stats-hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(242, 192, 31, 0.12) 0%, transparent 75%),
        radial-gradient(circle at 70% 70%, rgba(144, 23, 29, 0.1) 0%, transparent 75%);
    pointer-events: none;
    animation: slow-bg-rotation-stats 25s linear infinite;
}

@keyframes slow-bg-rotation-stats {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stats-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--burgundy) 40%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats-hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 6px;
    background: linear-gradient(90deg, var(--burgundy) 0%, var(--gold) 100%);
    border-radius: 3px;
}

.stats-hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 25px auto 0;
    line-height: 1.6;
    font-weight: 500;
}

/* Sliding Pill Tab Selector */
.mcTabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.mcTabs-wrapper {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(144, 23, 29, 0.08);
    border-radius: 40px;
    padding: 6px;
    box-shadow: var(--glass-shadow);
    z-index: 1;
}

.tab-indicator {
    position: absolute;
    height: calc(100% - 12px);
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-dark) 100%);
    border-radius: 30px;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 0;
    box-shadow: 0 4px 12px rgba(144, 23, 29, 0.25);
}

.tab-btn {
    position: relative;
    border: none;
    background: none;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 750;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 1;
    border-radius: 30px;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn.current {
    color: #ffffff;
}

.tab-btn:hover:not(.current) {
    color: var(--burgundy);
}

/* Tab Panels */
.filtertabs {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.filtertabs.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   TOP PERFORMERS SECTION
   ========================================================================== */
.top-performers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.performer-card {
    position: relative;
    border-radius: 28px;
    height: 420px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.performer-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--elevated-shadow);
}

.performer-card-link {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: inherit;
    padding: 24px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

/* Background Gradients for Cards */
.card-gold { background: linear-gradient(185deg, #1b355a 0%, #2a628d 100%); color: #ffffff; }
.card-yellow { background: linear-gradient(185deg, #00505a 0%, #008594 100%); color: #ffffff; }
.card-blue-dark { background: linear-gradient(185deg, #a17849 0%, #dcc094 100%); color: #000000; }
.card-blue-light { background: linear-gradient(185deg, #f5a812 0%, #ffc53e 100%); color: #000000; }
.card-teal { background: linear-gradient(185deg, #002244 0%, #00417e 100%); color: #ffffff; }
.card-cream { background: linear-gradient(185deg, #5b3e2b 0%, #d1a87b 100%); color: #ffffff; }

/* Light card specific color overrides */
.card-blue-dark .stat-category-tag, .card-blue-dark .team-name { color: rgba(0, 0, 0, 0.6); }
.card-blue-dark .player-name { color: var(--text-primary); }
.card-blue-dark .score-value { color: var(--burgundy); }
.card-blue-dark .score-label { color: rgba(0, 0, 0, 0.6); }

.card-blue-light .stat-category-tag, .card-blue-light .team-name { color: rgba(0, 0, 0, 0.65); }
.card-blue-light .player-name { color: var(--text-primary); }
.card-blue-light .score-value { color: var(--burgundy); }
.card-blue-light .score-label { color: rgba(0, 0, 0, 0.65); }

/* Team badge overlay in cards */
.team-badge-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-badge-overlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* Player Cutout Container */
.player-cutout-container {
    position: absolute;
    bottom: 110px;
    left: 0;
    width: 100%;
    height: 290px;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.player-img {
    height: 95%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.25));
    transition: transform 0.4s ease;
}

.performer-card:hover .player-img {
    transform: translateY(-5px) scale(1.03);
}

/* performer details text block */
.performer-details {
    position: relative;
    z-index: 3;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.card-blue-dark .performer-details, .card-blue-light .performer-details {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-category-tag {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    opacity: 0.85;
}

.player-name {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 900;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.team-name {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0.85;
    display: block;
    margin-bottom: 12px;
}

.performer-score-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 10px;
}

.card-blue-dark .performer-score-display, .card-blue-light .performer-score-display {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.score-label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.75;
}

.score-value {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--gold);
}

.card-blue-dark .score-value, .card-blue-light .score-value {
    color: var(--burgundy);
}

/* ==========================================================================
   STATISTICAL TABLES
   ========================================================================= */
.stats-table-wrapper {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 30px;
    box-shadow: var(--elevated-shadow);
    margin-bottom: 50px;
}

.table-header-row {
    margin-bottom: 25px;
}

.table-card-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 850;
    color: var(--burgundy-dark);
    margin-bottom: 5px;
}

.table-card-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
}

.stats-data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.stats-data-table th {
    background: var(--burgundy);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 18px 15px;
}

.stats-data-table th.text-left {
    text-align: left;
}

.stats-data-table td {
    padding: 16px 15px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(144, 23, 29, 0.05);
    font-weight: 550;
}

.stats-data-table tbody tr {
    transition: background 0.25s ease;
}

.stats-data-table tbody tr:hover {
    background: rgba(144, 23, 29, 0.03);
}

/* Rank column high styling */
.rank-cell {
    font-family: var(--font-heading);
    font-weight: 850;
    font-size: 1rem;
    color: var(--text-secondary);
}

.rank-first { background: rgba(242, 192, 31, 0.05); }
.rank-second { background: rgba(71, 85, 105, 0.02); }
.rank-third { background: rgba(144, 23, 29, 0.02); }

.rank-first:hover { background: rgba(242, 192, 31, 0.08) !important; }
.rank-second:hover { background: rgba(71, 85, 105, 0.05) !important; }
.rank-third:hover { background: rgba(144, 23, 29, 0.05) !important; }

/* Player Name Cell */
.player-cell {
    text-align: left;
}

.table-player-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.table-player-link:hover .player-name-main {
    color: var(--burgundy);
}

.table-player-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-player-cell img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(144, 23, 29, 0.05);
    border: 1.5px solid var(--glass-border);
}

.player-name-main {
    font-family: var(--font-heading);
    font-weight: 750;
    font-size: 0.98rem;
    color: var(--text-primary);
}

.highlight-val {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--burgundy);
}

/* ==========================================================================
   POINTS TABLE INTEGRATION STYLES
   ========================================================================== */
.table-team-cell {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.table-team-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(144, 23, 29, 0.06);
}

.table-team-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.table-team-name {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-primary);
    font-size: 0.95rem;
    letter-spacing: -0.2px;
}

.nrr-cell {
    font-weight: 800 !important;
}

.text-positive {
    color: var(--win-green) !important;
}

.text-negative {
    color: var(--wicket-red) !important;
}

.points-cell {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.15rem;
    color: var(--burgundy);
}

/* CTA Register Section */
.stats-cta-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    margin-bottom: 50px;
    gap: 30px;
}

.stats-cta-section p {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.stats-cta-button {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-dark) 100%);
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(144, 23, 29, 0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.stats-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(144, 23, 29, 0.3);
    background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--burgundy) 100%);
}

/* ==========================================================================
   FOOTER REDESIGN STYLES
   ========================================================================= */
.st-footer {
    background: #ffffff;
    border-top: 1px solid rgba(144, 23, 29, 0.08);
}

.footer-partners-section {
    padding: 50px 0;
    border-bottom: 1px solid rgba(144, 23, 29, 0.05);
    text-align: center;
}

.footer-partners-section.alternate-bg {
    background: rgba(144, 23, 29, 0.015);
}

.partner-section-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 35px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

/* Brand Ambassadors Grid */
.ambassador-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.ambassador-card {
    width: 250px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.ambassador-card:hover {
    transform: translateY(-4px);
}

.ambassador-card img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    background: #f8fafc;
    border: 2px solid rgba(144, 23, 29, 0.06);
}

.ambassador-name {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-primary);
    font-size: 1.05rem;
}

/* Influencer Grid */
.influencer-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.influencer-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 15px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.influencer-card:hover {
    transform: translateY(-4px);
}

.influencer-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 12px;
    background: #f8fafc;
    border: 2px solid rgba(144, 23, 29, 0.04);
}

.partner-name {
    font-family: var(--font-heading);
    font-weight: 750;
    color: var(--text-primary);
    font-size: 0.88rem;
    text-align: center;
}

/* Sponsors Grid */
.sponsors-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
}

.sponsor-logo-box {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    height: 75px;
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: var(--card-shadow);
}

.sponsor-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* Sponsorship Invite CTA */
.sponsorship-invite-cta {
    background: rgba(144, 23, 29, 0.02);
    border-top: 1px solid rgba(144, 23, 29, 0.05);
    border-bottom: 1px solid rgba(144, 23, 29, 0.05);
    padding: 25px 0;
    text-align: center;
}

.sponsorship-invite-cta p {
    font-family: var(--font-body);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.sponsor-cta-btn {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 850;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--burgundy);
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.sponsor-cta-btn:hover {
    background: var(--burgundy-dark);
}

/* Bottom Footer Links */
.footer-links-branding {
    background: var(--burgundy);
    color: #ffffff;
    padding: 60px 0;
}

.branding-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
}

.brand-info-block {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-brand-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
}

.footer-brand-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gold);
    border-radius: 1.5px;
}

.brand-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.brand-text a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

.footer-brand-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-brand-list li a {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-brand-list li a:hover {
    color: var(--gold);
}

/* Copyright footer bar */
.footer-copyright-bar {
    background: var(--burgundy-dark);
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    padding: 20px 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   RESPONSIVENESS MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
    .top-performers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .influencer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-page-container {
        padding-top: 100px;
    }

    .stats-hero-card {
        padding: 40px 20px;
        margin-bottom: 30px;
    }

    .mcTabs-wrapper {
        flex-direction: row;
        overflow-x: auto;
        max-width: 100%;
        padding: 4px;
        gap: 2px;
    }

    .tab-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    .stats-cta-section {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }

    .stats-cta-button {
        width: 100%;
        text-align: center;
    }

    .branding-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .influencer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ambassador-grid {
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .top-performers-grid {
        grid-template-columns: 1fr;
    }

    .performer-card {
        height: 390px;
    }

    .player-cutout-container {
        height: 260px;
    }

    .stats-table-wrapper {
        padding: 15px;
    }

    .stats-data-table th, .stats-data-table td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
    
    .table-team-cell {
        gap: 8px;
    }
    
    .table-team-logo {
        width: 28px;
        height: 28px;
    }
    
    .table-team-name {
        font-size: 0.85rem;
    }
}
