/* =========================================================
   NEWMOVIES — MOVIE DETAIL V1
   Cinematic detail page, cover-to-watch flow
   ========================================================= */

.movie-detail-page {
    background:
        radial-gradient(circle at 92% 17%, rgba(118, 13, 28, .13), transparent 30%),
        #04090d;
    color: #f4f5f6;
}

.movie-detail-page .site-header {
    position: relative;
    z-index: 30;
    background: rgba(4, 9, 13, .97);
    border-bottom: 1px solid rgba(151, 24, 41, .24);
}

.movie-hero {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background:
        linear-gradient(180deg, #101419, #070b0e);
}

.movie-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--movie-hero-image);
    background-position: center 24%;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1.01);
}

.movie-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(4, 9, 13, .36) 0%,
            rgba(4, 9, 13, .05) 48%,
            rgba(4, 9, 13, .11) 100%
        );
}

.movie-hero-shade {
    position: absolute;
    z-index: 1;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(4, 9, 13, .02) 0%, rgba(4, 9, 13, .08) 52%, #04090d 100%),
        linear-gradient(90deg, rgba(4, 9, 13, .12), transparent 58%);
}

.movie-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: 110px;
    padding-bottom: 128px;
}

.movie-hero-copy {
    max-width: 600px;
}

.movie-title-logo {
    display: block;
    width: min(390px, 62vw);
    max-height: 150px;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 20px;
    filter: drop-shadow(0 7px 18px rgba(0,0,0,.32));
}

.movie-hero-title {
    margin: 0 0 20px;
    max-width: 760px;
    font-size: clamp(42px, 6vw, 82px);
    line-height: .94;
    letter-spacing: -.045em;
    text-wrap: balance;
}

.movie-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    align-items: center;
    color: #f1f3f5;
    font-size: 14px;
    font-weight: 800;
}

.movie-meta-separator {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,.45);
}

.movie-rating-inline {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.movie-star,
.related-rating {
    color: #ffc61a;
}

.movie-genre-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.movie-genre-pills span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 13px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(6, 11, 15, .60);
    backdrop-filter: blur(8px);
    color: #f2f3f4;
    font-size: 12px;
    font-weight: 800;
}

.movie-main {
    position: relative;
    z-index: 5;
    margin-top: -94px;
    padding-bottom: 18px;
}

.movie-main-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.movie-poster-column {
    position: relative;
}

.movie-detail-poster {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid rgba(220, 40, 61, .78);
    border-radius: 11px;
    background: #10161b;
    box-shadow: 0 20px 50px rgba(0,0,0,.30);
}

.movie-detail-poster-placeholder {
    display: grid;
    place-items: center;
    color: #8a9299;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .14em;
}

.movie-info-column {
    min-width: 0;
    padding-top: 12px;
}

.movie-info-column > h2 {
    margin: 0 0 13px;
    font-size: clamp(30px, 3.7vw, 48px);
    line-height: 1;
    letter-spacing: -.035em;
}

.movie-overview {
    max-width: 790px;
    margin: 0 0 24px;
    color: #bcc3c9;
    font-size: 14px;
    line-height: 1.72;
}

.movie-facts-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    gap: 0 32px;
    max-width: 870px;
    margin-bottom: 24px;
}

.movie-fact {
    display: grid;
    grid-template-columns: 22px 96px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-height: 32px;
    padding: 5px 0;
}

.movie-fact-icon {
    color: #ef2b45;
    font-size: 14px;
    line-height: 1.25;
}

.movie-fact-label {
    color: #aeb6bd;
    font-size: 12px;
    line-height: 1.35;
}

.movie-fact strong {
    min-width: 0;
    color: #eef1f3;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.movie-watch-cover {
    position: relative;
    display: block;
    width: 100%;
    min-height: 280px;
    aspect-ratio: 16 / 5.25;
    overflow: hidden;
    border: 1px solid rgba(223, 41, 62, .88);
    border-radius: 11px;
    background: #0b1116;
    text-decoration: none;
    box-shadow:
        0 18px 48px rgba(0,0,0,.20),
        inset 0 1px 0 rgba(255,255,255,.02);
}

.movie-watch-cover > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.movie-watch-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.22)),
        radial-gradient(circle at 50% 52%, rgba(0,0,0,.04), rgba(0,0,0,.20) 70%);
}

