/* RSMovies — front-end styles. No framework, system fonts, CSS variables. */
:root {
	--bg: #0f1115;
	--bg2: #151922;
	--bg3: #1d2230;
	--line: #262c3b;
	--text: #f0f2f5;
	--muted: #9aa3b5;
	--accent: #3d5afe;
	--accent2: #ffb400;
	--radius: 10px;
	--wrap: 1320px;
	--strong: #fff;
	--featured: #00be08;
	--play: none;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--strong); }
h1,h2,h3 { line-height: 1.25; margin: 0 0 .6em; }
:root { --gutter: 20px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { clip: auto; width: auto; height: auto; z-index: 999; background: #fff; color: #000; padding: 8px 12px; left: 8px; top: 8px; }

/* Layout */
.site-main { padding: 18px 0 40px; }
.layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 28px; align-items: start; }
.layout:not(:has(.sidebar)) { grid-template-columns: 1fr; }
.page-head { margin-bottom: 18px; }
.page-title { font-size: 26px; }
.rsm-empty { color: var(--muted); }



/* Pagination */
.pagination { margin: 40px 0 24px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.pagination .page-numbers { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; background: rgba(255,255,255,.04); color: #cbd5e1; font-size: 14px; font-weight: 700; text-decoration: none; user-select: none; transition: .2s cubic-bezier(.4,0,.2,1); }
.pagination a.page-numbers:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); color: #fff; transform: translateY(-1px); }
.pagination .page-numbers.current { background: var(--accent-grad); border-color: transparent; box-shadow: 0 4px 15px rgba(255,56,56,.35); color: #fff; cursor: default; }
.pagination .page-numbers.dots { border-color: transparent; background: none; }
.pagination .prev, .pagination .next { padding: 0 18px; font-weight: 600; }
.pagination .prev svg, .pagination .next svg { transition: transform .2s; }
.pagination .prev:hover svg { transform: translateX(-2px); }
.pagination .next:hover svg { transform: translateX(2px); }

/* Sidebar + widgets (sizes matched to the reference design) */
:root { --widget-bg: #15181e; --accent-grad: linear-gradient(135deg, #ff3838 0%, #ff6b3d 100%); --accent-orange: #ff5722; }
.sidebar { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.sidebar .widget { margin: 0; padding: 20px; background: var(--widget-bg); border: 1px solid rgba(255,255,255,.06); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.widget-title { display: flex; align-items: center; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; font-size: 14px; font-weight: 800; line-height: 21px; letter-spacing: .6px; text-transform: uppercase; }
.widget-title::before { content: ""; display: inline-block; flex: none; width: 4px; height: 16px; margin-right: 10px; border-radius: 2px; background: var(--accent-grad); }
.widget ul { list-style: none; margin: 0; padding: 0; }

/* Genres */
.widget_rsm_genres { padding-right: 4px !important; }
.genres-list { display: flex; flex-direction: column; gap: 6px; padding-right: 6px; }
.genres-list.is-scroll { max-height: 290px; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: transparent transparent; transition: scrollbar-color .3s; }
.genres-list.is-scroll:hover { scrollbar-color: var(--accent-orange) rgba(255,255,255,.05); }
.genres-list::-webkit-scrollbar { width: 5px; }
.genres-list::-webkit-scrollbar-track { background: transparent; border-radius: 10px; }
.genres-list::-webkit-scrollbar-thumb { background: transparent; border-radius: 10px; transition: background .3s; }
.genres-list:hover::-webkit-scrollbar-thumb { background: rgba(255,87,34,.6); }
.genres-list::-webkit-scrollbar-thumb:hover { background: #ff5722; }
.genre-chip { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; padding: 8px 12px; border: 1px solid rgba(255,255,255,.06); border-radius: 6px; background: rgba(255,255,255,.02); color: #a0a6b5; font-size: 13px; font-weight: 600; line-height: 20.5px; transition: all .2s cubic-bezier(.4,0,.2,1); }
.genre-chip .genre-name { overflow: hidden; padding-right: 8px; white-space: nowrap; text-overflow: ellipsis; }
.genre-chip:hover, .genre-chip:focus-visible { background: rgba(255,56,56,.1); border-color: rgba(255,56,56,.35); color: #fff; transform: translateX(3px); }
.genre-count { flex-shrink: 0; padding: 2px 7px; border-radius: 10px; background: rgba(255,255,255,.12); color: #cbd5e1; font-size: 11px; font-weight: 700; line-height: 16.5px; transition: all .2s; }
.genre-chip:hover .genre-count, .genre-chip:focus-visible .genre-count { background: var(--accent-grad); color: #fff; }

/* Release years */
.widget_rsm_years { padding-right: 4px !important; }
.years-wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 220px; padding-right: 6px; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: transparent transparent; transition: scrollbar-color .3s; }
.years-wrap:hover { scrollbar-color: var(--accent-orange) rgba(255,255,255,.05); }
.years-wrap::-webkit-scrollbar { width: 5px; }
.years-wrap::-webkit-scrollbar-track { background: transparent; border-radius: 10px; }
.years-wrap::-webkit-scrollbar-thumb { background: transparent; border-radius: 10px; transition: background .3s; }
.years-wrap:hover::-webkit-scrollbar-thumb { background: rgba(255,87,34,.6); }
.years-wrap::-webkit-scrollbar-thumb:hover { background: #ff5722; }
.year-chip { display: block; padding: 8px 0; border: 1px solid rgba(255,255,255,.06); border-radius: 6px; background: rgba(255,255,255,.03); color: #8b92a4; font-size: 13px; font-weight: 700; line-height: 20px; text-align: center; transition: all .2s cubic-bezier(.4,0,.2,1); }
.year-chip:hover, .year-chip:focus-visible { background: var(--accent-grad); border-color: transparent; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(255,56,56,.3); }
.rsm-years-select { width: 100%; padding: 9px; background: rgba(255,255,255,.03); color: var(--text); border: 1px solid rgba(255,255,255,.08); border-radius: 6px; }
.rsm-witem { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rsm-witem img { width: 46px; height: 69px; object-fit: cover; border-radius: 6px; flex: none; }
.rsm-wrank { flex: none; width: 22px; font-weight: 800; color: var(--accent); text-align: center; }
.rsm-wmeta { min-width: 0; }
.rsm-wtitle { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsm-wsub { color: var(--muted); font-size: 12px; }

/* Content, comments, footer */
.entry-content a { color: #9fb0ff; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 13px; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 20px; margin-bottom: 20px; }
.footer-menu ul { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; padding: 0; margin: 0 0 12px; }

/* Responsive */
@media (max-width: 1024px) {
	.layout { grid-template-columns: 1fr; }
}


/* ===================== RSMovies Options ===================== */

/* Light color scheme */
body.scheme-light { --bg: #f3f5f9; --bg2: #ffffff; --bg3: #eef1f6; --line: #dde2ea; --text: #1d2330; --muted: #5d6778; --strong: #000; }
body.scheme-light .entry-content a { color: var(--accent); }

/* Sidebar on the left */
.layout.sidebar-left { grid-template-columns: 340px minmax(0, 1fr); }
.layout.sidebar-left > .sidebar { order: -1; }
.layout.sidebar-left:not(:has(.sidebar)) { grid-template-columns: 1fr; }




/* Live search */
.rsm-live { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; max-width: 90vw; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.35); overflow: hidden; z-index: 60; }
.rsm-live a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.rsm-live a:hover, .rsm-live a.is-focus { background: var(--bg3); }
.rsm-live img { width: 34px; height: 51px; object-fit: cover; border-radius: 4px; flex: none; background: var(--bg3); }
.rsm-live .t { font-weight: 600; font-size: 14px; display: block; }
.rsm-live .m { color: var(--muted); font-size: 12px; }
.rsm-live .all { display: block; text-align: center; padding: 9px; font-size: 13px; color: var(--accent); font-weight: 600; border: 0; }
.rsm-live .none { padding: 12px; color: var(--muted); font-size: 13px; }

/* Special pages */
.page-intro { color: var(--muted); margin: -4px 0 0; }
.rsm-top-imdb { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.rsm-toplist { list-style: none; margin: 0; padding: 0; counter-reset: top; }
.rsm-toplist li { counter-increment: top; }
.rsm-toplist a { display: grid; grid-template-columns: 30px 46px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rsm-toplist a::before { content: counter(top); font-weight: 800; color: var(--accent); text-align: center; }
.rsm-toplist img { width: 46px; height: 69px; object-fit: cover; border-radius: 6px; }
.rsm-toplist .t { font-weight: 600; }
.rsm-toplist .t small { color: var(--muted); font-weight: 400; }
.rsm-toplist .r { color: var(--accent2); font-weight: 700; }
.rsm-blog-list { display: grid; gap: 16px; }
.rsm-post { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.rsm-post-title { font-size: 18px; margin-bottom: 6px; }
.rsm-post-excerpt { color: var(--muted); }
.rsm-contact { max-width: 720px; }
.rsm-contact .rsm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rsm-contact label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.rsm-contact input, .rsm-contact textarea { width: 100%; background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 10px 12px; border-radius: 8px; font: inherit; }
.rsm-contact input:focus, .rsm-contact textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.rsm-hp { position: absolute !important; left: -9999px; }
.rsm-button { background: var(--accent); color: #fff; border: 0; padding: 11px 22px; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; }
.rsm-button:hover { filter: brightness(1.1); }
.rsm-alert { padding: 12px 14px; border-radius: 8px; font-weight: 600; }
.rsm-alert-ok { background: rgba(0,190,8,.12); color: #3ddc84; border: 1px solid rgba(0,190,8,.35); }
.rsm-alert-err { background: rgba(229,57,53,.12); color: #ff8a80; border: 1px solid rgba(229,57,53,.35); }
body.scheme-light .rsm-alert-ok { color: #0a7d2c; }
body.scheme-light .rsm-alert-err { color: #b3261e; }

/* Footer */
.footer-complete { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 28px; padding-bottom: 22px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.footer-about p { margin: 10px 0 0; max-width: 380px; }
.footer-logo img { height: 40px; width: auto; }
.footer-col h4 { color: var(--text); font-size: 14px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .5px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.footer-bottom .copy { margin: 0; }
.footer-bottom .footer-menu ul { margin: 0; }
.tmdb-note { margin: 12px 0 0; font-size: 12px; }

@media (max-width: 1024px) {
	.layout.sidebar-left { grid-template-columns: 1fr; }
	.layout.sidebar-left > .sidebar { order: 0; }
	.footer-complete { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 782px) {
	.rsm-live { left: 0; right: 0; width: auto; }
	.rsm-contact .rsm-row { grid-template-columns: 1fr; }
	.footer-complete { grid-template-columns: 1fr; }
}

/* Advertising slots */
.rsm-ad { margin: 0 0 24px; text-align: center; overflow: hidden; }
.rsm-ad img, .rsm-ad iframe { max-width: 100%; margin: 0 auto; }
.rsm-ad-wrap .rsm-ad { margin-bottom: 0; }
.rsm-ad-wrap { margin-bottom: 22px; }

/* Homepage modules */
.rsm-home-top .rsm-top-imdb.cols-1 { grid-template-columns: 1fr; }
.rsm-home-top .rsm-block h3 { font-size: 15px; margin: 0 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.rsm-post-date { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.rsm-post-excerpt { margin: 0; }

/* ===================== Header (sizes matched to the reference design) ===================== */
:root {
	--header-bg: #090a0d; --header-line: #262a34; --menu: #8e95a5; --menu-hover: #ffffff;
	--logo-g1: #ff3838; --logo-g2: #ff6b3d; --logo-color: #ffffff; --logo-tail: #ff5722;
	--home-bar: #0088cc;
}
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--header-bg); border-bottom: 1px solid var(--header-line); }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: var(--wrap); height: 60px; margin: 0 auto; padding: 12px var(--gutter); }
.brand { flex-shrink: 0; display: flex; align-items: center; }
.brand-logo { display: inline-flex; align-items: center; font-size: 24px; font-weight: 900; line-height: 36px; letter-spacing: -.5px; color: var(--logo-color); text-decoration: none; white-space: nowrap; }
.brand-logo:hover { color: var(--logo-color); }
.brand-badge { display: inline-block; margin-right: 3px; padding: 2px 8px; border-radius: 4px; background: linear-gradient(135deg, var(--logo-g1) 0%, var(--logo-g2) 100%); color: #fff; font-size: 20px; font-weight: 900; line-height: 30px; }
.brand-badge:empty { display: none; }
.brand-text { color: var(--logo-color); font-weight: 800; }
.brand-tail { color: var(--logo-tail); font-weight: 900; }
.logo-img img { height: 36px; width: auto; }

.header-nav { flex: 0 1 auto; min-width: 0; }
.header-nav .menu { display: flex; align-items: center; gap: 20px; list-style: none; margin: 0; padding: 0; }
.header-nav li { position: relative; }
.header-nav a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--menu); font-size: 14px; font-weight: 600; line-height: 21px; white-space: nowrap; transition: color .15s, background .15s; }
.header-nav a:hover, .header-nav .current-menu-item > a, .header-nav .current-menu-ancestor > a { color: var(--menu-hover); background: rgba(255,255,255,.05); }
.header-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 20; min-width: 200px; margin: 0; padding: 6px; list-style: none; background: #131722; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.header-nav li:hover > .sub-menu, .header-nav li:focus-within > .sub-menu { display: block; }

/* Search with mic + search buttons */
.header-search { position: relative; flex: 0 0 320px; width: 320px; margin-left: 0; }
.search-form { position: relative; display: block; margin: 0; }
.search-form input[type=search] { display: block; width: 100%; height: 36px; padding: 7px 72px 7px 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; background: rgba(255,255,255,.03); color: #fff; font: 400 13px/20px var(--font); outline: none; -webkit-appearance: none; appearance: none; transition: border-color .15s, background .15s; }
.search-form input[type=search]::placeholder { color: #6b7280; opacity: 1; }
.search-form input[type=search]:focus { border-color: rgba(255,87,34,.45); background: rgba(255,255,255,.05); }
.search-form input[type=search]::-webkit-search-cancel-button { display: none; }
.search-actions { position: absolute; top: 50%; right: 5px; display: flex; gap: 2px; transform: translateY(-50%); }
.search-action-btn { display: grid; place-items: center; width: 26px; height: 26px; padding: 5px; border: 0; border-radius: 4px; background: transparent; color: var(--menu); cursor: pointer; transition: color .15s, background .15s; }
.search-action-btn:hover, .search-action-btn:focus-visible { color: #fff; background: rgba(255,255,255,.08); }
.search-action-btn[hidden] { display: none; }
.voice-btn.is-listening { color: #fff; background: #e53935; animation: rsmPulse 1.2s ease-in-out infinite; }
@keyframes rsmPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(229,57,53,.6); } 50% { box-shadow: 0 0 0 6px rgba(229,57,53,0); } }
.rsm-search { position: relative; }
.rsm-live { top: calc(100% + 6px); }

/* Mobile menu button */
.mobile-search-btn { display: none; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(255,255,255,.05); color: #f1f5f9; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.mobile-search-btn:hover, .site-header.search-open .mobile-search-btn { background: rgba(255,107,53,.15); border-color: rgba(255,107,53,.4); color: #ff6b35; }
.menu-toggle { display: none; flex-shrink: 0; width: 40px; height: 40px; margin-left: auto; padding: 9px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(255,255,255,.05); cursor: pointer; }
.menu-toggle:hover { background: rgba(255,107,53,.15); border-color: rgba(255,107,53,.4); }
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: relative; display: block; width: 20px; height: 2px; margin: 0 auto; border-radius: 2px; background: #f1f5f9; transition: transform .2s, background .2s; }
.menu-toggle .bars::before { position: absolute; top: -6px; }
.menu-toggle .bars::after { position: absolute; top: 6px; }
.site-header.is-open .menu-toggle .bars { background: transparent; }
.site-header.is-open .menu-toggle .bars::before { top: 0; transform: rotate(45deg); }
.site-header.is-open .menu-toggle .bars::after { top: 0; transform: rotate(-45deg); }

/* A–Z bar (homepage, under the header) */
.rsm-glossary-bar { background: #0a0d14; border-bottom: 1px solid rgba(255,255,255,.06); }
.glossary-inner { max-width: var(--wrap); margin: 0 auto; padding: 10px var(--gutter); }
.rsm-glossary-bar ul { display: flex; justify-content: space-between; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rsm-glossary-bar li { flex: 1 1 0; min-width: 0; }
.rsm-glossary-bar a { display: block; height: 32px; border: 1px solid rgba(255,255,255,.05); border-radius: 6px; background: rgba(255,255,255,.03); color: #8b92a4; font-size: 13px; font-weight: 700; line-height: 30px; text-align: center; transition: all .2s ease; }
.rsm-glossary-bar a:hover, .rsm-glossary-bar a:focus-visible { background: rgba(255,56,56,.12); color: #ff5722; border-color: rgba(255,87,34,.4); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255,56,56,.25); }

/* Homepage title (H1) + big search */
.rsm-home-hero { margin-bottom: 22px; }
.rsm-home-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rsm-home-title .bar { flex: none; width: 3.5px; height: 20px; border-radius: 1px; background: var(--home-bar); }
.rsm-home-title h1 { margin: 0; font-size: 16px; font-weight: 700; line-height: 20px; color: #fff; }
.rsm-home-search .search-form input[type=search] { height: 46px; padding: 12px 84px 12px 18px; border-radius: 8px; background: rgba(255,255,255,.035); font-size: 14px; }
.rsm-home-search .search-actions { right: 10px; gap: 6px; }
.rsm-home-search .search-action-btn { width: 30px; height: 30px; }
.rsm-home-search .search-action-btn svg { width: 19px; height: 19px; }
.rsm-home-search .rsm-live { left: 0; right: 0; width: auto; }

@media (max-width: 1180px) {
	.header-nav .menu { gap: 6px; }
	.header-search { flex-basis: 260px; width: 260px; }
}
@media (max-width: 960px) {
	/* Mobile header: menu (left) · logo (centre) · search icon (right) */
	.header-inner { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 10px; height: auto; min-height: 60px; padding: 10px var(--gutter); }
	.menu-toggle { display: block; grid-column: 1; grid-row: 1; margin: 0; }
	.brand { grid-column: 2; grid-row: 1; justify-content: center; min-width: 0; }
	.brand-logo { font-size: 22px; }
	.brand-badge { font-size: 18px; }
	.mobile-search-btn { display: grid; grid-column: 3; grid-row: 1; }
	.header-nav, .header-search { display: none; grid-column: 1 / -1; width: 100%; }
	.site-header.search-open .header-search { display: block; grid-row: 2; padding-bottom: 2px; }
	.site-header.is-open .header-nav { display: block; grid-row: 3; }
	.header-nav .menu { flex-direction: column; align-items: stretch; gap: 2px; padding-bottom: 6px; }
	.header-nav a { padding: 11px 12px; font-size: 14.5px; }
	.header-nav .sub-menu { position: static; display: block; min-width: 0; margin-left: 12px; box-shadow: none; border: 0; background: transparent; padding: 0; }
	.rsm-glossary-bar ul { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.rsm-glossary-bar ul::-webkit-scrollbar { display: none; }
	.rsm-glossary-bar li { flex: 0 0 40px; }
	.glossary-inner { padding: 8px var(--gutter); }
}
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}

/* Most Viewed widget (sizes matched to the reference design) */
.popular-list { display: flex; flex-direction: column; gap: 10px; }
.popular-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.04); border-radius: 8px; background: rgba(255,255,255,.02); transition: all .2s cubic-bezier(.4,0,.2,1); }
.popular-card:hover, .popular-card:focus-within { background: rgba(255,255,255,.05); border-color: rgba(255,87,34,.3); transform: translateX(4px); box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.popular-thumb-wrap { display: block; flex-shrink: 0; width: 58px; height: 62px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; background: #0d0f14; box-shadow: 0 3px 10px rgba(0,0,0,.5); }
.popular-thumb { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center center; transition: transform .3s; }
.popular-card:hover .popular-thumb { transform: scale(1.08); }
.popular-info { display: flex; flex: 1 1 0%; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.popular-title { margin: 0; overflow: hidden; color: #f0f2f5; font-size: 13px; font-weight: 700; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.popular-title a { color: inherit; transition: color .2s; }
.popular-card:hover .popular-title a, .popular-title a:focus-visible { color: #ff6b3d; }
.popular-meta-box { display: flex; align-items: center; gap: 8px; }
.popular-rating-pill { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border: 1px solid rgba(255,255,255,.08); border-radius: 4px; background: rgba(255,255,255,.04); color: #ffb703; font-size: 11px; font-weight: 800; line-height: 1.2; }
.popular-year-text { color: #cbd5e1; font-size: 12px; font-weight: 600; }

/* ===================== Poster grid + cards (matched to the reference design) ===================== */
:root { --grid-cols-desktop: 5; --grid-cols-tablet: 4; --grid-cols-mobile: 3; --star-gold: #ffb703; }
.movies-section { margin-bottom: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid #262a34; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 0; color: #fff; font-size: 18px; font-weight: 800; line-height: 1.3; }
.section-title::before { content: ""; display: inline-block; flex: none; width: 4px; height: 18px; border-radius: 2px; background: var(--accent-grad); }

.movies-grid { display: grid; grid-template-columns: repeat(var(--grid-cols-desktop), minmax(0, 1fr)); gap: 20px 16px; width: 100%; min-width: 0; margin-bottom: 36px; }
.movie-card { position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0; border-radius: 8px; transition: transform .25s; }
.movie-card:hover { transform: translateY(-5px); }
.movie-poster-wrap { position: relative; display: block; width: 100%; aspect-ratio: 2/3; overflow: hidden; border-radius: 8px; background: #0d0f13; box-shadow: 0 4px 14px rgba(0,0,0,.45); transition: box-shadow .28s, transform .28s; }
.movie-poster-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.movie-card:hover .movie-poster-wrap { box-shadow: 0 10px 24px rgba(0,0,0,.75), 0 0 16px rgba(255,87,34,.15); }
.movie-card:hover .movie-poster-wrap img { transform: scale(1.05); }

.play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s; }
.movie-card:hover .play-overlay { opacity: 1; }
.play-circle { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent-grad); box-shadow: 0 0 20px rgba(255,56,56,.65); transform: scale(.85); transition: transform .2s; }
.movie-card:hover .play-circle, .movie-card:hover .play-image { transform: scale(1); }
.play-icon { width: 0; height: 0; margin-left: 3px; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 13px solid #fff; }
.play-image { width: 46px; height: 46px; background: var(--play) center/contain no-repeat; filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); transform: scale(.85); transition: transform .2s; }

.badge-rating { position: absolute; top: 7px; right: 7px; z-index: 2; display: flex; align-items: center; gap: 3px; padding: 3px 7px; border: 1px solid rgba(255,183,3,.35); border-radius: 4px; background: rgba(16,20,28,.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(0,0,0,.6); color: var(--star-gold); font-size: 11px; font-weight: 800; line-height: 1.5; }
.badge-rating .star { color: var(--star-gold); font-size: 11px; }
.badge-featured { position: absolute; top: 7px; left: 7px; z-index: 2; padding: 2.5px 7px; border-radius: 3px; background: var(--featured); color: #06210a; font-size: 10.5px; font-weight: 800; line-height: 1.25; letter-spacing: .3px; text-transform: uppercase; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.poster-badges-bottom { position: absolute; bottom: 7px; left: 7px; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.badge-quality { display: inline-flex; align-items: center; padding: 2.5px 7px; border-radius: 3px; background: linear-gradient(135deg, #ff5722 0%, #d84315 100%); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 1.25; letter-spacing: .3px; text-transform: uppercase; box-shadow: 0 2px 6px rgba(0,0,0,.5); }

.movie-info { display: flex; flex-direction: column; width: 100%; min-width: 0; padding: 8px 1px 0; }
.movie-title { display: block; width: 100%; min-width: 0; margin: 0 0 3px; overflow: hidden; color: #fff; font-size: 13.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.movie-title a { display: block; overflow: hidden; color: #fff; white-space: nowrap; text-overflow: ellipsis; transition: color .15s; }
.movie-card:hover .movie-title a, .movie-title a:focus-visible { color: #ff6b35; }
.movie-meta-row { display: flex; align-items: center; margin: 0; padding: 0; font-size: 12px; line-height: 1.5; }
.movie-year { color: #718096; font-size: 12px; font-weight: 500; line-height: 1.2; }

@media (max-width: 1024px) {
	.movies-grid { grid-template-columns: repeat(var(--grid-cols-tablet), minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 768px) {
	.movies-grid { grid-template-columns: repeat(var(--grid-cols-mobile), minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 640px) {
	.movies-grid { gap: 7px; margin-bottom: 24px; }
	.movie-card { border-radius: 6px; }
	.movie-info { padding: 6px 1px 0; overflow: hidden; }
	.movie-title { margin-bottom: 2px; font-size: 11px; line-height: 1.25; }
	.movie-meta-row, .movie-year { font-size: 10px; }
	.badge-rating { top: 4px; right: 4px; gap: 2px; padding: 2px 4px; font-size: 9px; }
	.badge-rating .star { font-size: 9px; }
	.badge-featured { top: 4px; left: 4px; padding: 1.5px 4px; font-size: 8.5px; }
	.poster-badges-bottom { bottom: 4px; left: 4px; right: 4px; gap: 3px; }
	.badge-quality { padding: 1.5px 4px; font-size: 8.5px; line-height: 1.2; }
	.play-circle, .play-image { width: 32px; height: 32px; }
	.play-icon { margin-left: 2px; border-top-width: 5px; border-bottom-width: 5px; border-left-width: 9px; }
}
@media (max-width: 380px) {
	.movies-grid { gap: 5px; }
	.movie-info { padding: 5px 1px 0; }
	.movie-title { font-size: 10px; }
	.movie-meta-row, .movie-year { font-size: 9px; }
	.badge-quality { padding: 1px 3px; font-size: 7.5px; }
	.badge-rating { padding: 1px 3px; font-size: 8px; }
}
@media (hover: none) {
	.movie-card:hover { transform: none; }
	.movie-card:hover .play-overlay { opacity: 0; }
}

/* Section head: "N Titles" + See all */
.section-extra-wrap { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.section-extra { color: #8e95a5; font-size: 12px; }
.section-more { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px 5px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; background: rgba(255,255,255,.04); color: #cbd5e1; font-size: 12px; font-weight: 700; line-height: 1.3; transition: all .2s; }
.section-more:hover, .section-more:focus-visible { border-color: transparent; background: var(--accent-grad); color: #fff; box-shadow: 0 4px 12px rgba(255,56,56,.3); }
.section-more svg { transition: transform .2s; }
.section-more:hover svg { transform: translateX(2px); }
@media (max-width: 480px) {
	.section-extra { display: none; }
	.section-title { font-size: 16px; }
}

/* One side gap for the whole site (header, A–Z bar, content, widgets) */
@media (max-width: 480px) {
	:root { --gutter: 6px; }
}


/* Never let the page slide sideways (all pages, all devices). `clip` keeps the sticky header working. */
html { overflow-x: hidden; }
body { overflow-x: clip; max-width: 100%; }
.rsm-glossary-bar ul { overscroll-behavior-x: contain; touch-action: pan-x pan-y; }
@media (hover: none) {
	.genre-chip:hover, .popular-card:hover, .year-chip:hover, .rsm-glossary-bar a:hover { transform: none; }
}

/* Homepage search: short highlight when the mobile search icon jumps to it */
.search-form.is-flash input[type=search] { border-color: rgba(255,87,34,.7); box-shadow: 0 0 0 3px rgba(255,87,34,.18); }

/* ===================== Movie archives: title between two lines (matched to the reference design) ===================== */
.taxonomy-hero-banner { margin: 10px 0 24px; text-align: center; }
.taxonomy-title-wrap { display: flex; align-items: center; justify-content: center; gap: 20px; }
.taxonomy-decor-line { flex: 1 1 0%; max-width: 220px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.18)); }
.taxonomy-decor-line.right { background: linear-gradient(90deg, rgba(255,255,255,.18), transparent); }
.taxonomy-hero-h1 { display: inline-flex; align-items: center; gap: 10px; min-width: 0; margin: 0; color: #fff; font-size: 26px; font-weight: 800; line-height: 1.5; letter-spacing: -.4px; text-transform: capitalize; text-shadow: 0 2px 12px rgba(0,0,0,.6); white-space: nowrap; }
.taxonomy-desc { max-width: 640px; margin: 10px auto 0; color: #8e95a5; font-size: 13px; line-height: 1.6; }
.taxonomy-desc p { margin: 0; }
.rsm-archive .movies-section .section-head { margin-bottom: 18px; }
.rsm-archive .movies-section .section-title { font-size: 18px; line-height: 27px; }
.rsm-archive .movies-section .section-extra { display: inline; font-size: 12px; }
.rsm-archive .pagination { margin: 36px 0 20px; }
.rsm-archive .pagination .page-numbers { min-width: 40px; height: 40px; font-size: 13.5px; }
.rsm-empty { padding: 30px 10px; color: #8e95a5; text-align: center; }
@media (max-width: 768px) {
	.taxonomy-hero-banner { margin: 6px 0 14px; padding: 0 2px; }
	.taxonomy-title-wrap { gap: 8px; }
	.taxonomy-hero-h1 { font-size: 19px; white-space: normal; }
	.taxonomy-decor-line { max-width: 28px; }
}

/* Back to top (appears after scrolling down) */
.rsm-to-top { position: fixed; right: 18px; bottom: 18px; z-index: 900; display: flex; align-items: center; justify-content: center; width: 50px; height: 40px; padding: 0; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(90,90,96,.82); box-shadow: 0 6px 18px rgba(0,0,0,.45); color: #fff; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, visibility .25s, transform .25s, background .2s; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.rsm-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.rsm-to-top:hover, .rsm-to-top:focus-visible { background: var(--accent-grad); border-color: transparent; }
@media (max-width: 768px) { .rsm-to-top { right: 12px; bottom: 12px; width: 46px; height: 38px; } }
@media (prefers-reduced-motion: reduce) { .rsm-to-top { transition: none; } }
