@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

#ipl-stats-wrap { 
    max-width: 1200px; 
    margin: 30px auto; 
    font-family: 'Poppins', sans-serif; 
    background: #fff; 
    border-radius: 10px;
}

/* --- NEW MAIN TITLE STYLE --- */
.ipl-main-page-title {
    font-size: 32px;
    font-weight: 800;
    color: #192038;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    padding-left: 15px;
    line-height: 1.2;
    padding-top: 20px;
}

/* --- HERO BANNER --- */
#ipl-hero {
    background: linear-gradient(135deg, #192038 0%, #2a3a7d 100%);
    /*border-radius: 15px; */
    color: #fff; 
    margin-bottom: 30px; 
    overflow: hidden; 
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.hero-container { 
    display: flex; 
    align-items: flex-end; 
    padding: 0 5%; 
    min-height: auto; 
}
.hero-player-side { 
    width: 40%; 
    display: flex; 
    align-items: flex-end; 
}
#h-player-img { 
    max-height: 430px; 
    width: auto; 
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6)); 
    vertical-align: bottom; 
}

.hero-info-side { 
    width: 60%; 
    padding: 40px 0 60px 40px; 
}

.hero-header-wrap { 
    display: flex; 
    align-items: center; 
    gap: 30px; 
    margin-bottom: 40px; 
}

/* Updated selector: removed H1 requirement, works for DIV */
#h-player-name { 
    font-size: 58px; 
    text-transform: uppercase; 
    margin: 0; 
    font-weight: 800; 
    line-height: 1; 
    color: #ffffff !important; 
    letter-spacing: -1px;
    display: block; /* Ensures div behaves like a heading */
}

.h-logo-box { 
    width: 75px; 
    height: 75px; 
    background: #fff; 
    border-radius: 50%; 
    padding: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.3); 
}
#h-team-logo { 
    max-width: 100%; 
    height: auto; 
    object-fit: contain; 
}

.h-stats-grid { 
    display: flex; 
    border: 1px solid rgba(255,255,255,0.2); 
    background: rgba(255,255,255,0.05); 
    border-radius: 10px; 
}
.h-box { 
    flex: 1; 
    padding: 18px 10px; 
    text-align: center; 
    border-right: 1px solid rgba(255,255,255,0.2); 
}
.h-box:last-child { border-right: none; }
.h-box span { 
    display: block; 
    font-size: 32px; 
    font-weight: 700; 
    color: #fff; 
    margin-bottom: 2px; 
    line-height: 1; 
    white-space: nowrap; 
}
.h-box { 
    font-size: 11px; 
    text-transform: uppercase; 
    color: rgba(255,255,255,0.6); 
    font-weight: 600; 
    letter-spacing: 1px; 
}

/* --- FILTERS --- */
.ipl-filters-row { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 15px; 
    padding: 20px 20px; 
    background: transparent; 
    margin-bottom: 30px; 
}

.filter-item { 
    flex: 1; 
    min-width: 200px; 
    position: relative; 
}

.filter-item select, 
.filter-item input, 
.custom-team-select { 
    appearance: none; 
    -webkit-appearance: none; 
    width: 100%; 
    height: 52px; 
    border: 1px solid #dfe3e8; 
    border-radius: 14px; 
    padding: 0 15px; 
    background-color: transparent !important; 
    background-image: none !important;
    cursor: pointer; 
    font-size: 14px; 
    color: #333; 
    outline: none; 
    transition: all 0.3s ease;
    display: flex;       
    align-items: center; 
    line-height: normal; 
}

.custom-team-select span {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%; 
    width: 100%;
}

.filter-item select:focus, 
.filter-item input:focus { 
    border-color: #2a3a7d; 
    background-color: transparent !important;
}

.filter-item:not(.search-wrap)::after { 
    content: ''; 
    position: absolute; 
    right: 18px; 
    top: 50%; 
    transform: translateY(-50%); 
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent; 
    border-right: 5px solid transparent; 
    border-top: 6px solid #888; 
    pointer-events: none; 
}

.filter-item.search-wrap::after { 
    display: none !important; 
}