.movie-watch-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.movie-watch-play {
    position: relative;
    width: 66px;
    height: 66px;
    margin-bottom: 10px;
    border: 4px solid #ee334b;
    border-radius: 50%;
    background: rgba(7, 10, 14, .72);
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    transition:
        transform .2s ease,
        background-color .2s ease,
        box-shadow .2s ease;
}

.movie-watch-play::after {
    content: "";
    position: absolute;
    left: 27px;
    top: 20px;
    border-left: 18px solid #fff;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

.movie-watch-center strong {
    font-size: 20px;
    line-height: 1.1;
    text-shadow: 0 2px 12px rgba(0,0,0,.55);
}

.movie-watch-center small {
    margin-top: 5px;
    color: rgba(255,255,255,.86);
    font-size: 11px;
}

.movie-watch-cover:hover > img {
    transform: scale(1.025);
}

.movie-watch-cover:hover .movie-watch-play {
    transform: scale(1.07);
    background: rgba(190, 28, 48, .86);
    box-shadow: 0 0 30px rgba(218, 39, 62, .25);
}

.movie-content-section {
    padding: 28px 0 12px;
}

.related-section {
    padding-top: 38px;
    padding-bottom: 56px;
}

.movie-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.movie-section-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 23px;
    line-height: 1;
    letter-spacing: -.02em;
}

.movie-section-heading h2 > span {
    width: 7px;
    height: 28px;
    border-radius: 4px;
    background: #f12643;
    box-shadow: 0 0 16px rgba(241, 38, 67, .18);
}

.cast-row {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 12px;
}

.cast-card {
    min-width: 0;
}

.cast-photo {
    display: block;
    width: 100%;
    aspect-ratio: .82;
    object-fit: cover;
    border: 1px solid rgba(112, 128, 140, .32);
    border-radius: 8px;
    background: #111820;
}

.cast-photo-placeholder {
    display: grid;
    place-items: center;
    color: #d7dce0;
    font-size: 28px;
    font-weight: 900;
    background:
        radial-gradient(circle at 50% 25%, rgba(153, 31, 47, .25), transparent 45%),
        #111820;
}

.cast-card strong {
    display: block;
    margin-top: 8px;
    overflow: hidden;
    color: #f0f2f3;
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cast-card span {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #858f98;
    font-size: 10px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.related-card {
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.related-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(124, 52, 61, .55);
    border-radius: 8px;
    background: #10161b;
}

.related-poster > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.related-poster-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #77818a;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .10em;
}

.related-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(2,5,8,.94) 100%);
}

.related-poster strong {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 9px;
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,.8);
}

.related-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
    color: #929ca5;
    font-size: 10px;
    font-weight: 700;
}

.related-card:hover .related-poster > img {
    transform: scale(1.035);
}

.related-card:hover .related-poster {
    border-color: rgba(216, 42, 62, .72);
}

.movie-state-page {
    min-height: 62vh;
    display: grid;
    place-items: center;
    padding: 80px 0;
}

.movie-state-card {
    max-width: 620px;
    margin: 0 auto;
    padding: 40px;
    border: 1px solid rgba(126, 35, 48, .35);
    border-radius: 14px;
    background: #0a1116;
    text-align: center;
}

.movie-state-card > span {
    color: #ef2b45;
    font-size: 24px;
    font-weight: 900;
}

.movie-state-card h1 {
    margin: 12px 0 10px;
}

.movie-state-card p {
    color: #9da8b1;
}

.movie-state-card a {
    display: inline-flex;
    margin-top: 14px;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 1180px) {
    .cast-row {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }

    .cast-card:nth-child(n+9) {
        display: none;
    }
}

