/* Reset CSS */
body,
h1,
h2,
p,
ul,
li {
    margin: 0;
    padding: 0;
}

/* Stili di base */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
}

header {
    background-color: #007BFF;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

h1 {
    font-size: 36px;
}

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

#searchInput {
    padding: 10px;
    font-size: 16px;
    width: 300px;
    border: none;
    border-radius: 5px 0 0 5px;
}

#searchButton {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #0056b3;
    color: #fff;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

#searchButton:hover {
    background-color: #004499;
}

main {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.movie-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.movie-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 10px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.movie-item img {
    max-width: 100%;
    height: auto;
}

.movie-item h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.trailer {
    width: 100%;
    max-width: 560px;
    margin-top: 20px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.trailer iframe {
    width: 100%;
    height: 315px;
}
/* Resto del codice CSS rimane invariato */

/* Stili per il popup */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}