/* ==========================================================================
   CINEMA — публичный дизайн
   Современная тёмная кинематографичная тема без внешних зависимостей.
   ========================================================================== */

/* ---------- Переменные ---------- */
:root {
    color-scheme: dark;

    --bg: #07070a;
    --bg-soft: #0b0b10;
    --bg-elevated: #101017;
    --surface: rgba(255, 255, 255, 0.045);
    --surface-strong: rgba(255, 255, 255, 0.08);
    --surface-hover: rgba(255, 255, 255, 0.09);
    --line: rgba(255, 255, 255, 0.075);
    --line-strong: rgba(255, 255, 255, 0.13);

    --text: #f6f6f8;
    --text-soft: #c5c5ce;
    --muted: #8d8d9a;
    --muted-2: #6d6d7a;

    --accent: #ff4438;
    --accent-hot: #ff6b4a;
    --accent-deep: #e3281f;
    --accent-soft: rgba(255, 68, 56, 0.14);
    --accent-glow: rgba(255, 68, 56, 0.35);
    --gold: #ffc857;
    --green: #41d68a;

    --gradient: linear-gradient(135deg, #ff6b4a 0%, #ff3b30 55%, #e0241b 100%);
    --gradient-soft: linear-gradient(135deg, rgba(255, 107, 74, 0.2), rgba(224, 36, 27, 0.05));

    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --radius-pill: 999px;

    --shadow-sm: 0 4px 18px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 16px 50px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.62);

    --container: 1440px;
    --header-h: 76px;

    --font: "Inter", "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
        "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ---------- Сброс ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

[hidden] {
    display: none !important;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(900px 560px at 88% -8%, rgba(255, 68, 56, 0.16), transparent 68%),
        radial-gradient(760px 520px at -8% 18%, rgba(88, 68, 255, 0.1), transparent 70%),
        radial-gradient(700px 700px at 50% 110%, rgba(255, 120, 60, 0.05), transparent 65%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.modal-open {
    overflow: hidden;
}

img,
svg {
    display: block;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
}

ul,
ol {
    list-style: none;
}

::selection {
    background: rgba(255, 68, 56, 0.35);
    color: #fff;
}

:focus-visible {
    outline: 2px solid rgba(255, 107, 74, 0.9);
    outline-offset: 3px;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: #26262f;
    border: 2px solid #0a0a0f;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #393944;
}

/* ---------- Базовые утилиты ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(18px, 3vw, 44px);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.muted {
    color: var(--muted);
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-fill {
    fill: currentColor;
    stroke: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-soft);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow .pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(255, 68, 56, 0.55);
    animation: pulse 2.4s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 68, 56, 0.5); }
    65% { box-shadow: 0 0 0 8px rgba(255, 68, 56, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 68, 56, 0); }
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: var(--surface-strong);
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition:
        transform 0.25s var(--ease),
        background 0.25s var(--ease),
        border-color 0.25s var(--ease),
        box-shadow 0.25s var(--ease),
        color 0.25s var(--ease);
}

.btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
}

.btn:active {
    transform: translateY(0);
}

.btn .icon {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--gradient);
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff;
    box-shadow: 0 12px 34px rgba(224, 36, 27, 0.32);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff7c5a 0%, #ff4438 55%, #ee2e24 100%);
    box-shadow: 0 16px 42px rgba(224, 36, 27, 0.42);
}

.btn-ghost {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
}

.btn-soft {
    background: var(--accent-soft);
    border-color: rgba(255, 68, 56, 0.24);
    color: #ff9b8f;
}

.btn-soft:hover {
    background: rgba(255, 68, 56, 0.2);
    color: #ffb4ab;
}

.btn-danger {
    background: rgba(255, 68, 56, 0.1);
    border-color: rgba(255, 68, 56, 0.25);
    color: #ff7b70;
}

.btn-danger:hover {
    background: rgba(255, 68, 56, 0.2);
    color: #ffaaa2;
}

.btn-lg {
    min-height: 54px;
    padding: 0 28px;
    border-radius: 15px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-soft);
    transition: 0.25s var(--ease);
}

.icon-btn:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateY(-1px);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(6, 6, 9, 0.55);
    color: var(--text-soft);
    font-size: 11.5px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.badge-accent {
    border-color: rgba(255, 68, 56, 0.34);
    background: rgba(255, 68, 56, 0.16);
    color: #ff9d92;
}

.badge-rating {
    border-color: rgba(255, 200, 87, 0.32);
    background: rgba(255, 200, 87, 0.14);
    color: var(--gold);
}

/* ---------- Шапка сайта ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
    border-bottom: 1px solid transparent;
    background: linear-gradient(to bottom, rgba(7, 7, 10, 0.92), rgba(7, 7, 10, 0.55) 70%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
    border-bottom-color: var(--line);
    background: rgba(7, 7, 10, 0.86);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 26px;
    height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
    font-size: 21px;
    font-weight: 850;
    letter-spacing: 0.02em;
    line-height: 1;
}

.brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--gradient);
    box-shadow: 0 8px 24px rgba(224, 36, 27, 0.38);
    color: #fff;
}

.brand-mark svg {
    width: 17px;
    height: 17px;
    margin-left: 2px;
    fill: currentColor;
}

.brand-dot {
    color: var(--accent);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 8px;
}

.main-nav a {
    position: relative;
    padding: 9px 14px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 550;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
}

.main-nav a.is-active {
    color: var(--text);
}

.main-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: var(--gradient);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: 0;
}

/* Поиск в шапке */
.header-search {
    flex: 1 1 260px;
    max-width: 500px;
    min-width: 210px;
    margin-left: auto;
}

.header-search .live-search {
    width: 100%;
}

.header-search-shell {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 7px 0 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.header-search-shell:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.06);
}

.header-search-shell:focus-within {
    border-color: rgba(255, 107, 74, 0.62);
    background: rgba(14, 14, 20, 0.96);
    box-shadow:
        0 0 0 4px rgba(255, 68, 56, 0.1),
        0 14px 34px rgba(0, 0, 0, 0.38);
}

.header-search-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--muted-2);
    transition: color 0.2s;
}