@media (max-width: 960px) {
    .movie-hero {
        min-height: 390px;
    }

    .movie-main-grid {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 22px;
    }

    .movie-facts-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .cast-row {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .cast-card:nth-child(n) {
        display: block;
    }

    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .movie-hero {
        min-height: 420px;
        align-items: flex-end;
    }

    .movie-hero::before {
        background-position: 64% 20%;
    }

    .movie-hero-inner {
        padding-top: 80px;
        padding-bottom: 115px;
    }

    .movie-main {
        margin-top: -78px;
    }

    .movie-main-grid {
        grid-template-columns: 1fr;
    }

    .movie-poster-column {
        width: 145px;
    }

    .movie-info-column {
        padding-top: 0;
    }

    .movie-watch-cover {
        min-height: 220px;
        aspect-ratio: 16 / 8.6;
    }

    .cast-row {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 8px;
        scroll-snap-type: x proximity;
    }

    .cast-card {
        flex: 0 0 112px;
        scroll-snap-align: start;
    }

    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .movie-title-logo {
        width: 72vw;
    }

    .movie-hero-title {
        font-size: 42px;
    }

    .movie-hero-meta {
        font-size: 12px;
    }

    .movie-main-grid {
        gap: 18px;
    }

    .movie-poster-column {
        width: 126px;
    }

    .movie-info-column > h2 {
        font-size: 31px;
    }

    .movie-overview {
        font-size: 13px;
    }

    .movie-fact {
        grid-template-columns: 20px 86px minmax(0, 1fr);
    }

    .movie-watch-cover {
        min-height: 190px;
    }

    .movie-watch-play {
        width: 58px;
        height: 58px;
    }

    .movie-watch-play::after {
        left: 24px;
        top: 17px;
    }

    .movie-watch-center strong {
        font-size: 17px;
    }

    .related-grid {
        gap: 10px;
    }
}


/* =========================================================
   MOVIE DETAIL V1.2 — READABILITY PASS
   Larger real-world text without changing the layout
   ========================================================= */

.movie-hero-meta {
    font-size: 16px;
}

.movie-genre-pills span {
    min-height: 32px;
    padding: 0 14px;
    font-size: 14px;
}

.movie-info-column > h2 {
    font-size: clamp(34px, 3.8vw, 50px);
}

.movie-overview {
    max-width: 850px;
    font-size: 17px;
    line-height: 1.72;
}

.movie-fact {
    grid-template-columns: 24px 112px minmax(0, 1fr);
    gap: 9px;
    min-height: 37px;
    padding: 6px 0;
}

.movie-fact-icon {
    font-size: 16px;
}

.movie-fact-label {
    font-size: 14px;
    line-height: 1.45;
}

.movie-fact strong {
    font-size: 14px;
    line-height: 1.5;
}

.movie-watch-center strong {
    font-size: 23px;
}

.movie-watch-center small {
    font-size: 13px;
}

.movie-section-heading h2 {
    font-size: 26px;
}

.cast-card strong {
    margin-top: 9px;
    font-size: 13px;
    line-height: 1.3;
}

.cast-card span {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.35;
}

.related-poster strong {
    left: 11px;
    right: 11px;
    bottom: 10px;
    font-size: 14px;
    line-height: 1.25;
}

.related-meta {
    padding-top: 8px;
    font-size: 12px;
}

@media (max-width: 960px) {
    .movie-overview {
        font-size: 16px;
    }

    .movie-fact {
        grid-template-columns: 23px 105px minmax(0, 1fr);
    }

    .movie-fact-label,
    .movie-fact strong {
        font-size: 13.5px;
    }
}

@media (max-width: 700px) {
    .movie-hero-meta {
        font-size: 14px;
    }

    .movie-genre-pills span {
        font-size: 13px;
    }

    .movie-overview {
        font-size: 15px;
        line-height: 1.68;
    }

    .cast-card strong {
        font-size: 12.5px;
    }

    .cast-card span {
        font-size: 11.5px;
    }

    .related-poster strong {
        font-size: 13px;
    }

    .related-meta {
        font-size: 11px;
    }
}

@media (max-width: 430px) {
    .movie-overview {
        font-size: 15px;
    }

    .movie-fact {
        grid-template-columns: 21px 92px minmax(0, 1fr);
    }

    .movie-fact-label,
    .movie-fact strong {
        font-size: 13px;
    }

    .movie-watch-center strong {
        font-size: 19px;
    }

    .movie-watch-center small {
        font-size: 12px;
    }
}


/* =========================================================
   MOVIE DETAIL V1.3 — FACTS ALIGNMENT FIX
   Tighten and align the info rows below the title
   ========================================================= */

.movie-facts-grid {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 10px 42px;
    align-items: start;
    max-width: 980px;
}

.movie-fact {
    grid-template-columns: 20px 112px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 0;
    align-items: center;
    min-height: 40px;
    padding: 5px 0;
}

.movie-fact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    margin-top: 0;
}

.movie-fact-label {
    display: block;
    white-space: nowrap;
    margin: 0;
}

.movie-fact strong {
    display: block;
    margin: 0;
}

