/* General Reset and Body Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f8ff;
    color: #333;
    line-height: 1.6;
    scroll-behavior: smooth; /* Smooth scroll effect */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation Bar */
nav {
    background-color: #0099cc;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style-type: none;
    padding: 0;
}

nav li {
    margin: 0 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
}

nav a:hover {
    color: #00bfff;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    font-size: 2em;
    cursor: pointer;
    color: gray;
    position: absolute;
    top: 20px; /* Moved down */
    right: 20px;
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background-color: rgb(52, 55, 56);
        position: absolute;
        top: 1060%; /* Move to center */
        left: 50%; /* Move to center */
        transform: translate(-50%, -50%); /* Perfect centering */
        width: 90%; /* Adjusted width for better visibility */
        text-align: center;
        padding: 20px 0;
    }

    .nav-links.active {
        display: flex;
        border: 2px solid white;
        border-radius: 10px;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    }

    .nav-links li {
        padding: 15px 0;
    }
}

/* Section Styling */
section {
    padding: 40px 0;
}

#image-gallery h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    color: #0099cc;
}

#home header {
    text-align: center;
    padding: 60px 0;
    background-color: #0099cc;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#court-rental, #faq, #gallery, #contact, #booking-form {
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin-bottom: 30px;
    padding: 40px 20px;
}

/* Court Availability Table */
#court-rental table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 15px;
    border: 1px solid #ddd;
    text-align: center;
}

th {
    background-color: #00bfff;
    color: white;
}

button {
    background-color: #00bfff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0099cc;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* FAQ Section */
.faq-item {
    margin-bottom: 20px;
}

.faq-item h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
}

.faq-item p {
    font-size: 1.1em;
}

#faq {
    text-align: center;  /* Centers the heading */
    padding: 40px 0;
}

/* Gallery Section */
#gallery {
    text-align: center;
}

#gallery .gallery {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

#gallery .gallery img {
    width: 300px;
    height: 200px;
    border-radius: 10px;
    object-fit: cover;
}

/* Contact Section */
#contact {
    text-align: center;
}

.contact-form label {
    display: block;
    margin: 10px 0 5px;
}

.contact-form .form-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
}

.contact-form .btn-submit {
    padding: 10px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

.contact-form .btn-submit:hover {
    background-color: #45a049;
}

/* General form styling */
form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column; /* Stack the form elements vertically */
    align-items: center; /* Center-align the items */
}

label {
    display: block;
    font-size: 1.1em;
    margin: 15px 0 5px;
    color: #333;
}

input, textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

input:focus, textarea:focus {
    border-color: #00bfff;
    outline: none;
}

textarea {
    height: 150px;
    resize: vertical;
}

button {
    background-color: #00bfff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 200px; /* Set a fixed width for the button */
    margin-top: 20px; /* Space between the button and the form fields */
}

button:hover {
    background-color: #0099cc;
}

/* Responsive form layout */
@media (max-width: 768px) {
    form {
        padding: 15px;
    }

    label {
        font-size: 1em;
    }

    input, textarea {
        font-size: 0.9em;
    }

    button {
        font-size: 1em;
    }
}

/* Court Rules Section */
#court-rules {
    background-color: #f9f9f9;
    padding: 40px 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#court-rules h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    color: #0099cc;
}

#court-rules ul {
    list-style-type: none;
    padding: 0;
    text-align: center;
}

/* #court-rules li {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 10px;
} */

#court-rules li::before {
    content: "•";
    color: #0099cc;
    margin-right: 10px;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 10px;
}

#court-rules strong {
    font-weight: bold;
}

/* Booking Form Styling */
#booking-form .form-container {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

form label {
    font-size: 1.1em;
    margin-bottom: 5px;
    display: block;
}

input, select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

input:focus, select:focus {
    border-color: #00bfff;
    outline: none;
}

.cta-btn {
    background-color: #00bfff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
}

.cta-btn:hover {
    background-color: #0099cc;
}

/* Footer Styling */
footer {
    background-color: #0099cc;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

footer .social-media {
    margin-bottom: 15px;
}

footer .social-media a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.3em;
}

footer .social-media a:hover {
    color: #00bfff;
}

footer .legal-links a {
    color: white;
    text-decoration: none;
    font-size: 1em;
}

footer .legal-links a:hover {
    color: #00bfff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    nav ul {
        flex-direction: column;
    }

    nav li {
        margin: 10px 0;
    }

    table {
        font-size: 0.9em;
    }

    #booking-form {
        margin-top: 20px;
    }

    #gallery .gallery img {
        width: 250px;
        height: 160px;
    }
}

@media (max-width: 768px) {
    /* Header section: Smaller font sizes */
    #home header h1 {
        font-size: 2.5em;
    }

    /* Navigation adjustments for mobile */
    nav ul {
        flex-direction: column;
        text-align: center;
    }

    nav li {
        margin: 8px 0;
    }

    /* Court Table Adjustments */
    table {
        font-size: 0.85em;
    }

    table th, table td {
        padding: 12px;
    }

    /* Button sizing for mobile */
    button {
        font-size: 0.9em;
        padding: 8px 15px;
    }

    .cta-btn {
        font-size: 1em;
    }

    #gallery .gallery {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    #gallery .gallery img {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 500px) {
    header h1 {
        font-size: 2em;
    }

    /* Booking form styling adjustments */
    form label {
        font-size: 1em;
    }

    input, select {
        padding: 10px;
        font-size: 0.95em;
    }

    .cta-btn {
        font-size: 1em;
        padding: 10px 18px;
    }

    footer .social-media a {
        font-size: 1.1em;
        margin: 0 10px;
    }

    footer .legal-links a {
        font-size: 0.9em;
    }

    /* Footer text adjustments */
    footer {
        font-size: 0.9em;
        padding: 15px 0;
    }
}

