/* =========================================================
   Modern Cinematic — Black & Gold
   Single Movie Template Stylesheet
   All classes prefixed with .smo- to avoid theme conflicts.
   ========================================================= */

.smo-page {
    --smo-gold: #d4af5e;
    --smo-gold-bright: #f4d68a;
    --smo-gold-deep: #7a5a1f;
    --smo-ink: #0b0b0d;
    --smo-panel: #141417;
    --smo-panel-hi: #1c1c20;
    --smo-line: #26221a;
    --smo-text: #e9e6df;
    --smo-muted: #7d776a;

    background: var(--smo-ink);
    color: var(--smo-text);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    direction: ltr;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}
.smo-page * { box-sizing: border-box; }

.smo-bg, .smo-bg-top {
    position: absolute;
    pointer-events: none;
}
.smo-bg {
    inset: 0;
    background:
        radial-gradient(800px 400px at 20% 10%, rgba(212,175,94,.09), transparent 60%),
        radial-gradient(600px 400px at 90% 0%, rgba(212,175,94,.06), transparent 60%);
}
.smo-bg-top {
    top: 0; left: 0; right: 0; height: 380px;
    background: linear-gradient(180deg, rgba(212,175,94,.03), transparent);
}

.smo-article { position: relative; z-index: 1; }

/* ---------- HERO ---------- */
.smo-hero { padding: 60px 56px 32px; }
.smo-hero-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.smo-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(212,175,94,.07);
    border: 1px solid rgba(212,175,94,.25);
    padding: 6px 14px; border-radius: 999px;
    font-size: 11px; color: var(--smo-gold-bright);
    letter-spacing: .2em; text-transform: uppercase; font-weight: 600;
}
.smo-pill-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--smo-gold-bright); box-shadow: 0 0 8px var(--smo-gold-bright);
}
.smo-hero-sub {
    /* Gold at 60% opacity — readable on the backdrop image while staying
       quieter than the main title. Was muted gray (#7d776a) which got lost
       against the cinematic backdrop. */
    font-size: 11px; color: rgba(212, 175, 94, .6);
    letter-spacing: .2em; text-transform: uppercase;
}
.smo-hero-row {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 40px; flex-wrap: wrap;
}
.smo-title {
    margin: 0;
    font-size: 76px; line-height: .95; font-weight: 800;
    letter-spacing: -.035em; color: #fff;
}
.smo-title-year {
    display: block; margin-top: 10px;
    font-size: 18px; font-weight: 500;
    letter-spacing: .4em; color: var(--smo-gold);
}
.smo-ratings { display: flex; gap: 14px; flex-wrap: wrap; }
.smo-rating-tile {
    background: var(--smo-panel-hi);
    border: 1px solid rgba(212,175,94,.19);
    border-radius: 12px;
    padding: 10px 16px;
    min-width: 88px; text-align: center;
}
.smo-rating-label {
    font-size: 9px; color: var(--smo-gold);
    letter-spacing: .2em; text-transform: uppercase; font-weight: 700;
}
.smo-rating-value {
    font-size: 22px; font-weight: 800; color: var(--smo-gold-bright);
    margin-top: 2px; letter-spacing: -.02em;
    display: flex; align-items: center; justify-content: center; gap: 4px;
}
.smo-star { color: var(--smo-gold-bright); }
.smo-rating-value .smo-star { font-size: 16px; }
.smo-rating-sub { font-size: 9px; color: var(--smo-muted); margin-top: 2px; }