@media (max-width: 1100px) {
    .movie-facts-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px 0;
        max-width: 760px;
    }
}

@media (max-width: 960px) {
    .movie-fact {
        grid-template-columns: 20px 106px minmax(0, 1fr);
        column-gap: 11px;
    }
}

@media (max-width: 430px) {
    .movie-fact {
        grid-template-columns: 18px 92px minmax(0, 1fr);
        column-gap: 10px;
    }
}


/* =========================================================
   MOVIE DETAIL V1.4 — PREMIUM FACTS LAYOUT
   Two deliberate aligned columns
   ========================================================= */

.movie-facts-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 56px;
    max-width: 980px;
    margin-bottom: 26px;
}

.movie-facts-column {
    display: grid;
    grid-template-rows: repeat(4, minmax(42px, auto));
    align-content: start;
}

.movie-fact {
    display: grid;
    grid-template-columns: 22px 112px minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    min-height: 42px;
    padding: 5px 0;
}

.movie-fact-icon {
    width: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ef2b45;
    line-height: 1;
}

.movie-fact-label {
    margin: 0;
    white-space: nowrap;
    color: #aeb6bd;
}

.movie-fact strong {
    margin: 0;
    min-width: 0;
    color: #eef1f3;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .movie-facts-grid {
        gap: 0 34px;
    }

    .movie-fact {
        grid-template-columns: 21px 102px minmax(0, 1fr);
        column-gap: 10px;
    }
}

@media (max-width: 820px) {
    .movie-facts-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        max-width: 760px;
    }

    .movie-facts-column {
        grid-template-rows: none;
    }

    .movie-fact {
        grid-template-columns: 21px 110px minmax(0, 1fr);
    }
}

@media (max-width: 430px) {
    .movie-fact {
        grid-template-columns: 19px 92px minmax(0, 1fr);
        column-gap: 9px;
    }
}


/* =========================================================
   MOVIE DETAIL V1.5 — HERO META ALIGNMENT
   Align year/runtime/rating + genre pills under logo/title
   ========================================================= */

.movie-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.movie-title-logo,
.movie-hero-title,
.movie-hero-meta,
.movie-genre-pills {
    margin-left: 0;
}

.movie-hero-meta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-height: 28px;
    margin-top: 0;
    margin-bottom: 14px;
    color: #f4f5f6;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

.movie-hero-meta > span:not(.movie-meta-separator) {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
}

.movie-meta-separator {
    width: 1px;
    height: 18px;
    margin: 0 14px;
    flex: 0 0 1px;
    background: rgba(255,255,255,.48);
}

.movie-rating-inline {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}

.movie-star {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.movie-genre-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 9px;
    margin-top: 0;
}

