@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
:root {
    --color-global: #512da8;
    --color-primary: #0077ff;
    --color-danger: #ff0060;
    --color-success: #09b442;
    --color-warning: #ffa500;
    --color-white: #ffffff;
    --color-info-dark: #7d8da1;
    /* --color-dark: #363949; */
    --color-dark: #000000;
    --color-light: rgba(132, 139, 200, 0.18);
    --color-dark-variant: #677483;
    --color-background: #edf1f6;
    --color-muted: #a4a4a4;
    --color-nav-bottom: #fff;

    --card-border-radius: 1.2rem;
    --border-radius-1: 0.4rem;
    --border-radius-2: 1.2rem;

    --card-padding: 1.8rem;
    --padding-1: 1.2rem;
    --padding-2: 2.2rem;
    --padding-3: 3.2rem;
    --padding-btn: 0.6rem;
    --padding-header: 0.1rem;

    --box-shadow: 0 2rem 3rem var(--color-light);

    /* --header-color: #ff9900; */
    /* --header-color: #374df5; */
    /* --header-color: #f1610c; */
    --header-color: #512da8;

    --gap-xs: 1.3rem;
    --gap-lg: 16px;
    --radii-xs: 4px;

    --font-sizes-xs: 0.9rem;
    --font-sizes-sm: 1.1rem;
    --font-size-md: 2rem;
    --font-size-lg: 3rem;

    --color-pitch-black: #000000;

    --color-bg-card: #ffffff;

    --color-items-hover: #e6e6e6;

    --color-bg-nav-items: #fffff;
    --color-nav-items: #596df7;
    --color-border-nav-items: #dee2e6;

    --bg-color-filter-btn-live: #fbe9e8;
    --color-filter-btn-live: #ff0000;
    --bg-color-filter-btn: #f1f4f7;

    --color-bg-light-gray: #e3e3e3;

    --logo-bg: transparent;

    --color-bg-card-gray: #f1f4f7;

    --color-bg-auth-page: #c6d9ff;
    --color-bg-gradient-1: #e2e2e2;
    --color-bg-gradient-2: #c6d9ff;

    --color-pitch-white: #ffffff;

    --transparent: transparent;
    --border-custom-btn: #212121;

    --border-gray: #e1e1e1;

    --color-bg-lightblue: #bde0ff;

    --skeleton-base: #e5e7eb;
    --skeleton-highlight: #f3f4f6;
    --skeleton-edge: #e5e7eb;

    --accent: #22b9ff;

    --color-hover: #e0e0e0;

    --color-conditional-white: #ffffff;

    --color-bg-card-header: #512da8;
}

.dark-mode {
    --color-background: #000000;
    --color-dark: #ffffff;
    --color-dark-variant: #a3bdcc;
    --color-light: rgba(0, 0, 0, 0.4);
    --box-shadow: 0 2rem 3rem var(--color-light);
    --header-color: #121517;
    --color-bg-card: #171c1f;
    --color-items-hover: #242323;
    --color-muted: rgba(255, 255, 255, 0.5);
    --color-nav-bottom: #191919;

    --color-bg-nav-items: transparent;

    --bg-color-filter-btn-live: #422326;
    --bg-color-filter-btn: #000000;

    --logo-bg: #ffffff;

    --color-bg-light-gray: #000000;

    --color-bg-card-gray: #0c0e0f;

    --color-bg-auth-page: #000000;
    --color-bg-gradient-1: #0c0e0f;
    --color-bg-gradient-2: #1d2224;

    --color-pitch-white: #000000;

    --transparent: #ffffff;
    --border-custom-btn: #ffffff;
    --border-gray: #414040;

    --color-bg-lightblue: #2c2e31;

    --skeleton-base: #374151;
    --skeleton-highlight: #4b5563;
    --skeleton-edge: #374151;

    --color-hover: #2c2c2c;
    --color-conditional-white: #000000;

    --color-bg-card-header: #0c0e0f;
}