@media (max-width: 375px) {
    /* Adjustments for very small screens */
    header h1 {
        font-size: 1.8em;
    }

    table th, table td {
        padding: 10px;
    }

    .cta-btn {
        font-size: 0.9em;
        padding: 10px 16px;
    }

    footer .social-media a {
        font-size: 1em;
    }

    footer .legal-links a {
        font-size: 0.8em;
    }

    .container {
        width: 95%;
    }
}

/* Location Section */
#location {
    background-color: #f9f9f9;
    padding: 40px 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#location h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    color: #0099cc;
}

#location p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 10px;
    text-align: center;
}

#location strong {
    font-weight: bold;
}

/* Pricing Section */
p {
    margin-top: 15px;
    text-align: center;
}

p a {
    color: #0099cc;
    text-decoration: none;
}

p a:hover {
    text-decoration: underline;
}

/* Operation Hours Section */
#operation-hours {
    padding: 40px 20px;
    background-color: white;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#operation-hours h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    color: #0099cc;
}

#operation-hours table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#operation-hours th, #operation-hours td {
    padding: 15px;
    border: 1px solid #ddd;
    text-align: center;
}

#operation-hours th {
    background-color: #00bfff;
    color: white;
}

#operation-hours td {
    font-size: 1.1em;
}

/* Login & Registration styles */
form {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 30px auto;
}

form label {
    display: block;
    margin: 10px 0 5px;
}

form input[type="text"],
form input[type="email"],
form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form button[type="submit"] {
    padding: 10px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

form button[type="submit"]:hover {
    background-color: #45a049;
}

form p {
    margin-top: 15px;
    text-align: center;
}

form p a {
    color: #4CAF50;
    text-decoration: none;
}

form p a:hover {
    text-decoration: underline;
}

/* My Bookings */
/* Styling for the button */
.cancel-button {
    background-color: #f44336;
    color: white;
    font-size: 14px;
    padding: 10px 20px; /* Adjust padding for better button size */
    border: none; /* Remove default border */
    cursor: pointer;
    border-radius: 5px; /* Rounded corners for the button */
    margin: 5px 0; /* Proper margin to avoid negative values */
}

.cancel-button:hover {
    background-color: #d32f2f; /* Slightly darker red on hover */
}

/* Modify Booking button */
#modify-booking-button {
    background-color: green;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: auto;
}

#modify-booking-button:hover {
    background-color: darkgreen;
}

/* Styling for the table */
table {
    border: 1px solid black;
    border-radius: 6px;
    border-collapse: collapse;
    margin-left: auto;
    margin-right: auto;
    width: 80%;
}

th, td {
    padding: 12px 15px;
    text-align: center;
}

th {
    background-color: #0099cc;
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2; /* Light grey for alternating rows */
}

tr:nth-child(odd) {
    background-color: #e6f7ff; /* Lighter blue for odd rows */
}

h1 {
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    text-align: center;
    font-size: 18px;
    color: #333;
}

/* Style the overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
}

/* Style the popup box */
.popup {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 300px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
}

.popup h2 {
    color: #4CAF50;
}

.popup p {
    color: #333;
}

.popup button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.popup button:hover {
    background-color: #45a049;
}

#popup-success #popup-fail-email #popup-reset-sent #popup-reset-fail #popup-verficiation {
    display: none;
}

/* Full-Screen Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Ensure it's above all content */
}

/* Loading Spinner */
#loading {
    display: none;
}

/* Loading spinner */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
  
/* Spinner animation */
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

#image-gallery .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

#image-gallery .responsive-img {
    width: 100%;
    height: 400px;
    border-radius: 8px;
}

#image-gallery .court-dim-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* My Active Bookings popup */
.popup-bookings {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.popup-bookings-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
}
#itemList {
    list-style: none;
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
#itemList li {
    border: 1px solid #ddd;
    padding: 10px;
    margin: 5px;
    border-radius: 5px;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
#itemList button {
    margin-top: 5px;
    background: red;
    color: white;
    border: none;
    padding: 5px;
    border-radius: 3px;
    cursor: pointer;
}
#itemList button:hover {
    background: darkred;
}
/* button {
    padding: 10px;
    border: none;
    background: blue;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}
button:hover {
    background: darkblue;
} */

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}
.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    margin: 15% auto;
    text-align: center;
    position: relative;
}
.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}
.info-icon {
    cursor: pointer;
    font-size: 18px;
    margin-left: 5px;
    color: blue;
}

/* Coaches */
.coach-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px;
}

.coach-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 300px;
    margin: 15px;
    padding: 20px;
    text-align: center;
}

.coach-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

.coach-card h3 {
    margin: 15px 0;
}

.coach-card p {
    color: #555;
    font-size: 14px;
    margin-bottom: 15px;
}

.contact-info {
    background-color: #f4f4f4;
    padding: 10px;
    border-radius: 4px;
}

.contact-info p {
    margin: 5px 0;
}

/* Admin view */
.center-container {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center horizontally */
    justify-content: center; /* Center vertically if needed */
    gap: 10px; /* Adds space between elements */
    padding: 20px;
    border: 1px solid #ccc; /* Optional: Adds a border */
    width: 300px; /* Set a fixed width for better alignment */
    margin: 0 auto; /* Centers the form in the page */
    border-radius: 8px;
    background-color: #f9f9f9;
}

/* Modal for editing user information in the user bookings page */
.small-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 10px;
    border: 1px solid black;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 10px;
}

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

.edit-button {
    cursor: pointer;
    margin-left: 10px;
    color: blue;
}