/* ---------- TOP TWO BOXES ---------- */
.smo-top {
    padding: 20px 56px;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    align-items: start; /* boxes start at top, height set explicitly below */
}
.smo-poster-wrap {
    /* Locked width 340px from grid column */
}
.smo-poster {
    background: var(--smo-panel);
    border-radius: 18px;
    padding: 12px;
    border: 1px solid var(--smo-line);
    box-shadow: 0 30px 60px -20px rgba(212,175,94,.15);
    overflow: hidden;
}
.smo-poster-img {
    display: block; width: 100%; height: auto;
    border-radius: 10px;
    aspect-ratio: 2/3;
    object-fit: cover;
    border: 1px solid rgba(212,175,94,.15);
}
.smo-poster-placeholder {
    aspect-ratio: 2/3;
    border-radius: 10px;
    background: repeating-linear-gradient(135deg, #1a1a1d 0 12px, #141417 12px 24px);
    border: 1px solid rgba(212,175,94,.15);
    display: flex; align-items: center; justify-content: center;
    color: var(--smo-gold-bright);
    font-family: monospace; font-size: 11px; letter-spacing: .25em;
}

.smo-info {
    background: var(--smo-panel);
    border: 1px solid var(--smo-line);
    border-radius: 18px;
    overflow: hidden;
}

/* DESKTOP: lock info box height to match the poster exactly.
   Poster column = 340px wide.
   Inside .smo-poster: padding 12px each side, border 1px each side.
   Inner image width = 340 - 24 - 2 = 314px.
   Image aspect-ratio 2/3 -> image height = 314 * 1.5 = 471px.
   Total poster wrap height = 471 + 24 (padding) + 2 (border) = 497px.
   The info box is forced to that height; if content exceeds, the BODY
   scrolls internally so the outer height never grows past the poster. */
@media (min-width: 769px) {
    .smo-info {
        height: calc((340px - 26px) * 1.5 + 26px); /* 497px */
        display: flex;
        flex-direction: column;
    }
    .smo-info-body {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        scrollbar-width: thin;
        scrollbar-color: rgba(212,175,94,.4) transparent;
    }
    .smo-info-body::-webkit-scrollbar { width: 6px; }
    .smo-info-body::-webkit-scrollbar-track { background: transparent; }
    .smo-info-body::-webkit-scrollbar-thumb {
        background: rgba(212,175,94,.3);
        border-radius: 3px;
    }
    .smo-info-body::-webkit-scrollbar-thumb:hover { background: rgba(212,175,94,.5); }
}
.smo-info-head {
    padding: 20px 26px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--smo-line);
    background: linear-gradient(180deg, rgba(212,175,94,.06), transparent);
    gap: 12px; flex-wrap: wrap;
}
.smo-info-head-left { display: flex; align-items: center; gap: 12px; }
.smo-info-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, var(--smo-gold), var(--smo-gold-deep));
    display: flex; align-items: center; justify-content: center;
    color: #000; font-size: 16px; font-weight: 800;
}
.smo-info-title { font-size: 16px; font-weight: 700; color: #fff; }
.smo-info-subtitle { font-size: 11px; color: var(--smo-muted); margin-top: 2px; }
.smo-info-count {
    font-size: 10px; color: var(--smo-gold);
    letter-spacing: .2em; text-transform: uppercase; font-weight: 600;
}
.smo-info-body { padding: 8px 0; }
.smo-info-row {
    display: grid;
    grid-template-columns: 32px 130px 1fr;
    align-items: center;
    gap: 14px;
    padding: 11px 26px;
    border-bottom: 1px solid rgba(38,34,26,.5);
    font-size: 13.5px;
}
.smo-info-row:last-child { border-bottom: none; }
.smo-info-row-icon {
    width: 28px; height: 28px; border-radius: 6px;
    background: rgba(212,175,94,.06);
    border: 1px solid rgba(212,175,94,.19);
    display: flex; align-items: center; justify-content: center;
    color: var(--smo-gold); font-size: 13px;
}
.smo-info-row-label {
    color: var(--smo-muted); font-size: 11px;
    letter-spacing: .15em; text-transform: uppercase; font-weight: 600;
}
.smo-info-row-value { color: var(--smo-text); font-weight: 500; }

/* ---------- TRAILER (independent box) ---------- */
.smo-trailer-section { padding: 24px 56px 0; }
.smo-trailer-box {
    background: var(--smo-panel);
    border: 1px solid var(--smo-line);
    border-radius: 18px;
    padding: 18px;
}
.smo-trailer-frame {
    aspect-ratio: 16/9;
    border-radius: 12px;
    background: #000;
    border: 1px solid rgba(212,175,94,.15);
    position: relative; overflow: hidden;
    background-image:
        radial-gradient(circle at 30% 50%, rgba(212,175,94,.06), transparent 50%),
        repeating-linear-gradient(90deg, #0a0a0a 0 2px, #050505 2px 4px);
    display: flex; align-items: center; justify-content: center;
}
/* oEmbed iframes fill the frame */
.smo-trailer-frame iframe,
.smo-trailer-frame video,
.smo-trailer-frame embed {
    position: absolute; inset: 0;
    width: 100%; height: 100%; border: 0;
}
.smo-trailer-link {
    position: relative; display: flex;
    align-items: center; justify-content: center;
    width: 100%; height: 100%;
    text-decoration: none;
}
.smo-trailer-play {
    width: 96px; height: 96px; border-radius: 50%;
    background: linear-gradient(135deg, var(--smo-gold-bright), var(--smo-gold) 60%, var(--smo-gold-deep));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 6px rgba(0,0,0,.6), 0 0 40px rgba(212,175,94,.5), 0 20px 50px rgba(212,175,94,.25);
}
.smo-trailer-play-icon {
    width: 0; height: 0;
    border-left: 26px solid #0b0b0d;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    margin-left: 8px;
}
.smo-trailer-pill {
    position: absolute; top: 16px; left: 16px;
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px;
    background: rgba(0,0,0,.6); border: 1px solid rgba(212,175,94,.25);
    font-size: 11px; color: var(--smo-gold-bright); font-weight: 600;
    letter-spacing: .15em; text-transform: uppercase;
}
.smo-trailer-rec {
    width: 6px; height: 6px; border-radius: 50%;
    background: #ff4444; box-shadow: 0 0 8px #ff4444;
}

/* ---------- BUTTONS (independent box) ---------- */
.smo-buttons-section { padding: 24px 56px 0; }
.smo-buttons-box {
    background: var(--smo-panel);
    border: 1px solid var(--smo-line);
    border-radius: 18px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.smo-btn {
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 20px 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--smo-gold-bright), var(--smo-gold) 60%, var(--smo-gold-deep));
    border: 1px solid var(--smo-gold-bright);
    color: #0b0b0d;
    box-shadow: 0 12px 28px rgba(212,175,94,.25), inset 0 1px 0 rgba(255,255,255,.5);
    text-align: center;
    font-size: 18px; font-weight: 800; letter-spacing: -.01em;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.smo-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(212,175,94,.35), inset 0 1px 0 rgba(255,255,255,.6);
}

/* ---------- STORYLINE (independent box) ---------- */
.smo-storyline-section { padding: 24px 56px 0; }
.smo-storyline {
    background: var(--smo-panel-hi);
    border: 1px solid var(--smo-line);
    border-radius: 12px;
    padding: 24px 28px;
    position: relative;
}
.smo-storyline-label {
    position: absolute; top: 0; left: 28px;
    transform: translateY(-50%);
    background: var(--smo-panel); padding: 4px 12px;
    border: 1px solid rgba(212,175,94,.25); border-radius: 6px;
    font-size: 10px; color: var(--smo-gold);
    letter-spacing: .25em; text-transform: uppercase; font-weight: 700;
}
.smo-storyline-text { font-size: 15.5px; line-height: 1.75; color: #d8d4c9; }
.smo-storyline-text p { margin: 0 0 12px; }
.smo-storyline-text p:last-child { margin-bottom: 0; }

.smo-storyline-tags {
    margin-top: 18px; padding-top: 16px;
    border-top: 1px solid var(--smo-line);
    display: flex; gap: 8px; flex-wrap: wrap;
}
.smo-tag {
    padding: 4px 10px; border-radius: 4px;
    background: rgba(212,175,94,.06);
    border: 1px solid rgba(212,175,94,.15);
    font-size: 11px; color: var(--smo-gold); font-weight: 500;
}

/* ---------- SIMILAR ---------- */
.smo-similar-section { padding: 50px 56px 0; }
.smo-similar-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 22px; gap: 12px; flex-wrap: wrap;
}
.smo-similar-eyebrow {
    font-size: 11px; color: var(--smo-gold);
    letter-spacing: .3em; text-transform: uppercase;
    font-weight: 700; margin-bottom: 6px;
}
.smo-similar-title {
    margin: 0; font-size: 32px; font-weight: 800;
    letter-spacing: -.02em; color: #fff;
}
.smo-similar-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}
.smo-card {
    background: var(--smo-panel);
    border: 1px solid var(--smo-line);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, border-color .15s ease;
}
.smo-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212,175,94,.4);
}
.smo-card-poster {
    aspect-ratio: 2/3;
    position: relative;
    background: repeating-linear-gradient(135deg, #1a1a1d 0 10px, #141417 10px 20px);
    overflow: hidden;
}
.smo-card-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.smo-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--smo-muted);
    font-family: monospace; font-size: 9px; letter-spacing: .2em;
}
.smo-card-badge {
    /* Year + rating pill — bottom-left of the poster (was top-left).
       5px corners + tighter padding to match the slider visual language. */
    position: absolute; bottom: 8px; left: 8px;
    display: flex; align-items: center; gap: 6px;
    background: rgba(0,0,0,.6); backdrop-filter: blur(8px);
    padding: 4px 7px; border-radius: 5px;
    border: 1px solid rgba(212,175,94,.25);
    color: var(--smo-gold-bright);
    font-weight: 700;
    line-height: 1;
    /* font-size set in "USER-TUNABLE SIZES" section at the bottom */
}
.smo-card-rating { display: inline-flex; align-items: center; gap: 3px; }
.smo-card-divider {
    width: 1px; height: 10px;
    background: rgba(212,175,94,.33);
}
.smo-card-year { color: var(--smo-gold); }
/* Status pill (TREND / SOON) — top-left of the poster, where the
   rating used to sit. Same wrapper class as the archive cards. */