* {
    margin: 0;
    padding: 0;
    outline: 0;
    appearance: 0;
    border: 0;
    text-decoration: none;
    box-sizing: border-box;
    /* outline: 1px solid red; */
}
html {
    font-size: 14px;
}
body {
    width: 100%;
    height: 100%;
    font-family: "Poppins", sans-serif;
    font-size: 0.88rem;
    user-select: none;
    overflow-x: hidden;
    color: var(--color-dark);
    background-color: var(--color-background);
}
html,
body {
    height: 100%;
    min-height: 100%;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
::-webkit-scrollbar {
    width: 5px;
    border-radius: 10px;
    transition: all 0.3s ease;
}
::-webkit-scrollbar-thumb {
    background: #a4a9b3;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #51565f;
}
main {
    flex: 1;
}
a {
    color: var(--color-dark);
}
img {
    display: block;
    width: 100%;
    object-fit: cover;
}
h1 {
    font-weight: 800;
    font-size: 2rem;
}
h2 {
    font-weight: 600;
    font-size: 1.4rem;
}
h3 {
    font-weight: 500;
    font-size: 0.87rem;
}
small {
    font-size: 0.88rem;
}
p {
    color: var(--color-dark-variant);
}
b {
    color: var(--color-dark);
}
hr {
    color: var(--color-muted);
    width: 100%;
}
span {
    font-size: 1.2rem;
}

.primary {
    color: var(--color-primary);
}
.danger {
    color: red;
}
.success {
    color: var(--color-success);
}
.warning {
    color: var(--color-warning);
}
.text-muted {
    color: var(--color-muted) !important;
}
.none-important {
    display: none !important;
}
.striped-table-row {
    background-color: var(--color-items-hover);
}
.form-select:focus {
    box-shadow: none !important;
    outline: none !important;
    border-color: #ced4da !important;
}
.custom-input {
    width: 100%;
    margin: 8px 0px;
    background: transparent;
    height: 35px;
    border: 1px solid #d8d8d8;
    padding: 10px;
    border-radius: 5px;
    color: var(--color-dark);
}


.custom-input:focus {
    border: 1px solid var(--color-global);
}
/* =============== HEADER STYLES START HERE ====================*/
header {
    width: 100%;
}
.header-container {
    width: 100%;
    background-color: var(--header-color);
    padding: var(--padding-header);
}
.header-container header {
    padding: 1rem;
}
.header-container .logo {
    width: 3rem;
    height: 3rem;
}
.parent-header {
    /* display: grid;
    grid-template-columns: repeat(3, auto); */
    display: flex;
    justify-content: space-between;
    align-content: center;
    gap: 2rem;
}

.header-left,
.header-center,
.header-right {
    flex-shrink: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-center {
    flex-basis: 50%;
}

.header-left {
    justify-content: flex-start;
    gap: 10px;
}
.header-left h1 {
    color: var(--color-white);
    margin-top: 0.4rem;
}

.header-center {
    padding: 3px;
    border-radius: 60px;
    background-color: var(--color-white);
    /* min-width: 350px; */
    max-height: 45px;
    margin-top: 5px;
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    align-items: center;
    gap: 10px;
}

.header-center svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin: 0 5px;
}
.header-center #search_leagues_input {
    flex-grow: 1;
    border: none;
    outline: none;
    width: 100%;
    background: transparent;
    padding: 5px;
}

/* Style for the search results container */
.header-center .search-results {
    position: absolute;
    width: 100%;
    background-color: var(--color-bg-card-gray);
    z-index: 9999999;
    top: 115%;
    left: 0px;
    border-radius: 12px;
    height: 70vh;
    display: none;
    transition: all 0.2s ease-in-out;
}

.header-center .search-results.show {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
}
.header-center .search-results::-webkit-scrollbar-thumb {
    display: none;
}

/* Blur overlay for the background */
.blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.2); /* soft dark layer */
    z-index: 9998; /* Below the search results */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Activate the blur effect */
