/* Shared layout styles for every page extending base.html */

body {
    background-color: #141414;
    color: #fff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
    padding-top: 80px;
    /* Navbar height compensation */
}

.navbar {
    background-color: #000 !important;
    border-bottom: 1px solid #333;
}

/* Mobile menu background & global refinements */
@media (max-width: 991.98px) {
    body {
        padding-top: 70px;
    }
    .navbar-collapse {
        background-color: #000;
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 8px;
    }
    .container, .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

.navbar-brand {
    color: #e50914 !important;
    font-size: 1.75rem;
    font-family: "Bebas Neue", serif;
}

.nav-link {
    color: #fff !important;
    margin-right: 15px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #e50914 !important;
}

/* Horizontal Scroll Containers */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.carousel-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 20px;
    /* Hide scrollbar spacing */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-scroll::-webkit-scrollbar {
    display: none;
}

.movie-box {
    flex: 0 0 auto;
    width: 160px;
    background: transparent;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.movie-box img {
    width: 100%;
    border-radius: 8px;
    display: block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.movie-box:hover {
    transform: scale(1.05);
    z-index: 10;
}

.section-header {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 4px solid #e50914;
}

/* Free Trial Modal Styles */
.trial-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.trial-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #e50914;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(229, 9, 20, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.trial-modal h2 {
    color: #e50914;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.trial-modal p {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.trial-timer {
    background: rgba(229, 9, 20, 0.2);
    border: 1px solid #e50914;
    border-radius: 10px;
    padding: 1rem;
    margin: 1.5rem 0;
    font-size: 1.3rem;
    color: #e50914;
    font-weight: bold;
}

.trial-modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.trial-modal-buttons button {
    flex: 1;
    min-width: 140px;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.trial-btn-signup {
    background: #e50914;
    color: white;
}

.trial-btn-signup:hover {
    background: #b8070e;
    transform: scale(1.05);
}

.trial-btn-login {
    background: transparent;
    color: white;
    border: 2px solid #fff;
}

.trial-btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* Loading Bar CSS */
#loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #e50914, #ff00cc);
    z-index: 11000;
    transition: width 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
    pointer-events: none;
}

.glass-panel {
    background-color: #000 !important;
    background-image: linear-gradient(145deg, rgba(30, 30, 30, 0.98), rgba(10, 10, 10, 0.99)) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.privacy-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
}

.privacy-option:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.privacy-option.private:hover {
    border-color: #E50914 !important;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.3);
}

.privacy-option.public:hover {
    border-color: #00d2ff !important;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
}

#privacyModal .modal-content,
#privacyModal h5,
#privacyModal p {
    color: white !important;
}

.icon-box {
    transition: transform 0.3s ease;
}

.privacy-option:hover .icon-box {
    transform: scale(1.1);
}

.glass-panel {
    background-color: #000 !important;
    background-image: linear-gradient(145deg, rgba(30, 30, 30, 0.98), rgba(10, 10, 10, 0.99)) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.privacy-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

.privacy-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #e50914 !important;
    transform: translateY(-5px);
}

#privacyModal .modal-content,
#privacyModal h5,
#privacyModal p {
    color: white !important;
}

/* ---------- Row scroll arrows (desktop / mouse users) ---------- */
.row-arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.row-arrow.prev { left: 10px; }
.row-arrow.next { right: 10px; }
.row-arrow:hover { background: #e50914; }
.row-arrow[hidden] { display: none !important; }

.carousel-container:hover .row-arrow,
.row-arrow:focus-visible {
    opacity: 1;
}

@media (hover: none) {
    .row-arrow { display: none !important; }
}

/* ---------- Poster cards: loading shimmer, keyboard + touch access ---------- */
.premium-card {
    background: linear-gradient(100deg, #1c1c1c 30%, #2a2a2a 50%, #1c1c1c 70%);
    background-size: 200% 100%;
    animation: card-shimmer 1.4s linear infinite;
}

@keyframes card-shimmer {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .premium-card { animation: none; }
}

.premium-card:focus-within .premium-overlay {
    opacity: 1;
}

@media (hover: none) {
    /* Hidden buttons must not catch taps; the first tap opens the card */
    .premium-card .premium-overlay { pointer-events: none; }
    .premium-card.touch-open .premium-overlay { opacity: 1; pointer-events: auto; }
}





/* =====================================================================
   Featured hero (home page)
   Slides cross-fade; the active tab's progress bar drives autoplay
   (see static/js/base.js). Reduced-motion users get manual tabs only.
   ===================================================================== */
.fh {
    --fh-duration: 8s;
    position: relative;
    height: min(82vh, 780px);
    min-height: 580px;
    overflow: hidden;
    background: #0b0b0b;
    isolation: isolate;
}

.fh-slides {
    position: absolute;
    inset: 0;
}

.fh-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}

.fh-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    transition: opacity 0.9s ease;
}