.movie-genre-pills span {
    min-height: 34px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

@media (max-width: 700px) {
    .movie-hero-meta {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .movie-meta-separator {
        margin: 0 10px;
        height: 16px;
    }

    .movie-genre-pills {
        gap: 7px;
    }

    .movie-genre-pills span {
        min-height: 31px;
        padding: 0 12px;
        font-size: 13px;
    }
}

@media (max-width: 430px) {
    .movie-hero-meta {
        row-gap: 8px;
    }

    .movie-meta-separator {
        margin: 0 8px;
    }
}


/* =========================================================
   MOVIE DETAIL V1.6 — HERO SAFE GUTTER
   Keep metadata away from viewport edge
   ========================================================= */

/*
 * The hero container spans the full viewport, unlike the normal .site-shell.
 * Give text metadata the same responsive left gutter as the main page shell:
 * 24px minimum, then centered against the 1480px site width on wide screens.
 */
.movie-hero-meta,
.movie-genre-pills {
    margin-left: max(24px, calc((100vw - 1480px) / 2));
}

/* If a movie has no TMDb logo and falls back to a text title,
   keep that title inside the same safe gutter too. */
.movie-hero-title {
    margin-left: max(24px, calc((100vw - 1480px) / 2));
}

@media (max-width: 700px) {
    .movie-hero-meta,
    .movie-genre-pills,
    .movie-hero-title {
        margin-left: 24px;
        margin-right: 24px;
    }
}

@media (max-width: 430px) {
    .movie-hero-meta,
    .movie-genre-pills,
    .movie-hero-title {
        margin-left: 18px;
        margin-right: 18px;
    }
}


/* =========================================================
   MOVIE DETAIL V1.7 — HERO LOGO GROUP
   Move logo slightly right and center metadata beneath it
   ========================================================= */

.movie-hero-copy {
    width: min(560px, calc(100vw - 48px));
    margin-left: 34px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Move the actual logo a little farther right. */
.movie-title-logo {
    width: min(430px, 72vw);
    margin-left: 28px;
    margin-right: 0;
    margin-bottom: 18px;
}

/*
 * Both metadata rows share the same visual width and are centered
 * below the logo, like the reference image.
 */
.movie-hero-meta,
.movie-genre-pills {
    width: min(470px, calc(100vw - 70px));
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
    align-self: flex-start;
}

.movie-hero-meta {
    display: flex;
    gap: 0;
    margin-bottom: 13px;
}

.movie-genre-pills {
    display: flex;
    gap: 9px;
    margin-top: 0;
}

/* Text-title fallback should line up with the same grouped block. */
.movie-hero-title {
    width: min(470px, calc(100vw - 70px));
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 700px) {
    .movie-hero-copy {
        width: calc(100vw - 36px);
        margin-left: 18px;
    }

    .movie-title-logo {
        width: min(360px, 76vw);
        margin-left: 18px;
    }

    .movie-hero-meta,
    .movie-genre-pills,
    .movie-hero-title {
        width: min(410px, calc(100vw - 36px));
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 430px) {
    .movie-hero-copy {
        width: calc(100vw - 28px);
        margin-left: 14px;
    }

    .movie-title-logo {
        width: min(300px, 78vw);
        margin-left: 14px;
    }

    .movie-hero-meta,
    .movie-genre-pills,
    .movie-hero-title {
        width: calc(100vw - 28px);
        justify-content: flex-start;
    }
}


/* =========================================================
   MOVIE DETAIL V1.8 — FACT ICONS MATCH REFERENCE
   ========================================================= */
.movie-fact-icon {
    width: 20px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ff314d;
    line-height: 1;
}

.movie-fact-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    overflow: visible;
}

.movie-fact {
    grid-template-columns: 24px 112px minmax(0, 1fr);
    column-gap: 14px;
}

@media (max-width: 1100px) {
    .movie-fact {
        grid-template-columns: 24px 104px minmax(0, 1fr);
    }
}


/* =========================================================
   MOVIE DETAIL V1.9 — YEAR FACT LINK
   ========================================================= */

.movie-fact-link {
    color: #eef1f3;
    text-decoration: none;
    border-bottom: 1px solid rgba(239, 43, 69, .34);
    transition:
        color .16s ease,
        border-color .16s ease;
}

.movie-fact-link:hover {
    color: #ff5268;
    border-color: rgba(239, 43, 69, .72);
}


/* =========================================================
   MOVIE DETAIL V2.0 — 12 RELATED MOVIES + IN-CARD META
   ========================================================= */

.related-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px 14px;
}

.related-poster {
    position: relative;
}

.related-card-shade {
    background:
        linear-gradient(
            180deg,
            transparent 38%,
            rgba(2, 5, 8, .34) 59%,
            rgba(2, 5, 8, .96) 100%
        );
}

.related-card-info {
    position: absolute;
    z-index: 2;
    left: 11px;
    right: 11px;
    bottom: 10px;
    min-width: 0;
}

.related-card-info > strong {
    position: static;
    display: block;
    margin: 0 0 7px;
    color: #fff;
    font-size: 14px;
    line-height: 1.22;
    text-shadow: 0 2px 10px rgba(0,0,0,.84);
}

.related-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #d8dde1;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
}

.related-card-meta .related-rating {
    color: #ffd01f;
    white-space: nowrap;
}

/* Year/rating no longer sit below the poster. */
.related-meta {
    display: none;
}

@media (max-width: 1100px) {
    .related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px 10px;
    }

    .related-card-info {
        left: 9px;
        right: 9px;
        bottom: 8px;
    }

    .related-card-info > strong {
        font-size: 13px;
    }

    .related-card-meta {
        font-size: 11px;
    }
}

@media (max-width: 520px) {
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   MOVIE DETAIL V2.1 — PREMIUM WATCH BUTTON
   ========================================================= */

.movie-watch-center {
    pointer-events: none;
}

.movie-watch-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px 14px 14px;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(16, 20, 27, .84), rgba(8, 11, 16, .94));
    border: 1px solid rgba(255,255,255,.12);
    box-shadow:
        0 18px 40px rgba(0,0,0,.36),
        0 0 0 1px rgba(223, 41, 62, .14),
        0 0 28px rgba(223, 41, 62, .16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease,
        background .2s ease;
}

