:root {
    --bg: #071019;
    --bg-deep: #03090e;
    --surface: #0b151f;
    --surface-2: #101c27;
    --surface-3: #15222e;
    --text: #f7f7f4;
    --muted: #9aa4ad;
    --muted-2: #65717d;
    --amber: #ffb43b;
    --amber-strong: #f6a91d;
    --amber-soft: rgba(255, 180, 59, .13);
    --line: rgba(255, 255, 255, .11);
    --line-strong: rgba(255, 255, 255, .19);
    --green: #6fd7a9;
    --font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; color: var(--text); background: var(--bg); font-family: var(--font); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1360px, calc(100% - 96px)); margin-inline: auto; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Hero */
.cinema-hero { position: relative; height: 455px; min-height: 455px; overflow: hidden; background: #06101a; isolation: isolate; }
.hero-backdrop { position: absolute; inset: 0; z-index: -2; background-position: 64% 30%; background-size: cover; transform: scale(1.015); transition: background-image .5s ease; }
.cinema-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3, 8, 13, .99) 0%, rgba(3, 8, 13, .88) 28%, rgba(3, 8, 13, .35) 62%, rgba(3, 8, 13, .3) 100%); }
.cinema-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--bg) 0%, transparent 35%); pointer-events: none; }
.site-header { height: 72px; }
.header-content { height: 72px; display: grid; grid-template-columns: 240px 1fr 320px; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; width: 190px; }
.logo-image { width: 100%; height: auto; max-height: 48px; object-fit: contain; object-position: left center; }
.highlight { color: var(--amber); }
.primary-nav { display: flex; justify-content: center; align-items: stretch; height: 100%; gap: 40px; }
.primary-nav-link { position: relative; display: inline-flex; align-items: center; border: 0; color: rgba(255, 255, 255, .78); background: transparent; font-size: .83rem; font-weight: 600; cursor: pointer; }
.primary-nav-link:hover, .primary-nav-link.active { color: white; }
.primary-nav-link.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 10px; height: 2px; background: var(--amber); }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; color: white; background: transparent; font-size: 1.3rem; cursor: pointer; transition: background .2s; }
.icon-button:hover { background: rgba(255, 255, 255, .08); }
.icon-button.active { color: var(--amber); background: rgba(255, 180, 59, .12); }
.language-toggle { height: 32px; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; color: #e8edf0; background: rgba(6, 12, 18, .4); font-size: .66rem; font-weight: 800; letter-spacing: .06em; cursor: pointer; transition: border-color .2s, background .2s; }
.language-toggle:hover { border-color: var(--amber); background: rgba(255, 180, 59, .08); }
.language-toggle i { font-size: .85rem; }
.profile-button { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border: 0; background: transparent; font-size: .82rem; cursor: pointer; }
.profile-avatar { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: #18232d; }
.profile-button > .ph-caret-down { color: var(--muted); font-size: .72rem; }
.header-search { position: relative; }
.search-container { position: absolute; top: 46px; right: 0; z-index: 500; width: min(450px, calc(100vw - 32px)); display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(7, 16, 25, .98); box-shadow: 0 18px 60px rgba(0, 0, 0, .55); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .2s var(--ease); }
.header-search.open .search-container { opacity: 1; visibility: visible; transform: none; }
.search-icon { color: var(--muted); margin-left: 7px; }
#searchInput { min-width: 0; flex: 1; padding: 8px 0; border: 0; outline: 0; color: white; background: transparent; }
#searchInput::placeholder { color: var(--muted-2); }
#searchBtn { padding: 9px 16px; border: 0; border-radius: 7px; color: #081019; background: var(--amber); font-weight: 800; cursor: pointer; }
.random-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; }
.random-btn:hover { color: white; background: rgba(255, 255, 255, .07); }
.suggestions-dropdown { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: 340px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
.suggestion-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px; cursor: pointer; }
.suggestion-item:hover { background: rgba(255, 255, 255, .06); }
.suggestion-poster { width: 32px; height: 46px; object-fit: cover; border-radius: 4px; }
.suggestion-info { min-width: 0; }
.suggestion-title { overflow: hidden; color: white; font-size: .8rem; white-space: nowrap; text-overflow: ellipsis; }
.suggestion-year { color: var(--muted); font-size: .7rem; }

.hero-feature { height: 383px; min-height: 0; display: flex; align-items: center; justify-content: space-between; padding-top: 4px; padding-bottom: 24px; }
.hero-feature-copy { width: min(590px, 52vw); }
.featured-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; color: var(--amber); font-size: .68rem; font-weight: 800; letter-spacing: .085em; }
.featured-kicker span { width: 28px; height: 2px; background: var(--amber); }
.hero-feature h1 { margin-left: -3px; color: white; font-size: clamp(2.8rem, 4.5vw, 4.35rem); font-weight: 500; line-height: .98; letter-spacing: -.065em; text-transform: uppercase; text-wrap: balance; }
.featured-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; color: #ccd1d4; font-size: .75rem; }
#featuredOverview { display: -webkit-box; max-width: 460px; margin-top: 15px; overflow: hidden; color: #c4cbd0; font-size: .8rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.featured-ratings { display: flex; align-items: center; gap: 17px; margin-top: 13px; font-size: .84rem; }
.featured-ratings > span:not(.rating-divider) { display: inline-flex; align-items: baseline; gap: 6px; }
.featured-ratings b { color: var(--amber); font-size: .91rem; }
.featured-ratings strong { font-size: 1rem; }
.featured-ratings small { color: var(--muted); font-size: .68rem; }
.rating-divider { width: 1px; height: 20px; background: var(--line-strong); }
.featured-actions { display: flex; align-items: center; gap: 22px; margin-top: 18px; }
.hero-primary { min-height: 48px; display: inline-flex; align-items: center; gap: 10px; padding: 0 24px; border: 0; border-radius: 6px; color: #0c1115; background: var(--amber); font-size: .79rem; font-weight: 800; letter-spacing: .025em; cursor: pointer; box-shadow: 0 9px 30px rgba(255, 180, 59, .13); transition: transform .2s var(--ease), background .2s; }
.hero-primary:hover { transform: translateY(-2px); background: #ffc05a; }
.hero-secondary { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; border: 0; color: rgba(255, 255, 255, .82); background: transparent; font-size: .75rem; font-weight: 700; cursor: pointer; }
.hero-secondary:hover { color: white; }
.trailer-link { align-self: flex-end; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; border: 0; color: rgba(255, 255, 255, .86); background: transparent; font-size: .8rem; cursor: pointer; }
.trailer-link i { font-size: 1.65rem; }

/* Discovery */
.discovery-shell { position: relative; z-index: 30; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(5, 13, 20, .98); }
.discovery-shell > .container { position: relative; padding-top: 20px; padding-bottom: 14px; }
.discovery-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.discovery-heading { display: flex; align-items: center; gap: 12px; }
.discovery-heading > i { color: #dce2e6; font-size: 1.35rem; }
.discovery-heading h2 { font-size: 1rem; letter-spacing: .035em; }
.discovery-heading p { margin-left: 6px; color: var(--muted); font-size: .75rem; }
.clear-all-btn { display: inline-flex; align-items: center; gap: 7px; border: 0; color: var(--amber); background: transparent; font-size: .72rem; font-weight: 700; cursor: pointer; }
.discovery-category-wrap { display: flex; gap: 10px; margin-top: 17px; }
.discovery-categories { flex: 1; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.discovery-category-btn, .all-genres-btn { min-width: 0; min-height: 42px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; color: #c6cdd2; background: rgba(255, 255, 255, .018); font-size: .72rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: .18s var(--ease); }
.discovery-category-btn:hover, .all-genres-btn:hover { color: white; border-color: rgba(255, 180, 59, .5); }
.discovery-category-btn.active, .discovery-category-btn.selected { color: var(--amber); border-color: var(--amber-strong); background: var(--amber-soft); box-shadow: inset 0 0 0 1px rgba(255, 180, 59, .08); }
.discovery-category-btn i, .all-genres-btn i { font-size: 1rem; }
.all-genres-btn { flex: 0 0 110px; }

.discovery-popover { position: absolute; z-index: 80; top: 124px; left: 48px; width: min(900px, calc(100% - 96px)); display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .8fr); border: 1px solid var(--line-strong); border-radius: 8px; background: #0b151f; box-shadow: 0 28px 70px rgba(0, 0, 0, .62); animation: popoverIn .18s var(--ease) both; }
.discovery-popover::before { content: ''; position: absolute; top: -7px; left: 295px; width: 12px; height: 12px; transform: rotate(45deg); border-left: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); background: #0b151f; }
@keyframes popoverIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
.popover-main { padding: 19px 22px 20px; }
.popover-title-row { display: flex; align-items: center; justify-content: space-between; }
.popover-title-row h3, .advanced-filter-panel h3 { font-size: .82rem; }
.popover-close { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; }
.popover-close:hover { color: white; background: rgba(255, 255, 255, .06); }
.theme-search { width: 58%; height: 36px; display: flex; align-items: center; gap: 8px; margin: 13px 0; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: rgba(0, 0, 0, .18); }
.theme-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: white; background: transparent; font-size: .73rem; }
.theme-search input::placeholder { color: var(--muted-2); }
.discovery-themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 34px; }
.discovery-theme-btn { min-height: 36px; display: flex; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .045); color: #c4ccd1; background: transparent; text-align: left; font-size: .72rem; cursor: pointer; }
.discovery-theme-btn::before { content: ''; width: 15px; height: 15px; flex: 0 0 15px; border: 1px solid #65727d; border-radius: 3px; }
.discovery-theme-btn:hover { color: white; }
.discovery-theme-btn.selected { color: white; }
.discovery-theme-btn.selected::before { content: '✓'; display: grid; place-items: center; border-color: var(--amber); color: #081019; background: var(--amber); font-size: .65rem; font-weight: 900; }
.discovery-empty-state { padding: 18px 0; color: var(--muted); font-size: .75rem; }
.advanced-filter-panel { display: flex; flex-direction: column; gap: 14px; padding: 19px 22px; border-left: 1px solid var(--line); background: rgba(255, 255, 255, .015); }
.advanced-filter-panel label, .year-range-control { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #c1c8cd; font-size: .7rem; }
.advanced-filter-panel select { width: 150px; height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; outline: 0; color: #dce2e6; background: #101c27; font-size: .7rem; }
.year-range-control > div { display: flex; align-items: center; gap: 6px; }
.year-range-control select { width: 70px; }
.popover-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: auto; padding-top: 6px; }
.text-button { border: 0; color: var(--muted); background: transparent; font-size: .7rem; cursor: pointer; }
.apply-discovery-btn { min-width: 190px; min-height: 42px; padding: 0 18px; border: 0; border-radius: 6px; color: #091017; background: var(--amber); font-size: .74rem; font-weight: 800; cursor: pointer; }
.apply-discovery-btn:disabled { opacity: .38; cursor: not-allowed; }
.active-filter-row { min-height: 45px; display: flex; align-items: center; gap: 10px; margin-top: 12px; border-top: 1px solid rgba(255, 255, 255, .06); color: var(--muted); font-size: .68rem; }
.active-filter-list { min-width: 0; flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.active-filter-list::-webkit-scrollbar { display: none; }
.active-filter-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 5px; color: #dde2e5; background: rgba(255, 255, 255, .055); font-size: .65rem; }
.active-filter-chip button { border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.active-filter-empty { color: var(--muted-2); }
.active-filter-search-btn { flex: 0 0 auto; min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border: 1px solid var(--amber); border-radius: 5px; color: #091017; background: var(--amber); font-size: .63rem; font-weight: 800; cursor: pointer; }
.active-filter-search-btn:hover { filter: brightness(1.08); }.active-filter-search-btn:disabled { opacity: .4; cursor: not-allowed; }
.selection-count { flex: 0 0 auto; color: var(--amber); font-weight: 700; }

/* Results */
.results-section { min-height: 440px; padding: 20px 0 58px; background: var(--bg); }
.results-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-heading { color: white; font-size: 1rem; font-weight: 800; letter-spacing: .02em; }
.results-hint { color: var(--muted-2); font-size: .68rem; }
.movie-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; }
.hidden-gems-section { margin-top: 48px; padding-top: 28px; border-top: 1px solid rgba(255, 180, 59, .2); }
.hidden-gems-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.hidden-gems-kicker { display: block; margin-bottom: 5px; color: var(--amber); font-size: .58rem; font-weight: 800; letter-spacing: .12em; }
.hidden-gems-heading p { max-width: 420px; color: var(--muted); font-size: .7rem; text-align: right; }
.hidden-gem-badge { position: absolute; z-index: 3; left: 9px; bottom: 9px; padding: 4px 7px; border: 1px solid rgba(255, 180, 59, .45); border-radius: 4px; color: #ffd594; background: rgba(4, 9, 14, .88); font-size: .56rem; font-weight: 800; }
.movie-card { min-width: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .06); border-radius: 6px; background: #0c151d; cursor: pointer; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; animation: cardIn .45s var(--ease) both; }
.movie-card:hover { z-index: 2; transform: translateY(-6px); border-color: rgba(255, 180, 59, .38); box-shadow: 0 18px 38px rgba(0, 0, 0, .46); }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.poster-container { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: #121d26; }
.poster-image { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.movie-card:hover .poster-image { transform: scale(1.035); }
.rating-badge { position: absolute; z-index: 3; top: 9px; left: 9px; display: flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 4px; color: #0b1116; background: var(--amber); font-size: .64rem; font-weight: 800; }
.rating-badge span { color: #0b1116; font-size: .57rem; }
.quick-source-links { position: absolute; z-index: 4; right: 9px; top: 9px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.movie-card:hover .quick-source-links, .quick-source-links:focus-within { opacity: 1; }
.quick-source-links a { padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; color: white; background: rgba(4, 9, 14, .88); font-size: .56rem; font-weight: 800; }
.personal-match-badge { position: absolute; z-index: 3; top: 39px; left: 9px; padding: 4px 6px; border-radius: 4px; color: var(--amber); background: rgba(4, 9, 14, .84); font-size: .56rem; font-weight: 800; }
.movie-info { min-height: 76px; padding: 11px 12px 12px; }
.movie-title { overflow: hidden; color: white; font-size: .78rem; font-weight: 700; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.movie-date { margin-top: 5px; color: var(--muted); font-size: .63rem; }
.recommendation-reason { margin-top: 6px; overflow: hidden; color: #c7ced2; font-size: .58rem; white-space: nowrap; text-overflow: ellipsis; }
.recommendation-reason span { color: var(--amber); font-weight: 800; }
.placeholder-poster { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); background: #111c25; font-size: 2rem; }
#loading { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.loader { width: 32px; height: 32px; border: 2px solid var(--line); border-top-color: var(--amber); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#error { padding: 55px 20px; border: 1px solid rgba(255, 180, 59, .2); border-radius: 8px; color: #ffd594; background: rgba(255, 180, 59, .05); text-align: center; }

/* Details */
.details-view { padding: 34px 0 70px; background: var(--bg); }
body.details-mode { background: #050b11; }
body.details-mode .cinema-hero,
body.details-mode .discovery-shell,
body.details-mode .results-section,
body.details-mode footer { display: none; }
body.details-mode .details-view { position: relative; isolation: isolate; min-height: 100vh; padding-top: 32px; background: #050b11; }
body.details-mode .details-view::before { content: ''; position: absolute; z-index: -2; inset: 0; min-height: 760px; background-image: linear-gradient(90deg, rgba(4, 10, 16, .98) 0%, rgba(4, 10, 16, .88) 48%, rgba(4, 10, 16, .7) 100%), linear-gradient(0deg, #050b11 0%, transparent 62%), var(--detail-backdrop); background-position: center top; background-size: cover; background-repeat: no-repeat; opacity: .75; }
body.details-mode .details-view::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, transparent 0, rgba(5, 11, 17, .3) 480px, #050b11 760px); pointer-events: none; }
.back-btn { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 25px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; }
.details-content { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 42px; }
.details-poster img { width: 100%; border-radius: 7px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.details-info h2 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.05; letter-spacing: -.04em; }
.meta-info { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.meta-badge { padding: 5px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: .72rem; }
.meta-rating { color: var(--amber); }
.overview { max-width: 760px; margin: 24px 0; color: #bbc4ca; line-height: 1.75; }
.external-ratings-section { max-width: 760px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .018); }
.external-ratings-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.external-ratings-heading h3 { font-size: .86rem; }
.external-ratings-heading span { color: var(--muted); font-size: .62rem; }
.external-ratings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.external-rating-card { min-width: 0; padding: 10px; border: 1px solid var(--line); border-top: 2px solid var(--muted); border-radius: 6px; background: #0d1821; }
.external-rating-card.tmdb { border-top-color: #01b4e4; }.external-rating-card.imdb { border-top-color: #f5c518; }.external-rating-card.rotten { border-top-color: #fa320a; }.external-rating-card.metacritic { border-top-color: #ffcc34; }
.rating-source-name { display: block; overflow: hidden; color: var(--muted); font-size: .59rem; white-space: nowrap; text-overflow: ellipsis; }
.external-rating-card strong { display: block; margin-top: 3px; font-size: 1rem; }.external-rating-card small { color: var(--muted-2); font-size: .56rem; }
.external-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }.source-link { padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: .62rem; }.source-link:hover { color: white; border-color: var(--amber); }
.user-actions, .share-container, .rating-container { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.action-btn, .share-btn, .comment-form button, .btn-primary, .filter-btn { min-height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 6px; color: white; background: var(--surface-2); cursor: pointer; }
.action-btn { display: inline-flex; align-items: center; gap: 8px; }
.rating-label { color: var(--muted); font-size: .72rem; }.star { color: #4f5b65; cursor: pointer; }.star.active, .star:hover { color: var(--amber); }
.share-container { margin: 14px 0; }.share-btn { width: 38px; padding: 0; display: grid; place-items: center; }
.trailer-container { margin-top: 20px; }.trailer-container:empty { display: none; }
.youtube-embed { position: relative; height: 0; padding-bottom: 56.25%; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #020508; }
.youtube-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.youtube-fallback-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; color: #d8dfe3; font-size: .7rem; font-weight: 700; }
.youtube-fallback-link:hover { color: var(--amber); }
.youtube-fallback-link i { color: #ff3b30; font-size: 1rem; }
.trailer-unavailable { padding: 20px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); text-align: center; }
.trailer-preview { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 8px; color: white; background: #05080b; }
.trailer-preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 24%, rgba(2, 5, 8, .9)); }
.trailer-preview img { width: 100%; height: 100%; object-fit: cover; opacity: .72; transition: transform .35s var(--ease), opacity .35s; }
.trailer-preview:hover img { transform: scale(1.025); opacity: .86; }
.trailer-preview-play { position: absolute; z-index: 2; inset: 50% auto auto 50%; width: 64px; height: 64px; display: grid; place-items: center; transform: translate(-50%, -50%); border-radius: 50%; color: #090d11; background: var(--amber); box-shadow: 0 14px 35px rgba(0, 0, 0, .45); font-size: 1.25rem; }
.trailer-preview-message { position: absolute; z-index: 2; right: 24px; bottom: 22px; left: 24px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.trailer-preview-message strong { max-width: 520px; font-size: .85rem; }
.trailer-preview-message small { flex: 0 0 auto; color: var(--amber); font-size: .7rem; font-weight: 800; }
.watch-providers-container { max-width: 760px; margin: 18px 0 12px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .018); }
.watch-providers-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.watch-providers-heading h3 { font-size: .86rem; }
.watch-providers-heading span { padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--amber); font-size: .58rem; font-weight: 800; }
.watch-provider-group + .watch-provider-group { margin-top: 13px; }
.watch-provider-group h4 { margin-bottom: 7px; color: var(--muted); font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.watch-provider-list { display: flex; flex-wrap: wrap; gap: 7px; }
.watch-provider-card { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 5px 9px 5px 5px; border: 1px solid var(--line); border-radius: 7px; color: #dce3e7; background: #0d1821; font-size: .66rem; font-weight: 700; transition: border-color .2s, transform .2s; }
.watch-provider-card:hover { border-color: var(--amber); transform: translateY(-1px); }
.watch-provider-card img { width: 28px; height: 28px; border-radius: 5px; object-fit: cover; }
.watch-providers-unavailable { color: var(--muted); font-size: .7rem; line-height: 1.5; }
.watch-providers-attribution { margin-top: 12px; color: var(--muted-2); font-size: .57rem; }
.watch-providers-attribution a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.movie-enrichment-section { max-width: 760px; margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .018); }
.enrichment-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.enrichment-heading h3 { font-size: .86rem; }.enrichment-heading > span { color: var(--muted-2); font-size: .58rem; }
.crew-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 13px; }
.crew-credit { min-width: 0; padding: 8px 9px; border-radius: 6px; background: #0d1821; }
.crew-credit span, .crew-credit strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.crew-credit span { color: var(--muted); font-size: .56rem; }.crew-credit strong { margin-top: 2px; font-size: .66rem; }
.cast-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cast-card { min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; color: white; background: #0d1821; font: inherit; text-align: left; cursor: pointer; }
.cast-card:hover { border-color: var(--amber); }.cast-card > img, .cast-card-placeholder { width: 100%; aspect-ratio: 1 / 1.15; object-fit: cover; }
.cast-card-placeholder { display: grid; place-items: center; color: var(--muted); background: var(--surface-2); font-size: 1.5rem; }
.cast-card-info { display: block; min-width: 0; padding: 7px; }.cast-card-info strong, .cast-card-info small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cast-card-info strong { font-size: .61rem; }.cast-card-info small { margin-top: 2px; color: var(--muted); font-size: .53rem; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 6px; }.keyword-chip { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #0d1821; font-size: .59rem; }
.stremio-container { margin: 15px 0; }.stremio-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 6px; color: #0b1116; background: var(--amber); font-weight: 800; }.stremio-hint, .stremio-unavailable { display: block; margin-top: 5px; color: var(--muted); font-size: .65rem; }
.comments-section { margin-top: 26px; }.comments-section h3 { margin-bottom: 12px; }.comment-form { display: flex; gap: 8px; margin-top: 12px; }.comment-form textarea { min-height: 75px; flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 6px; color: white; background: var(--surface); resize: vertical; }.comment { padding: 11px 0; border-bottom: 1px solid var(--line); }.comment-author { font-weight: 700; }.comment-text, .comment-date { color: var(--muted); font-size: .75rem; }
.comments-status, .custom-lists-hint { color: var(--muted); font-size: .8rem; }
.custom-lists-modal-content { width: min(680px, 100%); }
.create-list-form { grid-template-columns: 1fr auto !important; margin-bottom: 16px; }
.custom-lists-grid { display: grid; gap: 10px; max-height: 52vh; overflow: auto; }
.custom-list-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 8px; color: white; background: var(--surface); text-align: left; }
.custom-list-card button { flex: 0 0 auto; }
.custom-list-card strong, .custom-list-card span { display: block; }
.custom-list-card span { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.related-movies-section { margin-top: 45px; padding-top: 28px; border-top: 1px solid var(--line); }
.detail-expanded-section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.collection-section + .similar-section { margin-top: 28px; }
.related-movies-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.related-movies-heading span { color: var(--muted); font-size: .65rem; }
.related-movies-empty { color: var(--muted); }
.tmdb-reviews-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tmdb-review-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.tmdb-review-header { display: flex; justify-content: space-between; gap: 12px; }.tmdb-review-header strong { overflow: hidden; font-size: .7rem; white-space: nowrap; text-overflow: ellipsis; }.tmdb-review-header span { flex: 0 0 auto; color: var(--amber); font-size: .65rem; font-weight: 800; }
.tmdb-review-card p { display: -webkit-box; overflow: hidden; margin-top: 9px; color: var(--muted); font-size: .66rem; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 6; }
.tmdb-review-card a { display: inline-block; margin-top: 10px; color: var(--amber); font-size: .59rem; font-weight: 700; }
.detail-empty-state { color: var(--muted); font-size: .7rem; }
.public-lists-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.public-list-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: white; background: var(--surface); }
.public-list-card:hover { border-color: var(--amber); }.public-list-card strong, .public-list-card span { display: block; }.public-list-card strong { overflow: hidden; font-size: .67rem; white-space: nowrap; text-overflow: ellipsis; }.public-list-card span { margin-top: 5px; color: var(--muted); font-size: .57rem; }
.similar-section .section-heading { margin-bottom: 15px; }

/* Modals */
.modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 20px; background: rgba(2, 7, 11, .88); backdrop-filter: blur(10px); }
.modal-content { position: relative; width: min(420px, 100%); padding: 30px; border: 1px solid var(--line-strong); border-radius: 10px; background: #0d1821; box-shadow: 0 28px 80px rgba(0, 0, 0, .55); }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; color: var(--muted); background: transparent; font-size: 1.5rem; cursor: pointer; }
.modal-content h2 { margin-bottom: 18px; }.modal-content form { display: grid; gap: 10px; }.modal-content form input { height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; color: white; background: var(--surface); }.modal-switch { margin-top: 14px; color: var(--muted); font-size: .75rem; }.modal-switch a { color: var(--amber); }
.verification-modal-content { text-align: center; }.verification-modal-content > p { margin: 0 0 18px; color: var(--muted); font-size: .82rem; line-height: 1.65; }.verification-modal-content strong { color: white; }.verification-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 16px; border: 1px solid rgba(232, 166, 45, .45); border-radius: 50%; color: var(--amber); background: rgba(232, 166, 45, .1); font-size: 1.65rem; }.verification-modal-content .btn-primary { width: 100%; }.verification-modal-content .verification-hint { margin: 13px 0 0; font-size: .68rem; }
.taste-profile-modal-content { width: min(760px, 100%); max-height: 88vh; overflow-y: auto; }.taste-profile-kicker { color: var(--amber); font-size: .65rem; font-weight: 800; letter-spacing: .1em; }.taste-profile-intro { margin: -8px 0 18px; color: var(--muted); font-size: .78rem; }.taste-category-tabs { display: flex; gap: 7px; padding-bottom: 10px; overflow-x: auto; border-bottom: 1px solid var(--line); }.taste-category-btn, .taste-theme-btn { border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface); cursor: pointer; }.taste-category-btn { flex: 0 0 auto; padding: 8px 10px; font-size: .7rem; }.taste-theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 0; }.taste-theme-btn { min-height: 40px; padding: 7px; font-size: .7rem; }.taste-category-btn.active, .taste-theme-btn.selected { color: #0b1116; border-color: var(--amber); background: var(--amber); }.taste-profile-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }.taste-profile-save { display: flex; align-items: center; gap: 10px; }#tasteProfileCount { color: var(--muted); font-size: .68rem; }
.person-modal-content { width: min(1040px, 100%); max-height: 92vh; overflow-y: auto; }
.person-modal-loading { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: .72rem; }
.person-profile { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 25px; }
.person-portrait { overflow: hidden; aspect-ratio: 2 / 3; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: 2rem; }
.person-portrait img { width: 100%; height: 100%; object-fit: cover; }.person-profile-copy h2 { margin: 4px 0 8px; }
.person-meta { display: flex; flex-wrap: wrap; gap: 6px; }.person-meta span { padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: .6rem; }
.person-biography { max-width: 700px; margin: 15px 0; color: #bbc4ca; font-size: .7rem; line-height: 1.7; }
.person-filmography { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }.person-movies-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.person-movies-grid .movie-info { min-height: 62px; padding: 8px; }.person-movies-grid .movie-title { font-size: .66rem; }
.user-dropdown { position: absolute; top: calc(100% + 8px); right: 0; min-width: 170px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 15px 40px rgba(0,0,0,.45); }.user-name { display: block; margin-bottom: 9px; color: white; font-size: .75rem; }.logout-btn { width: 100%; min-height: 34px; border: 1px solid var(--line); border-radius: 5px; background: transparent; cursor: pointer; }
footer { padding: 25px 0; border-top: 1px solid var(--line); color: var(--muted-2); text-align: center; font-size: .68rem; }

/* Responsive */
@media (max-width: 1180px) {
    .container { width: min(100% - 48px, 1120px); }
    .header-content { grid-template-columns: 185px 1fr 250px; }.primary-nav { gap: 22px; }
    .discovery-categories { grid-template-columns: repeat(5, minmax(0, 1fr)); }.discovery-popover { top: 176px; left: 24px; width: calc(100% - 48px); }.discovery-popover::before { display: none; }
    .movie-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .container { width: min(100% - 32px, 820px); }
    .site-header { height: 70px; }.header-content { height: 70px; grid-template-columns: 1fr auto; }.primary-nav { display: none; }.header-actions { grid-column: 2; }.profile-button > span:not(.profile-avatar) { display: none; }
    .cinema-hero { min-height: 560px; }.hero-feature { min-height: 490px; }.hero-feature-copy { width: min(650px, 92%); }.trailer-link { display: none; }
    .discovery-heading p { display: none; }.discovery-categories { display: flex; overflow-x: auto; scrollbar-width: none; }.discovery-category-btn { flex: 0 0 125px; }.all-genres-btn { flex-basis: 110px; }
    .discovery-popover { position: fixed; inset: auto 16px 16px; width: auto; max-height: 78vh; overflow-y: auto; grid-template-columns: 1fr; border-radius: 12px; }.advanced-filter-panel { border-top: 1px solid var(--line); border-left: 0; }.theme-search { width: 100%; }
    .movie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.details-content { grid-template-columns: 220px 1fr; gap: 25px; }.cast-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.tmdb-reviews-list { grid-template-columns: 1fr; }.public-lists-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.person-movies-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .container { width: min(100% - 24px, 540px); }
    .logo { width: 150px; }.header-actions { gap: 2px; }.profile-button { display: none; }
    .cinema-hero { min-height: 620px; }.cinema-hero::before { background: linear-gradient(90deg, rgba(3,8,13,.96), rgba(3,8,13,.55)); }.hero-backdrop { background-position: 68% center; opacity: .75; }.hero-feature { min-height: 550px; align-items: flex-end; padding-bottom: 50px; }.hero-feature-copy { width: 100%; }.hero-feature h1 { font-size: clamp(2.7rem, 14vw, 4rem); }.featured-actions { align-items: flex-start; flex-direction: column; gap: 8px; }.hero-primary { width: 100%; justify-content: center; }.hero-secondary { padding-left: 0; }
    .discovery-heading-row { align-items: flex-start; }.clear-all-btn { font-size: 0; }.clear-all-btn i { font-size: 1rem; }.discovery-category-wrap { margin-inline: -12px; padding-inline: 12px; }.active-filter-row { align-items: flex-start; flex-wrap: wrap; padding-top: 9px; }.active-filter-list { flex-basis: calc(100% - 92px); }.active-filter-search-btn { margin-left: auto; }.selection-count { display: none; }
    .discovery-themes { grid-template-columns: 1fr; }.advanced-filter-panel label, .year-range-control { align-items: flex-start; flex-direction: column; }.advanced-filter-panel select { width: 100%; }.year-range-control > div, .year-range-control select { width: 100%; }.popover-actions { flex-direction: column-reverse; }.apply-discovery-btn, .text-button { width: 100%; }
    .hidden-gems-section { margin-top: 34px; padding-top: 22px; }.hidden-gems-heading { align-items: flex-start; flex-direction: column; gap: 7px; }.hidden-gems-heading p { text-align: left; }
    .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }.results-hint { display: none; }.movie-info { min-height: 68px; padding: 9px; }.details-content { grid-template-columns: 1fr; }.details-poster { max-width: 210px; margin-inline: auto; }.external-ratings-grid { grid-template-columns: repeat(2, 1fr); }.taste-theme-grid { grid-template-columns: repeat(2, 1fr); }.crew-highlights, .public-lists-grid { grid-template-columns: 1fr; }.cast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.person-profile { grid-template-columns: 1fr; }.person-portrait { width: 150px; margin-inline: auto; }.person-movies-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
