/* Import Google Fonts for 'Inter', 'Teko', 'Roboto', and 'Orbitron' (for digital clock) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Teko:wght@400;600;700&family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap'); /* Digital font */

/* Base body styles for font, text color, and background */
body {
    font-family: 'Inter', sans-serif;
    color: #F0F0F0; /* Light Text */
    background-color: #2B2E4A !important; /* Matte Black background */
}
/* Specific font styles for headings using 'Teko' */
h1, h2, h3, .teko-font {
    font-family: 'Teko', sans-serif;
    letter-spacing: 0.05em;
}
/* Custom color definitions for consistency */
.text-primary-dark { color: #A07EDD; } /* Pastel purple */
.bg-primary-dark { background-color: #A07EDD; } /* Pastel purple */
.text-accent-orange { color: #fe5451; } /* Burnt Orange */
.bg-accent-orange { background-color: #fe5451; } /* Burnt Orange */
.text-basketball-purple { color: #A07EDD; } /* Light Purple from logo */
.bg-basketball-purple { background-color: #A07EDD; }
.border-primary-dark { border-color: #A07EDD; } /* Pastel purple */
.border-accent-orange { border-color: #fe5451; } /* Burnt Orange */

/* Custom scrollbar for better aesthetics on dark background */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #252525; /* Darker track */
}
::-webkit-scrollbar-thumb {
    background: #fe5451; /* Burnt orange */
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #A34300; /* Darker burnt orange for hover */
}

/* Custom style for text outline to improve readability on busy backgrounds */
.text-outline-black {
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

/* Custom style for white text outline */
.text-outline-white {
    text-shadow:
        -1px -1px 0 #FFF,
        1px -1px 0 #FFF,
        -1px 1px 0 #FFF,
        1px 1px 0 #FFF;
}

/* Rules Page Specific Styles for cards and flow elements */
.card {
    background-color: #252525; /* Darker Matte Black for cards */
    border-left: 4px solid #B19CD9; /* Pastel Purple accent */
}
.flow-step {
    background-color: #252525; /* Darker Matte Black for flow steps */
    border: 2px solid #A2D9B3; /* Green border */
    color: #F0F0F0; /* Light Text */
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    flex-grow: 1;
}
.flow-connector {
    flex-grow: 1;
    background-color: #A2D9B3; /* Green connector */
    height: 4px;
    width: 100%;
    position: relative;
}
.flow-connector::after {
    content: '►';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    color: #A2D9B3; /* Green arrow */
    font-size: 1.5rem;
}
.flow-connector-vertical {
    width: 4px;
    background-color: #A2D9B3; /* Green connector */
    position: relative;
    margin: 0 auto;
}
.flow-connector-vertical::after {
    content: '▼';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    color: #A2D9B3; /* Green arrow */
    font-size: 1.5rem;
}
/* Modal styles for pop-ups */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 100; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    align-items: center; /* Center vertically */
    justify-content: center;
}
.modal-content {
    background-color: #252525;
    margin: auto;
    padding: 30px;
    border: 2px solid #fe5451;
    width: 80%;
    max-width: 500px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
}
.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer; /* Add cursor pointer for better UX */
}
.close-button:hover,
.close-button:focus {
    color: #fe5451;
    text-decoration: none;
    cursor: pointer;
}

/* Player Card Specific Styles */
.player-card-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #FFFFFF; /* White background for player cards */
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.3s ease;
    color: #1A1A1A; /* Black text for player card headers */
}
.player-card-header:hover {
    background-color: #F0F0F0; /* Slightly darker white on hover */
}
.player-card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background-color: #FFFFFF; /* White background for player card content */
    border-radius: 0.5rem;
    padding: 0 1rem;
    color: #1A1A1A; /* Black text for player card content */
}
.player-card-content.open {
    max-height: 1000px; /* Increased from 200px to allow more content */
    padding: 1rem;
}
.player-card-content-inner {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.player-card-header .player-info h3,
.player-card-header .player-info p,
.player-card-header .player-stats p {
    color: #1A1A1A; /* Ensure text within player card header is black */
}
.player-card-content-inner p {
    color: #1A1A1A; /* Ensure text within player card content is black */
}


/* Grid View Specific Styles */
.player-grid-view {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.player-grid-item .player-card-header {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
}
.player-grid-item .player-card-header img {
    margin-bottom: 0.75rem;
}
.player-grid-item .player-card-header .player-info {
    text-align: center;
    width: 100%;
}
.player-grid-item .player-card-header .player-stats {
    margin-top: 0.5rem;
}
.player-grid-item .player-card-header .toggle-icon {
    position: absolute;
    top: 10px;
    right: 10px;
}
.player-grid-item .player-card-content {
    padding: 0; /* Content will be inside the card, not a separate dropdown */
    max-height: none;
    overflow: visible;
    transition: none;
}
.player-grid-item .player-card-content.open {
    max-height: none;
    padding: 0;
}
.player-grid-item .player-card-content-inner {
    padding: 1rem;
    border-top: 1px solid #E5E5E5; /* Light border for separation in grid view */
}

/* Custom style for score input fields */
.score-input-field {
    width: 8rem; /* Slimmer width */
    height: 8rem; /* Vertically longer */
    font-family: 'Teko', sans-serif; /* Same font as section subtitle */
    font-size: 6rem; /* Increased font size for visibility */
}

/* Digital clock font */
.digital-font {
    font-family: 'Orbitron', sans-serif;
}

/* Custom checkbox styling */
input[type="checkbox"] {
    /* For modern browsers */
    accent-color: #fe5451;
    width: 1.25rem; /* Tailwind h-5 */
    height: 1.25rem; /* Tailwind w-5 */
    border: 2px solid #fe5451; /* Thicker border with accent color */
}

/* Starting player highlight */
.starting-player-highlight {
    box-shadow: 0 0 0 4px #4A4A4A; /* Dark gray border shadow */
    border-color: #4A4A4A;
}

/* Player search results styling */
.player-search-results {
    position: absolute;
    top: calc(100% + 5px); /* Position below the input with a small gap */
    left: 0;
    right: 0;
    max-height: 150px; /* Limit height for scroll */
    overflow-y: auto;
    background-color: #FFFFFF;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 20; /* Ensure it's above other elements */
    color: #1A1A1A; /* Black text for results */
    border: 1px solid #E5E5E5;
}

.player-search-results div {
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.player-search-results div:hover {
    background-color: #F0F0F0;
}

/* Country dropdown specific styles */
.country-dropdown-results {
    position: absolute;
    top: calc(100% + 5px); /* Position below the input with a small gap */
    left: 0;
    right: 0;
    max-height: 200px; /* Limit height for scroll */
    overflow-y: auto;
    background-color: #FFFFFF;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 20; /* Ensure it's above other elements */
    color: #1A1A1A; /* Black text for results */
    border: 1px solid #E5E5E5;
}
.country-dropdown-results div {
    padding: 0.5rem 1rem;
    cursor: pointer;
}
.country-dropdown-results div:hover {
    background-color: #F0F0F0;
}

/* Partners Slider Styles */
.slider-container {
    overflow: hidden;
    width: 100%;
    white-space: nowrap; /* Keep images in a single line */
}

.slider-track {
    display: inline-flex; /* Use inline-flex to keep items in a row */
    animation: slide 30s linear infinite; /* Adjust duration as needed */
}

.slider-track:hover {
    animation-play-state: paused; /* Pause on hover */
}

.slider-track img {
    height: 80px; /* Adjust height as needed */
    margin: 0 20px; /* Spacing between logos */
    filter: grayscale(100%); /* Greyed out effect */
    opacity: 0.7;
    transition: opacity 0.3s ease;
    flex-shrink: 0; /* Prevent images from shrinking */
}

.slider-track img:hover {
    opacity: 1;
    filter: grayscale(0%); /* Full color on hover */
}

@keyframes slide {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%); /* Slide to show the duplicate set */
    }
}