html, body {
    margin: 0;
    padding: 0;
    width: 100vw; /* Explicitly set to viewport width */
    min-height: 100vh;
    background-color: #f7f7f7; /* Ensure consistent background */
    box-sizing: border-box; /* Prevent padding/margins from adding to width */
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    color: #333;
    display: flex;
    flex-direction: column; /* Ensure vertical stacking */
    min-height: 100vh; /* Ensure body takes full height */
    width: 100vw; /* Ensure body takes full viewport width */
}

.banner {
    background: linear-gradient(to right, #ff6f61, #ff8a65);
    padding: 20px;
    text-align: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100vw; /* Ensure banner takes full width */
}

.banner h1 {
    margin: 0;
    font-weight: normal;
}

.top-bar {
    background-color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100vw; /* Ensure top-bar takes full viewport width */
    box-sizing: border-box; /* Prevent padding from affecting width */
}

.top-bar .logo {
    font-size: 24px;
    font-weight: bold;
    color: #ff6f61;
}

.top-bar select, .top-bar a {
    margin-left: 15px;
    padding: 5px 10px;
    color: #333;
    text-decoration: none;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.top-bar a:hover {
    text-decoration: underline;
}

.search-container, .login-container, .register-container, .admin-container, .room-listings {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%; /* Use full available width within max-width */
    box-sizing: border-box; /* Ensure padding doesn't affect width */
}

.search-form, .login-form, .register-form, .admin-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-form label, .login-form label, .register-form label, .admin-form label {
    display: block;
    font-weight: bold;
}

.search-form input, .search-form select, 
.login-form input, .register-form input, .admin-form input, .admin-form select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.search-form button, .login-form button, .register-form button, .admin-form button {
    padding: 10px 20px;
    background-color: #ff6f61;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.search-form button:hover, .login-form button:hover, .register-form button:hover, .admin-form button:hover {
    background-color: #ff8a65;
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    padding: 5px 0;
}

.room-item {
    margin-bottom: 20px;
}

footer {
    margin-top: auto; /* Push footer to the bottom */
    text-align: center;
    padding: 20px;
    background-color: #ff6f61;
    color: white;
    width: 100%; /* Use 100% of parent width instead of 100vw */
    box-sizing: border-box;
}

.search-container {
    max-width: 1200px;
    margin: 20px auto;
}

.search-form {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    justify-content: space-between;
}

.search-form div {
    flex: 1 1 18%;
    min-width: 180px;
}

.search-form div label {
    display: block;
    margin-bottom: 5px;
}

.search-form div input,
.search-form div select {
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
}

.checkin-checkout {
    display: flex;
    gap: 5px;
}

.checkin-checkout input[type="date"] {
    width: 65%;
}

.checkin-checkout select {
    width: 35%;
}

.search-form div.qty {
    flex: 1 1 10%;
    min-width: 80px;
}

.search-form div.submit {
    flex: 1 1 10%;
    min-width: 100px;
}

.search-form div.submit button {
    width: 100%;
    padding: 10px;
    background-color: #ff6347;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.search-form div.submit button:hover {
    background-color: #e5533d;
}

.carousel-container {
    width: 100vw;
    margin: 20px 0;
    height: 300px;
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    left: 50%;
    right: 50%;
    transform: translateX(-50%);
}

.carousel-container p {
    color: #666;
    font-size: 18px;
}

.login-button {
    display: inline-block;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.login-button:hover {
    background: #0056b3;
}

.error-message {
    color: red;
    text-align: center;
    margin: 10px 0;
}

.success-message {
    color: green;
    text-align: center;
    margin: 10px 0;
}

.room-listings {
    max-width: 1200px;
    margin: 20px auto;
}

.room-item {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

.room-item h3 {
    margin: 0 0 10px 0;
}

.room-item button {
    padding: 8px 15px;
    background-color: #ff6347;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.room-item button:hover {
    background-color: #e5533d;
}

.booking-review-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.booking-review-form .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.booking-review-form .form-row div {
    flex: 1;
    min-width: 200px;
}

.booking-review-form .form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.booking-review-form .form-row input,
.booking-review-form .form-row select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.booking-review-form .notes-section {
    margin-bottom: 15px;
}

.booking-review-form .notes-section textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: vertical;
}

.booking-review-form .submit {
    text-align: center;
}

.booking-review-form .submit button {
    padding: 10px 20px;
    background-color: #ff6f61;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.booking-review-form .submit button:hover {
    background-color: #ff8a65;
}

.full_list_tables {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
}

.full_list_tables th,
.full_list_tables td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.full_list_tables th {
    background-color: #f7f7f7;
}

.full_list_tables tr {
    border-bottom: 1px solid #ddd;
}

a {
    color: #ff6f61;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page-wrapper {
    display: flex;
    flex-direction: column; /* Move column layout here */
    flex: 1 0 auto; /* Keep this for sticky footer behavior */
    min-height: 100vh; /* Ensure it takes full viewport height */
    width: 100%; /* Use 100% of parent width */
    background-color: #f7f7f7; /* Match body background */
    box-sizing: border-box; /* Prevent padding/margins from adding to width */
}

/* Profile form styling for side-by-side label and input */
.login-form .profile_form {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.login-form .profile_form label {
    flex: 1;
    margin-right: 10px;
    font-weight: bold;
}

.login-form .profile_form input {
    flex: 2;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.login-form .submit {
    text-align: center;
}

.login-form .submit button {
    display: block;
    margin: 0 auto;
}

/* New styles for profile page */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.profile-table td {
    padding: 10px;
    border: none;
    vertical-align: top;
}

.profile-table td:first-child {
    width: 30%;
    font-weight: bold;
    color: #333;
}

.profile-table td:last-child {
    width: 70%;
}

.profile-table input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: 'Noto Sans TC', sans-serif;
    color: #333;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 10px;
}

.carousel-container img {
    height: 300px; /* fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
}