.team-dropdown-list { 
    display: none; 
    position: absolute; 
    top: 58px; 
    left: 0; 
    width: 100%; 
    background: #fff; 
    z-index: 9999; 
    border: 1px solid #dfe3e8; 
    border-radius: 12px; 
    list-style: none !important; 
    padding: 0 !important; 
    margin: 0 !important; 
    max-height: 350px; 
    overflow-y: auto; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.12); 
}
.team-dropdown-list li { 
    padding: 14px 18px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    border-bottom: 1px solid #f4f7f9; 
    cursor: pointer; 
}
.team-dropdown-list li:hover { background: #f0f4ff; }
.team-dropdown-list li img { width: 28px; height: 28px; object-fit: contain; }

/* --- SYNCED SCROLLBARS --- */
.top-scrollbar-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    height: 10px;
    margin: 0;
    width: 100%;
    background: #f8f9fa;
    border-top: 1px solid #dfe3e8; 
    border-left: 1px solid #dfe3e8;
    border-right: 1px solid #dfe3e8;
    border-radius: 12px 12px 0 0;
}
.top-scrollbar-inner {
    height: 1px;
}

.top-scrollbar-wrapper::-webkit-scrollbar,
.ipl-table-container::-webkit-scrollbar {
    height: 6px;
}
.top-scrollbar-wrapper::-webkit-scrollbar-track,
.ipl-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.top-scrollbar-wrapper::-webkit-scrollbar-thumb,
.ipl-table-container::-webkit-scrollbar-thumb {
    background: #ccc; 
    border-radius: 10px;
}

/* --- TABLE SECTION --- */
.ipl-table-container { 
    background: #fff; 
    border-radius: 0 0 12px 12px; 
    overflow-x: auto; 
    border: 1px solid #dfe3e8; 
    border-top: none; 
    margin-top: 0; 
}
#stats-table { width: 100%; border-collapse: collapse; min-width: 1100px; }
#stats-table th { 
    background: #192038; 
    color: #fff; 
    text-align: center; 
    padding: 20px 10px; 
    font-size: 13px; 
    text-transform: uppercase; 
    font-weight: 600; 
    border: none; 
}
#stats-table th.text-left { text-align: left; padding-left: 30px; }
#stats-table td { 
    padding: 16px 10px; 
    border-bottom: 1px solid #f0f3f7 !important; 
    font-size: 14px; 
    vertical-align: middle; 
    text-align: center; 
    color: #444; 
    border: unset;
}

#stats-table tbody tr:last-child td {
    border-bottom: none !important;
}

.td-player { display: flex; align-items: center; text-align: left !important; gap: 15px; }
.p-thumb { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; background: #f8f9fa; border: 1px solid #eee; }
.p-name { font-weight: 700; color: #111; font-size: 15px; line-height: 1.2; display: block; text-decoration: none !important; }
.p-team-row { 
    font-size: 11px; 
    color: #888; 
    text-transform: uppercase; 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    margin-top: 3px; 
}

.highlight { background-color: #fcfdfe !important; font-weight: 700; color: #192038 !important; }

/* --- LOAD MORE BUTTON --- */
#load-more-container {
    padding: 50px 0;
    text-align: center;
    border-top: 1px solid #f0f3f7; 
    margin-top: -1px; 
}

#load-more-btn {
    display: inline-flex;       
    align-items: center;        
    justify-content: center;    
    background: #192038;
    color: #fff;
    padding: 0 45px;            
    height: 54px;               
    min-width: 180px;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 20px rgba(25, 32, 56, 0.1);
    line-height: 1;             
    outline: none;
}

#load-more-btn:hover {
    background: #2a3a7d;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(25, 32, 56, 0.2);
}

#load-more-btn:active {
    transform: translateY(-1px);
}

/* --- RESPONSIVE FIXES --- */
@media (max-width: 900px) {
    .ipl-main-page-title { font-size: 24px; text-align: center; border-left: none; padding-left: 0; }
    .hero-container { flex-direction: column; text-align: center; padding-top: 30px; }
    .hero-player-side { width: 100%; justify-content: center; }
    #h-player-img { max-height: 350px; }
    .hero-info-side { width: 100%; padding: 20px 5% 40px; }
    .hero-header-wrap { justify-content: center; flex-direction: column; gap: 15px; }
    #h-player-name { font-size: 38px; }
    .h-stats-grid { flex-wrap: wrap; }
    .h-box { flex: 0 0 50%; border-bottom: 1px solid rgba(255,255,255,0.1); border-right: 1px solid rgba(255,255,255,0.1); }
    .h-box:nth-child(even) { border-right: none; }
    .h-box:last-child { flex: 0 0 100%; border-bottom: none; }
    .filter-item { min-width: 100%; }
    #load-more-btn { height: 40px !important; }
}