/* Only the backdrops cross-fade; the outgoing text leaves quickly so two titles never overlap */
.fh-slide .fh-inner {
    transition: opacity 0.25s ease;
}
.fh-slide:not(.is-active) .fh-inner {
    opacity: 0;
}

.fh-fallback,
.fh-backdrop {
    position: absolute;
    background-size: cover;
    background-position: center 25%;
}

.fh-fallback {
    inset: -60px;
    filter: blur(40px) brightness(0.55);
}

.fh-backdrop {
    inset: 0;
    transform: scale(1.04);
}

.fh-slide.is-active .fh-backdrop {
    animation: fh-zoom 14s ease-out forwards;
}

@keyframes fh-zoom {
    from { transform: scale(1.14); }
    to { transform: scale(1.02); }
}

.fh-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 10, 10, 0.96) 0%, rgba(10, 10, 10, 0.78) 32%, rgba(10, 10, 10, 0.2) 68%, rgba(10, 10, 10, 0.45) 100%),
        linear-gradient(0deg, #141414 0%, rgba(20, 20, 20, 0) 38%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 22%);
}

.fh-shade-promo {
    background:
        linear-gradient(120deg, rgba(229, 9, 20, 0.35), rgba(51, 51, 153, 0.45)),
        linear-gradient(90deg, rgba(10, 10, 10, 0.92) 0%, rgba(10, 10, 10, 0.6) 45%, rgba(10, 10, 10, 0.25) 100%),
        linear-gradient(0deg, #141414 0%, rgba(20, 20, 20, 0) 38%);
}

.fh-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 5% 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.fh-copy {
    max-width: 640px;
    padding-top: 2rem;
}

/* staggered entrance for the active slide's text */
.fh-slide.is-active .fh-copy > * {
    animation: fh-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
.fh-slide.is-active .fh-copy > *:nth-child(2) { animation-delay: 0.08s; }
.fh-slide.is-active .fh-copy > *:nth-child(3) { animation-delay: 0.16s; }
.fh-slide.is-active .fh-copy > *:nth-child(4) { animation-delay: 0.24s; }
.fh-slide.is-active .fh-copy > *:nth-child(5) { animation-delay: 0.32s; }

@keyframes fh-rise {
    from { opacity: 0; transform: translateY(18px); }
}

.fh-eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.9rem;
    margin-bottom: 1.1rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
    font-weight: 500;
}

.fh-eyebrow > span + span:not(.fh-rated)::before {
    content: "\2022";
    margin-right: 0.9rem;
    color: rgba(255, 255, 255, 0.35);
}

.fh-tag {
    padding: 0.32rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(229, 9, 20, 0.45);
    background: rgba(229, 9, 20, 0.16);
    color: #ff5a5f;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.fh-tag-promo {
    border-color: rgba(255, 0, 204, 0.45);
    background: rgba(255, 0, 204, 0.16);
    color: #ff7ae6;
}

.fh-rated {
    padding: 0 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.5;
}

.fh-title {
    margin: 0 0 1rem;
    font-family: var(--font-heading, 'Bebas Neue', sans-serif);
    font-size: clamp(3.2rem, 7.2vw, 6.8rem);
    font-weight: 400;
    line-height: 0.92;
    letter-spacing: 0.02em;
    color: #fff;
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.55);
}

.fh-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.15rem;
}

.fh-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: #f5c518;
    color: #000;
    font-size: 0.85rem;
    font-weight: 800;
}

.fh-genre {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    color: #eee;
    font-size: 0.8rem;
}

