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

body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #080a54;
    color: #ffffff;
    overflow-x: hidden; /* Hide horizontal overflow */
}

/* Reset default margin and padding */
body, h1, p {
    margin: 0;
    padding: 0;
}

/* Wrapper to contain both the main content and the footer */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main content container */
#container {
    flex: 1; /* This makes sure the container takes up all available space */
    padding: 20px;
    text-align: center;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3C/path fill="%23424242" fill-opacity="1" d="M0,224L1440,32L1440,320L0,320Z"%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-left: 250px; 
    margin-right: 250px; 
    overflow-y: auto; /* Enable vertical scrolling */
}

/* Footer styles */
footer {
    background-color: #080a54; /* Adjust as needed */
    color: #fff; /* Adjust as needed */
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    width: 100%; /* Ensure it spans the full width */
    flex-shrink: 0; /* Ensure the footer doesn't shrink */
    position: sticky;
    bottom: 0;
}

/* Style for the content within the footer */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

#footer p {
    margin: 0;
    font-size: 0.8em;
}

.hero-section {
    background-color: #080a54; /* Dark background color */
    color: #ffffff; /* White text color */
    height: calc(30vh + 20px); /* Full viewport height plus 20px to cover any gaps */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1rem; /* Adjust the font size as needed */
    overflow: hidden; /* Ensure no overflow */
    position: relative; /* Ensure relative positioning */
    /* margin-left: 250px;  
    margin-right: 250px;   */
    top: -20px; /* Offset to cover any gap at the top */
}


.hero-content {
    position: relative; /* Ensure relative positioning */
    z-index: 1; /* Ensure content is above any background */
    width: 100%; /* Ensure content spans full width */
    padding: 20px; /* Optional: Add padding as needed */
}

.user-section {
    position: absolute;
    top: 20px; /* Adjust as needed */
    right: 20px; /* Adjust as needed */
    z-index: 100; /* Ensure it's above other content */
}


#usernameDisplay {
    color: #ffffff;
    font-weight: bold;
    margin-right: 5px;
}

#myAccountButton {
    background-color: #080a54;
    border: 1px solid #ffffff;
    color: #ffffff;
    padding: 10px 20px;
    text-align: right;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#myAccountButton:hover {
    background-color: #ffffff;
    color: #080a54;
}


.hero-background {
    position: absolute; /* Absolute positioning to cover the entire hero section */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Ensure background is behind content */
    object-fit: cover; /* Ensure background image covers entire area */
}

.hero-title {
    font-family: 'Arial', sans-serif; /* Change font family */
    font-size: 4rem; /* Change font size */
    color: #ffffff; /* Change font color */
    margin-bottom: 10px; /* Optional: Adjust margin as needed */
}

.hero-subtitle {
    font-size: 1.5rem; /* Smaller font size for subtitle */
    /* font-style: italic; Italicize the subtitle */
}

#layout {
    display: flex;
    justify-content: space-between; /* Distribute columns */
    max-width: 100%; /* Maximum width for the layout */
    width: 100%; /* Ensure full width */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative; /* Added */
}

#sidebar, #sidebar-right {
    width: 250px;
    padding: 20px; /* Existing padding */
    padding-bottom: 100px; /* Add padding to the bottom */
    background-color: #080a54;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: fixed;
    top: 0;
    bottom: 0;
    overflow-y: auto;
}

#sidebar {
    left: 0; /* Fixed to the left edge */
}

#sidebar-right {
    right: 0; /* Fixed to the right edge */
}

