@import url('https://fonts.googleapis.com/css2?family=Lato:wght@700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
}

#logo {
    width: 80%; /* Set width to 80% for smaller screens */
    max-width: 500px; /* Limit the maximum width of the logo */
    display: block;
    margin: 0 auto;
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.main-container img {
    width: 500px;
}

#instructorid {
    border-radius: 10px;
    border-color: rgb(122, 122, 122);
}

.register-button {
    padding: 10px;
    background-color: #8ac058;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}

.registration-container, .confirmation-container {
    max-width: 600px;
    width: 80%;
    margin: 50px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#playerList {
    display: flex;
    flex-direction: column; /* Stack player information vertically */
    grid-gap: 10px; /* Add spacing between player entries */
    justify-content: flex-start;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    border: 1px solid #00000038;
    height: auto;
    width: 100%; /* Ensure the playerList stays within the container */
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

#playerInformation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box; /* Include padding and border in the element’s width */
}

#playerName {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    margin: 0;
    padding: 5px;
    word-break: break-word; /* Ensure names don't cause overflow */
    max-width: 70%; /* Limit player name width */
}

.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    width: 100%;
}

.checkbox-container label {
    width: 90%; /* Allows the text to take up more width */
    margin-right: 10px; /* Adds space between the label and the checkbox */
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.agreement-text, .email-agreement-text {
    font-size: 15px;
}


button {
    padding: 10px;
    background-color: #8ac058;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.save-player-button {
    opacity: 0.5;
    padding: 15px;
    font-size: 15px;
    transition: opacity 0.2s linear;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: transparent; /* No background */
    color: #555; /* Red text color for the 'X' */
    border: none; /* No border */
    font-size: 20px; /* Make the 'X' larger */
    cursor: pointer; /* Change cursor to pointer */
    font-weight: bold; /* Make 'X' bold */
    padding: 5px; /* Add a little padding */
}

.close-button:hover {
    color: #333; /* Darker red on hover */
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 2;
    max-width: 90vw; /* Set a max width based on viewport width */
    max-height: 90vh; /* Set a max height based on viewport height */
    width: 500px; /* Default width for larger screens */
    height: auto; /* Let the height adjust automatically */
    overflow-y: auto; /* Ensure the content is scrollable if it's too large */
}

/* Adjust popup width for smaller devices */
@media screen and (max-width: 576px) {
    .popup {
        width: 90%; /* Set width to 90% of the viewport width */
        max-width: 300px; /* Limit maximum width for smaller screens */
    }
}

/* Apply border styles for inputs, textareas, and select elements inside the popup */
#playerPopup input,
#playerPopup textarea,
#playerPopup select {
    border: 1px solid #ccc;
}

/* Highlight border color when input, textarea, or select element is focused */
#playerPopup input:focus,
#playerPopup textarea:focus,
#playerPopup select:focus {
    border-color: #007BFF;
}

/* Apply border color for invalid inputs, textareas, or select elements */
#playerPopup input.invalid,
#playerPopup textarea.invalid,
#playerPopup select.invalid {
    border-color: #dc3545;
}

/* Popup Styles */
.popup-tos {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    width: 80%;
    max-width: 600px;
    max-height: 70vh; /* Allow scrolling */
    overflow-y: auto; /* Enables vertical scroll */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 100;
}

.popup-tos h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.popup-tos p {
    font-size: 1em;
    line-height: 1.5;
}

.popup-tos .close-button {
    background-color: transparent;
    color: red;
    border: none;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
}

.popup-tos .close-button:hover {
    color: darkred;
}

.tos-link {
    color: blue;
    text-decoration: underline;
    cursor: pointer;
}

.popup-rules {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    width: 80%;
    max-width: 600px;
    max-height: 70vh; /* Allow scrolling */
    overflow-y: auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 100;
}

.popup-rules h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.popup-rules .rules-content h3 {
    margin-top: 20px;
    text-decoration: underline;
}

.popup-rules .rules-content ol {
    margin-left: 20px;
}

.popup-rules .rules-content ol li {
    margin-bottom: 10px;
    font-size: 1em;
}

.popup-rules .close-button {
    background-color: transparent;
    color: red;
    border: none;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
}

.popup-rules .close-button:hover {
    color: darkred;
}

.rules-link {
    color: blue;
    text-decoration: underline;
    cursor: pointer;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: none;
}

label {
    display: inline-block;
    width: 100%; /* Adjusts the label width */
    vertical-align: middle;
    margin-bottom: 8px;
}

input, select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.playerDisplay, #logo {
    filter: blur(0px);
    transition: filter 0.2s ease-in-out;
}

.playerDisplay.blurred, #logo.blurred {
    filter: blur(10px);
}

.error-container {
    background-color: #8ac058; /* Background color */
    color: #fff; /* Text color */
    text-align: center;
    padding: 50px;
    max-width: 50%; /* Set a maximum width for the container */
    margin: 0 auto; /* Center the container horizontally */
}

.error-container h1 {
    font-size: 2em;
}

.error-container p {
    font-size: 1.2em;
}

input, select, textarea, button {
    font-size: 16px; /* Prevent iOS zooming */
}

#countryCode {
    width: 80px;
    font-size: 14px;
}

/* Media queries for responsive design */
@media screen and (max-width: 768px) {
    #logo {
        width: 80%; /* Adjust width for smaller screens */
    }

    .popup {
        width: 90vw; /* Set width to 90% of the viewport width */
        max-width: 400px; /* Reduce the maximum width for smaller screens */
        max-height: 80vh; /* Set a max height for smaller screens */
    }
}

@media screen and (max-width: 576px) {
    #logo {
        width: 80%; /* Adjust width for smaller screens */
    }

    .popup {
        width: 90vw; /* Set width to 90% of the viewport width */
        max-width: 300px; /* Further reduce max width for very small screens */
        max-height: 75vh; /* Set a lower max height for smaller screens */
    }
}