/* ================================================================
   SMART MOVIE HUB PRO — Frontend CSS v1.5.0
   Netflix-inspired dark theme — fully responsive
   ================================================================ */

/* ---------------------------------------------------------------  VARIABLES / BASE */
.smhp-wrapper, .smhp-static-fallback {
    --smhp-bg:      #07070a;
    --smhp-card:    #11121a;
    --smhp-card2:   #161824;
    --smhp-text:    #f0f2ff;
    --smhp-muted:   #8b90b8;
    --smhp-accent:  #e50914;
    --smhp-accent2: #f59e0b;
    --smhp-blue:    #3b82f6;
    --smhp-green:   #10b981;
    --smhp-border:  rgba(255,255,255,.09);
    --smhp-radius:  18px;
    --smhp-shadow:  0 20px 60px rgba(0,0,0,.5);
    box-sizing: border-box;
    color: var(--smhp-text);
    background: var(--smhp-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.65;
    overflow-x: clip; /* clip not hidden — hidden creates stacking context that breaks ad scripts */
}
.smhp-wrapper *, .smhp-static-fallback * { box-sizing: border-box; }
.smhp-wrapper a, .smhp-static-fallback a { text-decoration: none; }
.smhp-wrapper h1,.smhp-wrapper h2,.smhp-wrapper h3,.smhp-wrapper h4,
.smhp-static-fallback h1,.smhp-static-fallback h2,.smhp-static-fallback h3 {
    color: var(--smhp-text); margin: 0;
}
.smhp-muted { color: var(--smhp-muted) !important; }
body.smhp-modal-open { overflow: hidden !important; }

/* Hide static fallback when plugin wrapper is present (inline style from PHP also does this) */
.smhp-wrapper ~ .smhp-static-fallback,
.smhp-wrapper + .smhp-static-fallback { display: none !important; }

/* Cinematic full-bleed mode */
.smhp-mode-cinematic {
    border-radius: 0;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: max(20px, calc((100vw - 1280px) / 2));
    padding-right: max(20px, calc((100vw - 1280px) / 2));
}

/* ---------------------------------------------------------------  SECTION TITLE */
.smhp-section-title {
    font-size: clamp(18px, 2.2vw, 24px);
    font-weight: 800;
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--smhp-accent);
    display: inline-block;
    color: var(--smhp-text);
}
.smhp-section-head {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px; margin: 24px 0 12px;
}
.smhp-section-head h2 { font-size: clamp(20px, 2.5vw, 28px); margin: 0; }