/*body.site-light textarea { background-color: unset !important; }*/
/*#f-sort, #f-season { background-color: transparent !important; }*/

body.site-light textarea { background-color: unset !important; }
/*#f-sort, #f-season { background-color: transparent !important; }*/
body.site-dark .filter-item select #f-sort{
    background-color: #1e293b !important;
}

body.site-dark .filter-item select #f-season{
    background-color: #1e293b !important;
}


/* =========================================
   LIGHT MODE (body.site-light)
   ========================================= */
body.site-light #ipl-stats-wrap {
    background: #ffffff;
}

body.site-light .ipl-main-page-title {
    color: #192038;
}

body.site-light .filter-item select, 
body.site-light .filter-item input, 
body.site-light .custom-team-select {
    border-color: #dfe3e8;
    color: #333333;
    background-color: #ffffff !important;
}

body.site-light .team-dropdown-list {
    background: #ffffff;
    border-color: #dfe3e8;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

body.site-light .team-dropdown-list li {
    color: #333;
    border-bottom: 1px solid #f4f7f9;
}

body.site-light .team-dropdown-list li:hover {
    background: #f0f4ff;
}

body.site-light .ipl-table-container {
    background: #ffffff;
    border-color: #dfe3e8;
}

body.site-light #stats-table td {
    color: #444444;
    border-bottom-color: #f0f3f7 !important;
}

body.site-light .p-name {
    color: #111111;
}

body.site-light .highlight {
    background-color: #f6f8ff !important;
    color: #192038 !important;
}

body.site-light .top-scrollbar-wrapper {
    background: #f8f9fa;
    border-color: #dfe3e8;
}

/* =========================================
   DARK MODE (body.site-dark)
   ========================================= */
body.site-dark #ipl-stats-wrap {
    background: #0f172a; /* Dark Navy/Black background */
}

body.site-dark .ipl-main-page-title {
    color: #f8fafc;
}

/* Filters in Dark Mode */
body.site-dark .filter-item select, 
body.site-dark .filter-item input, 
body.site-dark .custom-team-select {
    border-color: #334155;
    color: #f1f5f9;
    background-color: #1e293b !important;
}

body.site-dark .filter-item:not(.search-wrap)::after {
    border-top-color: #94a3b8; /* Light gray arrow */
}

body.site-dark .team-dropdown-list {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

body.site-dark .team-dropdown-list li {
    color: #f1f5f9;
    border-bottom: 1px solid #334155;
}

body.site-dark .team-dropdown-list li:hover {
    background: #2d3748;
}

/* Table in Dark Mode */
body.site-dark .ipl-table-container {
    background: #1e293b;
    border-color: #334155;
}

body.site-dark #stats-table th {
    background: #020617; /* Darker header */
    color: #f1f5f9;
}

body.site-dark #stats-table td {
    color: #cbd5e1;
    border-bottom-color: #334155 !important;
}

body.site-dark .p-name {
    color: #ffffff;
}

body.site-dark .p-team-row {
    color: #94a3b8;
}

body.site-dark .highlight {
    background-color: #2d3748 !important;
    color: #38bdf8 !important; /* Light blue highlight text */
}

body.site-dark .top-scrollbar-wrapper {
    background: #0f172a;
    border-color: #334155;
}

/* Load More Button Adjustments */
body.site-dark #load-more-btn {
    background: #38bdf8;
    color: #0f172a;
}

body.site-dark #load-more-btn:hover {
    background: #7dd3fc;
    box-shadow: 0 15px 30px rgba(56, 189, 248, 0.2);
}

/* Custom Scrollbars for Dark Mode */
body.site-dark .top-scrollbar-wrapper::-webkit-scrollbar-track,
body.site-dark .ipl-table-container::-webkit-scrollbar-track {
    background: #1e293b;
}

body.site-dark .top-scrollbar-wrapper::-webkit-scrollbar-thumb,
body.site-dark .ipl-table-container::-webkit-scrollbar-thumb {
    background: #475569;
}

.ipl-breadcrumb {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 20px;
    padding-inline-start: 10px;
}

.ipl-breadcrumb a {
    color: #007bff;
    text-decoration: none;
    text-transform: capitalize;
}

.ipl-breadcrumb a:hover {
    text-decoration: underline;
}

.ipl-breadcrumb span.separator {
    color: #ccc;
}

.ipl-breadcrumb span.current-page {
    color: #333;
    font-weight: 600;
}

body.site-dark .ipl-breadcrumb span.current-page{
color:#fff;
}