.header-search-shell:focus-within .header-search-icon {
    color: var(--accent-hot);
}

.header-search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 13.5px;
    outline: none;
}

.header-search-input::placeholder {
    color: var(--muted-2);
}

.header-search-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.24);
    color: var(--muted-2);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
}

.header-search-submit {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--gradient);
    box-shadow: 0 6px 16px rgba(224, 36, 27, 0.32);
    color: #fff;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s;
}

.header-search-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(224, 36, 27, 0.44);
    filter: brightness(1.06);
}

.header-search-submit .icon {
    width: 16px;
    height: 16px;
}

.header-search .search-suggest {
    max-height: min(62vh, 430px);
}

.search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 10px 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    font-size: 13.5px;
    transition: 0.25s var(--ease);
}

.search-trigger:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-soft);
}

.search-trigger .icon {
    width: 17px;
    height: 17px;
}

.search-trigger kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--muted-2);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
}

.fav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
    transition: 0.25s var(--ease);
}

.fav-link:hover,
.fav-link.is-active {
    border-color: rgba(255, 68, 56, 0.3);
    background: var(--accent-soft);
    color: #ff9d92;
}

.fav-link .icon {
    width: 18px;
    height: 18px;
}

.fav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 7px;
    background: var(--gradient);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-soft);
    place-items: center;
}

.menu-toggle svg {
    width: 20px;
    height: 20px;
}

/* Мобильное меню */
.mobile-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    z-index: 99;
    display: none;
    padding: 14px clamp(18px, 4vw, 32px) 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 10, 14, 0.97);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: 0.28s var(--ease);
}

.mobile-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 16px;
    font-weight: 600;
}

.mobile-nav a:last-child {
    border-bottom: 0;
}

.mobile-nav a span {
    color: var(--muted-2);
    font-size: 12px;
}

/* ---------- Модальное окно поиска ---------- */
.search-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(70px, 12vh, 130px) 18px 30px;
    background: rgba(3, 3, 5, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s var(--ease);
}

.search-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.search-modal-panel {
    width: min(760px, 100%);
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    background: #0d0d13;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    transform: translateY(-14px) scale(0.985);
    transition: 0.3s var(--ease);
}

.search-modal.is-open .search-modal-panel {
    transform: translateY(0) scale(1);
}

.search-modal-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.search-modal-head .icon {
    width: 22px;
    height: 22px;
    color: var(--accent-hot);
}

.search-modal-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font-size: 18px;
    font-weight: 500;
    outline: none;
}

.search-modal-input::placeholder {
    color: var(--muted-2);
}

.search-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
    transition: 0.2s;
}

.search-modal-close:hover {
    color: #fff;
    background: var(--surface-hover);
}

.search-modal-body {
    max-height: min(52vh, 430px);
    overflow-y: auto;
    padding: 8px;
}

.search-modal-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 20px;
    border-top: 1px solid var(--line);
    color: var(--muted-2);
    font-size: 12px;
}

.search-modal-hint kbd {
    display: inline-block;
    min-width: 20px;
    margin: 0 2px;
    padding: 2px 5px;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-family: inherit;
    font-size: 10px;
    text-align: center;
}