.movie-watch-icon {
    position: relative;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,.20), transparent 34%),
        linear-gradient(180deg, #ff4c67 0%, #d81f3c 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.20),
        0 10px 22px rgba(216,31,60,.30),
        0 0 0 6px rgba(216,31,60,.12);
}

.movie-watch-icon::after {
    content: "";
    position: absolute;
    left: 23px;
    top: 18px;
    border-left: 16px solid #fff;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,.18));
}

.movie-watch-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    min-width: 0;
}

.movie-watch-copy strong {
    position: static;
    margin: 0;
    font-size: 24px;
    line-height: 1;
    letter-spacing: -.02em;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.40);
}

.movie-watch-copy small {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.2;
    color: rgba(255,255,255,.82);
    white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0,0,0,.42);
}

.movie-watch-cover:hover .movie-watch-cta {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(255,255,255,.18);
    background:
        linear-gradient(180deg, rgba(20, 25, 32, .88), rgba(9, 12, 17, .96));
    box-shadow:
        0 22px 46px rgba(0,0,0,.40),
        0 0 0 1px rgba(223, 41, 62, .18),
        0 0 36px rgba(223, 41, 62, .22);
}

.movie-watch-cover:hover .movie-watch-icon {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 12px 26px rgba(216,31,60,.36),
        0 0 0 7px rgba(216,31,60,.14);
}

@media (max-width: 760px) {
    .movie-watch-cta {
        gap: 12px;
        padding: 12px 16px 12px 12px;
    }

    .movie-watch-icon {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }

    .movie-watch-icon::after {
        left: 20px;
        top: 15px;
        border-left-width: 14px;
        border-top-width: 10px;
        border-bottom-width: 10px;
    }

    .movie-watch-copy strong {
        font-size: 20px;
    }

    .movie-watch-copy small {
        font-size: 11px;
    }
}

@media (max-width: 520px) {
    .movie-watch-cta {
        gap: 10px;
        padding: 11px 14px 11px 11px;
    }

    .movie-watch-icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .movie-watch-icon::after {
        left: 18px;
        top: 14px;
        border-left-width: 13px;
        border-top-width: 9px;
        border-bottom-width: 9px;
    }

    .movie-watch-copy strong {
        font-size: 18px;
    }

    .movie-watch-copy small {
        font-size: 10px;
    }
}


/* =========================================================
   MOVIE DETAIL V2.2 — TMDB CAST + TAGLINE + SHARED CARDS
   ========================================================= */

.movie-tagline {
    max-width: 780px;
    margin: -2px 0 12px;
    color: #e5e9ed;
    font-size: clamp(15px, 1.55vw, 19px);
    font-weight: 650;
    font-style: italic;
    line-height: 1.45;
    letter-spacing: -.012em;
    opacity: .92;
}

/* Keep the watch panel connected to the facts block. */
.movie-facts-grid {
    margin-bottom: 16px;
}

/* Real TMDB cast photos make this row feel more editorial. */
.cast-section {
    padding-top: 32px;
}

.cast-row {
    gap: 14px;
}

.cast-photo {
    aspect-ratio: .78;
    object-position: center 20%;
    border-color: rgba(255,255,255,.12);
    border-radius: 10px;
    filter: saturate(.95) contrast(1.03);
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

.cast-card strong {
    margin-top: 9px;
    font-size: 11.5px;
}

.cast-card span {
    color: #9aa4ad;
}

/* More Like This now uses the global shared card system. */
.nm-related-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px 14px;
}

.related-card-shared {
    min-width: 0;
    border-radius: 10px;
}

.related-card-shared .nm-card__bottom {
    grid-template-columns: minmax(0, 1fr);
    left: 11px;
    right: 11px;
    bottom: 11px;
}

.related-card-shared .nm-card__content {
    min-height: 58px;
}

.related-card-shared .nm-card__fallback-title,
.related-card-shared .nm-card__title {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.related-card-shared .nm-card__fallback-title {
    font-size: 14px;
}

.related-card-shared .nm-card__title {
    font-size: 13px;
}

.related-card-shared .nm-card__meta {
    justify-content: space-between;
    gap: 8px;
}

@media (max-width: 1100px) {
    .nm-related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .movie-tagline {
        margin-bottom: 10px;
        font-size: 15px;
    }

    .nm-related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px 10px;
    }
}