/* ---------------------------------------------------------------  HERO (shortcode homepage) */
.smhp-hero {
    min-height: 460px;
    background-size: cover; background-position: center;
    border-radius: 24px; display: flex; align-items: flex-end;
    padding: 42px; margin-bottom: 28px; position: relative; overflow: hidden;
}
.smhp-hero > div { max-width: 680px; position: relative; z-index: 1; }
.smhp-hero h1 { font-size: clamp(32px, 5vw, 64px); line-height: 1; margin: 12px 0; color: #fff; }
.smhp-hero p  { font-size: 17px; color: #e5e7eb; max-width: 620px; line-height: 1.65; }

/* ---------------------------------------------------------------  STATIC HERO (post fallback + live post) */
.smhp-static-hero, .smhp-tmdb-hero {
    position: relative;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: flex-start;
    min-height: 380px;
    background-size: cover; background-position: center top;
    border-radius: var(--smhp-radius);
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid var(--smhp-border);
    overflow: hidden;
}
.smhp-static-hero::before, .smhp-tmdb-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(7,7,10,.97) 38%, rgba(7,7,10,.6));
    z-index: 0;
}
.smhp-static-hero > *, .smhp-tmdb-hero > * { position: relative; z-index: 1; }
.smhp-static-poster img, .smhp-tmdb-poster img {
    width: 100%; aspect-ratio: 2/3; object-fit: cover;
    border-radius: 14px; display: block;
    box-shadow: 0 24px 60px rgba(0,0,0,.65);
}
.smhp-static-hero-info, .smhp-tmdb-info {
    display: flex; flex-direction: column; gap: 14px; padding-top: 8px;
}
.smhp-type-badge, .smhp-type-pill {
    display: inline-block;
    background: var(--smhp-accent); color: #fff;
    border-radius: 999px; padding: 4px 14px;
    font-size: 12px; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase;
}
.smhp-movie-title, .smhp-tmdb-info h2 {
    font-size: clamp(28px, 4vw, 56px);
    font-weight: 900; line-height: 1.05; color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.smhp-meta-badges, .smhp-tmdb-meta-line {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.smhp-badge, .smhp-tmdb-meta-line span {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px; padding: 5px 13px;
    font-size: 13px; font-weight: 600; color: var(--smhp-text);
}
.smhp-badge-rating { background: rgba(245,158,11,.15); border-color: rgba(245,158,11,.3); color: var(--smhp-accent2); }
.smhp-badge-year   { background: rgba(59,130,246,.15);  border-color: rgba(59,130,246,.3);  color: #93c5fd; }
.smhp-genre-chips  { display: flex; flex-wrap: wrap; gap: 7px; }
.smhp-genre-chips span {
    background: rgba(229,9,20,.12); border: 1px solid rgba(229,9,20,.25);
    color: #fca5a5; border-radius: 999px; padding: 4px 13px;
    font-size: 13px; font-weight: 600;
}
.smhp-static-overview, .smhp-overview {
    font-size: 15px; line-height: 1.7; color: #c8cedf;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.smhp-tagline { font-style: italic; color: var(--smhp-muted); margin-top: 4px; }
.smhp-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------------------------------------------------------------  BUTTONS */
.smhp-btn {
    display: inline-flex; align-items: center; gap: 8px;
    border: 0; border-radius: 12px;
    background: var(--smhp-accent); color: #fff !important;
    padding: 12px 20px; font-size: 15px; font-weight: 800;
    cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
    text-decoration: none !important;
}
.smhp-btn small { opacity: .82; font-weight: 600; font-size: 12px; }
.smhp-btn:hover { background: #c2070f; transform: scale(1.03); box-shadow: 0 8px 24px rgba(229,9,20,.35); }
.smhp-btn-secondary {
    background: rgba(255,255,255,.1) !important;
    border: 1px solid rgba(255,255,255,.2) !important;
}
.smhp-btn-secondary:hover { background: rgba(255,255,255,.2) !important; }
.smhp-trailer-btn { background: rgba(255,255,255,.12) !important; border: 1px solid rgba(255,255,255,.22) !important; }
.smhp-trailer-open:hover, .smhp-trailer-btn:hover { box-shadow: 0 8px 24px rgba(229,9,20,.3); }

/* ---------------------------------------------------------------  2-COLUMN LAYOUT */
.smhp-content-cols {
    display: grid; grid-template-columns: 1fr 360px;
    gap: 24px; margin-bottom: 24px; align-items: start;
}
.smhp-col-main, .smhp-col-sidebar {
    background: var(--smhp-card); border: 1px solid var(--smhp-border);
    border-radius: var(--smhp-radius); padding: 24px;
}

/* ---------------------------------------------------------------  CONTENT SECTION (story/review) */
.smhp-content-section, .smhp-story {
    background: var(--smhp-card); border: 1px solid var(--smhp-border);
    border-radius: var(--smhp-radius); padding: 24px; margin: 0;
}
.smhp-content-section h2 { font-size: 20px; color: var(--smhp-text); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--smhp-border); }
.smhp-content-section h2 + h2 { margin-top: 20px; }
.smhp-content-section p  { color: #c8cedf; line-height: 1.75; margin: 0 0 14px; }

/* ---------------------------------------------------------------  INFO TABLE */
.smhp-info-section {
    background: var(--smhp-card); border: 1px solid var(--smhp-border);
    border-radius: var(--smhp-radius); padding: 22px; margin: 0;
}
.smhp-info-section h3 { font-size: 17px; color: var(--smhp-text); margin: 0 0 14px; }
.smhp-info-table {
    display: flex; flex-direction: column; gap: 1px;
    background: var(--smhp-border); border-radius: 12px; overflow: hidden;
}
.smhp-info-table > div {
    display: grid; grid-template-columns: 120px 1fr;
    gap: 10px; padding: 11px 14px;
    background: var(--smhp-card2); align-items: center;
}
.smhp-info-table > div:hover { background: rgba(255,255,255,.04); }
.smhp-info-table strong { font-size: 12px; font-weight: 700; color: var(--smhp-muted); text-transform: uppercase; letter-spacing: .04em; }
.smhp-info-table span   { font-size: 14px; font-weight: 600; color: var(--smhp-text); word-break: break-word; }

/* ---------------------------------------------------------------  CAST */
.smhp-cast-row, .smhp-cast-scroll {
    display: flex; gap: 12px; overflow-x: auto;
    padding-bottom: 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.smhp-cast-scroll::-webkit-scrollbar { height: 3px; }
.smhp-cast-scroll::-webkit-scrollbar-thumb { background: var(--smhp-accent); border-radius: 2px; }
.smhp-cast-card {
    flex: 0 0 120px; scroll-snap-align: start;
    background: var(--smhp-card2); border: 1px solid var(--smhp-border);
    border-radius: 13px; overflow: hidden; text-align: center;
    padding-bottom: 10px; transition: transform .2s;
}
.smhp-cast-card:hover { transform: translateY(-4px); }
.smhp-cast-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.smhp-cast-card strong { display: block; font-size: 12px; color: var(--smhp-text); padding: 7px 7px 2px; line-height: 1.3; }
.smhp-cast-card small  { display: block; font-size: 11px; color: var(--smhp-muted); padding: 0 7px; }

/* ---------------------------------------------------------------  SCREENSHOTS */
.smhp-screenshot-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px;
}
.smhp-screenshot-grid a { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 16/9; }
.smhp-screenshot-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.smhp-screenshot-grid a:hover img { transform: scale(1.06); }

/* ---------------------------------------------------------------  DOWNLOAD SECTION */
.smhp-download-card, .smhp-static-downloads {
    background: linear-gradient(135deg, #0d0f1e, #130a1a);
    border: 1px solid var(--smhp-border); border-radius: var(--smhp-radius);
    padding: 24px; margin: 0;
}
.smhp-download-card h3, .smhp-series h3 { font-size: 17px; color: var(--smhp-text); margin: 0 0 16px; }
.smhp-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.smhp-quality-btn {
    display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px;
    background: linear-gradient(135deg, var(--smhp-accent), #8b0006);
    color: #fff !important; border-radius: 12px; padding: 10px 14px;
    min-width: 100px; transition: transform .15s, box-shadow .15s; text-decoration: none !important;
}
.smhp-quality-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(229,9,20,.4); }
.smhp-quality-btn span { font-size: 14px; font-weight: 800; color: #fff; }
.smhp-quality-btn small { font-size: 11px; color: rgba(255,255,255,.82); }

/* ---------------------------------------------------------------  SEASON TABS */
.smhp-season-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.smhp-season-tab {
    background: var(--smhp-card2); border: 1px solid var(--smhp-border);
    color: var(--smhp-muted); border-radius: 10px; padding: 9px 16px;
    font-weight: 700; font-size: 13px; cursor: pointer;
    transition: background .15s, color .15s;
}
.smhp-season-tab.active, .smhp-season-tab:hover {
    background: var(--smhp-accent); border-color: var(--smhp-accent); color: #fff;
}
.smhp-season-panel { display: none; }
.smhp-season-panel.active,
.smhp-season-panel:first-of-type { display: block; }
/* Legacy select-based */
.smhp-series { background: var(--smhp-card); border: 1px solid var(--smhp-border); border-radius: var(--smhp-radius); padding: 22px; margin: 0; }
.smhp-season { display: none; }
.smhp-season:first-of-type { display: block; }
.smhp-season-select { background: #fff; color: #111; border: 1px solid #ccc; border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; }
.smhp-episode-card { border: 1px solid var(--smhp-border); border-radius: 13px; padding: 13px; margin: 10px 0; background: rgba(255,255,255,.04); }
.smhp-episode-head { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.smhp-episode-head strong { color: var(--smhp-text); font-size: 15px; }
.smhp-episode-head span   { color: var(--smhp-muted); font-size: 13px; }
.smhp-episode-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------  RELATED */
.smhp-related-row {
    display: flex; gap: 14px; overflow-x: auto;
    padding-bottom: 10px; scroll-snap-type: x mandatory;
}
.smhp-related-row::-webkit-scrollbar { height: 3px; }
.smhp-related-row::-webkit-scrollbar-thumb { background: var(--smhp-accent); }
.smhp-related-card {
    flex: 0 0 130px; scroll-snap-align: start;
    background: var(--smhp-card); border: 1px solid var(--smhp-border);
    border-radius: 13px; overflow: hidden; transition: transform .2s;
    color: var(--smhp-text) !important;
}
.smhp-related-card:hover { transform: scale(1.04); }
.smhp-related-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.smhp-related-card strong { display: block; font-size: 12px; padding: 7px 8px 2px; line-height: 1.3; color: #fff; }
.smhp-related-card small  { display: block; font-size: 11px; padding: 0 8px 8px; color: var(--smhp-muted); }

/* ---------------------------------------------------------------  FAQ */
.smhp-faq details {
    background: rgba(255,255,255,.04); border: 1px solid var(--smhp-border);
    border-radius: 12px; padding: 12px 16px; margin: 8px 0;
    transition: border-color .2s;
}
.smhp-faq details[open] { border-color: rgba(229,9,20,.35); }
.smhp-faq summary {
    cursor: pointer; font-weight: 700; font-size: 15px; color: var(--smhp-text);
    list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.smhp-faq summary::after { content: '+'; font-size: 22px; color: var(--smhp-accent); }
.smhp-faq details[open] summary::after { content: '−'; }
.smhp-faq p { color: #c5c9dd; margin: 10px 0 0; line-height: 1.65; font-size: 14px; }

/* ---------------------------------------------------------------  GRID / CARDS (homepage, archives) */
.smhp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px; margin: 14px 0 26px;
}
.smhp-card {
    background: var(--smhp-card); border: 1px solid var(--smhp-border);
    border-radius: var(--smhp-radius); overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.smhp-card:hover { transform: translateY(-5px); box-shadow: var(--smhp-shadow); }
.smhp-card a { display: block; color: var(--smhp-text) !important; text-decoration: none !important; }
.smhp-poster { aspect-ratio: 2/3; background: var(--smhp-card2); display: flex; align-items: center; justify-content: center; color: var(--smhp-muted); overflow: hidden; }
.smhp-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.smhp-card-body { padding: 11px; }
.smhp-card h3  { font-size: 14px; line-height: 1.25; margin: 0 0 6px; color: var(--smhp-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.smhp-card p, .smhp-card-cats { color: var(--smhp-muted) !important; margin: 0; font-size: 12px; }

/* ---------------------------------------------------------------  LIVE SEARCH */
.smhp-live-search { position: relative; margin: 14px 0; }
.smhp-live-search input {
    width: 100%; border: 1px solid var(--smhp-border);
    background: rgba(255,255,255,.07); color: var(--smhp-text);
    padding: 14px 18px; border-radius: 999px; font-size: 16px;
    transition: border-color .2s, box-shadow .2s;
}
.smhp-live-search input:focus { outline: none; border-color: var(--smhp-accent); box-shadow: 0 0 0 3px rgba(229,9,20,.18); }
.smhp-search-results {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 50;
    background: #0e0f18; border: 1px solid var(--smhp-border);
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 24px 55px rgba(0,0,0,.45);
}
.smhp-search-result {
    display: flex !important; gap: 11px; padding: 11px 14px !important;
    color: var(--smhp-text) !important; border-bottom: 1px solid var(--smhp-border);
    transition: background .15s; align-items: center;
}
.smhp-search-result:hover { background: rgba(255,255,255,.05); }
.smhp-search-result img { width: 38px; height: 54px; object-fit: cover; border-radius: 6px; }
.smhp-search-result span { display: flex; flex-direction: column; }
.smhp-search-result strong { font-size: 14px; color: var(--smhp-text); }
.smhp-search-result small, .smhp-search-result em { font-size: 11px; color: var(--smhp-muted); font-style: normal; }
.smhp-search-disabled { opacity: .75; cursor: default; }

/* ---------------------------------------------------------------  CATEGORIES */
.smhp-category-grid { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 26px; }
.smhp-category-pill {
    display: inline-flex; gap: 8px; align-items: center;
    border: 1px solid var(--smhp-border); background: rgba(255,255,255,.07);
    color: var(--smhp-text) !important; padding: 10px 16px; border-radius: 999px;
    transition: background .15s, border-color .15s;
}
.smhp-category-pill:hover { background: var(--smhp-accent); border-color: var(--smhp-accent); }
.smhp-category-pill small { opacity: .72; border-left: 1px solid var(--smhp-border); padding-left: 8px; }

/* ---------------------------------------------------------------  TAXONOMY ARCHIVE */
.smhp-tax-archive { margin: 22px auto; max-width: 1220px; }
.smhp-archive-hero {
    padding: 34px; border: 1px solid var(--smhp-border); border-radius: 22px;
    background: linear-gradient(135deg, rgba(229,9,20,.2), rgba(255,255,255,.04)); margin-bottom: 22px;
}
.smhp-archive-hero h1 { color: var(--smhp-text); font-size: clamp(30px, 5vw, 54px); line-height: 1; margin: 10px 0; }
.smhp-archive-hero p  { color: #dfe2ec; max-width: 760px; }

/* ---------------------------------------------------------------  ADS */
/* -------  AD SLOTS: zero interference, auto-adjust, native-first ------- */

/*
 * Core rule: never force width/height on ad containers.
 * Let Adsterra, AdSense, Monetag, iframe — all render at their own natural size.
 * We only center them and give breathing room.
 */
.smhp-ad-slot {
    /* block flow so ad scripts read the correct offsetWidth */
    display: block;
    width: 100%;
    margin: 22px 0;
    position: relative;
    overflow: visible;          /* must NOT be hidden — popunders/scripts need this */
    text-align: center;         /* centers inline/inline-block ad units naturally */
    line-height: 0;             /* collapse whitespace-gaps around ad iframes */
    font-size: 0;               /* same — prevents ghost spacing */
}

/* Reset font-size for any text inside ad (e.g. native ad labels) */
.smhp-ad-slot * {
    font-size: initial;
    line-height: initial;
}

/*
 * .smhp-ad-content: the direct wrapper around the raw ad code.
 * display:inline-block so it shrink-wraps to ad's natural width.
 * NEVER set width/max-width/height here.
 */
.smhp-ad-content {
    display: inline-block;
    vertical-align: top;
    text-align: initial;        /* reset center so ad's own alignment works */
    overflow: visible;
}

/* ---- Mode: original (default) ---- */
/* No overrides — ad renders at 100% natural size */
.smhp-ad-original .smhp-ad-content {
    display: block;
    text-align: initial;
}

/* ---- Mode: centered ---- */
/* Already centered by parent text-align:center + inline-block child */
.smhp-ad-centered .smhp-ad-content {
    display: inline-block;
}

/* ---- Mode: responsive (stretch to full column width) ---- */
.smhp-ad-responsive .smhp-ad-content {
    display: block;
    width: 100%;
}
.smhp-ad-responsive iframe,
.smhp-ad-responsive img,
.smhp-ad-responsive ins {
    width: 100% !important;
    height: auto !important;
}

/* ---- Mode: full (100% width hard) ---- */
.smhp-ad-full .smhp-ad-content,
.smhp-ad-full iframe,
.smhp-ad-full img,
.smhp-ad-full ins {
    width: 100% !important;
    max-width: 100% !important;
}

/*
 * AdSense <ins> — never constrain width/height, AdSense sizes itself
 * after measuring the container. Forcing max-width breaks it.
 */
.smhp-ad-slot ins.adsbygoogle {
    display: inline-block !important;
    /* width/height intentionally NOT set here */
}

/*
 * Adsterra / Monetag native banners — they inject their own <div> or <iframe>
 * with explicit pixel dimensions. Don't override those.
 */
.smhp-ad-slot iframe {
    /* Allow iframe to use its own width/height attributes */
    border: 0;
    display: inline-block;
    vertical-align: top;
}

/* Script tags are invisible by nature — no display:none needed */
/* (display:none !important on script was breaking some ad loaders) */

/* ---- Close button for sitewide zones ---- */
.smhp-ad-close {
    position: absolute; right: 8px; top: 8px; z-index: 2;
    width: 26px; height: 26px; border: 0; border-radius: 999px;
    background: rgba(255,255,255,.9); color: #111; font-size: 17px; line-height: 1;
    cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.25);
    display: flex; align-items: center; justify-content: center;
}
.smhp-ad-close {
    position: absolute; right: 8px; top: 8px; z-index: 2;
    width: 28px; height: 28px; border: 0; border-radius: 999px;
    background: rgba(255,255,255,.9); color: #111; font-size: 18px; line-height: 1;
    cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.25);
    display: flex; align-items: center; justify-content: center;
}
/* Sitewide zones */
.smhp-ad-zone-sticky_ads {
    left: 50%; right: auto; bottom: 12px; transform: translateX(-50%);
    z-index: 9998; background: rgba(6,7,12,.92); backdrop-filter: blur(8px);
    border: 1px solid var(--smhp-border); border-radius: 14px;
    padding: 10px 42px 10px 10px; max-width: 96vw;
}
.smhp-ad-zone-popup_ads {
    right: 20px; bottom: 20px; z-index: 9997;
    background: rgba(6,7,12,.92); backdrop-filter: blur(8px);
    border: 1px solid var(--smhp-border); border-radius: 14px;
    padding: 38px 10px 10px; max-width: min(380px, 92vw); display: none;
}
.smhp-ad-zone-floating_ads {
    right: 18px; bottom: 18px; z-index: 9996;
    background: rgba(6,7,12,.92); backdrop-filter: blur(8px);
    border: 1px solid var(--smhp-border); border-radius: 14px;
    padding: 36px 10px 10px; max-width: min(380px, 92vw);
}
.smhp-floating-tab {
    position: fixed; right: 16px; bottom: 16px; z-index: 9995;
    border: 0; border-radius: 999px; background: var(--smhp-accent);
    color: #fff; font-weight: 800; padding: 10px 14px; cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.smhp-floating-tab[hidden] { display: none; }

/* ---------------------------------------------------------------  TRAILER MODAL */
#smhp-global-trailer-modal.smhp-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.93); z-index: 999999;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    animation: smhpFadeIn .2s ease;
}
#smhp-global-trailer-modal.smhp-modal[hidden] { display: none; }
.smhp-modal-inner {
    position: relative; width: min(960px, 96vw);
    animation: smhpSlideUp .25s ease;
}
.smhp-modal-iframe-wrap {
    position: relative; padding-top: 56.25%;
    border-radius: 18px; overflow: hidden; background: #000;
    box-shadow: 0 40px 80px rgba(0,0,0,.7);
}
.smhp-modal-iframe-wrap iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.smhp-modal-close {
    position: absolute; right: -6px; top: -52px;
    background: rgba(255,255,255,.15); backdrop-filter: blur(6px);
    color: #fff; border: 2px solid rgba(255,255,255,.3);
    border-radius: 999px; width: 42px; height: 42px;
    font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.smhp-modal-close:hover { background: rgba(255,255,255,.3); }
@keyframes smhpFadeIn  { from { opacity: 0; }                             to { opacity: 1; } }
@keyframes smhpSlideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------------------------------------------------------------  EMPTY STATE / MISC */
.smhp-empty-state {
    grid-column: 1 / -1; border: 1px dashed var(--smhp-border);
    background: rgba(255,255,255,.03); border-radius: 16px;
    padding: 20px; color: var(--smhp-muted);
}
.smhp-empty-state p { margin: 0; line-height: 1.6; }
.smhp-chip { border: 1px solid var(--smhp-border); border-radius: 999px; padding: 6px 12px; color: var(--smhp-text) !important; background: rgba(255,255,255,.06); font-size: 13px; }
.smhp-page { min-height: 280px; padding: 24px; }
/* ad-original covered in ad-slot block above */

/* ---------------------------------------------------------------  THEME MODE */
.smhp-mode-theme {
    --smhp-bg: transparent; --smhp-card: rgba(0,0,0,.04);
    --smhp-text: inherit; --smhp-muted: inherit; --smhp-border: rgba(0,0,0,.1);
}
.smhp-mode-theme .smhp-info-section,
.smhp-mode-theme .smhp-download-card,
.smhp-mode-theme .smhp-series    { background: #fff; color: #111827; }
.smhp-mode-theme .smhp-info-section h2,
.smhp-mode-theme .smhp-info-section h3,
.smhp-mode-theme .smhp-info-table strong { color: #111827; }
.smhp-mode-theme .smhp-info-table span  { color: #374151; }

/* ---------------------------------------------------------------  RESPONSIVE */
@media (max-width: 900px) {
    .smhp-static-hero, .smhp-tmdb-hero { grid-template-columns: 160px 1fr; gap: 20px; }
    .smhp-content-cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .smhp-wrapper, .smhp-static-fallback { padding: 14px; border-radius: 14px; }
    .smhp-static-hero, .smhp-tmdb-hero { grid-template-columns: 1fr; min-height: auto; }
    .smhp-static-poster, .smhp-tmdb-poster { max-width: 180px; }
    .smhp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .smhp-info-table > div { grid-template-columns: 1fr; gap: 3px; }
    .smhp-info-table span { text-align: left; }
    .smhp-screenshot-grid { grid-template-columns: repeat(2, 1fr); }
    .smhp-buttons, .smhp-episode-buttons { flex-direction: column; }
    .smhp-btn, .smhp-quality-btn { width: 100%; justify-content: center; }
    .smhp-ad-zone-sticky_ads, .smhp-ad-zone-popup_ads, .smhp-ad-zone-floating_ads {
        right: 10px; left: 10px; bottom: 10px; max-width: none; transform: none;
    }
}
