.container {
    width: 100% !important;
    margin: 0;
    padding: 0;
}

.heart {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    color: #e74c3c;
    display: flex;
    gap: 1vw;
    justify-content: center;
}

@keyframes loseHeart {
    0%   { transform: scale(1) rotate(0deg); }
    10%  { transform: scale(2.4) rotate(6deg); }
    25%  { transform: scale(2.0) rotate(-6deg); }
    40%  { transform: scale(2.3) rotate(5deg); }
    55%  { transform: scale(1.9) rotate(-5deg); }
    70%  { transform: scale(2.2) rotate(4deg); }
    85%  { transform: scale(1.8) rotate(-4deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.heart-lost {
    display: inline-block;
    animation: loseHeart 0.9s cubic-bezier(.36,.07,.19,.97);
}

.scoreBox {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.2em;
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-family: 'Quicksand', sans-serif;
}

.movieToPlace {
    text-align: center;
    margin-bottom: 40px;
    min-height: 300px;
    position: relative;
}

#game-over {
    display: none;
    height: 300px;
    justify-content: center;
    text-align: center;
    color: #E83151;
    font-family: 'Anton';
    font-size: 5rem;
}

#game-over .score-over {
    font-size: 2rem;
    margin-top: 20px;
    font-family: 'Quicksand', sans-serif;
}

.btn {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    display: none;
    gap: 1rem;
    margin: 1rem;
}

.btn a {
    background-color: #740401;
    color: white;
    padding: 5px 10px;
    margin-right: 5px;
    font-family: 'Oswald';
    font-size: 1rem;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    font-weight: 800;
    text-decoration: none;
}

.movie-card {
    display: inline-block;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    padding: 15px;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 200px;
}

.movie-card:active {
    cursor: grabbing;
}

/* .movie-card.dragging {
    opacity: 1 !important;
} */

.movie-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
    pointer-events: none;
}

.movie-card h3 {
    margin: 0;
    font-size: 1em;
    text-align: center;
    pointer-events: none;
    font-family: 'Quicksand', sans-serif;
}

.timeline {
    position: relative;
    min-height: 250px;
    overflow-x: auto;
}

/* #movies doit rester position: relative (tu l'as déjà) */
#movies {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 150px;
    padding: 0 20px;
    z-index: 2;
}

/* Ligne visuelle — sa largeur sera définie en JS */
.line {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    background: #ffffff;
    transform: translateY(-50%);
    z-index: 1;              /* derrière les vignettes */
    pointer-events: none;
}


.movie-slot {
    position: relative;
    text-align: center;
    padding: 10px 5px;
    z-index: 2;
    flex-shrink: 0;
    transition: transform 0.3s ease, margin 0.3s ease;
}

.movie-slot .content {
    padding: 10px;
    width: 8vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.movie-slot .content img {
    height: 20vh;
}

.movie-slot .year {
    margin: 0;
    font-size: 1rem;
    width: calc(70% - 10px);
    padding: 5px;
    background-color: #01DF7F;
    color: black;
    text-align: center;
    font-family: 'Quicksand';
    font-weight: bold;
}

.movie-slot .year.is-failed {
    background-color: #E83151;
    color: white;
}

.movie-slot.shift-right {
    transform: translateX(80px);
}

::-webkit-scrollbar {
  width: 10px;
  height: 5px;
}

::-webkit-scrollbar-track {
    border-radius: 8px;
    background-color: #e7e7e7;
    border: 1px solid #cacaca;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
}

::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background-color: #E83151;
}

.feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px 60px;
    border-radius: 10px;
    font-size: 2em;
    font-weight: bold;
    z-index: 1000;
    animation: fadeOut 1s forwards;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    font-family: 'Quicksand', sans-serif;
}

.feedback.success {
    background: #2ecc71;
    color: white;
}

.feedback.failed {
    background: #e74c3c;
    color: white;
}

@keyframes fadeOut {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

.instruction {
    margin-bottom: 20px;
    color: white;
    font-family: 'Quicksand', sans-serif;
    text-align: center;
}

@media screen and (max-width: 1024px) {
    .btn a {
        font-size: 1.3rem;
    }
}

@media screen and (max-width: 540px) {
    .scoreBox {
        position: unset;
    }

    .btn a {
        font-size: 1rem;
    }

    .content {
        width: auto !important;
    }

    ::-webkit-scrollbar {
        display: none;
    }

    .timeline {
        margin-bottom: 10vh;
    }

    .feedback {
        font-size: 1rem;
        padding: 20px 40px;
    }

    .instruction.dont-show-on-mobile {
        display: none;
    }

    #game-over {
        height: auto;
        font-size: 4rem;
    }

    .movie-card {
        max-width: 150px;
    }
}