.blur-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Ensure the header center stays above the blur effect */
.header-center {
    position: relative;
    z-index: 99999; /* Above blur */
}

.result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    border-bottom: 1px solid #eaeaea;
    transition: background-color 0.3s ease;
    cursor: pointer;
    border-radius: 12px;
    color: var(--color-dark);
}

.result-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.result-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%; /* circular images */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    background-color: #ffffff;
}

.result-info {
    display: flex;
    flex-direction: column;
}

.result-title {
    font-size: 1rem; /* 16px */
    font-weight: 600;
    color: var(--color-dark);
    margin: 0;
}

.result-label {
    font-size: 0.8rem; /* 13px */
    color: #777;
    background-color: var(--color-bg-light-gray);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 4px;
    width: 55px;
}

/* League-specific styles */
.result-item.league .result-label {
    background-color: #d1e8ff;
    color: #005bb5;
}

/* Player-specific styles */
.result-item.player .result-label {
    background-color: #ffe0e0;
    color: #b50000;
}
.no-result {
    font-size: 1rem;
    height: 100%;
    width: 100%;
}
.no-result .no-result-icon {
    font-size: 1rem;
    color: var(--color-dark);
    margin: 0px 5px;
}
.no-result .no-result-icon.err {
    color: red;
}

.header-right {
    justify-content: flex-end;
    gap: var(--gap-xs);
}

#signin_btn,
#logout-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    letter-spacing: 0.07px;
    text-transform: uppercase;
    font-size: var(--font-sizes-sm);
    font-weight: 700;
    line-height: 1.14;
    padding-inline: var(--gap-lg);
    gap: 0.2rem;
    border-radius: var(--radii-xs);
    background-color: var(--color-white);
    transition: all 0.3s ease;
}
#logout-btn {
    text-transform: lowercase;
}
#signin_btn:hover,
#logout-btn:hover {
    transition: all 0.3s ease;
    background-color: var(--color-pitch-black);
    color: var(--color-white);
}
.header-icon,
.footer-icon {
    font-size: 1.6rem;
    color: var(--color-white);
}
.header-icon.filled {
    color: red;
}
.header-icon-span {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30px;
    width: 30px;
    border-radius: 50%;
    padding: var(--padding-1);
}
.header-icon-span:hover {
    transition: all 0.3s ease;
    background-color: #d7d7d730;
}
span.username_header {
    font-size: 1rem;
}
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}
.avatar-comment {
    width: 44px;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}
.header-right .user-detail {
    position: relative;
}
.header-right .user-detail .avatar-dropdown {
    position: absolute;
    background-color: var(--color-bg-card-gray);
    color: var(--color-dark);
    min-width: 240px;
    height: auto;
    padding: 8px 10px;
    top: 100%;
    right: 10px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(34, 34, 38, 0.16);
    opacity: 0;
    display: none;
    transition: opacity 0.2 s ease-in-out;
}
.header-right .user-detail .avatar-dropdown.open {
    opacity: 1;
    display: block;
}
.avatar-dropdown span {
    color: var(--color-dark);
    font-size: 1.1rem;
}
.avatar-dropdown span.material-icons-sharp {
    font-size: 1.3rem;
}
.avatar-dropdown a {
    text-decoration: none;
}
.avatar-dropdown div {
    border-radius: 8px;
}
.avatar-dropdown div:hover {
    background-color: var(--color-hover);
}
#theme_toggle_icon {
    font-size: 1.8rem;
}
#signin-placeholder-icon {
    color: #ffffff;
    display: none;
}
/* =============== HEADER STYLES END HERE ====================*/

