body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
}

header {
    color: white;
    background-image: url('../images/watchwhat\ bg.png');
    background-position: center; /* 居中显示 */
    background-size: cover;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 400px; 
}

.header-logo {
    position: absolute; /* 绝对定位 */
    top: 117px; /* 调整top值，使Logo与搜索栏垂直高度大致相同 */
    left: 15px; /* 左侧间隔，根据需要调整 */
    height: 80px; /* Logo大小，根据需要调整 */
    width: auto; /* 保持图像的宽高比 */
}

nav {
    position: absolute;
    width: 100%;
    top: 35px;
    left: 0;
    right: 0;
    
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

nav ul li {
    text-align: center; /* 确保文本居中 */
    justify-content: center;
    display: flex;
}

nav ul li a {
    text-decoration: none;
    color: #F0E4BF;
    padding: 10px 20px;
    font-weight: bold;
    font-size: 22px; /* Larger font size for better readability */
    font-family: Arial, Helvetica, sans-serif; /* Fallbacks included */
    display: block;
}

nav ul li a.active {
    color: #FCE293;
}


main {
    margin-right: 10px;
    display: flex; /* 修改为flex布局 */
}

.column-nav {
    flex: 0 0 200px;
    position: static; /* 修改为正常文档流 */
    width: 200px;
    height: 100%;
    background-color: rgba(110, 108, 108, 0.5);
}

#now-showing {
    flex-grow: 1; /* 这将使now-showing占用剩余的空间 */
}

.column-nav ul {
    list-style: none;
    padding: 0;
    margin-top: 15px; /* Adjust this to match the height of the header */
}

.column-nav ul li a {
    display: block;
    padding: 20px;
    text-align: center;
    font-size: 18px;
    color: #FCE293;
    text-decoration: none;
}

.column-nav .active {
    text-decoration: underline;
}

.title-with-lines {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #89A8BB;
    font-family:PoetsenOne;
    font-size: 15px;
}

.line {
    border: none;
    height: 3px;
    background-color: #89A8BB;
    width: 38%; /* Adjust line width as needed */
    margin: 0 10px;
}

#movie-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.movie {
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.movie img {
    max-width: 100%;
    border-radius: 5px;
}

.movie h3 {
    margin: 10px 0;
}

.movie p {
    margin: 5px 0;
}

.content-container {
    display: flex;
    flex-direction: column; /* vertical display */
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 3fr; /* 定义两列布局 */
    grid-template-rows: auto auto auto;
    grid-gap: 20px;
    border-bottom: 10px solid black;
}

.poster {
    grid-column: 1 / 2; /* 占据第一列 */
    grid-row: 1 / 2; /* 占据两行 */
    padding-left: 20px;
}

.trailer {
    grid-column: 2 / 3; /* 占据第二列 */
    grid-row: 1 / 2; /* 占据第一行 */
}

.plot {
    grid-column: 2 / 3; /* 占据第二列 */
    grid-row: 2 / 3; /* 占据第二行 */
}

.very-interested {
    grid-column: 2 / 3; /* 保证它在第二列 */
    grid-row: 3 / 4; /* 在第三行 */
    margin-top: 20px;
}

.very-interested h2 {
    font-size: 24px;
    color: #D3CAA8;
}

.buy-now {
    background-color: #D3CAA8;
    color: #1a1a1a;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    margin-top: 10px;
    border-radius: 5px;
}

.buy-now:hover {
    background-color: #B5AA8E;
}

.poster img {
    width: 100%;
    height: auto;
}

.poster-title {
    text-align: center; /* 文字水平居中 */
    margin-top: 10px;
    color: white;
    font-weight: bold;
    font-size: 22px;
}

.trailer-title {
    color: white;
    font-size: 22px;
    font-weight: bold;
}

.trailer video {
    width: 100%;
}

.plot-title {
    color: white;
    font-size: 22px;
    font-weight: bold;
}

.plot-content {
    color: white; 
}