.smo-card-status {
    position: absolute; top: 8px; left: 8px;
    display: inline-flex;
    align-items: center;
    z-index: 2;
}
.smo-card-body { padding: 12px 12px 14px; }
.smo-card-title {
    font-weight: 700; color: #fff;
    line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    /* font-size set in "USER-TUNABLE SIZES" section at the bottom */
}

/* =========================================================
   RESPONSIVE — stacked on small screens
   Order on mobile: poster → info → trailer → buttons (stacked) → storyline → similar
   ========================================================= */
@media (max-width: 768px) {
    .smo-hero,
    .smo-top,
    .smo-trailer-section,
    .smo-buttons-section,
    .smo-storyline-section,
    .smo-similar-section { padding-left: 18px; padding-right: 18px; }

    .smo-hero { padding-top: 30px; padding-bottom: 14px; }
    .smo-title { font-size: 42px; }
    .smo-title-year { font-size: 14px; }

    .smo-ratings { gap: 8px; width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr; }
    .smo-rating-tile { min-width: 0; padding: 8px 6px; }
    .smo-rating-value { font-size: 18px; }

    .smo-top {
        grid-template-columns: 1fr;
        gap: 14px;
        padding-top: 12px; padding-bottom: 0;
    }

    /* Mobile: reset desktop height lock — info box flows naturally below poster. */
    .smo-info {
        height: auto;
        display: block;
    }
    .smo-info-body {
        overflow: visible;
        min-height: 0;
    }

    .smo-info-head { padding: 14px 16px; }
    .smo-info-row {
        grid-template-columns: 28px 100px 1fr;
        padding: 10px 16px;
        font-size: 12.5px;
        gap: 10px;
    }
    .smo-info-row-icon { width: 24px; height: 24px; font-size: 11px; }
    .smo-info-row-label { font-size: 10px; }

    .smo-trailer-section,
    .smo-buttons-section,
    .smo-storyline-section { padding-top: 14px; }

    .smo-trailer-box,
    .smo-buttons-box { padding: 12px; }

    /* stacked buttons on mobile */
    .smo-buttons-box {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .smo-btn { font-size: 16px; padding: 18px; }

    .smo-trailer-play { width: 60px; height: 60px; }
    .smo-trailer-play-icon {
        border-left-width: 18px;
        border-top-width: 12px;
        border-bottom-width: 12px;
        margin-left: 6px;
    }

    .smo-storyline { padding: 22px 18px; }
    .smo-storyline-label { left: 18px; }
    .smo-storyline-text { font-size: 13.5px; }

    .smo-similar-section { padding-top: 24px; }
    .smo-similar-title { font-size: 22px; }
    /* (similar-grid columns are handled by the dedicated rules below) */
}

/* === You may also like — column counts ===
   - Desktop (default, ≥1024px) : 6 (set on .smo-similar-grid base rule)
   - Tablet  (640-1023px)       : 3
   - Mobile  (≤639px)           : 2
   The tablet breakpoint is set to 1023px to match the archive's
   "large tablet" boundary; mobile starts where standard phones
   in landscape already feel cramped at 3 columns. */
@media (max-width: 1023px) {
    .smo-similar-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 639px) {
    .smo-similar-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .smo-hero,
    .smo-top,
    .smo-trailer-section,
    .smo-buttons-section,
    .smo-storyline-section,
    .smo-similar-section { padding-left: 12px; padding-right: 12px; }

    .smo-title { font-size: 34px; }
    .smo-info-row {
        grid-template-columns: 24px 84px 1fr;
        padding: 9px 12px;
    }
    .smo-info-head { padding: 12px; }
    .smo-storyline { padding: 20px 14px; }
}

/* =========================================================================
   USER-TUNABLE SIZES — change these numbers freely.
   Every size that affects the look of the "You may also like" cards lives
   in this section. Each rule names the class it targets.
   ========================================================================= */

/* DESKTOP (default, applies > 768px) */

/* Card title (movie name in "You may also like").
   .smo-card-title  →  movie name on each card */
.smo-card-title { font-size: 18px; }

/* Badge on the poster bottom-left (rating + year).
   One step above the slider's badge size (slider = 11px desktop)
   so it reads clearly without dwarfing the slider visual.
   .smo-card-badge  →  the whole pill (rating ★ + year) */
.smo-card-badge { font-size: 12px; }

/* MOBILE (≤ 768px) */
@media (max-width: 768px) {
    .smo-card-title { font-size: 16px; }
    .smo-card-badge { font-size: 12px; }
}

/* SMALL MOBILE (≤ 480px) */
@media (max-width: 480px) {
    .smo-card-title { font-size: 14.5px; }
    .smo-card-badge { font-size: 11px; }
}

/* =========================================================
   v1.3 ADDITIONS — backdrop hero, tagline, trailer modal,
   watch providers. All scoped to .smo-page; no theme leaks.
   ========================================================= */

/* ---------- Backdrop (TMDB) ----------
   Soft cinematic image behind the hero. Uses a CSS custom
   property set inline by the template, so the actual URL
   stays out of the stylesheet. Fades to black so the title
   stays readable. */
.smo-page.has-backdrop .smo-bg-top {
    /* Lengthen the gold tint area to blend with the image below */
    height: 520px;
}
.smo-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 520px;
    background-image: var(--smo-backdrop-url);
    background-size: cover;
    background-position: center 25%;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    /* Fade-out gradient so text in the hero stays legible */
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.30) 50%, transparent 100%);
            mask-image: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.30) 50%, transparent 100%);
    opacity: .85;
}
@media (max-width: 768px) {
    .smo-page.has-backdrop .smo-bg-top { height: 360px; }
    .smo-backdrop { height: 360px; background-position: center 30%; }
}