.fh-plot {
    max-width: 560px;
    margin-bottom: 1.8rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.05rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fh-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.fh-actions form {
    margin: 0;
}

.fh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    height: 52px;
    padding: 0 1.7rem;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.fh-btn:hover { transform: translateY(-2px); }
.fh-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.fh-btn-primary {
    background: #fff;
    color: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.fh-btn-primary:hover { background: #e9e9e9; color: #000; }

.fh-btn-glass {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    color: #fff;
}
.fh-btn-glass:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }

.fh-btn-icon {
    width: 52px;
    padding: 0;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
}
.fh-btn-icon:hover { border-color: #fff; }
.fh-btn-icon.is-saved { border-color: #e50914; background: #e50914; }

.fh-btn-promo {
    background: linear-gradient(45deg, #ff00cc, #333399);
    color: #fff;
    box-shadow: 0 10px 30px rgba(255, 0, 204, 0.3);
}
.fh-btn-promo:hover { color: #fff; box-shadow: 0 14px 34px rgba(255, 0, 204, 0.45); }

.fh-poster {
    flex-shrink: 0;
    width: clamp(210px, 19vw, 290px);
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: perspective(1100px) rotateY(-9deg) rotateX(2deg);
    transition: transform 0.5s ease;
}
.fh-poster:hover { transform: perspective(1100px) rotateY(0) translateY(-6px); }
.fh-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }

.fh-slide.is-active .fh-poster {
    animation: fh-poster-in 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s backwards;
}

@keyframes fh-poster-in {
    from { opacity: 0; transform: perspective(1100px) rotateY(-20deg) translateX(40px); }
}

/* Tabs + progress */
.fh-controls {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 30px;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
}

.fh-tabs {
    flex: 1;
    display: flex;
    gap: 1.25rem;
}

.fh-toggle {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.fh-toggle:hover { background: rgba(255, 255, 255, 0.15); border-color: #fff; }
.fh-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.fh-tab {
    flex: 1;
    max-width: 230px;
    padding: 0.4rem 0;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s ease;
}
.fh-tab:hover,
.fh-tab.is-active { color: #fff; }
.fh-tab:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 4px; }

.fh-tab-label {
    display: block;
    margin-bottom: 0.55rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.fh-tab-bar {
    display: block;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.fh-tab-fill {
    display: block;
    width: 0;
    height: 100%;
    background: #e50914;
}

.fh-tab.is-active .fh-tab-fill {
    animation: fh-progress var(--fh-duration) linear forwards;
}

.fh.is-paused .fh-tab.is-active .fh-tab-fill {
    animation-play-state: paused;
}

@keyframes fh-progress {
    from { width: 0; }
    to { width: 100%; }
}

@media (min-width: 992px) {
    /* body padding is ~10px taller than the navbar; close the gap above the hero */
    .fh { margin-top: -10px; }
}

@media (max-width: 991.98px) {
    .fh-poster { display: none; }
}

@media (max-width: 767.98px) {
    .fh {
        height: 74vh;
        min-height: 540px;
    }
    .fh-inner {
        align-items: flex-end;
        padding: 0 1.25rem 78px;
    }
    .fh-shade {
        background:
            linear-gradient(0deg, #141414 0%, rgba(20, 20, 20, 0.85) 38%, rgba(20, 20, 20, 0.15) 75%),
            linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 25%);
    }
    .fh-title { font-size: clamp(2.6rem, 12vw, 3.4rem); }
    .fh-plot { font-size: 0.95rem; margin-bottom: 1.3rem; }
    .fh-eyebrow { font-size: 0.8rem; margin-bottom: 0.8rem; }
    .fh-eyebrow .fh-seasons,
    .fh-eyebrow .fh-rated { display: none; }  /* keep the line to one row */
    .fh-btn { height: 46px; padding: 0 1.25rem; font-size: 0.95rem; }
    .fh-btn-icon { width: 46px; padding: 0; }
    .fh-controls { bottom: 22px; padding: 0 1.25rem; gap: 0.75rem; align-items: center; }
    .fh-tabs { gap: 0.5rem; }
    .fh-toggle { width: 30px; height: 30px; }
    .fh-tab { padding: 0.5rem 0; }
    .fh-tab-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .fh-slide,
    .fh-slide.is-active { transition: none; }
    .fh-slide.is-active .fh-backdrop,
    .fh-slide.is-active .fh-copy > *,
    .fh-slide.is-active .fh-poster { animation: none; }
    /* still auto-advances (JS timer), but without the moving bar */
    .fh-tab.is-active .fh-tab-fill { animation: none; width: 100%; }
}

/* =====================================================================
   Page body: title rows
   ===================================================================== */
:root {
    --gutter: clamp(16px, 4vw, 56px);
}

.home-body {
    padding: 2.25rem 0 1rem;
    background: radial-gradient(1100px 420px at 15% 0%, rgba(229, 9, 20, 0.07), transparent 70%);
}

.row-section {
    margin-bottom: 2.6rem;
}

.row-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0 var(--gutter);
}

.row-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.row-heading {
    flex: 1;
    min-width: 0;
}

.row-heading h2 {
    margin: 0;
    font-family: var(--font-heading, 'Bebas Neue', sans-serif);
    font-size: clamp(1.5rem, 2.1vw, 1.9rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1;
    color: #fff;
}

.row-heading p {
    margin: 0.25rem 0 0;
    color: #8f8f8f;
    font-size: 0.85rem;
}

.row-badge {
    flex-shrink: 0;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.accent-red    { background: rgba(229, 9, 20, 0.14);   color: #ff4d55; }
.accent-blue   { background: rgba(78, 142, 255, 0.14); color: #6ea2ff; }
.accent-yellow { background: rgba(255, 202, 44, 0.14); color: #ffca2c; }
.accent-pink   { background: rgba(214, 51, 132, 0.16); color: #ff5fae; }
.accent-green  { background: rgba(46, 204, 113, 0.14); color: #3ddc84; }

/* Rows scroll edge-to-edge but start on the same line as the heading */
.row-section .carousel-container {
    padding: 0;
    margin: 0;
}

.row-section .carousel-scroll {
    margin: 0;
    padding: 16px var(--gutter) 20px;
    gap: 16px;
    scroll-padding-left: var(--gutter);
}

/* fade at the right edge hints that the row scrolls */
.row-section .carousel-container::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--gutter);
    background: linear-gradient(90deg, rgba(20, 20, 20, 0), #141414);
    pointer-events: none;
    z-index: 4;
}

.carousel-scroll > .mcard {
    flex: 0 0 clamp(132px, 12.5vw, 190px);
    scroll-snap-align: start;
}

.media-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.75rem 1.1rem;
}

/* =====================================================================
   Title card (templates/partials/media_card.html)
   ===================================================================== */
.mcard {
    position: relative;
    min-width: 0;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.mcard-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(100deg, #1c1c1c 30%, #2a2a2a 50%, #1c1c1c 70%);
    background-size: 200% 100%;
    animation: card-shimmer 1.4s linear infinite;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: box-shadow 0.35s ease;
}

.mcard-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.mcard-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.75) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mcard:hover,
.mcard:focus-within {
    transform: translateY(-6px);
}

.mcard:hover .mcard-poster,
.mcard:focus-within .mcard-poster {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(229, 9, 20, 0.6);
}

.mcard:hover .mcard-poster img { transform: scale(1.06); }
.mcard:hover .mcard-poster::after,
.mcard:focus-within .mcard-poster::after { opacity: 1; }

.mcard-poster:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.mcard-rating {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}
.mcard-rating i { color: #f5c518; font-size: 0.62rem; }

.mcard-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    margin: -26px 0 0 -26px;
    padding-left: 3px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.92);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.45);
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mcard:hover .mcard-play,
.mcard-poster:focus-visible .mcard-play {
    opacity: 1;
    transform: scale(1);
}

.mcard-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mcard:hover .mcard-actions,
.mcard:focus-within .mcard-actions {
    opacity: 1;
    transform: none;
}

.mcard-actions form { margin: 0; }

.mcard-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.mcard-icon:hover { background: #e50914; border-color: #e50914; transform: scale(1.08); }
.mcard-icon:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mcard-icon.is-saved { background: #e50914; border-color: #e50914; }

.mcard-info {
    padding: 0.65rem 0.15rem 0;
}

.mcard-title {
    margin: 0;
    font-family: inherit;
    letter-spacing: normal;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    color: #ececec;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mcard:hover .mcard-title { color: #fff; }

.mcard-meta {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.2rem;
    color: #8c8c8c;
    font-size: 0.78rem;
}
.mcard-meta span + span::before {
    content: "\2022";
    margin-right: 0.45rem;
    color: #555;
}

/* Touch screens: no hover, so keep the action buttons visible and skip the play badge */
@media (hover: none) {
    .mcard-actions { opacity: 1; transform: none; }
    .mcard-play { display: none; }
    .mcard:hover, .mcard:focus-within { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .mcard, .mcard-poster img { transition: none; }
    .mcard-poster { animation: none; }
}

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer {
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f0f0f;
    color: #8c8c8c;
    font-size: 0.85rem;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    padding: 2rem var(--gutter) 1.25rem;
}

.footer-brand {
    font-family: var(--font-heading, 'Bebas Neue', sans-serif);
    font-size: 1.6rem;
    letter-spacing: 0.04em;
    color: #e50914;
    text-decoration: none;
}
.footer-tagline { margin: 0.1rem 0 0; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}
.footer-links a { color: #b3b3b3; text-decoration: none; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
    padding: 1rem var(--gutter) 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: #6f6f6f;
}