/* Результаты поиска */
.search-result {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 13px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.search-result:hover {
    background: rgba(255, 255, 255, 0.055);
    transform: translateX(3px);
}

.search-result-poster {
    width: 42px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #191921;
    flex: 0 0 auto;
}

.search-result-info {
    min-width: 0;
}

.search-result-title {
    overflow: hidden;
    color: var(--text);
    font-size: 14.5px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-meta {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.search-loader,
.search-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 34px 20px;
    color: var(--muted);
    font-size: 13.5px;
    text-align: center;
}

.search-loader::before {
    content: "";
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-top-color: var(--accent-hot);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Живой поиск в hero ---------- */
.live-search {
    position: relative;
    width: 100%;
}

.search-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 60px;
    padding: 0 8px 0 20px;
    border: 1px solid var(--line-strong);
    border-radius: 17px;
    background: rgba(11, 11, 16, 0.82);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: 0.25s var(--ease);
}

.search-shell:focus-within {
    border-color: rgba(255, 107, 74, 0.65);
    box-shadow:
        0 0 0 4px rgba(255, 68, 56, 0.1),
        0 22px 60px rgba(0, 0, 0, 0.45);
    background: rgba(14, 14, 20, 0.96);
}

.search-shell > .icon {
    width: 21px;
    height: 21px;
    color: var(--muted);
    transition: color 0.2s;
}

.search-shell:focus-within > .icon {
    color: var(--accent-hot);
}

.search-shell input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 15.5px;
    outline: none;
}

.search-shell input::placeholder {
    color: var(--muted-2);
}

.search-shell .btn {
    min-height: 44px;
    padding: 0 19px;
    border-radius: 12px;
}

.search-suggest {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 430px;
    overflow-y: auto;
    padding: 7px;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: rgba(13, 13, 19, 0.98);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-7px);
    transition: 0.24s var(--ease);
}

.search-suggest.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(40px, 5.5vw, 74px) 0 clamp(36px, 4.5vw, 58px);
    background:
        radial-gradient(ellipse 68% 95% at 50% -22%, rgba(255, 68, 56, 0.22), transparent 66%),
        radial-gradient(ellipse 38% 55% at 88% 8%, rgba(255, 47, 122, 0.09), transparent 72%);
}

.hero-art {
    position: absolute;
    top: -18%;
    right: -8%;
    z-index: -1;
    width: 68%;
    height: 136%;
    background-position: center 22%;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.26;
    filter: blur(18px) saturate(1.15);
    transform: scale(1.04);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.75) 38%, #000 100%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.75) 38%, #000 100%);
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, var(--bg) 0%, transparent 55%),
        linear-gradient(to left, transparent 30%, var(--bg) 92%);
}

.hero-inner {
    display: block;
    min-height: 0;
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-copy .eyebrow {
    justify-content: center;
    margin-bottom: 20px;
}

.hero-title {
    margin: 0;
    font-size: clamp(42px, 5.4vw, 76px);
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 0.99;
    text-wrap: balance;
}

.hero-title .grad {
    display: inline-block;
    background: linear-gradient(100deg, #ffd2a1 0%, #ff8b60 30%, #ff4438 66%, #ff2f7a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    max-width: 620px;
    margin: 20px auto 30px;
    color: var(--muted);
    font-size: clamp(14.5px, 1.4vw, 16.5px);
    line-height: 1.65;
}

.hero-search {
    max-width: 780px;
    margin: 0 auto;
}

.hero-search .search-shell {
    height: 66px;
    padding: 0 10px 0 22px;
    border-radius: 19px;
    background: rgba(12, 12, 18, 0.9);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.46),
        0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.hero-search .search-shell > .icon {
    width: 22px;
    height: 22px;
}

.hero-search .search-shell input {
    font-size: 16px;
}

.hero-search .search-shell .btn {
    min-height: 48px;
    padding: 0 24px;
    font-size: 14px;
}

.hero-search .search-suggest {
    text-align: left;
}

.hero-search-note {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px 15px;
    margin-top: 12px;
    color: var(--muted-2);
    font-size: 12.5px;
}

.hero-search-note .icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--accent-hot);
}

.hero-search-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted-2);
    font-size: 11.5px;
}

.hero-search-shortcut kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 21px;
    padding: 0 5px;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 26px;
    margin-top: 26px;
}

.hero-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--muted);
    font-size: 12.5px;
}

.hero-stat b {
    color: var(--text);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-stat + .hero-stat {
    padding-left: 26px;
    border-left: 1px solid var(--line);
}

.hero-lucky {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s;
}

.hero-lucky .icon {
    width: 16px;
    height: 16px;
    color: var(--accent-hot);
}

.hero-lucky:hover {
    color: #fff;
}

.hero-feature {
    position: relative;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.hero-feature::before {
    content: "";
    position: absolute;
    top: 8%;
    left: 50%;
    width: 78%;
    height: 84%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 68, 56, 0.34), transparent 68%);
    transform: translateX(-50%);
    filter: blur(30px);
}

.feature-card {
    position: relative;
    z-index: 1;
    display: block;
    width: min(300px, 88%);
    padding: 9px;
    border: 1px solid var(--line-strong);
    border-radius: 26px;
    background: rgba(16, 16, 23, 0.72);
    box-shadow:
        0 36px 90px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transform: rotate(1.6deg);
    transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.feature-card:hover {
    transform: rotate(0deg) translateY(-7px);
    box-shadow:
        0 46px 110px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 107, 74, 0.1) inset;
}

.feature-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 19px;
    background: #14141b;
}

.feature-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.feature-card:hover .feature-poster img {
    transform: scale(1.045);
}

.feature-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 5, 8, 0.92) 0%, transparent 46%);
}

