/* --- Global Styles & Font --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #121212;
    color: #f1f1f1;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1100px;
    background-color: #1e1e1e; 
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #ffffff;
}

.judul-container {
    margin-bottom: 20px;
    text-align: center;
}

/*CONTAINER UTAMA*/
.watchlist-body {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /*Ngatur Besarnya Kolom*/
    gap: 40px;
    align-items: flex-start;
}

.form-container, .list-container {
    width: 100%;
}

/*CONTAINER FORM*/
#movie-watchlist {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#movie-watchlist label {
    font-weight: 500;
}

#movie-watchlist input[type="text"],
#movie-watchlist input[type="number"],
#movie-watchlist input[type="url"] {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #444;
    background-color: #333;
    color: #f1f1f1;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

#movie-watchlist input:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

#movie-watchlist input[type="submit"] {
    padding: 12px 20px;
    border: none;
    background-color: #007BFF;
    color: white;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

#movie-watchlist input[type="submit"]:hover {
    background-color: #0056b3;
}

/*CONTAINER CARD*/
#movie-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.movie-card {
    background-color: #2c2c2c;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-card-content {
    display: flex;
    gap: 15px;
    flex-grow: 1;
}

.movie-card img {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.movie-card .movie-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.movie-card h3 {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 1.1em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.movie-card p {
    margin: 0 0 5px 0;
    color: #b3b3b3;
    font-size: 0.9em;
}
.card-buttons {
    display: flex;
    margin-top: auto;
    gap: 10px;
}
.btnWatched {
    padding: 8px 12px;
    border: 1px solid #35d645;
    background-color: transparent;
    color: #35d645;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btnWatched:hover {
    background-color: #35d645;
    color: white;
}
.movie-card.watched {
    opacity: 0.6;
    border-left: 5px solid #28a745; 
}
.btnDelete {
    padding: 8px 12px;
    border: 1px solid #dc3545;
    background-color: transparent;
    color: #dc3545;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btnDelete:hover {
    background-color: #dc3545;
    color: white;
}

/* --- Media Query untuk Layar Kecil (Responsif) --- */
@media (max-width: 850px) {
    .watchlist-body {
        grid-template-columns: 1fr; /* Layout menjadi 1 kolom */
    }
}