/* =============== FOOTER STYLES START HERE ====================*/
footer {
    margin: 0;
    background-color: var(--header-color);
}
footer .footer_wrapper {
    padding: var(--padding-1) var(--padding-2);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: space-between;
    align-content: center;
    gap: 10px;
}
.footer_logo {
    width: 150px;
    height: 50px;
}
.footer_left,
.footer_links_nav,
.social_icons_footer {
    display: flex;
    align-items: center;
    gap: 20px;
}
.footer_left {
    justify-content: flex-start;
}
.footer_links_nav {
    justify-content: center;
}
.social_icons_footer {
    justify-content: flex-end;
}
.footer_links_nav,
.social_icons_footer {
    height: 100%;
}
.footer_links_nav a {
    color: var(--color-white);
    font-size: var(--font-sizes-sm);
}
.footer-icon {
    transition: color 0.3s ease-in-out;
    cursor: pointer;
}
/* Bottom Navbar Styling */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--color-nav-bottom);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 0px;
    z-index: 10000;
    transition: transform 0.3s ease-in-out;
}
.bottom-nav.hidden {
    transform: translateY(100%) !important;
}
.bottom-nav a {
    text-decoration: none;
    color: var(--color-dark);
    font-size: 14px;
    text-align: center;
    flex-grow: 1;
}
.bottom-nav a i {
    display: block;
    font-size: 20px;
    margin-bottom: 2px;
}
.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.bottom-hr {
    width: 50%;
    height: 2px;
    background-color: #374df5;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.nav-item.active .bottom-hr {
    opacity: 1;
}
.nav-item.active {
    color: #374df5;
}

/* =============== FOOTER STYLES END HERE ====================*/

/* =============== GLOBAL CUSTOM ELEMENTS STYLESHERE ====================*/

.danger span.err-txt {
    font-size: 1rem;
}
.danger span.err-icon {
    font-size: 1.4rem;
}
.err-feedback {
    color: red;
}
.card {
    background-color: var(--color-bg-card);
    border-radius: var(--card-border-radius);
    box-shadow: var(--box-shadow);
    border: none;
}
.no-margin {
    margin: 0;
}
.custom-btn {
    background-color: transparent;
    color: var(--color-dark);
    font-size: 12px;
    border: 1px solid var(--border-custom-btn);
    border-radius: 60px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.custom-btn:hover {
    background-color: var(--color-global);
    color: #fff;
}
.bg-primary {
    background-color: var(--color-global) !important;
}
.bg-success {
    background-color: #00a357 !important;
}
.logo-cont {
    background-color: var(--logo-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 50%;
}
.logo-cont .logo {
    width: 70px;
    height: 70px;
}
.league-logo {
    height: 30px;
    width: 30px;
}
.league-logo-cont {
    height: 29px;
    width: 29px;
}
.team-logo-cont {
    height: 68px;
    width: 68px;
}

input.switch {
    height: 0;
    width: 0;
    visibility: hidden;
}

label.switch-label {
    cursor: pointer;
    text-indent: -9999px;
    width: 50px; /* Adjusted width */
    height: 25px; /* Adjusted height */
    background: grey;
    display: block;
    border-radius: 25px; /* Adjusted for smooth edges */
    position: relative;
    cursor: pointer;
}

label.switch-label:after {
    content: "";
    position: absolute;
    top: 2px; /* Adjusted position */
    left: 2px;
    width: 21px; /* Adjusted knob size */
    height: 21px; /* Adjusted knob size */
    background: var(--color-white);
    border-radius: 50%;
    transition: 0.3s;
}

input.switch:checked + label.switch-label {
    background: var(--color-global);
}

input.switch:checked + label.switch-label:after {
    left: calc(100% - 2px);
    transform: translateX(-100%);
}

label.switch-label:active:after {
    width: 26px; /* Slightly increased on click */
}

.loader {
    width: 60px;
    aspect-ratio: 2;
    --_g: no-repeat radial-gradient(circle closest-side, #512da8 90%, #0000);
    background: var(--_g) 0% 50%, var(--_g) 50% 50%, var(--_g) 100% 50%;
    background-size: calc(100% / 3) 50%;
    animation: l3 1s infinite linear;
}
.loader.small-loader {
    width: 35px;
}

@keyframes l3 {
    20% {
        background-position: 0% 0%, 50% 50%, 100% 50%;
    }
    40% {
        background-position: 0% 100%, 50% 0%, 100% 50%;
    }
    60% {
        background-position: 0% 50%, 50% 100%, 100% 0%;
    }
    80% {
        background-position: 0% 50%, 50% 50%, 100% 100%;
    }
}

.back-icon {
    padding: 0.5rem;
}
.back-icon:hover {
    background-color: var(--color-nav-bottom);
    border-radius: 50%;
}

.skeleton-table {
    width: 100%;
    border-collapse: collapse;
}

.skeleton-table th,
.skeleton-table td {
    padding: 16px;
    border: 1px solid var(--skeleton-base);
}

.skeleton-loader {
    display: inline-block;
    height: 16px;
    width: 100%;
    background: linear-gradient(
        90deg,
        var(--skeleton-base) 25%,
        var(--skeleton-highlight) 50%,
        var(--skeleton-edge) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.modal-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 1100px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    max-height: 90vh;
}
.modal-container::-webkit-scrollbar-thumb {
    display: none;
}
.close-modal-icon,
#minimize-filters-icon {
    background-color: #ababab;
    border-radius: 50%;
    padding: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}
.close-modal-icon:hover,
#minimize-filters-icon:hover {
    background-color: var(--color-global);
    color: white;
}

.skeleton-fixture {
    position: relative;
    overflow: hidden;
    background-color: var(--skeleton-base);
}
.skeleton-fixture::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150px;
    width: 150px;
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--skeleton-base) 25%,
        var(--skeleton-highlight) 50%,
        var(--skeleton-edge) 75%
    );
    animation: shimmer-fixture 1.2s infinite;
}
@keyframes shimmer-fixture {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(300px);
    }
}
.skeleton-circle {
    border-radius: 50%;
}
.skeleton-text {
    border-radius: 4px;
    height: 14px;
}
.skeleton-logo {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}
.skeleton-score {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}
.skeleton-bar {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    margin-top: 6px;
}
.skeleton-container {
    margin-bottom: 24px;
}

