* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
}

header {
    background-color: #000;
    background-image: url('../images/book bg.avif'); /* Path to your image */
    background-size: cover; /* Ensures the image covers the entire header area without being contained within its dimensions */
    background-position: center; /* Centers the background image */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    flex-direction: row; /* Change from column to row for horizontal alignment of elements */
    justify-content: space-between;
    width: 100%; /* Full width */
    height: 287px; /* Specific height for the header */
    position: fixed; /* Keeps the header at the top of the viewport */
    top: 0;
    left: 0;
    z-index: 1000; /* Ensures the header stays above all other content */
    box-sizing: border-box; /* Includes padding and border in the element's total width and height */
}

.logo {
    align-self: flex-start; /* Align logo to the left */
    position: relative; /* Adjust based on layout needs */
    top: 5px; /* Adjusted for visual balance */
    padding-bottom: 10px; /* Space between logo and search area */
}

.logo img {
    top: 0;
    margin-top: 0;
    margin-bottom: 10px;
    left: 0;
    height: auto;
    width: 230px; /* Adjust the logo size accordingly */
    display: block; /* Ensure the logo image does not have extra space around it */
}

.search-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%; 
    position: relative;
    margin-left: auto; /* Push search area to the right */
    margin-right: 20px;
    padding-left: 5px; /* Alignment padding */
}

.search-area input[type="text"] {
    padding: 8px;
    width: 100%; /* Take up full width of .search-area */
    margin-top: 5px;
    flex-grow: 1;
    margin-right: 10px;
    padding-right: 50px;
}

.search-area select {
    width: 100%;
    padding: 8px;
    margin-top: 15px;
    background: #fff; /* Ensure visibility against dark background */
    color: #000; /* Text color */
    border: 1px solid #ccc; /* Subtle border for inputs */
    position: relative;
}