.feature-quality {
    position: absolute;
    top: 11px;
    left: 11px;
    z-index: 2;
}

.feature-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(8, 8, 12, 0.5);
    color: #fff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: 0.3s var(--ease);
}

.feature-play svg {
    width: 20px;
    height: 20px;
    margin-left: 3px;
    fill: currentColor;
}

.feature-card:hover .feature-play {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.feature-body {
    position: absolute;
    left: 9px;
    right: 9px;
    bottom: 9px;
    z-index: 2;
    padding: 18px 16px 14px;
}

.feature-body h3 {
    overflow: hidden;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feature-body p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11.5px;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 9px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.feature-badge svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

/* ---------- Секции ---------- */
.section {
    padding: clamp(34px, 5vw, 66px) 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: clamp(20px, 2.5vw, 30px);
}

.section-head h2 {
    margin-top: 8px;
    font-size: clamp(24px, 2.8vw, 36px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.section-head p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13.5px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s, gap 0.2s;
}

.section-link:hover {
    gap: 10px;
    color: var(--text);
}

.section-link .icon {
    width: 16px;
    height: 16px;
}

.section-link--danger:hover {
    color: #ff8c82;
}

/* ---------- Панель каталога ---------- */
.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 13px;
    margin-bottom: 24px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.segmented {
    display: flex;
    gap: 3px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(0, 0, 0, 0.24);
}

.segmented a {
    padding: 9px 15px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    transition: 0.2s var(--ease);
}

.segmented a:hover {
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.04);
}

.segmented a.is-active {
    background: var(--text);
    color: #08080b;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.genre-chips {
    display: flex;
    flex: 1;
    gap: 7px;
    min-width: 0;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: none;
}

.genre-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: 0.2s var(--ease);
}

.chip:hover {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--text-soft);
}

.chip.is-active {
    border-color: rgba(255, 68, 56, 0.36);
    background: var(--accent-soft);
    color: #ff9f95;
}

.catalog-controls {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
}

.select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.select-wrap select {
    height: 42px;
    padding: 0 38px 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.24);
    color: var(--text-soft);
    font-size: 12.5px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s, background 0.2s;
}

.select-wrap select:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.04);
}

.select-wrap select:focus {
    border-color: rgba(255, 107, 74, 0.55);
}

.select-wrap svg {
    position: absolute;
    right: 13px;
    width: 15px;
    height: 15px;
    color: var(--muted);
    pointer-events: none;
}

/* ---------- Сетка фильмов и карточки ---------- */
.films-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 26px) clamp(12px, 1.5vw, 22px);
}

.film-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 11px;
    transition: transform 0.35s var(--ease);
}

.film-card:hover {
    transform: translateY(-5px);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 17px;
    background: #121218;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
}

.film-card:hover .poster-wrap {
    border-color: rgba(255, 107, 74, 0.25);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.48);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s var(--ease), filter 0.35s;
}

.film-card:hover .poster-wrap img {
    transform: scale(1.055);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 5, 8, 0.55), transparent 42%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
}

.film-card:hover .poster-wrap::after {
    opacity: 1;
}

.poster-wrap.is-fallback::before,
.detail-poster.is-fallback::before,
.feature-poster.is-fallback::before {
    content: "CINEMA";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(90% 70% at 50% 12%, rgba(255, 107, 74, 0.2), transparent 68%),
        linear-gradient(145deg, #17131c, #0b0b10 60%, #141018);
    color: rgba(255, 255, 255, 0.17);
    font-size: clamp(15px, 2.2vw, 22px);
    font-weight: 850;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
    pointer-events: none;
}

.card-pills {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    pointer-events: none;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 7px;
    background: rgba(6, 6, 9, 0.62);
    color: #fff;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.03em;
    line-height: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pill-accent {
    border-color: rgba(255, 68, 56, 0.38);
    background: rgba(255, 68, 56, 0.82);
    box-shadow: 0 4px 14px rgba(224, 36, 27, 0.3);
}

.pill-rating {
    border-color: rgba(255, 200, 87, 0.3);
    background: rgba(8, 8, 11, 0.66);
    color: var(--gold);
}

.card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    background: rgba(7, 7, 11, 0.48);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    transition: 0.3s var(--ease-spring);
    pointer-events: none;
}

.card-play svg {
    width: 18px;
    height: 18px;
    margin-left: 3px;
    fill: currentColor;
}

.film-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.fav-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(7, 7, 11, 0.62);
    color: #fff;
    opacity: 0;
    transform: translateY(4px);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    transition: 0.25s var(--ease);
}

.fav-btn svg {
    width: 17px;
    height: 17px;
}

.fav-btn:hover {
    border-color: rgba(255, 91, 80, 0.5);
    background: rgba(255, 68, 56, 0.24);
    transform: translateY(0) scale(1.06);
}

.fav-btn.is-active {
    border-color: rgba(255, 91, 80, 0.5);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 5px 18px rgba(224, 36, 27, 0.4);
}