.search_bar {
    width: 100%;
    border: 1px solid var(--border-gray);
    border-radius: 60px;
    outline: none;
    padding: 8px;
    margin-top: 10px;
    background-color: transparent;
    transition: all 0.2s ease-in-out;
    color: var(--color-dark);
}
.search_bar:focus {
    border: 1px solid var(--color-global);
}

/* ===============  Utilties ============== */
.pill-tag {
    background-color: var(--color-global);
    color: var(--color-white);
    padding: 6px 12px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    margin: 5px;
}

/* =============== MEDIA QUERIES FOR LAYOUT ============== */

@media (min-width: 993px) {
    .bottom-nav {
        display: none;
    }
}
@media only screen and (max-width: 992px) {
    .header-center {
        display: none;
    }
    /* .parent-header {
        grid-template-columns: repeat(2, auto);
        justify-content: space-between;
    } */
    footer .footer_wrapper {
        grid-template-columns: 1fr;
        align-content: space-between;
        gap: 20px;
    }
    .footer_left,
    .footer_links_nav,
    .social_icons_footer {
        justify-content: flex-start;
    }
    .header-fav-icon-span {
        display: none;
    }
}

@media only screen and (max-width: 576px) {
    .nav-item span.nav-text {
        font-size: 1rem;
    }
    footer {
        padding: 5px 20px;
    }
    .header-left h1 {
        font-size: 1.7rem;
    }
    .header-left .logo {
        width: 2rem;
        height: 2rem;
    }
    #signin_btn {
        max-width: 100px;
        min-height: 34px;
    }
    #signin_btn span {
        font-size: 0.9rem;
    }
    #signin_btn span.material-icons-sharp {
        font-size: 1.1rem;
    }
}
@media only screen and (max-width: 476px) {
    #signin-placeholder-icon {
        display: inline-block;
    }
    #signin_btn {
        display: none;
    }
}

@media only screen and (max-width: 400px) {
    .header-left h1 {
        font-size: 1.4rem;
    }
}
