body { font-family: sans-serif; padding: 20px; background-color: #f1f1f1; }

.login-page {
    background: url('img/bg-login.jpg') no-repeat center center fixed;
    background-size: cover;
}

.login-page .login-container {
    max-width: 400px;
    margin: 100px auto;
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 30px auto;  /* centers the grid */
}

input, button {
    width: 100%; /* instead of 50% */
    max-width: 100%;
    box-sizing: border-box;
}
form { margin: 0; }
a { text-decoration: none; display: block; margin-top: 10px; text-align: center; }
.error { color: red; }

.card {
    border: 3px solid #222;
    color: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, transform 0.2s;
    background-color: #bc7789;
}

button {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 14px;
}

button:hover {
    background-color: #ffb600;
}

a {
    text-decoration: none;
    display: block;
    margin-top: 20px;
    color: #fff;
    font-weight: bold;
}

.modal {
    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;
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-height: 90vh; /* prevent overflowing screen */
  overflow-y: auto;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-btn {
    font-size: 20px;
    cursor: pointer;
    color: #888;
}

form input, form label {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

input[type=\"text\"], input[type=\"number\"] {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .card {
        padding: 15px;
        font-size: 14px;
    }

    button, input[type="text"], input[type="number"], .modal-content {
        width: 100%;
        font-size: 14px;
    }

    .modal-content {
        padding: 15px;
    }

    .modal-header h3 {
        font-size: 16px;
    }

    .close-btn {
        font-size: 18px;
    }

    .booking-page {
        background-attachment: scroll; /* prevent jittering on mobile */
        background-position: center top;
    }

    .booking-page .flex-container,
    .booking-page .header-bar,
    .booking-page .grid,
    .booking-page div {
        padding: 10px;
        font-size: 14px;
    }

    .booking-page .card {
        padding: 10px;
        font-size: 14px;
    }

}

.hidden_button {
    display: flex;
    background-color: #002060;
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.login-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 30px;
    background-color: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

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

.login-form button {
    width: 100%;
    padding: 10px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.login-form button:hover {
    background-color: #155ab6;
}

.error {
    color: red;
    text-align: center;
    margin-bottom: 10px;
}

.flex-container {
  display: flex;
  justify-content: center;
}

.flex-container > div {
  width: 20%;
  background-color: #1a73e8;
  margin: 10px;
  padding: 20px;
  border-radius: 5px;
}

.logout-link {
    float: left;
    background-color: #ff4d4d;
    color: white;
    padding: 6px 12px;
    border-radius: 3px;
    font-weight: bold;
    text-decoration: none;
}

.logout-link:hover {
    background-color: #cc0000;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.slot-card {
    border: 3px solid #111;
    color: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, transform 0.2s;
    background-color: #1b998d;
}

.slot-card.booked {
    background-color: #b5b5b5;
    color: #eee;
    cursor: not-allowed;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #f44336;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    z-index: 9999;
    font-weight: bold;
}

.booking-page {
    background: url('img/bg-tennis.jpg') no-repeat center center fixed;
    background-size: cover;
    background-attachment: fixed;
}


.styled-table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 10px;
    font-size: 14px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
.styled-table th, .styled-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}
.styled-table thead {
    background-color: #1a73e8;
    color: white;
}

/* HEADER BAR */
.header-bar {
    background-color: #3e3e3e;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.logout-btn {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.logout-btn:hover {
    background-color: #e60000;
}

/* FEATURE SECTION */
.feature-section {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px auto;
    padding: 20px;
    max-width: 900px;
    background: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.feature-card {
    background-color: #bb7a8d;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    width: 180px;
    color: white;
    font-size: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.feature-card:hover {
    transform: scale(1.05);
}

/* BOOKINGS SECTION */
.booking-section {
    margin: 40px auto;
    padding: 25px;
    max-width: 900px;
    background: #fffbe6;
    border: 1px solid #ffcc00;
    border-radius: 10px;
}

.booking-section h3 {
    margin-bottom: 10px;
}
