:root {
    --white: #fff;
    --rose: #ff0077;
    --light-rose: #ff2ba0;
    --gray-wishlist: #ffffff1a;
    --light-gray-wishlist: #ffffff26;
    --shadow: #00000099;
}

main {
    padding: 40px 5%;
    text-align: center;
    flex: 1; 
    margin-top: 80px;
}

h1 {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--white);
}

#empty-message {
    font-size: 1.2rem;
    opacity: 0.7;
    margin-top: 50px;
    color: var(--white);
}

.empty-state {
    grid-column: 1 / -1; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--rose);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none; 
    font-weight: bold;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background-color: var(--light-rose);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 0, 119, 0.4);
}

/* Grille adaptative */
#movie-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    padding: 20px 0;
    justify-items: center;
}

/* Carte de la Wishlist */
.wishlist-card {
    background-color: var(--gray-wishlist);
    width: 100%;
    max-width: 220px;
    border-radius: 14px;
    backdrop-filter: blur(10px);
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--gray-wishlist);
}

.wishlist-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px var(--shadow);
    background-color: var(--light-gray-wishlist);
}

.movie-link {
    text-decoration: none;
    color: var(--white);
}

.wishlist-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}

.wishlist-card h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

/* Bouton Supprimer */
.remove-btn {
    background-color: var(--rose);
    color: var(--white);
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    margin-top: auto; 
}

.remove-btn:hover {
    background-color: var(--light-rose);
}

/* Style du message vide */
#empty-message {
    grid-column: 1 / -1; 
    width: 100%;
    text-align: center;
    margin-top: 80px; 
    font-size: 1.2rem;
    color: var(--text-grey);
    font-style: italic;
}

#movie-list:has(#empty-message) {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

/* --- Responsive Mobile --- */
@media (max-width: 768px) {
    h1 {
        font-size: 1.6rem;
        margin-top: 20px;
    }

    #movie-list {
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px;
    }

    .wishlist-card {
        padding: 10px;
    }

    .wishlist-card img {
        height: 200px; 
    }

    .wishlist-card h3 {
        font-size: 0.9rem;
    }

    .remove-btn {
        padding: 8px;
        font-size: 0.8rem;
    }
}