/* ===========================================
   FILM CARD COMPONENT
   Elegant film poster card with hover effects
   =========================================== */

/* ---------- Base Container ---------- */
.film-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    isolation: isolate;
}

.film-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ---------- Film Poster ---------- */
.film-card__poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.film-card__poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    opacity: 0;
}

.film-card__poster-image.loaded {
    opacity: 1;
}

.film-card:hover .film-card__poster-image,
.film-card.touch-active .film-card__poster-image {
    transform: scale(1.06);
}

.film-card__poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.15) 60%,
        rgba(0, 0, 0, 0.65) 100%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
}

.film-card:hover .film-card__poster-overlay,
.film-card.touch-active .film-card__poster-overlay {
    opacity: 1;
}

/* ---------- Content Section ---------- */
.film-card__content {
    padding: 1.75rem 1.75rem 1.5rem;
    background: #fff;
    position: relative;
    z-index: 2;
}

.film-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    min-height: auto;
}

.film-card__role {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #777;
    margin: 0 0 1.25rem 0;
    line-height: 1.5;
    min-height: auto;
}

/* ---------- Action Buttons ---------- */
.film-card__actions {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.film-card__btn {
    width: 100%;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.film-card__btn--primary {
    padding: 0.75rem 1.25rem;
    background: #FFD700;
    color: #1a1a1a;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.25);
}

.film-card__btn--primary:hover {
    background: #FFC700;
    box-shadow: 0 5px 16px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.film-card__btn--primary:active {
    transform: translateY(0);
}

.film-card__btn--secondary {
    padding: 0.625rem 1rem;
    background: transparent;
    color: #999;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.02em;
    border: 1px solid #e5e5e5;
}

.film-card__btn--secondary:hover {
    background: #fafafa;
    border-color: #d5d5d5;
    color: #666;
}

/* ---------- Year Badge ---------- */
.film-card__year {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.95);
    padding: 0.375rem 0.875rem;
    border-radius: 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.02em;
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 768px) {
    .film-card {
        max-width: 100%;
        border-radius: 10px;
    }

    .film-card__content {
        padding: 1.5rem 1.5rem 1.25rem;
    }

    .film-card__title {
        font-size: 1rem;
    }

    .film-card__role {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }

    .film-card__btn--primary {
        padding: 0.625rem 1rem;
        font-size: 0.75rem;
    }

    .film-card__btn--secondary {
        padding: 0.5rem 0.875rem;
        font-size: 0.6875rem;
    }

    .film-card__year {
        padding: 0.3125rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media screen and (max-width: 480px) {
    .film-card {
        border-radius: 8px;
    }

    .film-card__content {
        padding: 1.25rem 1.25rem 1rem;
    }

    .film-card__title {
        font-size: 0.9375rem;
    }

    .film-card__role {
        font-size: 0.6875rem;
        margin-bottom: 1rem;
    }

    .film-card__actions {
        gap: 0.5rem;
    }

    .film-card__btn--primary {
        padding: 0.5625rem 0.875rem;
        font-size: 0.6875rem;
    }

    .film-card__btn--secondary {
        padding: 0.4375rem 0.75rem;
        font-size: 0.625rem;
    }

    .film-card__year {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.25rem 0.625rem;
        font-size: 0.6875rem;
    }
}

/* ===========================================
   VIDEO MODAL
   =========================================== */

/* ---------- Modal Overlay ---------- */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    padding: 2rem;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.video-modal__container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-modal.active .video-modal__container {
    transform: scale(1);
}

/* ---------- Close Button ---------- */
.video-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-modal__close:hover {
    background: #fff;
    transform: scale(1.1);
}

.video-modal__close:active {
    transform: scale(0.95);
}

.video-modal__close svg {
    width: 24px;
    height: 24px;
    stroke: #1a1a1a;
    stroke-width: 2;
}

/* ---------- Video Player ---------- */
.video-modal__video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* ---------- Title Overlay ---------- */
.video-modal__title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-modal__container:hover .video-modal__title {
    opacity: 1;
}

/* ---------- Responsive Modal ---------- */
@media screen and (max-width: 768px) {
    .video-modal {
        padding: 1rem;
    }

    .video-modal__close {
        width: 40px;
        height: 40px;
        top: 0.75rem;
        right: 0.75rem;
    }

    .video-modal__close svg {
        width: 20px;
        height: 20px;
    }

    .video-modal__title {
        font-size: 1.125rem;
        padding: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .video-modal {
        padding: 0.5rem;
    }

    .video-modal__container {
        border-radius: 8px;
    }

    .video-modal__close {
        width: 36px;
        height: 36px;
        top: 0.5rem;
        right: 0.5rem;
    }

    .video-modal__close svg {
        width: 18px;
        height: 18px;
    }

    .video-modal__title {
        font-size: 1rem;
        padding: 1rem;
    }
}
