/*
Theme Name: BGFilms Cinema
Theme URI: https://bgfilms.art/
Author: Ivo
Author URI: https://ivo.wf/
Description: Модерна, адаптивна WordPress тема за филмов сайт с каталог, автоматично попълване по IMDb код чрез TMDB, собствен вход и плеър за разрешени видео източници.
Version: 1.10.3
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: bgfilms-cinema
Tags: entertainment, grid-layout, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --bgfilms-accent: #e73346;
  --bgfilms-accent-dark: #bd1f31;
  --bgfilms-bg: #f5f6f8;
  --bgfilms-surface: #ffffff;
  --bgfilms-surface-2: #eef0f4;
  --bgfilms-text: #17191f;
  --bgfilms-muted: #737985;
  --bgfilms-border: #e1e4e9;
  --bgfilms-dark: #10131a;
  --bgfilms-dark-2: #181c25;
  --bgfilms-gold: #f7b731;
  --bgfilms-shadow: 0 14px 35px rgba(25, 29, 40, .10);
  --bgfilms-radius: 14px;
  --bgfilms-container: 1280px;
}

body.bgfilms-dark-mode {
  --bgfilms-bg: #0c0f14;
  --bgfilms-surface: #141821;
  --bgfilms-surface-2: #1c212c;
  --bgfilms-text: #f4f5f7;
  --bgfilms-muted: #a8afbd;
  --bgfilms-border: #2a303c;
  --bgfilms-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bgfilms-bg);
  color: var(--bgfilms-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  transition: background-color .25s ease, color .25s ease;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--bgfilms-accent); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto !important; width: auto; height: auto; margin: 0;
  padding: 12px 16px; top: 10px; left: 10px; z-index: 100000;
  background: var(--bgfilms-surface); color: var(--bgfilms-text); border-radius: 8px;
}
.bgfilms-container { width: min(calc(100% - 32px), var(--bgfilms-container)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: color-mix(in srgb, var(--bgfilms-surface) 92%, transparent);
  border-bottom: 1px solid var(--bgfilms-border);
  backdrop-filter: blur(14px);
}
.admin-bar .site-header { top: 32px; }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 28px; }
.site-branding { display: flex; align-items: center; min-width: max-content; }
.custom-logo { display: block; max-height: 48px; width: auto; }
.site-title {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 24px; letter-spacing: -.03em;
}
.site-title::before {
  content: "▶"; display: grid; place-items: center; width: 34px; height: 34px;
  background: var(--bgfilms-accent); color: #fff; border-radius: 10px; font-size: 15px;
}
.site-title span { color: var(--bgfilms-accent); }
.primary-navigation { flex: 1; }
.primary-navigation ul { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.primary-navigation a { font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.primary-navigation .current-menu-item > a,
.primary-navigation .current_page_item > a { color: var(--bgfilms-accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button {
  width: 42px; height: 42px; border: 1px solid var(--bgfilms-border); border-radius: 12px;
  background: var(--bgfilms-surface); color: var(--bgfilms-text); display: grid; place-items: center;
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}
.icon-button:hover { transform: translateY(-2px); border-color: var(--bgfilms-accent); color: var(--bgfilms-accent); }
.header-search { position: relative; width: min(290px, 24vw); }
.header-search input {
  width: 100%; min-height: 42px; padding: 0 44px 0 15px; border: 1px solid var(--bgfilms-border);
  border-radius: 12px; background: var(--bgfilms-surface); color: var(--bgfilms-text); outline: none;
}
.header-search input:focus { border-color: var(--bgfilms-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bgfilms-accent) 15%, transparent); }
.header-search button { position: absolute; inset: 0 0 0 auto; width: 42px; border: 0; background: transparent; color: var(--bgfilms-muted); }
.menu-toggle { display: none; }

/* Hero */
.hero-section { padding: 24px 0 0; }
.hero-slider { position: relative; min-height: 560px; border-radius: 18px; overflow: hidden; background: var(--bgfilms-dark); box-shadow: var(--bgfilms-shadow); }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .55s ease, visibility .55s ease; }
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slide__image { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.02); }
.hero-slide__image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7, 9, 13, .94) 0%, rgba(7, 9, 13, .76) 36%, rgba(7, 9, 13, .18) 72%, rgba(7, 9, 13, .10) 100%),
              linear-gradient(0deg, rgba(7, 9, 13, .55), transparent 55%);
}
.hero-placeholder-art {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 74% 40%, rgba(231, 51, 70, .52), transparent 19%),
    radial-gradient(circle at 78% 45%, rgba(72, 94, 156, .55), transparent 34%),
    linear-gradient(120deg, #0c1119 0%, #252d3a 48%, #8791a0 100%);
}
.hero-placeholder-art::before {
  content: ""; position: absolute; right: 10%; bottom: -16%; width: 36%; aspect-ratio: .72;
  border-radius: 48% 48% 12% 12%; background: linear-gradient(160deg, #121720, #3d4654);
  filter: drop-shadow(0 20px 20px rgba(0,0,0,.45)); transform: rotate(-4deg);
}
.hero-content { position: relative; z-index: 2; min-height: 560px; max-width: 650px; display: flex; flex-direction: column; justify-content: center; padding: 70px 72px; color: #fff; }
.hero-badge, .movie-badge {
  display: inline-flex; align-items: center; width: max-content; padding: 6px 10px; border-radius: 6px;
  background: var(--bgfilms-accent); color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
}
.hero-title { margin: 16px 0 10px; font-size: clamp(38px, 5vw, 64px); line-height: 1.04; letter-spacing: -.045em; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: rgba(255,255,255,.86); font-weight: 700; }
.rating { color: var(--bgfilms-gold); font-weight: 900; }
.hero-excerpt { max-width: 580px; margin: 18px 0 28px; color: rgba(255,255,255,.76); font-size: 17px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.button, .wp-element-button, input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 20px;
  border: 0; border-radius: 10px; background: var(--bgfilms-accent); color: #fff; font-weight: 800;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.button:hover, .wp-element-button:hover, input[type="submit"]:hover { transform: translateY(-2px); background: var(--bgfilms-accent-dark); color: #fff; box-shadow: 0 10px 24px rgba(231, 51, 70, .26); }
.button--light { background: #fff; color: #16181d; }
.button--light:hover { background: #f0f1f3; color: #16181d; }
.button--ghost { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.35); }
.hero-control {
  position: absolute; z-index: 4; top: 50%; transform: translateY(-50%); width: 44px; height: 58px;
  border: 0; background: rgba(0,0,0,.42); color: #fff; border-radius: 10px; font-size: 24px;
}
.hero-control:hover { background: var(--bgfilms-accent); }
.hero-control--prev { left: 18px; }
.hero-control--next { right: 18px; }
.hero-dots { position: absolute; z-index: 4; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 7px; }
.hero-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.45); }
.hero-dot.is-active { width: 24px; border-radius: 10px; background: var(--bgfilms-accent); }

/* Sections and cards */
.content-section { padding: 54px 0 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-title { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.section-title::after { content: "›"; margin-left: 9px; color: var(--bgfilms-accent); }
.section-link { color: var(--bgfilms-muted); font-size: 14px; font-weight: 700; }
.movies-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px 18px; }
.movie-card { min-width: 0; }
.movie-card__poster { position: relative; display: block; overflow: hidden; aspect-ratio: 2 / 3; border-radius: 12px; background: var(--bgfilms-dark-2); box-shadow: 0 8px 24px rgba(17, 20, 27, .14); }
.movie-card__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.movie-card:hover .movie-card__poster img { transform: scale(1.055); }
.movie-card__overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8, 10, 14, .48); opacity: 0; transition: opacity .25s ease; }
.movie-card:hover .movie-card__overlay { opacity: 1; }
.play-circle { display: grid; place-items: center; width: 54px; height: 54px; border: 2px solid #fff; border-radius: 50%; color: #fff; font-size: 18px; backdrop-filter: blur(3px); }
.movie-card__top { position: absolute; inset: 10px 10px auto; z-index: 2; display: flex; justify-content: space-between; gap: 8px; }
.movie-card__year { padding: 4px 7px; border-radius: 5px; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; font-weight: 800; }
.movie-placeholder { width: 100%; height: 100%; display: grid; place-items: center; padding: 18px; text-align: center; color: rgba(255,255,255,.86); background: linear-gradient(145deg, #1b2230, #313d52 48%, #a42b3a); font-weight: 900; font-size: clamp(18px, 2vw, 28px); letter-spacing: -.03em; }
.movie-card__content { padding: 12px 2px 0; }
.movie-card__title { margin: 0 0 4px; font-size: 15px; line-height: 1.35; font-weight: 800; }
.movie-card__meta { display: flex; flex-wrap: wrap; gap: 5px 10px; color: var(--bgfilms-muted); font-size: 12px; }
.movie-card__rating { color: var(--bgfilms-gold); font-weight: 900; }

/* Spotlight */
.spotlight { display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; min-height: 390px; background: var(--bgfilms-surface); border: 1px solid var(--bgfilms-border); border-radius: 16px; box-shadow: var(--bgfilms-shadow); }
.spotlight__media { position: relative; min-height: 390px; background: var(--bgfilms-dark); }
.spotlight__media img { width: 100%; height: 100%; object-fit: cover; }
.spotlight__media .movie-placeholder { position: absolute; inset: 0; font-size: 42px; }
.spotlight__play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); }
.spotlight__content { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 5vw, 64px); }
.spotlight__content h3 { margin: 10px 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -.04em; }
.spotlight__meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--bgfilms-muted); font-weight: 700; }
.spotlight__cast { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.cast-chip { padding: 6px 10px; border: 1px solid var(--bgfilms-border); border-radius: 999px; background: var(--bgfilms-surface-2); font-size: 12px; font-weight: 700; }

/* Genre cards */
.genres-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.genre-card { position: relative; min-height: 122px; padding: 18px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 13px; background: linear-gradient(145deg, #252c38, #11151d); color: #fff; isolation: isolate; }
.genre-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 82% 15%, color-mix(in srgb, var(--bgfilms-accent) 62%, transparent), transparent 42%); opacity: .9; }
.genre-card:hover { color: #fff; transform: translateY(-3px); box-shadow: var(--bgfilms-shadow); }
.genre-card__icon { font-size: 30px; margin-bottom: 12px; }
.genre-card strong { font-size: 15px; }
.genre-card small { color: rgba(255,255,255,.65); }

/* Content templates */
.site-main { min-height: 55vh; }
.page-shell { padding: 44px 0 70px; }
.archive-header, .page-header { margin-bottom: 26px; }
.archive-title, .page-title { margin: 0 0 8px; font-size: clamp(32px, 5vw, 52px); line-height: 1.1; letter-spacing: -.04em; }
.archive-description { color: var(--bgfilms-muted); max-width: 760px; }
.content-card { padding: clamp(24px, 4vw, 46px); background: var(--bgfilms-surface); border: 1px solid var(--bgfilms-border); border-radius: var(--bgfilms-radius); box-shadow: var(--bgfilms-shadow); }
.entry-title { margin-top: 0; line-height: 1.15; letter-spacing: -.03em; }
.entry-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; color: var(--bgfilms-muted); font-size: 14px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content a { color: var(--bgfilms-accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: 12px; }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.page-numbers { display: grid; place-items: center; min-width: 42px; min-height: 42px; padding: 0 12px; border: 1px solid var(--bgfilms-border); border-radius: 10px; background: var(--bgfilms-surface); }
.page-numbers.current { background: var(--bgfilms-accent); border-color: var(--bgfilms-accent); color: #fff; }
.empty-state { padding: 55px 30px; text-align: center; background: var(--bgfilms-surface); border: 1px dashed var(--bgfilms-border); border-radius: 14px; }

/* Single movie */
.movie-single-hero { position: relative; min-height: 590px; background: var(--bgfilms-dark); color: #fff; overflow: hidden; }
.movie-single-hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(1px); transform: scale(1.03); }
.movie-single-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,9,13,.96), rgba(7,9,13,.72) 52%, rgba(7,9,13,.42)), linear-gradient(0deg, rgba(7,9,13,.95), transparent 70%); }
.movie-single-hero__inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(220px, 330px) 1fr; align-items: center; gap: clamp(30px, 5vw, 70px); min-height: 590px; padding-block: 55px; }
.movie-single-poster { overflow: hidden; aspect-ratio: 2/3; border-radius: 14px; box-shadow: 0 22px 55px rgba(0,0,0,.5); }
.movie-single-poster img { width: 100%; height: 100%; object-fit: cover; }
.movie-single-title { margin: 14px 0 12px; font-size: clamp(42px, 6vw, 76px); line-height: 1; letter-spacing: -.055em; }
.movie-single-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 20px; color: rgba(255,255,255,.78); font-weight: 700; }
.movie-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 30px; margin-top: 24px; }
.movie-detail { color: rgba(255,255,255,.72); }
.movie-detail strong { color: #fff; }
.movie-body { padding: 54px 0 70px; }
.movie-body-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; }
.movie-facts { padding: 24px; background: var(--bgfilms-surface); border: 1px solid var(--bgfilms-border); border-radius: 14px; height: max-content; }
.movie-facts h3 { margin-top: 0; }
.movie-facts dl { margin: 0; }
.movie-facts dt { margin-top: 14px; font-weight: 800; }
.movie-facts dd { margin: 2px 0 0; color: var(--bgfilms-muted); }

