/* home page */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1em 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#welcome-message {
    color: #fff;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li:first-child {
    margin-left: 0;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #ddd;
}

.banner {
    position: relative;
    height: 70vh;
    background: url('pic/banner1.jpg') center/cover no-repeat;
    animation: scrollBackground 15s linear infinite;
}

@keyframes scrollBackground {
    0% { background-image: url('pic/banner1.jpg'); }
    33% { background-image: url('pic/banner2.jpg'); }
    66% { background-image: url('pic/room3.jpg'); }
    100% { background-image: url('pic/banner1.jpg'); }
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
}

.banner-content h1 {
    font-size: 3em;
    margin: 0;
}

.subtitle {
    font-size: 1.5em;
}

.dots-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
}

.dot {
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.dot.active {
    background-color: #636363;
}

.search-bar {
    text-align: center;
    padding: 2em 0;
}

.search-bar input {
    padding: 0.5em;
    width: 50%;
    font-size: 1em;
}

.popular-rooms {
    background-color: #fff;
    padding: 10px;
    text-align: center;
}

.rooms-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

.room-item {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.room-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.room-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 1em;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.room-item:hover .room-info {
    transform: translateY(0);
}

.room-item:hover {
    transform: scale(1.05);
}

.all-rooms {
    margin-top: 20px;
}

footer {
    text-align: center;
    padding: 1em 0;
    background-color: #333;
    color: #fff;
}

@media (max-width: 1200px) {
    .rooms-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .rooms-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .rooms-list {
        grid-template-columns: 1fr;
    }
}

/* forms (signup, login, create room)*/
.fullscreen-form-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.auth-form {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2em;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.auth-form h1 {
    text-align: center;
    margin-bottom: 1em;
    color: #333;
    font-size: 2em;
}

.auth-form form {
    display: flex;
    flex-direction: column;
}

.auth-form input,
.auth-form textarea {
    margin-bottom: 1em;
    padding: 0.5em;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.auth-form textarea {
    resize: vertical;
    min-height: 100px;
}

.auth-form button {
    padding: 0.5em;
    font-size: 1em;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-form button:hover {
    background-color: #555;
}

.auth-form p {
    margin-top: 1em;
    text-align: center;
}

.auth-form a {
    color: #333;
    text-decoration: none;
}

.auth-form a:hover {
    text-decoration: underline;
}

/* background images for each form */
.login-banner {
    background-image: url('pic/banner2.jpg');
}

.signup-banner {
    background-image: url('pic/room3.jpg');
}

.create-room-banner {
    background-image: url('pic/room1.jpg');
}

/* room display */
.room-display {
    padding: 2em;
    text-align: center;
}

.room-item {
    position: relative;
    width: 80%;
    margin: 10px auto;
    padding: 1em;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.room-item h3 {
    margin: 0.5em 0;
}

.room-item p {
    margin: 0.5em 0;
}

/* profile page */
.profile-page {
    background-color: #f4f4f4;
    min-height: calc(100vh - 60px); /* Adjust based on your header height */
    padding: 20px 0;
}

.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.profile-banner {
    background: url('banner1.jpg') center/cover no-repeat;
    height: 200px;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 5px;
    margin-bottom: -50px; /* Pull the header slightly into the content area */
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 20px;
    border: 3px solid #fff;
    background-color: #333; /* You can change this to any color you prefer */
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    font-weight: bold;
    text-transform: uppercase;
}

.profile-content {
    padding: 70px 20px 20px; /* Increased top padding to account for overlapping header */
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .profile-container {
        margin: 0 10px;
    }
    
    .profile-content {
        grid-template-columns: 1fr;
    }

    .profile-info, .profile-rooms, .profile-activity {
        grid-column: 1 / 2;
        grid-row: auto;
    }
}

.profile-info, .profile-rooms, .profile-activity {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.profile-info {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.profile-rooms {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.edit-profile-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.edit-profile-btn:hover {
    background-color: #555;
}

.account-info-edit {
    margin-top: 20px;
}

.update-form {
    display: flex;
    flex-direction: column;
}

.update-form input,
.update-form textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-bottom: 10px;
}

.update-form textarea {
    height: 100px;
    resize: vertical;
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.button-group button {
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    margin-top: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cancel-btn {
    background-color: #ccc;
    color: #333;
}

.cancel-btn:hover {
    background-color: #bbb;
}

/* Styles for the My Rooms section header */
.rooms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.edit-rooms-btn {
    padding: 5px 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.edit-rooms-btn:hover {
    background-color: #555;
}

@media (max-width: 768px) {
    .profile-content {
        grid-template-columns: 1fr;
    }

    .profile-info, .profile-rooms {
        grid-column: 1 / 2;
        grid-row: auto;
    }
}

/* The dim-background class remains the same */
.dim-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* The room-info-edit class handles centering */
.room-info-edit {
    top: 10%;
    left: 25%;
    position: relative;
    float: left;
    background-color: #fff;
    padding: 2em;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    width: 100%; 
    max-width: 600px; /* Match the form max-width */
}