@media (max-width: 520px) {
    .nm-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   MOVIE DETAIL V3 — CALM PLAY CTA + INTERNAL CAST LINKS
   ========================================================= */

/* Cast cards are internal navigation now. */
.cast-card {
    display: block;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
    outline: none;
}

.cast-card .cast-photo {
    transition: transform .22s ease, border-color .22s ease, filter .22s ease;
}

.cast-card:hover .cast-photo,
.cast-card:focus-visible .cast-photo {
    transform: translateY(-2px);
    border-color: rgba(241, 38, 67, .52);
    filter: brightness(1.04);
}

.cast-card:hover strong,
.cast-card:focus-visible strong {
    color: #fff;
}

.cast-card:focus-visible {
    box-shadow: 0 0 0 2px rgba(241, 38, 67, .38);
}

/* Quiet streaming-style CTA: less glow, less red, more glass. */
.movie-watch-cta {
    gap: 10px;
    padding: 10px 15px 10px 10px;
    border-radius: 14px;
    background: rgba(8, 12, 17, .78);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .30);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.movie-watch-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    background: rgba(241, 38, 67, .16);
    border: 1px solid rgba(241, 38, 67, .52);
    box-shadow: none;
}

.movie-watch-icon::after {
    left: 16px;
    top: 12px;
    border-left: 12px solid #f6f8fa;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    filter: none;
}

.movie-watch-copy strong {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.015em;
    text-shadow: none;
}

.movie-watch-copy small {
    max-width: 240px;
    margin-top: 4px;
    overflow: hidden;
    color: rgba(221, 227, 232, .72);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: none;
}

.movie-watch-cover:hover .movie-watch-cta {
    transform: translateY(-1px);
    background: rgba(11, 16, 22, .88);
    border-color: rgba(241, 38, 67, .34);
    box-shadow: 0 13px 34px rgba(0, 0, 0, .34);
}

.movie-watch-cover:hover .movie-watch-icon {
    background: rgba(241, 38, 67, .23);
    border-color: rgba(241, 38, 67, .72);
    box-shadow: none;
}

@media (max-width: 760px) {
    .movie-watch-cta {
        gap: 9px;
        padding: 9px 13px 9px 9px;
    }

    .movie-watch-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .movie-watch-icon::after {
        left: 14px;
        top: 10px;
        border-left-width: 11px;
        border-top-width: 7px;
        border-bottom-width: 7px;
    }

    .movie-watch-copy strong {
        font-size: 16px;
    }
}

@media (max-width: 520px) {
    .movie-watch-cta {
        border-radius: 12px;
    }

    .movie-watch-copy small {
        max-width: 180px;
    }
}


/* =========================================================
   MOVIE DETAIL V4 — INTERNAL DISCOVERY LINKS
   Category / Country / Year / Actors
   ========================================================= */

.movie-hero-meta-link {
    color: inherit;
    text-decoration: none;
    transition: color .16s ease;
}

.movie-hero-meta-link:hover,
.movie-hero-meta-link:focus-visible {
    color: #ff5268;
}

.movie-genre-pills a {
    min-height: 34px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 999px;
    background: rgba(8, 13, 17, .72);
    color: #edf1f4;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    transition:
        color .16s ease,
        border-color .16s ease,
        background .16s ease,
        transform .16s ease;
}

.movie-genre-pills a:hover,
.movie-genre-pills a:focus-visible {
    color: #fff;
    border-color: rgba(239, 43, 69, .58);
    background: rgba(239, 43, 69, .10);
    transform: translateY(-1px);
}

.movie-fact-links {
    min-width: 0;
}

.movie-fact-link {
    color: #eef1f3;
    text-decoration: none;
    border-bottom: 1px solid rgba(239, 43, 69, .30);
    transition: color .16s ease, border-color .16s ease;
}

.movie-fact-link:hover,
.movie-fact-link:focus-visible {
    color: #ff5268;
    border-color: rgba(239, 43, 69, .75);
}

@media (max-width: 700px) {
    .movie-genre-pills a {
        min-height: 31px;
        padding: 0 12px;
        font-size: 12px;
    }
}