/* ---------- Tagline ---------- */
.smo-tagline {
    margin-top: 18px;
    font-size: 16px;
    font-style: italic;
    color: var(--smo-gold);
    letter-spacing: .01em;
    max-width: 900px;
    line-height: 1.4;
}
@media (max-width: 768px) {
    .smo-tagline { font-size: 14px; margin-top: 14px; }
}

/* ---------- Trailer modal ---------- */
.smo-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.smo-modal.is-open { display: flex; }
.smo-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.smo-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .7),
                0 0 0 1px rgba(212, 175, 94, .25);
    /* Subtle entrance — only when the modal opens */
    animation: smo-modal-in .18s ease-out;
}
@keyframes smo-modal-in {
    from { transform: scale(.96); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
/* Hide the modal's <h2> visually but leave it for screen readers.
   Without this, the heading reserved real vertical space and squashed
   the iframe below it. (The .smo-field-screen utility lives in the
   archive stylesheet, which doesn't load on single-movie pages.) */
.smo-modal h2.smo-field-screen {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.smo-modal-frame { width: 100%; height: 100%; background: #000; }
.smo-modal-frame iframe {
    width: 100%; height: 100%; border: 0; display: block;
}
/* Close button — must sit INSIDE the dialog's clipping area, otherwise
   `overflow: hidden` on .smo-modal-dialog cuts it off (which is why the
   X was invisible before). Top-right corner with a small inset. */
.smo-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 0;
    background: var(--smo-gold-bright);
    color: #0b0b0d;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .6);
    z-index: 2;     /* above the iframe */
    transition: transform .15s ease;
}
.smo-modal-close:hover  { transform: scale(1.08); }
.smo-modal-close:active { transform: scale(.94);  }
@media (max-width: 600px) {
    .smo-modal { padding: 12px; }
    .smo-modal-close {
        top: 6px; right: 6px;
        width: 32px; height: 32px;
        font-size: 20px;
    }
}
/* Body lock while modal is open (set by the JS) */
body.smo-modal-locked { overflow: hidden; }

/* ---------- Watch Providers ----------
   Layout:
   - Title sits INSIDE the box, centered, at the top.
   - Dropdown spans the full width of the box.
   - Provider grid below the dropdown.
*/
.smo-providers-section {
    padding: 28px 56px 0;
}
.smo-providers-box {
    background: var(--smo-panel);
    border: 1px solid var(--smo-line);
    border-radius: 18px;
    padding: 22px 24px;
}
.smo-providers-heading {
    margin: 0 0 18px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--smo-gold-bright);
    letter-spacing: .2em;
    text-transform: uppercase;
}
/* Screen-reader-only utility — hides text visually but leaves it for
   assistive tech. Mirrors the same class used on the archive page. */
.smo-providers-section .smo-field-screen {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.smo-providers-control {
    width: 100%;
    margin-bottom: 18px;
}
/* The select itself — full width, dark background, gold caret.
   Two layers force the dark theme:
     - background-color (closed state)
     - color-scheme: dark (helps with the popup on Firefox/Chrome desktop)
   On Android/iOS the OS draws its own native picker UI; that's a platform
   limitation we can't override with CSS. */
.smo-providers-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    height: 48px;
    padding: 0 42px 0 16px;
    background-color: var(--smo-panel-hi);
    color: var(--smo-text);
    border: 1px solid rgba(212, 175, 94, .25);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color-scheme: dark;
    /* Custom gold caret on the right (RTL-safe via background-position right) */
    background-image:
        linear-gradient(45deg, transparent 50%, var(--smo-gold) 50%),
        linear-gradient(135deg, var(--smo-gold) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.smo-providers-select:focus {
    outline: none;
    border-color: rgba(212, 175, 94, .5);
    box-shadow: 0 0 0 3px rgba(212, 175, 94, .15);
}
/* Popup options (desktop browsers honor this; Safari macOS partial; iOS ignores).
   Same rules used by the archive .smo-select for visual consistency. */
.smo-providers-select option {
    background-color: #1c1c20;
    color: #e9e6df;
    padding: 8px 12px;
}
.smo-providers-select option:checked {
    background-color: #2a2620;
    color: #f4d68a;
}
/* When there's only one country, render it as a styled dark pill instead. */
.smo-providers-control-static {
    height: 48px;
    line-height: 48px;
    padding: 0 16px;
    background-color: var(--smo-panel-hi);
    color: var(--smo-text);
    border: 1px solid rgba(212, 175, 94, .25);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}
.smo-providers-panel {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.smo-providers-panel.is-active { display: grid; }
.smo-provider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    background: var(--smo-panel-hi);
    border: 1px solid rgba(212, 175, 94, .15);
    border-radius: 12px;
    text-align: center;
    transition: border-color .15s ease, transform .15s ease;
}
.smo-provider:hover {
    border-color: rgba(212, 175, 94, .4);
    transform: translateY(-1px);
}
.smo-provider-logo {
    width: 48px; height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #0b0b0d;
}
.smo-provider-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--smo-text);
    line-height: 1.2;
}
@media (max-width: 768px) {
    .smo-providers-section { padding: 22px 14px 0; }
    .smo-providers-box { padding: 18px 16px; border-radius: 14px; }
    .smo-providers-heading { font-size: 15px; margin-bottom: 14px; }
    .smo-providers-control { margin-bottom: 14px; }
    .smo-providers-select,
    .smo-providers-control-static { height: 44px; line-height: 44px; }
    .smo-providers-panel { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
    .smo-provider-logo { width: 40px; height: 40px; }
}

/* Respect users who prefer no motion. */
@media (prefers-reduced-motion: reduce) {
    .smo-modal-dialog { animation: none; }
    .smo-card { transition: none; }
    .smo-provider { transition: none; }
}

/* =========================================================
   v1.4 — TRENDING badge in single-movie title
   Inline next to the year. Wraps to its own line on mobile
   (the .smo-title h1 already wraps naturally).
   ========================================================= */
.smo-title-trending {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: 16px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, .55);
    border: 1px solid var(--smo-gold);
    border-radius: 999px;
    color: var(--smo-gold-bright);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .15em;
    text-transform: uppercase;
    /* Reset h1's huge typography */
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
}
.smo-title-trending-icon { font-size: 14px; line-height: 1; }
.smo-title-trending-text { line-height: 1; }

@media (max-width: 768px) {
    .smo-title-trending {
        font-size: 11px;
        padding: 5px 11px;
        margin-inline-start: 10px;
        gap: 4px;
    }
    .smo-title-trending-icon { font-size: 12px; }
}

/* =========================================================
   v1.7.2 — TREND / SOON badges on similar-movie cards
   Mirrors the archive: badges sit on the poster (top-left)
   via .smo-card-status. The .smo-card-meta-row genre row
   has been removed from the card body.
   ========================================================= */
.smo-similar-grid .smo-card-trending {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    background: rgba(0, 0, 0, .65);
    border: 1px solid var(--smo-gold);
    border-radius: 5px;
    color: var(--smo-gold-bright);
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}
.smo-similar-grid .smo-card-trending-icon { font-size: 11px; line-height: 1; }
.smo-similar-grid .smo-card-trending-text { line-height: 1; }

.smo-similar-grid .smo-card-soon {
    display: inline-flex;
    align-items: center;
    padding: 4px 6px;
    background: var(--smo-gold-bright);
    border: 1px solid var(--smo-gold-bright);
    border-radius: 5px;
    color: #0b0b0d;
    font-weight: 800;
    font-size: 11px;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
}
.smo-similar-grid .smo-card-soon-text { line-height: 1; }

@media (max-width: 480px) {
    .smo-similar-grid .smo-card-trending,
    .smo-similar-grid .smo-card-soon {
        padding: 3px 5px;
        font-size: 10px;
    }
    .smo-similar-grid .smo-card-trending { gap: 3px; letter-spacing: .07em; }
    .smo-similar-grid .smo-card-soon    { letter-spacing: .08em; }
}

/* === SOON badge in the hero title (matches TRENDING title style) === */
.smo-title-soon {
    display: inline-flex;
    align-items: center;
    margin-inline-start: 12px;
    padding: 4px 12px;
    background: var(--smo-gold-bright);
    border: 1px solid var(--smo-gold-bright);
    border-radius: 999px;
    color: #0b0b0d;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}
.smo-title-soon-text { line-height: 1; }

@media (max-width: 768px) {
    .smo-title-soon {
        margin-inline-start: 8px;
        padding: 3px 10px;
        font-size: 12px;
    }
}

/* =========================================================
   v1.5 — TMDB Attribution
   Required by TMDB's API terms of use. Sits below the
   "You may also like" section, inside the article column so
   it inherits the page padding. Logo + mandated notice text.
   Only rendered when the SMT_Attribution class exists, so it
   disappears automatically if the TMDB plugin is removed.
   ========================================================= */
.smt-attribution {
    margin: 32px 56px 0;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--smo-panel);
    border: 1px solid var(--smo-line);
    border-radius: 12px;
    color: var(--smo-muted);
    font-size: 12px;
    line-height: 1.5;
}
.smt-attribution-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--smo-gold-bright);
    transition: opacity .15s ease;
}
.smt-attribution-link:hover {
    opacity: .8;
}
.smt-attribution-logo {
    height: 28px;
    width: auto;
    display: block;
}
/* Text-only fallback when the user hasn't dropped the official SVG into
   /assets yet. Styled as a small gold pill so it still looks intentional. */
.smt-attribution-mark {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    background: var(--smo-panel-hi);
    border: 1px solid rgba(212, 175, 94, .3);
    border-radius: 6px;
    color: var(--smo-gold-bright);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .15em;
}
.smt-attribution-text {
    margin: 0;
    flex: 1 1 auto;
    color: var(--smo-muted);
}

@media (max-width: 768px) {
    .smt-attribution {
        margin: 24px 14px 0;
        padding: 14px 14px;
        gap: 10px;
        font-size: 11px;
    }
    .smt-attribution-logo { height: 24px; }
    .smt-attribution-mark { height: 24px; font-size: 11px; padding: 0 10px; }
}
@media (max-width: 480px) {
    .smt-attribution {
        flex-direction: column;
        align-items: flex-start;
        text-align: start;
        gap: 8px;
    }
}