/* Forms / comments */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--bgfilms-border); border-radius: 10px; background: var(--bgfilms-surface); color: var(--bgfilms-text); outline: none;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--bgfilms-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bgfilms-accent) 13%, transparent); }
.comments-area { margin-top: 34px; padding: 28px; background: var(--bgfilms-surface); border: 1px solid var(--bgfilms-border); border-radius: 14px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--bgfilms-border); }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-right: 8px; }

/* Footer */
.site-footer { margin-top: 70px; background: var(--bgfilms-dark); color: #e8eaf0; }
.footer-widgets { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 40px; padding: 58px 0 42px; }
.footer-widget-title { margin: 0 0 17px; color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; }
.site-footer p, .site-footer li, .site-footer .textwidget { color: #9fa6b3; font-size: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 8px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.08); color: #7d8491; font-size: 13px; }
.social-links { display: flex; gap: 9px; }
.social-links a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; }
.social-links a:hover { background: var(--bgfilms-accent); }
.back-to-top { position: fixed; right: 20px; bottom: 20px; z-index: 80; opacity: 0; pointer-events: none; transform: translateY(10px); }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Trailer modal */

/* Full movie player. */
.movie-watch-section { padding: clamp(38px, 6vw, 76px) 0; background: var(--bgfilms-dark); color: #fff; }
.movie-watch-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.movie-watch-heading h2 { margin: 0; color: #fff; font-size: clamp(28px, 4vw, 46px); letter-spacing: -.035em; }
.movie-watch-heading p { max-width: 650px; margin: 0; color: rgba(255,255,255,.68); }
.bgfilms-movie-player { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: #000; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.bgfilms-movie-player video,
.bgfilms-movie-player iframe,
.bgfilms-movie-player .wp-video,
.bgfilms-movie-player .wp-video-shortcode { width: 100% !important; height: 100% !important; max-width: none !important; border: 0; background: #000; }
.bgfilms-movie-player iframe { display: block; }
.bgfilms-movie-player__video { display: block; object-fit: contain; }
.movie-player-disclaimer { margin: 14px 0 0; color: rgba(255,255,255,.62); font-size: 13px; }

.trailer-modal { position: fixed; inset: 0; z-index: 10000; display: none; place-items: center; padding: 24px; background: rgba(0,0,0,.84); }
.trailer-modal.is-open { display: grid; }
.trailer-modal__dialog { position: relative; width: min(100%, 1050px); aspect-ratio: 16/9; background: #000; border-radius: 14px; overflow: hidden; box-shadow: 0 25px 80px rgba(0,0,0,.55); }
.trailer-modal iframe { width: 100%; height: 100%; border: 0; }
.trailer-modal__close { position: absolute; z-index: 2; top: 10px; right: 10px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(0,0,0,.72); color: #fff; font-size: 24px; }

/* WordPress alignment */
.alignwide { width: min(120%, 1400px); max-width: 1400px; margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { color: var(--bgfilms-muted); font-size: 13px; }
.sticky { border-left: 4px solid var(--bgfilms-accent); }
.bypostauthor { outline: 1px solid transparent; }

/* Responsive */
@media (max-width: 1100px) {
  .movies-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .genres-grid { grid-template-columns: repeat(3, 1fr); }
  .header-search { width: 220px; }
  .primary-navigation ul { gap: 16px; }
  .footer-widgets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .admin-bar .site-header { top: 46px; }
  .header-inner { min-height: 68px; }
  .menu-toggle { display: grid; }
  .primary-navigation { position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 12px 16px 20px; background: var(--bgfilms-surface); border-bottom: 1px solid var(--bgfilms-border); box-shadow: var(--bgfilms-shadow); }
  .primary-navigation.is-open { display: block; }
  .primary-navigation ul { display: block; }
  .primary-navigation li + li { margin-top: 8px; }
  .primary-navigation a { display: block; padding: 9px 6px; }
  .header-search { margin-left: auto; width: min(260px, 38vw); }
  .hero-slider, .hero-content { min-height: 500px; }
  .hero-content { padding: 55px 58px; }
  .spotlight { grid-template-columns: 1fr; }
  .spotlight__media { min-height: 350px; }
  .movie-single-hero__inner { grid-template-columns: 230px 1fr; gap: 30px; }
  .movie-body-grid { grid-template-columns: 1fr; }
  .movie-facts { order: -1; }
}
@media (max-width: 700px) {
  .bgfilms-container { width: min(calc(100% - 22px), var(--bgfilms-container)); }
  .site-title { font-size: 20px; }
  .header-search { display: none; }
  .header-actions { margin-left: auto; }
  .hero-section { padding-top: 12px; }
  .hero-slider, .hero-content { min-height: 490px; }
  .hero-content { padding: 48px 30px; justify-content: flex-end; }
  .hero-slide__image::after { background: linear-gradient(0deg, rgba(7,9,13,.98) 0%, rgba(7,9,13,.76) 58%, rgba(7,9,13,.25) 100%); }
  .hero-control { display: none; }
  .hero-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .movies-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .genres-grid { grid-template-columns: repeat(2, 1fr); }
  .content-section { padding-top: 42px; }
  .spotlight__media { min-height: 270px; }
  .movie-single-hero__inner { grid-template-columns: 1fr; padding-top: 36px; }
  .movie-single-poster { width: min(260px, 72vw); }
  .movie-single-title { font-size: 43px; }
  .movie-details { grid-template-columns: 1fr; }
  .footer-widgets { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 430px) {
  .site-title::before { width: 30px; height: 30px; }
  .header-actions .account-link { display: none; }
  .hero-title { font-size: 38px; }
  .hero-meta { gap: 8px 12px; font-size: 13px; }
  .button { width: 100%; }
  .genres-grid { grid-template-columns: 1fr; }
  .movie-card__title { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.content-list { display: grid; gap: 22px; }
.movies-grid > .content-card { grid-column: 1 / -1; }
.entry-featured-image { margin: 0 0 26px; }
.entry-featured-image img { width: 100%; border-radius: 12px; }
.search-form { display: flex; gap: 10px; max-width: 650px; margin: 22px auto 0; }
.search-form label { flex: 1; }
@media (max-width: 520px) { .search-form { flex-direction: column; } }

/* Login links */
.header-auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--bgfilms-text);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.header-auth-link:hover { color: var(--bgfilms-accent); background: var(--bgfilms-surface-2); }
@media (max-width: 820px) {
  .header-auth-link { display: inline-flex; min-height: 36px; padding-inline: 10px; }
}


/* Front-end account pages */
.account-page {
  min-height: calc(100vh - 76px);
  padding: clamp(42px, 7vw, 90px) 0;
  background:
    radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--bgfilms-accent) 14%, transparent), transparent 34%),
    radial-gradient(circle at 88% 85%, rgba(29, 43, 76, .12), transparent 32%),
    var(--bgfilms-bg);
}
.account-shell { max-width: 1080px; }
.account-shell--narrow { max-width: 650px; }
.account-card,
.profile-card {
  overflow: hidden;
  border: 1px solid var(--bgfilms-border);
  border-radius: 22px;
  background: var(--bgfilms-surface);
  box-shadow: 0 28px 80px rgba(15, 18, 27, .16);
}
.account-card { display: grid; grid-template-columns: minmax(300px, .86fr) minmax(420px, 1.14fr); }
.account-card--single { display: block; }
.account-card__intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 570px;
  padding: clamp(38px, 6vw, 70px);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(6, 8, 14, .80), rgba(13, 16, 26, .94)),
    radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--bgfilms-accent) 72%, #ff8b73), transparent 34%),
    #10131a;
}
.account-card__intro h1,
.account-card__form h1,
.profile-card h1 { margin: 8px 0 12px; line-height: 1.05; letter-spacing: -.035em; font-size: clamp(34px, 5vw, 54px); }
.account-card__intro p { color: rgba(255,255,255,.74); }
.account-card__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  border-radius: 20px;
  background: var(--bgfilms-accent);
  color: #fff;
  font-size: 27px;
  box-shadow: 0 16px 38px color-mix(in srgb, var(--bgfilms-accent) 38%, transparent);
}
.account-card__form { padding: clamp(32px, 5vw, 58px); }
.account-card--single .account-card__form { max-width: 650px; margin-inline: auto; }
.account-lead { margin: 0 0 24px; color: var(--bgfilms-muted); }
.account-benefits { display: grid; gap: 13px; margin: 28px 0 0; padding: 0; list-style: none; }
.account-benefits li { position: relative; padding-left: 28px; color: rgba(255,255,255,.86); }
.account-benefits li::before { content: "✓"; position: absolute; left: 0; color: #ffcd5c; font-weight: 900; }
.account-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 28px;
  padding: 5px;
  border-radius: 12px;
  background: var(--bgfilms-surface-2);
}
.account-tabs a { padding: 10px 14px; border-radius: 9px; text-align: center; font-weight: 800; color: var(--bgfilms-muted); }
.account-tabs a:hover { color: var(--bgfilms-text); }
.account-tabs a.is-active { background: var(--bgfilms-surface); color: var(--bgfilms-text); box-shadow: 0 5px 18px rgba(20,24,33,.10); }
.account-form { display: grid; gap: 18px; }
.account-form label { display: grid; gap: 7px; font-weight: 800; color: var(--bgfilms-text); }
.account-form label > span { font-size: 14px; }
.account-form input[type="text"],
.account-form input[type="email"],
.account-form input[type="password"] {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid var(--bgfilms-border);
  border-radius: 11px;
  outline: 0;
  background: var(--bgfilms-bg);
  color: var(--bgfilms-text);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.account-form input:focus { border-color: var(--bgfilms-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bgfilms-accent) 17%, transparent); background: var(--bgfilms-surface); }
.account-form small,
.profile-form-wrap > small { color: var(--bgfilms-muted); font-weight: 500; }
.account-form__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; }
.account-form__row > a,
.account-back-link a { color: var(--bgfilms-accent); font-weight: 800; }
.account-checkbox { display: inline-flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; font-weight: 600 !important; }
.account-checkbox input { width: 17px; height: 17px; accent-color: var(--bgfilms-accent); }
.account-checkbox span { font-size: 14px !important; }
.account-form__columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.account-submit { width: 100%; min-height: 50px; margin-top: 2px; border: 0; }
.account-notice { margin-bottom: 20px; padding: 13px 15px; border-radius: 11px; line-height: 1.5; }
.account-notice ul { margin: 0; padding-left: 20px; }
.account-notice--error { border: 1px solid color-mix(in srgb, #dc3545 34%, transparent); background: color-mix(in srgb, #dc3545 10%, var(--bgfilms-surface)); color: color-mix(in srgb, #dc3545 82%, var(--bgfilms-text)); }
.account-notice--success { border: 1px solid color-mix(in srgb, #2ba66f 35%, transparent); background: color-mix(in srgb, #2ba66f 10%, var(--bgfilms-surface)); color: color-mix(in srgb, #178153 85%, var(--bgfilms-text)); }
.account-honeypot { position: absolute !important; left: -99999px !important; width: 1px; height: 1px; overflow: hidden; }
.account-back-link { margin: 22px 0 0; text-align: center; }

/* Front-end member profile */
.profile-card__header {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: clamp(28px, 5vw, 46px);
  color: #fff;
  background: linear-gradient(135deg, #111620, #20293b 65%, color-mix(in srgb, var(--bgfilms-accent) 44%, #20293b));
}
.profile-card__header h1 { margin-bottom: 5px; font-size: clamp(32px, 4vw, 48px); }
.profile-card__header p { margin: 0; color: rgba(255,255,255,.70); }
.profile-avatar img { display: block; border: 4px solid rgba(255,255,255,.18); border-radius: 50%; }
.profile-logout { margin-left: auto; color: #fff; }
.profile-logout:hover { border-color: #fff; background: #fff; color: #151922; }
.profile-card__body { display: grid; grid-template-columns: minmax(260px, .78fr) minmax(420px, 1.22fr); }
.profile-summary { padding: clamp(30px, 5vw, 48px); border-right: 1px solid var(--bgfilms-border); background: var(--bgfilms-surface-2); }
.profile-summary h2,
.profile-form-wrap h2 { margin-top: 0; }
.profile-summary p { color: var(--bgfilms-muted); }
.profile-summary dl { display: grid; gap: 12px; margin: 28px 0; }
.profile-summary dl > div { padding-bottom: 12px; border-bottom: 1px solid var(--bgfilms-border); }
.profile-summary dt { color: var(--bgfilms-muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.profile-summary dd { margin: 3px 0 0; font-weight: 800; overflow-wrap: anywhere; }
.profile-summary .button--ghost { border-color: var(--bgfilms-border); background: var(--bgfilms-surface); color: var(--bgfilms-text); }
.profile-summary .button--ghost:hover { background: var(--bgfilms-accent); color: #fff; }
.profile-form-wrap { padding: clamp(30px, 5vw, 48px); }

@media (max-width: 860px) {
  .account-card { grid-template-columns: 1fr; }
  .account-card__intro { min-height: auto; padding-block: 42px; }
  .profile-card__body { grid-template-columns: 1fr; }
  .profile-summary { border-right: 0; border-bottom: 1px solid var(--bgfilms-border); }
}
@media (max-width: 620px) {
  .account-page { padding-block: 24px; }
  .account-card,
  .profile-card { border-radius: 16px; }
  .account-card__form,
  .account-card__intro,
  .profile-summary,
  .profile-form-wrap { padding: 26px 20px; }
  .account-form__columns { grid-template-columns: 1fr; }
  .account-form__row { align-items: flex-start; flex-direction: column; }
  .profile-card__header { align-items: flex-start; flex-wrap: wrap; padding: 26px 20px; }
  .profile-avatar img { width: 82px; height: 82px; }
  .profile-logout { width: 100%; margin-left: 0; }
}
@media (max-width: 430px) {
  .header-actions .account-link { display: grid; }
  .header-auth-link { font-size: 0; width: 38px; padding: 0; }
  .header-auth-link::before { content: "↪"; font-size: 18px; }
  .account-card__intro h1,
  .account-card__form h1 { font-size: 34px; }
}

.movie-source-note {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--bgfilms-border);
  color: var(--bgfilms-muted);
  font-size: .88rem;
}

.movie-source-note a {
  font-weight: 700;
}

.tmdb-attribution {
  padding: 0 0 22px;
  color: var(--bgfilms-muted);
  text-align: center;
}
.tmdb-attribution a { color: inherit; text-decoration: underline; }

@media (max-width: 680px) {
  .movie-watch-heading { align-items: flex-start; flex-direction: column; }
  .bgfilms-movie-player { border-radius: 10px; }
}
