body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 20px;
}

h1 {
    text-align: center;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.movie {
    flex: 0 0 calc(50% - 10px); /* 2 posters per row */
    box-sizing: border-box;
    text-align: center;
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
}

.movie img {
    width: 100%;
    max-width: 150px;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}

.movie h3 {
    margin: 10px 0 5px;
    font-size: 1.2em;
}

.movie p {
    margin: 0;
    font-size: 1em;
    color: #777;
}

.rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination button {
    cursor: pointer;
    padding: 10px 15px;
    margin: 0 5px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    font-size: 1em;
}

.pagination button:hover {
    background-color: #0056b3;
}

.pagination button.active {
    background-color: #0056b3;
}

.movie-details {
    display: none;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.back-button {
    cursor: pointer;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.details-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.poster-section {
    display: flex;
    gap: 20px;
    align-items: center;
}

.poster-section img {
    max-width: 200px;
    border-radius: 10px;
}

.cast {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cast-member {
    text-align: center;
}

.cast-member img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.screenshots-slider, .related-movies-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.screenshots-slider img, .related-movies-slider img {
    max-width: 150px;
    border-radius: 10px;
}