#reviews {
    grid-column: 1 / 2; /* 只占据一列 */
    grid-row: 2 / 3; /* 位于poster下方 */
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#reviews {
    grid-column: 1 / 2; /* 只占据一列 */
    grid-row: 2 / 3; /* 位于poster下方 */
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating input {
    display: none;
}

.rating label {
    font-size: 2em;
    color: #ccc;
    cursor: pointer;
}

.rating input:checked ~ label {
    color: #ffc700;
}

.rating label:hover,
.rating label:hover ~ label {
    color: #deb217;
}

#reviewForm {
    display: flex;
    flex-direction: column;
}

#reviewForm textarea {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;

#movies {
    margin-top: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: block;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.movie {
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.movie img {
    max-width: 100%;
    border-radius: 5px;
}

.movie h3 {
    margin: 10px 0;
}

.movie p {
    margin: 5px 0;
    background-color: #ffc700;
}



footer {
    text-align: center;
    padding: 10px 0;
    background-color: #333;
    color: white;
}
}

@media (max-width: 768px) {
    body {
        max-width: 100%;
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }

    header {
        flex-direction: column;
        align-items: center;
        height: 200px;
        padding: 10px;
    }

    .header-logo {
        height: 50px;
        top: 50px;
        margin: 10px 0;
    }

    nav {
        position: static;
        width: 100%;
    }

    nav ul {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }

    nav ul li {
        flex: 1;
    }

    nav ul li a {
        width: 100%;
        text-align: center;
        padding: 10px 0;
        font-size: 12px !important;
    }

    .search-bar {
        width: 80%;
        margin-top: 10px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .search-bar input[type="text"] {
        flex-grow: 1;
        border: none;
        padding: 8px 10px;
        outline: none;
        background: transparent;
    }

    .search-bar button {
        padding: 8px 10px; /* Adjust padding for search button */
    }

    .column-nav {
        flex: 1;
        width: 100%;
        margin-bottom: 20px;
    }

    #now-showing {
        flex-grow: 1;
    }

    .content-grid {
        display: grid;
        grid-template-columns: 1fr; /* Single column layout */
        grid-gap: 10px; /* Adjust gap between items */
    }

    .poster {
        grid-column: 1 / 2;
        grid-row: 1 / 2; /* Ensure each section takes the full width */
        padding: 10px; /* Remove padding for smaller screens */
    }

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

    .plot {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }

    .very-interested {
        grid-column: 1 / 2;
        grid-row: 4 / 5;
    }

    #reviews {
        grid-column: 1 / 2;
        grid-row: 5 / 6;
    }

    #movie-list {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Adjust grid columns for small screens */
        gap: 10px;
    }
}

@media (max-width: 480px) {
    body {
        max-width: 100%;
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }

    header {
        flex-direction: column;
        align-items: center;
        height: 120px;
        padding: 10px;
    }

    .header-logo {
        height: 40px;
        top: 30px;
        margin: 10px 0;
    }

    nav {
        position: static;
        width: 100%;
    }

    nav ul {    
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    nav ul li a {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 5px 0;
        font-size: 12px;
    }

    .search-bar {
        width: 90%;
        margin-top: 10px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .search-bar input[type="text"] {
        flex-grow: 1;
        border: none;
        padding: 8px 10px;
        outline: none;
        background: transparent;
    }

    .search-bar button {
        padding: 8px 10px; /* Adjust padding for search button */
    }

    .column-nav {
        flex: 1;
        width: 100%;
        margin-bottom: 20px;
    }

    #now-showing {
        flex-grow: 1;
    }

    .content-grid {
        display: grid;
        grid-template-columns: 1fr; /* Single column layout */
        grid-gap: 10px; /* Adjust gap between items */
    }

    .poster {
        grid-column: 1 / 2;
        grid-row: 1 / 2; /* Ensure each section takes the full width */
        padding-left: 10px; /* Remove padding for extra small screens */
    }

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

    .plot {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }

    .very-interested {
        grid-column: 1 / 2;
        grid-row: 4 / 5;
    }

    #reviews {
        grid-column: 1 / 2;
        grid-row: 5 / 6;
    }

    #movie-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

#movie-title {
    color: #ffc700 !important;

}