.search-area button {
    position: absolute; /* Set to absolute positioning */
    right: 10px; /* Position on the right */
    top: 0; /* Position at the top */
    width: 45px;
    height: 45px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.search-area button i {
    font-size: 20px;
    color: #000;
}

.search-button {
    background-color: transparent;
    color: rgb(25, 24, 24);
    border: none;
    padding: 8px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    font-weight: bold;
    margin: 5px 0;
    align-self: start; /* Align button to the start (left) */
    margin-top: 15px; /* Space between select and button */
    right: 0; /* Position inside the search bar */
}

.page-title {
    font-size: 95px;
    line-height: 1.5;
    text-align: center;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.logo h1 {
    margin-left: 20px;
    font-size: 24px;
}

.my-div {
    position: absolute;
    top: 5px;
    left: 5px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-title {
    position: absolute;
    margin-right: 50px;
    top: 50%; /* Centered vertically */
    transform: translateY(-50%); /* Precise vertical centering */
    font-size: 60px; /* Larger font size */
    font-weight: bold;
    line-height: 1.5;
    text-align: center;
    color: #E2B323;
    display: flex;
    flex-direction: column; /* Ensures "Book" and "now" are on separate lines */
}

.filters {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #ffffff; /* White background for better visibility */
    justify-content: flex-start; /* Align filters to the left */
    width: 100%; /* Ensures the filter bar spans the full width */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Adds subtle shadow for depth */
    position: fixed; /* Fixed position to stay visible */
    top: 287px; /* Position right below the header */
    left: 0;
    z-index: 100; /* High z-index to keep it above other content but below the header */
}

.fas.fa-filter {
    color: #000; /* Change icon color */
    font-size: 20px; /* Change icon size */
}

.filter {
    margin-left: 20px;
    margin-right: 20px;
    width: 50px; /* Specific width for filter icons */
    height: 50px; /* Specific height for filter icons */
    border: none;
    cursor: pointer;
    display: inline-flex; /* Use inline-flex to align icon and text properly */
    align-items: center; /* Center items vertically */
    justify-content: center; /* Center content horizontally */
    background-color: transparent;
    color: white; /* White text for visibility */
}

.filter-cc {
    background-image: url('../images/cc icon.png');
    background-size: cover;
}

.filter-sub {
    background-image: url('../images/sub.png');
    background-size: cover;
}

.filter-3d {
    background-image: url('../images/3D icon.png');
    background-size: cover;
}

.filter-vm {
    background-image: url('../images/VM icon.png');
    background-size: cover;
}

.filter-ad {
    background-image: url('../images/AD icon.png');
    background-size: cover;
}

.filter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px; /* Adjust based on your needs */
}

.filter-description {
    margin-top: 5px; /* Adjust based on your needs */
    text-align: center;
    font-size: 14px; /* Adjust based on your needs */
}

main {
    display: flex;
    padding: 20px;
    position: relative;
    margin-top: 400px; /* Adjust based on header and filters height */
    flex-wrap: wrap; /* Ensure content doesn't overflow */
}

.content {
    display: flex !important;
    flex-grow: 1;  
    overflow: hidden; 
    flex-direction: row;
    width: 100%;  /* Change from auto to 100% */
    min-height: 0; 
}

.movie-poster,
.movie-schedule {
    flex: 1;
}

.movie-poster {
    flex: 1;
    margin: 0 10px; /* Ensure there's space between the two columns */
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start; 
    align-items: center; 
    position: relative;
}

.movie-poster img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.movie-poster p {
    text-align: center;
    font-size: 20px;
    color: #000000;
    margin-top: 10px;
    font-weight: bold;
}

.schedule {
    overflow-y: auto; /* Add this line */
    padding-top: 0; /* Change from the total height of your fixed elements to 0 */
    position: relative;
    z-index: 0;
    top: 45vh;
    flex: 2;
}

.date-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-selector button,
.date-selector .next-date {
    background-color: #ddd;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}

.next-date {
    font-size: 20px;
    color: #444; /* Styling for the arrow icon */
}

.cinema-schedule h3 {
    font-size: 18px;
    margin-top: 10px;
}

.cinema-schedule-wrapper {
    display: grid; /* Ensure this is also a grid to hold schedules */
    grid-template-rows: 1fr 1fr; /* Two rows for each schedule */
    gap: 10px;
}

.cinema-schedule p {
    font-size: 16px;
    color: #666;
}

.cinema-schedule ul {
    list-style: none;
    padding: 15px 0;
}

.cinema-schedule ul li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.cinema-schedule button {
    background-color: #008000;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    display: block;
    width: 100%;
    margin-top: 10px;
    border-radius: 5px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        height: 210px;
        padding: 10px;
    }

    .logo img {
        width: 150px; /* 调整 logo 大小 */
        margin-top: 10px;
    }

    .search-area {
        align-items: center;
        margin-top: 10px;
        width: 80%;
        position: relative;
    }

    .search-area input[type="text"], 
    .search-area select {
        width: 100%; /* 全宽 */
        margin-top: 5px; /* 增加间距 */
    }

    .search-area button {
        position: absolute;
        right: 5px;
        top: 25%;
        transform: translateY(-50%);
        width: 45px;
        height: 45px;
    }

    .page-title {
        font-size: 30px; /* 调整字体大小 */
        margin-top: 10px;
        text-align: center;
    }

    .filters {
        flex-direction: row;
        flex-wrap: wrap; 
        justify-content: center; 
        padding: 10px;
        top: 150px;
        margin-top: 65px;
    }

    .filter {
        width: 40px; 
        height: 40px; 
        margin: 5px;
    }

    .filter-description {
        font-size: 12px;
        text-align: center;
    }

    main {
        flex-direction: column;
        padding: 10px;
        margin-top: 20px;
    }

    .content {
        flex-direction: column;
        width: 100%;
        height: auto;
        margin-top: 280px;
    }

    .movie-poster, 
    .movie-schedule {
        width: 100%;
        margin-bottom: 20px;
    }

    .movie-poster img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .movie-schedule {
        overflow-y: auto;
    }

    .date-selector {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .date-selector button,
    .date-selector .next-date {
        font-size: 14px;
        padding: 6px;
        margin-right: 5px;
    }
}
   

@media (max-width: 480px) {
    header {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    .logo img {
        width: 100px; /* Adjust logo size */
        margin-top: 10px;
    }

    .search-area {
        display: flex;
        align-items: center;
        margin-top: 10px;
        width: 70%;
        position: relative;
        margin-left: 0;
    }

    .search-area input[type="text"], 
    .search-area select {
        width: 100%;
        margin-top: 5px;
        margin-left: 0;
    }

    #search-movies {
        position: relative;
        height: 30px;
        padding-right: 35px; 
    }

    #search-movies button {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
    }
    
    .page-title {
        font-size: 38px;
        margin-right: 0;
        text-align: center;
    }

    .filters {
        flex-direction: row;
        flex-wrap: wrap; /* Allow wrapping */
        justify-content: flex-start; /* Adjust alignment */
        padding: 10px;
        position: static; /* Static position */
        margin-top: 205px; /* Adjust based on header height */
    }

    .filter {
        width: 20px; /* Set a fixed width */
        height: 20px; /* Set a fixed height */
        margin: 5px; /* Add spacing */
    }

    .filter-description {
        font-size: 10px; /* Adjust font size */
        text-align: center;
    }

    main {
        flex-direction: column; /* Stack content vertically */
        padding: 10px;
    }

    .content {
        flex-direction: column;
        width: 100%;
        height: auto;
        margin-top: 0;
    }

    .movie-poster,
    .movie-schedule {
        position: static;
        width: 100%;
        height: auto;
        object-fit: contain;
        margin: 0;
        margin-top: 10px;
        padding: 0;
    }

    .movie-poster img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .date-selector button, .date-selector .next-date {
        font-size: 12px;
        padding: 6px;
    }
}
