body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, cornflowerblue 0%, rebeccapurple 100%);
    color: darkslategray;
    min-height: 100vh;
}

header {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.search-container {
    margin-top: 15px;
}

#search-input {
    padding: 12px;
    width: 70%;
    max-width: 400px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
}

#search-btn {
    padding: 12px 20px;
    background-color: lightcoral;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    margin-left: 10px;
    transition: background 0.3s;
}

#search-btn:hover {
    background-color: indianred;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    margin-bottom: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.movie-card {
    display: inline-block;
    width: 220px;
    margin: 15px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.movie-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.movie-card h3 {
    margin: 10px;
    font-size: 18px;
    color: darkslategray;
}

.movie-card p {
    margin: 10px;
    color: dimgray;
    font-size: 14px;
}

.hidden {
    display: none;
}

#loading {
    text-align: center;
    font-size: 20px;
    color: lightcoral;
}

#pagination {
    text-align: center;
    margin-top: 20px;
}

#pagination button {
    padding: 10px 15px;
    margin: 0 10px;
    background-color: dodgerblue;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#pagination button:disabled {
    background-color: lightgray;
    cursor: not-allowed;
}

#movie-details {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#movie-details img {
    float: left;
    margin-right: 20px;
    width: 200px;
    border-radius: 10px;
}

#recommendations {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.watchlist-btn {
    background-color: seagreen;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s;
}

.watchlist-btn:hover {
    background-color: forestgreen;
}

.remove-btn {
    background-color: crimson;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.remove-btn:hover {
    background-color: firebrick;
}

@media (max-width: 768px) {
    .movie-card {
        width: 100%;
        margin: 10px 0;
    }
    #search-input {
        width: 80%;
    }
}