.fav-btn.is-active svg {
    fill: currentColor;
}

.film-card:hover .fav-btn,
.film-card:focus-within .fav-btn {
    opacity: 1;
    transform: translateY(0);
}

.card-body {
    min-width: 0;
    padding: 0 2px;
}

.film-title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-soft);
    font-size: clamp(13px, 1.1vw, 14.5px);
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color 0.25s;
}

.film-card:hover .film-title {
    color: #fff;
}

.film-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 5px;
    color: var(--muted-2);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.3;
}

.film-meta .sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
}

.film-meta .rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--gold);
    font-weight: 650;
}

.film-meta .rating svg {
    width: 11px;
    height: 11px;
    fill: currentColor;
}

/* ---------- Горизонтальные подборки ---------- */
.rail-wrap {
    position: relative;
}

.rail {
    display: flex;
    gap: clamp(12px, 1.4vw, 18px);
    overflow-x: auto;
    padding: 4px 2px 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.rail::-webkit-scrollbar {
    display: none;
}

.rail .film-card {
    flex: 0 0 clamp(142px, 14vw, 178px);
    scroll-snap-align: start;
}

.rail .fav-btn {
    opacity: 1;
    transform: none;
}

.history-section[hidden] {
    display: none;
}

/* ---------- Пустое состояние ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    padding: clamp(48px, 8vw, 90px) 24px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.018);
    text-align: center;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    margin-bottom: 20px;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: var(--surface);
    color: var(--muted);
}

.empty-icon svg {
    width: 31px;
    height: 31px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.empty-state p {
    max-width: 430px;
    margin: 8px 0 22px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.6;
}

/* ---------- Пагинация ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: clamp(28px, 4vw, 46px);
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1;
    transition: 0.2s var(--ease);
}

.page-btn:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    transform: translateY(-1px);
}

.page-btn.is-active {
    border-color: transparent;
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 8px 20px rgba(224, 36, 27, 0.3);
}

.page-btn.is-disabled {
    opacity: 0.3;
    pointer-events: none;
}

.page-arrow {
    padding: 0 11px;
}

.page-arrow .icon {
    width: 17px;
    height: 17px;
}

.page-dots {
    padding: 0 3px;
    color: var(--muted-2);
    font-size: 14px;
}

.poster-link {
    display: block;
    width: 100%;
    height: 100%;
}


/* ---------- Подвал ---------- */
.site-footer {
    position: relative;
    margin-top: clamp(40px, 6vw, 90px);
    padding: clamp(38px, 5vw, 64px) 0 28px;
    border-top: 1px solid var(--line);
    background:
        radial-gradient(700px 300px at 15% 0%, rgba(255, 68, 56, 0.055), transparent 65%),
        rgba(5, 5, 8, 0.5);
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) repeat(2, minmax(130px, 0.6fr));
    gap: 36px;
    padding-bottom: 34px;
}

.footer-brand p {
    max-width: 360px;
    margin-top: 15px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.footer-col h4 {
    margin-bottom: 14px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.footer-col a {
    display: block;
    padding: 5px 0;
    color: var(--muted);
    font-size: 13px;
    transition: color 0.2s, transform 0.2s;
}

.footer-col a:hover {
    color: var(--text);
    transform: translateX(3px);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted-2);
    font-size: 12px;
}

.footer-bottom .footer-note {
    max-width: 620px;
    line-height: 1.6;
}

.footer-bottom .footer-note a {
    color: var(--text-soft);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.to-top {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    transition: color 0.2s;
}

.to-top:hover {
    color: var(--text);
}

.to-top svg {
    width: 15px;
    height: 15px;
}

/* ---------- Страница фильма ---------- */
.film-page {
    position: relative;
    overflow-x: clip;
    padding-bottom: clamp(40px, 6vw, 80px);
}

.detail-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: -1;
    height: 760px;
    background-position: center 15%;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.2;
    filter: blur(24px) saturate(1.15);
    transform: scale(1.06);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.72) 42%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.72) 42%, transparent 100%);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, var(--bg) 2%, transparent 55%),
        linear-gradient(to right, rgba(7, 7, 10, 0.35), transparent 45%, rgba(7, 7, 10, 0.3));
}

.film-page .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 28px;
    color: var(--muted-2);
    font-size: 12.5px;
}

.film-page .breadcrumbs a {
    color: var(--muted);
    transition: color 0.2s;
}

.film-page .breadcrumbs a:hover {
    color: var(--text-soft);
}

.film-page .breadcrumbs .current {
    max-width: 420px;
    overflow: hidden;
    color: var(--text-soft);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.film-page .breadcrumbs svg {
    width: 13px;
    height: 13px;
    opacity: 0.55;
}

.detail-hero {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    align-items: start;
    gap: clamp(28px, 4vw, 54px);
    padding: clamp(26px, 4vw, 48px) 0 clamp(34px, 5vw, 56px);
}

.detail-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: #121218;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-poster .quality-badge {
    position: absolute;
    left: 13px;
    bottom: 13px;
    z-index: 2;
}