.stat-control,
.field-condition-control {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-control button,
.field-condition-control button {
    background-color: #454444;
    border: 1px solid #000000;
    color: #ffffff;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 5px;
    width: 100%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.stat-control button.active,
.field-condition-control button.active {
    background-color: #000125;
    border: 1px solid #ffffff;
    /* background-color: #246498; */
    color: #ffffff;
}

/* Styling for sliders */
.stat-control input[type="range"],
.field-condition-control input[type="range"] {
    width: 100%;
    margin: 5px 0;
    display: none; /* Initially hide the sliders */
    -webkit-appearance: none; /* Remove default appearance */
    appearance: none;
}

/* Custom track and thumb styles for sliders */
.stat-control input[type="range"]::-webkit-slider-runnable-track,
.field-condition-control input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px; /* Height of the track */
    background-color: #272727; /* Track color */
    border-radius: 5px; /* Rounded corners */
}

.stat-control input[type="range"]::-webkit-slider-thumb,
.field-condition-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; /* Remove default appearance */
    appearance: none;
    width: 16px; /* Width of the thumb */
    height: 16px; /* Height of the thumb */
    background-color: #ffffff; /* Thumb color */
    border-radius: 50%; /* Rounded shape */
    cursor: pointer; /* Cursor style */
    border: 1px solid #272727; /* Border color */
}

.stat-control input[type="range"]:focus,
.field-condition-control input[type="range"]:focus {
    outline: none; /* Remove focus outline */
}

/* Active state for sliders */
.stat-control input[type="range"].active,
.field-condition-control input[type="range"].active {
    display: block; /* Show the slider when active */
}

.stat-control span,
.field-condition-control span {
    color: white;
    margin: 5px 0;
    display: none; /* Initially hide the readouts */
}

.stat-control span.active,
.field-condition-control span.active {
    display: block; /* Show the readout when active */
}

h1 {
    font-size: 30px;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 18px;
    margin-bottom: 40px;
}

.date-wrapper {
    margin-top: 20px;
    margin-bottom: 20px;
}

.date-wrapper label {
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
    color: #ffffff;
}

.date-wrapper input[type="text"] {
    padding: 15px;
    font-size: 18px;
    border: 2px solid #000125;
    border-radius: 15px;
    background-color: #013369;
    color: #ffffff;
    cursor: pointer;
    width: 30%;
    box-sizing: border-box;
}

.teamContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}



.player-container {
    display: flex;
    flex-wrap: wrap; /* Allow cards to wrap to the next row */
    justify-content: space-between; /* Adjust as needed for spacing between cards */
}

#gameList {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 10px;
    background-color: #080a54; /* Very dark grey background */
}

.gameItem {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #454444; /* Grey background */
    color: white; /* Text color */
    width: 300px; /* Adjust as needed */
    cursor: pointer; /* Add cursor pointer for better UX */
    transition: background-color 0.1s ease; /* Smooth transition for color change */
}

.gameItem.active {
    background-color: #000125; /* Blue background for active state */
    border-color: #ffffff; /* White border for active state */
}


.teamLogo {
    width: 40px; /* Adjust logo size */
    height: 40px; /* Maintain aspect ratio */
    border-radius: 50%; /* Circular shape */
    margin-right: 10px; /* Space between logo and text */
    align-self: flex-start; /* Align logo to the top within its container */
}



.teamLogoPlayerCard {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 10px;
}

.frailtyScore {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px;
    border-radius: 3px;
    font-size: 1em;
}


.playerCard {
    position: relative;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin: 5px;
    width: 250px;
    height: calc(250px * 1.4);
    overflow: hidden;
    background-color: #01022b;
    color: rgb(255, 255, 255);
    box-shadow: 0 8px 8px rgba(0, 0, 0, 0.1);
    perspective: 1000px;
}

.frontSide, .backSide {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.backSide {
    transform: rotateY(180deg);
}

.teamLogoPlayerCard {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}

.frailtyScore {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #02056300;
    padding: 5px;
    border-radius: 3px;
    font-size: 1em;
    z-index: 1;
}

.playerName {
    font-size: 1.2em;
    margin: 70px 0 10px; /* Increased top margin to accommodate logo */
    text-align: center;
    width: 100%;
}

.playerStats {
    max-height: calc(100% - 70px); /* Adjusted to account for logo and name */
    overflow-y: auto;
    padding: 5px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    color: rgb(231, 228, 228);
}


.playerStats p {
    margin: 5px 0;
    font-size: 0.9em;
    text-align: left;
    color: rgb(149, 146, 146);
}

.flipCardInner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.4s;
    transform-style: preserve-3d;
}