.detail-poster .pill {
    padding: 7px 10px;
    font-size: 11px;
}

.detail-info {
    min-width: 0;
    padding-top: 5px;
}

.detail-info h1 {
    max-width: 900px;
    margin: 16px 0 18px;
    font-size: clamp(31px, 4.2vw, 56px);
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 1.03;
    text-wrap: balance;
}

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.detail-badges .badge {
    padding: 7px 11px;
    border-radius: 9px;
    font-size: 12px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.detail-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 13px;
}

.detail-meta-line .sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--muted-2);
}

.detail-description {
    position: relative;
    max-width: 790px;
    margin-top: 24px;
    color: #b6b6c1;
    font-size: clamp(14px, 1.3vw, 15.5px);
    line-height: 1.78;
}

.detail-description.is-collapsed {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 9px;
    color: var(--accent-hot);
    font-size: 12.5px;
    font-weight: 650;
}

.desc-toggle .icon {
    width: 14px;
    height: 14px;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.detail-actions .btn-primary {
    min-width: 194px;
}

.detail-actions .btn-fav {
    min-width: 150px;
}

.detail-actions .btn-fav.is-active {
    border-color: rgba(255, 68, 56, 0.35);
    background: var(--accent-soft);
    color: #ff9f95;
}

.detail-actions .btn-fav.is-active svg {
    fill: currentColor;
}

.detail-actions .icon-btn {
    width: 50px;
    height: 50px;
    border-radius: 14px;
}

/* Плеер */
.player-section {
    margin-top: clamp(22px, 3vw, 38px);
    scroll-margin-top: calc(var(--header-h) + 20px);
}

.player-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.player-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(19px, 2vw, 24px);
    font-weight: 750;
    letter-spacing: -0.025em;
}

.player-head h2 .live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(255, 68, 56, 0.13);
}

.player-note {
    color: var(--muted-2);
    font-size: 12px;
}

.player-frame {
    position: relative;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.video-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background: #000;
    scroll-margin-top: calc(var(--header-h) + 24px);
}

.dreams-player {
    width: 100%;
    height: 100%;
}

.dreams-player iframe,
.dreams-player video {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Сериалы */
.series-panel {
    margin-top: 28px;
    padding: clamp(18px, 2.5vw, 28px);
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.025);
}

.series-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 17px;
}

.series-title {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.series-title svg {
    width: 17px;
    height: 17px;
    color: var(--accent-hot);
}

.series-nav-buttons {
    display: flex;
    gap: 7px;
}

.series-nav-buttons .btn {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 11.5px;
}

.series-nav-buttons .btn[aria-disabled="true"] {
    opacity: 0.35;
    pointer-events: none;
}

.season-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding-bottom: 17px;
    margin-bottom: 17px;
    border-bottom: 1px solid var(--line);
}

.season-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    transition: 0.2s var(--ease);
}

.season-tab:hover {
    border-color: var(--line-strong);
    color: var(--text);
}

.season-tab.is-active {
    border-color: rgba(255, 68, 56, 0.4);
    background: var(--accent-soft);
    color: #ff9f95;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 8px;
}

.episode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
    transition: 0.2s var(--ease);
}

.episode-btn:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
}

.episode-btn.is-active {
    border-color: rgba(255, 68, 56, 0.45);
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 6px 18px rgba(224, 36, 27, 0.28);
}

/* Рекомендации */
.recommend-section {
    margin-top: clamp(44px, 6vw, 76px);
    padding-top: clamp(30px, 4vw, 46px);
    border-top: 1px solid var(--line);
}

/* ---------- Избранное ---------- */
.page-hero {
    position: relative;
    padding: clamp(36px, 5vw, 64px) 0 clamp(24px, 3vw, 38px);
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    top: -180px;
    right: -80px;
    z-index: -1;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 68, 56, 0.16), transparent 68%);
    filter: blur(20px);
}

.page-hero h1 {
    margin-top: 16px;
    font-size: clamp(36px, 4.5vw, 58px);
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 1.04;
}

.page-hero p {
    max-width: 620px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.65;
}

.page-hero-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.favorites-section {
    padding-bottom: clamp(40px, 6vw, 80px);
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 26px) clamp(12px, 1.5vw, 22px);
}

.skeleton-card {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.skeleton-poster {
    aspect-ratio: 2 / 3;
    border-radius: 17px;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.035) 20%, rgba(255, 255, 255, 0.075) 40%, rgba(255, 255, 255, 0.035) 60%);
    background-size: 220% 100%;
    animation: shimmer 1.5s infinite linear;
}

.skeleton-line {
    height: 11px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.skeleton-line.short {
    width: 55%;
    height: 9px;
}

@keyframes shimmer {
    to { background-position: -220% 0; }
}

/* ---------- Страница ошибки ---------- */
.error-page {
    display: flex;
    min-height: 68vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.error-code {
    background: linear-gradient(120deg, #ffb27a, #ff4438 60%, #ff2f7a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: clamp(72px, 12vw, 140px);
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 0.9;
}

.error-page h1 {
    margin-top: 22px;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.error-page p {
    max-width: 480px;
    margin: 12px 0 26px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

/* ---------- Уведомления ---------- */
.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 500;
    display: flex;
    width: min(360px, calc(100vw - 32px));
    flex-direction: column;
    gap: 9px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: rgba(17, 17, 24, 0.97);
    box-shadow: var(--shadow-md);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 550;
    line-height: 1.4;
    pointer-events: auto;
    animation: toast-in 0.35s var(--ease);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.toast.is-leaving {
    animation: toast-out 0.25s ease forwards;
}

.toast-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 9px;
    background: var(--surface);
    color: var(--accent-hot);
}

.toast-icon svg {
    width: 16px;
    height: 16px;
}

.toast--success .toast-icon {
    background: rgba(65, 214, 138, 0.12);
    color: var(--green);
}

.toast--error .toast-icon {
    background: rgba(255, 68, 56, 0.12);
    color: #ff7b70;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(8px) scale(0.97); }
}

/* ---------- Появление при скролле ---------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Адаптивность
   ========================================================================== */

@media (max-width: 1399px) {
    .films-grid,
    .skeleton-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1199px) {
    .films-grid,
    .skeleton-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-inner {
        gap: 40px;
    }

    .feature-card {
        width: min(275px, 92%);
    }

    .detail-hero {
        grid-template-columns: 250px minmax(0, 1fr);
    }
}

@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: grid;
    }

    .mobile-nav {
        display: block;
    }

    .header-inner {
        gap: 14px;
    }

    .header-search {
        flex: 1 1 auto;
        max-width: none;
        margin-left: 0;
    }

    .search-trigger {
        padding: 0 12px;
    }

    .search-trigger span,
    .search-trigger kbd {
        display: none;
    }

    .fav-link span:not(.fav-count) {
        display: none;
    }

    .fav-link {
        padding: 0 12px;
    }

    .catalog-toolbar {
        gap: 10px;
    }

    .genre-chips {
        order: 3;
        flex-basis: 100%;
    }

    .catalog-controls {
        margin-left: 0;
    }
}

@media (max-width: 980px) {
    :root {
        --header-h: 68px;
    }

    .hero {
        padding-top: 34px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 38px;
    }

    .hero-copy {
        max-width: none;
    }

    .hero-title {
        font-size: clamp(38px, 9vw, 62px);
    }

    .hero-lead {
        max-width: 640px;
    }

    .hero-search {
        max-width: none;
    }

    .hero-feature {
        justify-content: flex-start;
    }

    .hero-feature::before {
        display: none;
    }

    .feature-card {
        display: flex;
        width: min(100%, 560px);
        align-items: center;
        gap: 16px;
        padding: 9px;
        transform: none;
    }

    .feature-card:hover {
        transform: translateY(-3px);
    }

    .feature-poster {
        flex: 0 0 112px;
        width: 112px;
        border-radius: 16px;
    }

    .feature-body {
        position: relative;
        inset: auto;
        flex: 1;
        min-width: 0;
        padding: 10px 8px;
    }

    .feature-body h3 {
        font-size: 17px;
        white-space: normal;
    }

    .feature-play {
        display: none;
    }

    .feature-badge {
        margin-bottom: 6px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .detail-poster {
        width: min(230px, 62vw);
        margin: 0 auto;
    }

    .detail-info {
        padding-top: 0;
        text-align: center;
    }

    .detail-badges,
    .detail-meta-line {
        justify-content: center;
    }

    .detail-description {
        margin-right: auto;
        margin-left: auto;
        text-align: left;
    }

    .detail-actions {
        justify-content: center;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 860px) {
    .films-grid,
    .skeleton-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .section-head {
        align-items: flex-start;
    }

    .catalog-controls {
        width: 100%;
        justify-content: space-between;
    }

    .catalog-controls .select-wrap {
        flex: 1;
    }

    .catalog-controls .select-wrap select {
        width: 100%;
    }

    .fav-btn {
        opacity: 1;
        transform: none;
    }

    .card-play {
        display: none;
    }
}

@media (max-width: 760px) {
    :root {
        --header-h: 118px;
    }

    .header-inner {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "brand . actions"
            "search search search";
        height: auto;
        gap: 10px 12px;
        padding: 10px clamp(18px, 3vw, 44px) 12px;
    }

    .brand {
        grid-area: brand;
    }

    .header-actions {
        grid-area: actions;
        margin-left: 0;
    }

    .header-search {
        grid-area: search;
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        min-width: 0;
        margin: 0;
    }

    .header-search-kbd {
        display: none;
    }

    .header-search-shell {
        height: 44px;
    }

    .hero-search .search-shell {
        height: 60px;
        padding-left: 18px;
    }

    .hero-search .search-shell input {
        font-size: 15px;
    }

    .hero-search .search-shell .btn {
        min-height: 44px;
        padding: 0 18px;
    }
}

@media (max-width: 768px) {
    .hero-meta {
        gap: 10px 16px;
    }

    .hero-stat + .hero-stat {
        padding-left: 16px;
    }

    .hero-stat b {
        font-size: 16px;
    }

    .hero-stat span {
        font-size: 11.5px;
    }

    .detail-info h1 {
        font-size: clamp(29px, 8vw, 44px);
    }

    .detail-actions .btn-primary {
        min-width: 0;
        flex: 1 1 100%;
    }

    .detail-actions .btn-fav {
        flex: 1 1 auto;
    }

    .detail-actions .icon-btn {
        width: 50px;
        height: 50px;
        flex: 0 0 50px;
    }

    .player-frame {
        padding: 5px;
        border-radius: 17px;
    }

    .video-wrapper {
        border-radius: 13px;
    }

    .episode-grid {
        grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    }

    .toast-stack {
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
    }
}

@media (max-width: 640px) {
    .films-grid,
    .skeleton-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 12px;
    }

    .poster-wrap {
        border-radius: 14px;
    }

    .film-title {
        font-size: 13px;
    }

    .film-meta {
        font-size: 10.5px;
    }

    .section {
        padding: 32px 0;
    }

    .section-head {
        gap: 12px;
    }

    .section-head h2 {
        font-size: 24px;
    }

    .section-head p {
        font-size: 12.5px;
    }

    .section-link {
        font-size: 12px;
    }

    .hero-search-shortcut {
        display: none;
    }

    .hero-search .search-shell {
        height: 56px;
        padding-left: 16px;
        border-radius: 16px;
    }

    .hero-search .search-shell .btn {
        min-height: 42px;
    }

    .search-shell {
        height: 54px;
        padding-left: 16px;
        border-radius: 15px;
    }

    .search-shell input {
        font-size: 14px;
    }

    .search-shell .btn {
        min-height: 40px;
        padding: 0 13px;
        font-size: 12.5px;
    }

    .search-shell .btn span {
        display: none;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .hero-stat + .hero-stat {
        padding-left: 0;
        border-left: 0;
    }

    .hero-feature {
        margin-top: 2px;
    }

    .feature-card {
        gap: 12px;
    }

    .feature-poster {
        flex-basis: 90px;
        width: 90px;
    }

    .feature-body h3 {
        font-size: 15px;
    }

    .feature-badge {
        font-size: 10px;
    }

    .segmented {
        width: 100%;
    }

    .segmented a {
        flex: 1;
        padding: 9px 8px;
        text-align: center;
    }

    .catalog-toolbar {
        padding: 10px;
        border-radius: 16px;
    }

    .catalog-controls {
        flex-wrap: wrap;
    }

    .catalog-controls .select-wrap {
        flex: 1 1 100%;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-backdrop {
        height: 560px;
        opacity: 0.16;
    }

    .film-page .breadcrumbs {
        padding-top: 20px;
    }

    .detail-hero {
        padding-top: 20px;
    }

    .detail-poster {
        width: min(200px, 56vw);
    }

    .detail-description {
        margin-top: 19px;
        font-size: 14px;
    }

    .series-panel {
        padding: 15px;
        border-radius: 18px;
    }

    .series-top {
        margin-bottom: 13px;
    }

    .season-tabs {
        padding-bottom: 13px;
        margin-bottom: 13px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .season-tabs::-webkit-scrollbar {
        display: none;
    }

    .season-tab {
        flex: 0 0 auto;
    }

    .player-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .page-hero {
        padding-top: 30px;
    }

    .page-hero h1 {
        font-size: clamp(32px, 9vw, 46px);
    }

    .search-modal {
        padding: 12px 10px;
        align-items: flex-start;
    }

    .search-modal-panel {
        border-radius: 18px;
    }

    .search-modal-head {
        padding: 12px 14px;
    }

    .search-modal-input {
        font-size: 16px;
    }

    .search-modal-hint {
        display: none;
    }

    .search-modal-body {
        max-height: 66vh;
    }

    .search-result {
        padding: 9px 8px;
    }

    .search-result-poster {
        width: 38px;
        height: 54px;
    }
}

@media (max-width: 420px) {
    .header-inner {
        gap: 8px;
    }

    .brand {
        font-size: 18px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .header-actions {
        gap: 6px;
    }

    .search-trigger,
    .fav-link,
    .menu-toggle {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 11px;
    }

    .fav-count {
        position: absolute;
        top: -5px;
        right: -5px;
        min-width: 18px;
        height: 18px;
        font-size: 9.5px;
    }

    .hero-title {
        font-size: 35px;
    }

    .hero-lead {
        margin: 17px 0 23px;
    }

    .eyebrow {
        font-size: 10px;
        letter-spacing: 0.11em;
    }

    .film-title {
        font-size: 12.5px;
    }

    .pill {
        padding: 4px 6px;
        font-size: 9px;
    }

    .fav-btn {
        width: 32px;
        height: 32px;
    }

    .fav-btn svg {
        width: 15px;
        height: 15px;
    }

    .detail-meta-line {
        font-size: 12px;
    }
}