.playerCard.flip .flipCardInner {
    transform: rotateY(180deg);
}

.frontSide, .backSide {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.playerImg {
    width: 100%; /* Adjusted to fill the container */
    height: auto;
    border-radius: 10px; /* Rounded corners */
    display: block;
    margin: 0 auto; /* Center the image */
}

.playerNameFront {
    font-size: 1.2em;
    margin: 10px 0;
    text-align: center;
    width: 100%;
}

.playerPosition {
    margin: 5px 0;
    text-align: center; /* Align player position center */
    color: #ccc; /* Adjust color as needed */
}


.playerDetails {
    padding: 20px;
    flex-grow: 1; /* Ensure player details fill remaining space */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}



.teamName {
    display: flex;
    align-items: center;
    margin: 5px 0;
}



.high-frailty {
    color: red; /* Color for high frailty score */
}

.low-frailty {
    color: rgb(0, 194, 0); /* Color for low frailty score */
}

.medium-frailty {
    color: yellow; /* Color for medium frailty score */
}

/* #080a54 dark blue */

/* Styles for the popup container */
.popup-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #080a54; /* Semi-transparent background */
    color: #ffffff;
    z-index: 1000; /* Ensure the popup is on top of other content */
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8); /* Optional: Add box shadow for depth */
    text-align: center;
}

/* Styles for the popup content */
.popup-content {
    max-width: 400px; /* Adjust maximum width as needed */
    margin: 0 auto; /* Center horizontally */
    text-align: left; /* Align text to the left */
}

/* Styles for the close button */
.popup-content .close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 1.5em;
}

/* Styles for the info icon */
.info-icon {
    cursor: pointer;
    margin-left: 5px;
    font-weight: bold;
    font-size: 1em;
    vertical-align: middle;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #000; /* Background color for the circle */
    color: #fff; /* Text color */
    border-radius: 50%; /* Makes the icon a circle */
    text-align: center;
    line-height: 20px; /* Centers the 'i' vertically */
}

/* Ensure the info icon is clickable */
.info-icon:hover {
    color: #ccc; /* Change color on hover */
}
.button {
    background-color: #080a54; /* Green background */
    border: 1px solid #ccc;
    border-radius: 5px;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #000125; /* Darker green background on hover */
}

.spinner {
    width: 220px; /* Three times larger than original */
    height: 220px; /* Three times larger than original */
    position: fixed; /* Position fixed to stay in the center */
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%);
    border: 8px solid rgba(255, 255, 255, 0.3); /* Adjust border thickness */
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s infinite linear;
    z-index: 1000; /* Ensure spinner is on top of other content */
    display: none; /* Initially hidden */
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 999; /* Place it below the spinner but above other content */
    display: none; /* Initially hidden */
}


@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .hero-section {
        height: auto;
        margin-left: 0;
        margin-right: 0;
        padding: 20px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    #layout {
        flex-direction: column;
    }

    #sidebar, #sidebar-right {
        width: 100%;
        position: static;
        padding: 10px;
    }

    #container {
        margin-left: 0;
        margin-right: 0;
        padding: 10px;
    }

    .date-wrapper input[type="text"] {
        width: 100%;
    }

    .player-container {
        justify-content: center;
    }

    .playerCard {
        width: 100%;
        max-width: 300px;
        height: auto;
        margin: 10px 0;
    }

    #gameList {
        flex-direction: column;
    }

    .gameItem {
        width: 100%;
    }

    .user-section {
        position: static;
        text-align: center;
        margin-bottom: 20px;
    }

    #myAccountButton {
        display: block;
        width: 100%;
        margin-top: 10px;
    }

    .stat-control,
    .field-condition-control {
        width: 100%;
    }

    .stat-control button,
    .field-condition-control button {
        padding: 15px;
        font-size: 18px;
    }

    .stat-control input[type="range"],
    .field-condition-control input[type="range"] {
        width: 100%;
        margin: 10px 0;
    }

    .spinner {
        width: 150px;
        height: 150px;
    }
}
