:root {
    --md-primary: #6200ee;
    --md-primary-dark: #3700b3;
    --md-secondary: #03dac6;
    --md-accent: #ff0266;
    --md-bg: #f5f5f7;
    --md-surface: #ffffff;
    --md-text: #1c1b1f;
    --md-text-secondary: #5f5f6a;
    --md-shadow-1: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
    --md-shadow-2: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(0,0,0,.23);
    --md-shadow-3: 0 10px 20px rgba(0,0,0,.19), 0 6px 6px rgba(0,0,0,.23);
    --md-radius: 16px;
    --transition: cubic-bezier(.4,0,.2,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Roboto', system-ui, sans-serif;
    background: var(--md-bg); color: var(--md-text);
    line-height: 1.6; overflow-x: hidden; padding-top: 72px;
}
body.drawer-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* APP BAR */
.app-bar {
    position: fixed; top: 0; left: 0; right: 0; height: 72px;
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000;
    transition: box-shadow .3s var(--transition), height .3s var(--transition);
}
.app-bar.scrolled { box-shadow: var(--md-shadow-2); }
.app-bar__inner { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800; font-size: 22px;
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    -webkit-background-clip: text; background-clip: text;
    color: transparent; transition: transform .3s var(--transition);
}
.brand:hover { transform: scale(1.03); }
.brand__icon { color: var(--md-primary); -webkit-text-fill-color: initial; }
.nav-desktop { margin-left: auto; }
.nav-desktop ul { display: flex; gap: 4px; list-style: none; }
.nav-desktop a {
    display: inline-block; padding: 10px 18px; border-radius: 100px;
    font-weight: 500; font-size: 15px; position: relative;
    transition: background .3s var(--transition), color .3s var(--transition);
}
.nav-desktop a::after {
    content: ''; position: absolute; left: 50%; bottom: 6px;
    width: 0; height: 2px; background: var(--md-primary);
    transform: translateX(-50%); transition: width .3s var(--transition);
}
.nav-desktop a:hover { background: rgba(98,0,238,.08); color: var(--md-primary); }
.nav-desktop a:hover::after { width: 60%; }
.icon-btn {
    background: none; border: none; cursor: pointer;
    width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center; color: var(--md-text);
    transition: background .25s var(--transition), transform .25s var(--transition);
}
.icon-btn:hover { background: rgba(0,0,0,.06); }
.icon-btn:active { transform: scale(.9); }
.menu-toggle { display: none; }

/* SEARCH */
.search-bar {
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--md-surface); padding: 0 24px;
    max-height: 0; overflow: hidden;
    transition: max-height .4s var(--transition), padding .3s var(--transition);
    box-shadow: var(--md-shadow-1);
}
.search-bar.open { max-height: 100px; padding: 16px 24px; }
.search-form { display: flex; gap: 8px; max-width: 800px; margin: 0 auto; }
.search-form input[type=search] {
    flex: 1; padding: 14px 20px; border-radius: 100px;
    border: 1px solid #e0e0e0; font-size: 15px;
    transition: border-color .3s var(--transition), box-shadow .3s var(--transition);
}
.search-form input:focus {
    outline: none; border-color: var(--md-primary);
    box-shadow: 0 0 0 4px rgba(98,0,238,.12);
}
.search-form input[type=submit] {
    padding: 0 24px; border: none; border-radius: 100px;
    background: var(--md-primary); color: #fff;
    font-weight: 600; cursor: pointer;
    transition: transform .2s var(--transition), box-shadow .3s var(--transition);
}
.search-form input[type=submit]:hover {
    transform: translateY(-2px); box-shadow: 0 8px 20px rgba(98,0,238,.35);
}

/* DRAWER */
.drawer {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; background: var(--md-surface); z-index: 2000;
    transform: translateX(-100%);
    transition: transform .4s var(--transition);
    padding: 24px; box-shadow: var(--md-shadow-3);
}
.drawer.open { transform: translateX(0); }
.drawer__header { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.drawer ul { list-style: none; }
.drawer li a {
    display: block; padding: 14px 18px; border-radius: 12px;
    font-weight: 500;
    transition: background .3s var(--transition), transform .2s var(--transition);
}
.drawer li a:hover { background: rgba(98,0,238,.08); transform: translateX(4px); }
.drawer-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    opacity: 0; pointer-events: none;
    transition: opacity .4s var(--transition); z-index: 1500;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

/* HERO главной */
.hero {
    position: relative; min-height: 560px;
    display: flex; align-items: center; overflow: hidden;
    border-radius: 0 0 32px 32px; margin-bottom: 60px;
}
.hero__bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,2,102,.35), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(3,218,198,.35), transparent 45%),
        linear-gradient(135deg, #1a0033 0%, #2d0a54 50%, #0a0033 100%);
    background-size: 200% 200%, 200% 200%, 100% 100%;
    animation: gradientShift 18s ease infinite; z-index: 0;
}
.hero__bg::after {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.15) 1px, transparent 1px);
    background-size: 32px 32px; opacity: .5;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%, 100% 50%, 0 0; }
    50% { background-position: 100% 50%, 0% 50%, 0 0; }
}
.hero__content { position: relative; z-index: 2; color: #fff; max-width: 700px; padding: 60px 24px; }
.hero__title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(32px, 5vw, 64px); font-weight: 800;
    line-height: 1.1; margin: 20px 0; letter-spacing: -1px;
    animation: fadeUp .8s var(--transition) .1s both;
}
.hero__subtitle {
    font-size: 18px; opacity: .85; margin-bottom: 32px;
    animation: fadeUp .8s var(--transition) .25s both;
}
.hero__actions {
    display: flex; gap: 14px; flex-wrap: wrap;
    animation: fadeUp .8s var(--transition) .4s both;
}
.hero .chip { animation: fadeUp .8s var(--transition) both; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 100px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(10px);
    color: #fff; font-size: 13px; font-weight: 600;
    border: 1px solid rgba(255,255,255,.2);
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px; border-radius: 100px;
    font-weight: 600; font-size: 15px;
    cursor: pointer; border: none;
    position: relative; overflow: hidden;
    transition: transform .25s var(--transition), box-shadow .3s var(--transition);
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.98); }
.btn--primary {
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    color: #fff; box-shadow: 0 8px 24px rgba(98,0,238,.4);
}
.btn--primary:hover { box-shadow: 0 12px 32px rgba(255,2,102,.5); }
.btn--outline {
    background: rgba(255,255,255,.1); color: #fff;
    border: 1px solid rgba(255,255,255,.3);
    backdrop-filter: blur(10px);
}
.btn--outline:hover { background: rgba(255,255,255,.2); }
.btn-ripple { position: relative; overflow: hidden; }
.btn-ripple .ripple {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,.6);
    transform: scale(0); animation: ripple .6s linear;
    pointer-events: none;
}
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* SECTIONS */
.section { margin: 60px auto; }
.section__head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}
.section__title {
    display: flex; align-items: center; gap: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(22px, 3vw, 32px); font-weight: 700;
}
.section__title .material-icons-round {
    font-size: 32px;
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-subtitle {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 22px; font-weight: 700; margin: 32px 0 20px;
}
.section-subtitle .material-icons-round {
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; font-size: 28px;
}
.link-more {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--md-primary); font-weight: 600;
    transition: gap .3s var(--transition);
}
.link-more:hover { gap: 12px; }

/* =========================================================
   MOVIES GRID — ПЛИТКА 4 / 3 / 2
   ========================================================= */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 8px;
}
@media (max-width: 1100px) {
    .movies-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 700px) {
    .movies-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 380px) {
    .movies-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   MOVIE CARD — плитка
   ========================================================= */
.movie-card {
    display: flex; flex-direction: column;
    background: var(--md-surface); border-radius: 16px;
    overflow: hidden; box-shadow: var(--md-shadow-1);
    transition: transform .4s var(--transition), box-shadow .4s var(--transition);
    cursor: pointer; height: 100%;
}
.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(98,0,238,.25);
}
.movie-card__link {
    display: flex; flex-direction: column;
    height: 100%; color: inherit;
}
.movie-card__poster {
    position: relative; aspect-ratio: 2 / 3; overflow: hidden;
    background: linear-gradient(135deg, #1a0033, #0a0033);
}
.movie-card__poster img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .7s var(--transition);
}
.movie-card:hover .movie-card__poster img { transform: scale(1.08); }
.movie-card__placeholder {
    width: 100%; height: 100%; display: grid; place-items: center;
    background: linear-gradient(135deg, #2d0a54, #6200ee);
    color: rgba(255,255,255,.35);
}
.movie-card__placeholder .material-icons-round { font-size: 64px; }
.movie-card__overlay {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: linear-gradient(to top, rgba(0,0,0,.85), transparent 60%);
    opacity: 0; transition: opacity .35s var(--transition);
}
.movie-card:hover .movie-card__overlay { opacity: 1; }
.play-icon {
    font-size: 56px !important; color: #fff;
    filter: drop-shadow(0 4px 16px rgba(255,2,102,.8));
    transform: scale(.7); transition: transform .4s var(--transition);
}
.movie-card:hover .play-icon { transform: scale(1); animation: pulse 1.6s ease infinite; }
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.movie-card__body {
    padding: 12px 14px 16px;
    display: flex; flex-direction: column; gap: 6px;
    flex: 1 1 auto;
}
.movie-card__title {
    font-size: 14px; font-weight: 600; line-height: 1.3; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    transition: color .3s var(--transition);
}
.movie-card:hover .movie-card__title { color: var(--md-primary); }
.movie-card__meta {
    display: flex; gap: 6px; flex-wrap: wrap;
    font-size: 11px; color: var(--md-text-secondary);
    margin-top: auto;
}
.movie-card__meta span {
    padding: 2px 8px; border-radius: 100px;
    background: rgba(98,0,238,.08); font-weight: 500;
}
.badge-rating {
    position: absolute; top: 10px; right: 10px;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 100px;
    background: rgba(0,0,0,.75); backdrop-filter: blur(10px);
    color: #ffd700; font-size: 12px; font-weight: 700;
    border: 1px solid rgba(255,215,0,.35); z-index: 2;
}
.badge-rating .material-icons-round { font-size: 14px; }

/* GENRES */
.genres { display: flex; flex-wrap: wrap; gap: 12px; }
.genre-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 100px;
    background: var(--md-surface); box-shadow: var(--md-shadow-1);
    font-weight: 600; font-size: 14px;
    transition: transform .3s var(--transition), box-shadow .3s var(--transition), color .3s var(--transition);
}
.genre-chip:hover { transform: translateY(-4px); box-shadow: var(--md-shadow-2); color: var(--md-primary); }
.genre-chip .count {
    padding: 2px 10px; border-radius: 100px;
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    color: #fff; font-size: 12px;
}

/* CARD */
.card {
    background: var(--md-surface); border-radius: var(--md-radius);
    padding: 24px; box-shadow: var(--md-shadow-1);
    transition: transform .3s var(--transition), box-shadow .3s var(--transition);
}
.card:hover { box-shadow: var(--md-shadow-2); }

/* REVEAL */
.reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity .7s var(--transition), transform .7s var(--transition);
    transition-delay: var(--delay, 0ms);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   SINGLE MOVIE — компактный hero с постером
   ========================================================= */
.single-movie__hero {
    position: relative;
    min-height: 360px;
    max-height: 55vh;
    background-size: cover;
    background-position: center;
    background-color: #1a0033;
    background-image: linear-gradient(135deg, #1a0033, #0a0033);
    display: flex;
    align-items: flex-end;
    border-radius: 0 0 32px 32px;
    margin-bottom: 32px;
    overflow: hidden;
}
.single-movie__shade {
    position: absolute; inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.95) 0%,
        rgba(0,0,0,.55) 45%,
        rgba(0,0,0,.25) 100%
    );
    border-radius: inherit;
}
.single-movie__head {
    position: relative; z-index: 2; color: #fff;
    padding-bottom: 32px; padding-top: 80px;
    width: 100%; display: flex; align-items: flex-end; gap: 24px;
    animation: fadeUp .7s var(--transition) both;
}
.single-movie__poster {
    flex: 0 0 140px; width: 140px; aspect-ratio: 2 / 3;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 12px 32px rgba(0,0,0,.6);
    border: 2px solid rgba(255,255,255,.15);
}
.single-movie__poster img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.single-movie__info { flex: 1 1 auto; min-width: 0; }
.single-movie__info h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(22px, 3vw, 40px); font-weight: 800;
    line-height: 1.15; margin: 12px 0 10px;
    color: #fff; word-break: break-word;
    text-shadow: 0 2px 20px rgba(0,0,0,.6);
}
.single-movie__meta {
    display: flex; gap: 12px; align-items: center;
    flex-wrap: wrap; color: rgba(255,255,255,.9); font-size: 14px;
}
.single-movie__meta .badge-rating { position: static; }
.single-movie__meta .meta-genres {
    padding: 4px 12px; border-radius: 100px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.2);
}
.single-movie__content { max-width: 1000px; margin: 0 auto; }

/* VIDEO PLAYER */
.video-player {
    margin-bottom: 32px; border-radius: var(--md-radius);
    overflow: hidden; box-shadow: var(--md-shadow-3);
    background: #000; position: relative;
}
.video-player video {
    width: 100%; display: block; max-height: 70vh;
    background: #000; border-radius: var(--md-radius) var(--md-radius) 0 0;
}
.video-controls-bar {
    display: flex; gap: 12px; padding: 16px 20px;
    background: linear-gradient(135deg, #1a0033, #0a0033);
    flex-wrap: wrap;
}
.video-controls-bar .btn { padding: 10px 20px; font-size: 14px; }
.video-player:fullscreen, .video-player:-webkit-full-screen { border-radius: 0; }
.video-player:fullscreen video, .video-player:-webkit-full-screen video {
    max-height: 100vh; height: 100vh; border-radius: 0;
}
.video-player:fullscreen .video-controls-bar,
.video-player:-webkit-full-screen .video-controls-bar { display: none; }

/* VIDEO WRAP (YouTube) */
.video-wrap {
    position: relative; padding-bottom: 56.25%; height: 0;
    border-radius: var(--md-radius); overflow: hidden;
    box-shadow: var(--md-shadow-3); margin-bottom: 32px;
}
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.content-card { margin-bottom: 40px; }
.content-card p { margin-bottom: 16px; }

/* MOBILE */
@media (max-width: 600px) {
    .single-movie__hero { min-height: 300px; max-height: none; padding-bottom: 24px; }
    .single-movie__head {
        flex-direction: column; align-items: flex-start;
        gap: 16px; padding-top: 60px;
    }
    .single-movie__poster { flex: 0 0 auto; width: 100px; }
    .single-movie__info h1 { font-size: 22px; }
}

/* FOOTER */
.footer {
    background: linear-gradient(135deg, #1a0033, #0a0033);
    color: rgba(255,255,255,.85); margin-top: 80px;
    border-radius: 32px 32px 0 0;
}
.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 40px 24px 28px;
    max-width: 600px;
    margin: 0 auto;
}
.footer__col h4 {
    color: #fff; margin-bottom: 16px;
    font-family: 'Montserrat', sans-serif; font-size: 16px;
}
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 8px; }
.footer__col a { transition: color .3s var(--transition), padding-left .3s var(--transition); }
.footer__col a:hover { color: var(--md-secondary); padding-left: 6px; }
.footer__desc { opacity: .7; margin-top: 12px; }
.footer .brand { color: transparent; }
.footer .brand__icon { color: var(--md-secondary); }
.subscribe {
    display: flex; gap: 8px; background: rgba(255,255,255,.08);
    padding: 6px 6px 6px 20px; border-radius: 100px;
    border: 1px solid rgba(255,255,255,.15);
}
.subscribe input {
    flex: 1; background: none; border: none;
    color: #fff; font-size: 14px; outline: none;
}
.subscribe input::placeholder { color: rgba(255,255,255,.5); }
.subscribe button {
    width: 44px; height: 44px; border-radius: 50%;
    border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    color: #fff; display: grid; place-items: center;
    transition: transform .3s var(--transition);
}
.subscribe button:hover { transform: scale(1.1) rotate(15deg); }
.footer__bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 24px 0; font-size: 14px; text-align: center; opacity: .7;
}

/* FAB */
.fab {
    position: fixed; right: 24px; bottom: 24px;
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    color: #fff; border: none; cursor: pointer;
    display: grid; place-items: center;
    box-shadow: var(--md-shadow-2);
    opacity: 0; pointer-events: none;
    transform: translateY(20px);
    transition: opacity .4s var(--transition), transform .4s var(--transition), box-shadow .3s var(--transition);
    z-index: 900;
}
.fab.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.fab:hover { box-shadow: 0 12px 32px rgba(255,2,102,.5); transform: translateY(-4px); }

/* UTILS */
.empty {
    padding: 40px; text-align: center;
    color: var(--md-text-secondary);
    background: var(--md-surface); border-radius: var(--md-radius);
    grid-column: 1 / -1;
}
.page-title { font-family: 'Montserrat', sans-serif; font-size: 32px; margin-bottom: 32px; }
.posts-list { display: grid; gap: 20px; }
.post-meta { font-size: 13px; color: var(--md-text-secondary); margin: 6px 0 10px; }

/* PAGINATION */
.pagination, .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers, .nav-links .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; height: 44px; padding: 0 14px;
    border-radius: 100px; background: var(--md-surface);
    box-shadow: var(--md-shadow-1); font-weight: 600;
    transition: transform .3s var(--transition), background .3s var(--transition), color .3s var(--transition);
}
.pagination .page-numbers:hover, .nav-links .page-numbers:hover {
    transform: translateY(-3px); color: #fff;
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
}
.pagination .current, .nav-links .current {
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    color: #fff;
}

/* RESPONSIVE общий */
@media (max-width: 900px) {
    .nav-desktop { display: none; }
    .menu-toggle { display: grid; }
    .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    body { padding-top: 64px; }
    .app-bar { height: 64px; }
    .search-bar { top: 64px; }
    .brand { font-size: 18px; }
    .hero { min-height: 480px; }
    .container { padding: 0 16px; }
    .card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
/* =========================================================
   SINGLE MOVIE — компактный центрированный hero v2
   ========================================================= */
.single-movie {
    padding: 0 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.single-movie__hero {
    position: relative;
    min-height: 0;
    max-height: none;
    padding: 0;
    background-size: cover;
    background-position: center;
    background-color: transparent;
    background-image: none;
    border-radius: 24px;
    margin: 24px auto 40px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

/* Внутренний градиент, если нет фоновой картинки */
.single-movie__hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,2,102,.5), transparent 55%),
        radial-gradient(circle at 80% 70%, rgba(3,218,198,.5), transparent 55%),
        linear-gradient(135deg, #1a0033 0%, #2d0a54 50%, #0a0033 100%);
    background-size: 200% 200%, 200% 200%, 100% 100%;
    animation: gradientShift 18s ease infinite;
    z-index: 0;
}

.single-movie__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.65) 0%,
        rgba(0,0,0,.25) 50%,
        rgba(0,0,0,.1) 100%
    );
    z-index: 1;
}

.single-movie__head {
    position: relative;
    z-index: 2;
    color: #fff;
    width: 100%;
    padding: 48px 32px;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 32px;
    animation: heroFade .9s var(--transition) both;
}

.single-movie__poster {
    flex: 0 0 200px;
    width: 200px;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0,0,0,.7),
        0 0 0 2px rgba(255,255,255,.12);
    animation: posterFloat .8s var(--transition) .15s both;
}

.single-movie__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.single-movie__info {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}

.single-movie__info .chip {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    font-size: 13px;
    padding: 6px 16px;
}

.single-movie__info h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(26px, 3.5vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin: 4px 0;
    color: #fff;
    word-break: break-word;
    text-shadow: 0 2px 20px rgba(0,0,0,.85);
}

.single-movie__info h1::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    margin-top: 16px;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--md-primary), var(--md-accent));
    box-shadow: 0 0 20px rgba(255,2,102,.6);
    animation: lineGrow .8s var(--transition) .5s both;
}

.single-movie__meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    color: rgba(255,255,255,.9);
    font-size: 14px;
    margin-top: 6px;
}

.single-movie__meta .badge-rating {
    position: static;
    padding: 6px 14px;
    font-size: 13px;
}

.single-movie__meta .meta-genres {
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.2);
    font-size: 12px;
    font-weight: 500;
}

/* Мобильная версия */
@media (max-width: 700px) {
    .single-movie { padding: 0 12px; }
    .single-movie__hero { border-radius: 20px; margin: 16px auto 24px; }
    .single-movie__head {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 20px;
        padding: 32px 20px;
    }
    .single-movie__poster { flex: 0 0 120px; width: 120px; }
    .single-movie__info h1 { font-size: 24px; }
}
.footer {
    background: linear-gradient(135deg, #1a0033, #0a0033);
    color: rgba(255,255,255,.85);
    margin-top: 80px;
    border-radius: 32px 32px 0 0;
    padding-bottom: 8px;
}
/* =========================================================
   DARK THEME — переопределение цветов
   ========================================================= */
:root {
    --md-bg: #0f0d17;
    --md-surface: #1a1726;
    --md-surface-2: #221e33;
    --md-text: #f2f0f7;
    --md-text-secondary: #a19cb0;
    --md-primary: #a06bff;
    --md-primary-dark: #7a3fd6;
    --md-secondary: #4ae8d2;
    --md-accent: #ff4d9d;

    --md-shadow-1: 0 2px 6px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.5);
    --md-shadow-2: 0 4px 12px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.4);
    --md-shadow-3: 0 12px 32px rgba(0,0,0,.6), 0 6px 12px rgba(0,0,0,.4);
}

body {
    background: #0f0d17;
    background-image:
        radial-gradient(circle at 10% 0%, rgba(160,107,255,.08), transparent 40%),
        radial-gradient(circle at 90% 100%, rgba(255,77,157,.06), transparent 40%);
    background-attachment: fixed;
    color: var(--md-text);
}

/* APP BAR — тёмный */
.app-bar {
    background: rgba(15,13,23,.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.app-bar.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.6); }
.icon-btn { color: var(--md-text); }
.icon-btn:hover { background: rgba(255,255,255,.08); }
.nav-desktop a { color: var(--md-text); }
.nav-desktop a:hover {
    background: rgba(160,107,255,.15);
    color: var(--md-primary);
}

/* SEARCH */
.search-bar { background: var(--md-surface); box-shadow: 0 4px 20px rgba(0,0,0,.6); }
.search-form input[type=search] {
    background: var(--md-surface-2);
    border-color: #2d2840;
    color: var(--md-text);
}
.search-form input[type=search]::placeholder { color: var(--md-text-secondary); }
.search-form input[type=search]:focus { border-color: var(--md-primary); }

/* DRAWER */
.drawer { background: var(--md-surface); }
.drawer li a { color: var(--md-text); }
.drawer li a:hover { background: rgba(160,107,255,.15); }

/* CARDS */
.card {
    background: var(--md-surface);
    border: 1px solid rgba(255,255,255,.05);
}
.card:hover {
    border-color: rgba(160,107,255,.3);
    box-shadow: 0 12px 32px rgba(160,107,255,.2);
}

/* MOVIE CARD */
.movie-card {
    background: var(--md-surface);
    border: 1px solid rgba(255,255,255,.05);
}
.movie-card:hover {
    box-shadow: 0 16px 40px rgba(160,107,255,.35);
    border-color: rgba(160,107,255,.4);
}
.movie-card__title { color: var(--md-text); }
.movie-card:hover .movie-card__title { color: var(--md-primary); }
.movie-card__meta { color: var(--md-text-secondary); }
.movie-card__meta span {
    background: rgba(160,107,255,.12);
    color: var(--md-text);
}

/* GENRES */
.genre-chip {
    background: var(--md-surface);
    color: var(--md-text);
    border: 1px solid rgba(255,255,255,.05);
}
.genre-chip:hover {
    color: var(--md-primary);
    border-color: rgba(160,107,255,.4);
}

/* SECTIONS */
.section__title { color: var(--md-text); }
.page-title { color: var(--md-text); }
.post-meta { color: var(--md-text-secondary); }

/* SINGLE MOVIE */
.single-movie__hero {
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.single-movie__info h1 { color: #fff; }

/* VIDEO PLAYER */
.video-player { box-shadow: 0 20px 60px rgba(0,0,0,.7); }
.video-controls-bar {
    background: linear-gradient(135deg, #1a1726, #0f0d17);
    border-top: 1px solid rgba(255,255,255,.06);
}

/* CONTENT CARD */
.content-card {
    background: var(--md-surface);
    color: var(--md-text);
}
.content-card p { color: var(--md-text); }

/* FOOTER — тёмный */
.footer {
    background: linear-gradient(135deg, #0a0812, #16101f);
    border-top: 1px solid rgba(255,255,255,.05);
}
.footer__desc { color: var(--md-text-secondary); }
.footer__bottom {
    color: var(--md-text-secondary);
    border-top-color: rgba(255,255,255,.06);
}

/* FAB */
.fab {
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    box-shadow: 0 8px 24px rgba(160,107,255,.5);
}
.fab:hover {
    box-shadow: 0 12px 40px rgba(255,77,157,.6);
}

/* BUTTONS */
.btn--primary {
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    box-shadow: 0 8px 24px rgba(160,107,255,.45);
}
.btn--primary:hover {
    box-shadow: 0 12px 40px rgba(255,77,157,.55);
}

/* PAGINATION */
.pagination .page-numbers, .nav-links .page-numbers {
    background: var(--md-surface);
    color: var(--md-text);
    border: 1px solid rgba(255,255,255,.05);
}

/* EMPTY */
.empty {
    background: var(--md-surface);
    color: var(--md-text-secondary);
}

/* Ссылки в контенте */
.content-card a,
.single-movie__content a {
    color: var(--md-primary);
    text-decoration: underline;
    text-decoration-color: rgba(160,107,255,.4);
    transition: color .2s;
}
.content-card a:hover,
.single-movie__content a:hover {
    color: var(--md-accent);
}

/* Скроллбар — тёмный */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0f0d17; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    border-radius: 10px;
    border: 2px solid #0f0d17;
}
::-webkit-scrollbar-thumb:hover { background: var(--md-accent); }

/* Выделение текста */
::selection {
    background: var(--md-primary);
    color: #fff;
}
/* =========================================================
   DARK THEME v2 — посветлее
   ========================================================= */
:root {
    --md-bg: #1a1a24;           /* было #0f0d17 — стало светлее */
    --md-surface: #262336;      /* было #1a1726 */
    --md-surface-2: #2f2b42;    /* для поиска и т.п. */
    --md-text: #f0eef6;
    --md-text-secondary: #b0aac2;
}

body {
    background: #1a1a24;
    background-image:
        radial-gradient(circle at 15% 10%, rgba(160,107,255,.12), transparent 45%),
        radial-gradient(circle at 85% 90%, rgba(255,77,157,.08), transparent 45%);
    background-attachment: fixed;
    color: var(--md-text);
}

/* App bar */
.app-bar {
    background: rgba(26,26,36,.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

/* Drawer */
.drawer { background: var(--md-surface); }

/* Search */
.search-bar { background: var(--md-surface); }
.search-form input[type=search] {
    background: var(--md-surface-2);
    border-color: #3a3452;
    color: var(--md-text);
}

/* Cards */
.card,
.movie-card,
.genre-chip {
    background: var(--md-surface);
    border: 1px solid rgba(255,255,255,.06);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #14121c, #1f1a2b);
}

/* Content card */
.content-card {
    background: var(--md-surface);
    color: var(--md-text);
}

/* Empty */
.empty { background: var(--md-surface); color: var(--md-text-secondary); }

/* Скроллбар */
::-webkit-scrollbar-track { background: #1a1a24; }
::-webkit-scrollbar-thumb { border-color: #1a1a24; }

/* Pagination */
.pagination .page-numbers,
.nav-links .page-numbers {
    background: var(--md-surface);
    color: var(--md-text);
}
/* =========================================================
   VIDEO CONTROLS — компактная панель с одной кнопкой
   ========================================================= */
.video-controls-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1a1726, #0f0d17);
    border-top: 1px solid rgba(255,255,255,.06);
}

/* Кнопка скачать — стильная, с градиентом и иконкой */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 26px;
    border-radius: 100px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .3px;
    color: #ffffff !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    box-shadow: 0 6px 20px rgba(160,107,255,.35);
    transition: transform .25s var(--transition), box-shadow .3s var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-download::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--md-accent), var(--md-primary));
    opacity: 0;
    transition: opacity .3s var(--transition);
    z-index: 0;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255,77,157,.5);
}
.btn-download:hover::before { opacity: 1; }

.btn-download:active { transform: translateY(0) scale(.97); }

.btn-download .material-icons-round,
.btn-download span {
    position: relative;
    z-index: 1;
}

.btn-download .material-icons-round {
    font-size: 20px;
    transition: transform .3s var(--transition);
}
.btn-download:hover .material-icons-round {
    transform: translateY(2px);
}

/* Мобильная версия — на всю ширину */
@media (max-width: 600px) {
    .video-controls-bar { padding: 12px; }
    .btn-download { width: 100%; justify-content: center; }
}
/* Бейдж с количеством фильмов в заголовке жанра */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    margin-left: 8px;
    border-radius: 100px;
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 4px 12px rgba(160,107,255,.4);
}

/* Пустое состояние */
.empty .material-icons-round {
    display: block;
    margin: 0 auto;
}

/* Кнопка "Все фильмы" в заголовке */
.section__head .link-more {
    white-space: nowrap;
}
/* =========================================================
   HERO главной — по центру + анимация
   ========================================================= */
.hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0 0 32px 32px;
    margin-bottom: 60px;
    text-align: center;
}
.hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,2,102,.45), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(3,218,198,.45), transparent 45%),
        linear-gradient(135deg, #1a0033 0%, #2d0a54 50%, #0a0033 100%);
    background-size: 200% 200%, 200% 200%, 100% 100%;
    animation: gradientShift 18s ease infinite;
    z-index: 0;
}
.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.15) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: .5;
    animation: dotsFloat 60s linear infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%, 100% 50%, 0 0; }
    50%      { background-position: 100% 50%, 0% 50%, 0 0; }
}
@keyframes dotsFloat {
    from { background-position: 0 0; }
    to   { background-position: 320px 320px; }
}

.hero__content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 900px;
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero .chip {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(10px);
    font-size: 14px;
    padding: 10px 20px;
    animation: heroFadeUp .8s var(--transition) both;
}

.hero__title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(36px, 6vw, 82px);
    font-weight: 800;
    line-height: 1.05;
    margin: 24px 0 20px;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #ffffff 0%, #e0d5ff 50%, #ffb3d9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 40px rgba(98,0,238,.5);
    animation: heroFadeUp .9s var(--transition) .15s both;
}

.hero__subtitle {
    font-size: clamp(15px, 1.5vw, 19px);
    opacity: .9;
    margin-bottom: 40px;
    max-width: 640px;
    line-height: 1.6;
    color: rgba(255,255,255,.85);
    animation: heroFadeUp .9s var(--transition) .3s both;
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    animation: heroFadeUp .9s var(--transition) .45s both;
}

.hero__actions .btn--primary {
    animation: btnPulse 2.4s ease-in-out 1.5s infinite;
}
@keyframes btnPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(98,0,238,.4); }
    50%      { box-shadow: 0 12px 40px rgba(255,2,102,.65); }
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}


/* Мобильная версия */
@media (max-width: 600px) {
    .hero { min-height: 520px; }
    .hero__content { padding: 60px 16px; }
    .hero__title { letter-spacing: -1px; }
    .hero__actions { flex-direction: column; width: 100%; }
    .hero__actions .btn { width: 100%; justify-content: center; }
}
/* =========================================================
   APP BAR — логотип по центру с анимацией
   ========================================================= */
.app-bar__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
}

/* Левая группа (пустая, для симметрии) */
.app-bar__inner::before {
    content: '';
    display: block;
    width: 120px;
    flex: 0 0 120px;
}



/* Иконка киноленты */
.brand__icon {
    color: var(--md-primary);
    -webkit-text-fill-color: initial;
    font-size: 32px;
    transition: transform .4s var(--transition);
    animation: iconSpin 8s linear infinite;
}

@keyframes iconSpin {
    0%   { transform: rotate(0deg) scale(1); }
    45%  { transform: rotate(0deg) scale(1); }
    50%  { transform: rotate(-15deg) scale(1.15); }
    55%  { transform: rotate(15deg) scale(1.15); }
    60%  { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(0deg) scale(1); }
}

/* При наведении на логотип — иконка крутится быстрее */
.brand:hover .brand__icon {
    transform: rotate(360deg);
    transition: transform .8s var(--transition);
    animation: none;
}

/* Текст логотипа — градиент с блеском */
.brand__name {
    background: linear-gradient(
        90deg,
        var(--md-primary) 0%,
        var(--md-accent) 30%,
        #ffffff 50%,
        var(--md-accent) 70%,
        var(--md-primary) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* Правая группа иконок */
.app-bar__inner .nav-desktop {
    margin-left: 0;
    display: flex;
    align-items: center;
}

.app-bar__inner > .icon-btn {
    position: relative;
    z-index: 11;
}

/* Мобильная версия */
@media (max-width: 900px) {
    .brand { font-size: 22px; }
    .brand__icon { font-size: 26px; }
    .app-bar__inner::before { width: 80px; flex: 0 0 80px; }
}
@media (max-width: 600px) {
    .brand { font-size: 20px; }
    .brand__icon { font-size: 24px; }
    .app-bar__inner::before { display: none; }
}
/* =========================================================
   FAB "На главную" — всегда видна, выше стрелки "Наверх"
   ========================================================= */
.fab-home {
    position: fixed;
    right: 24px;
    bottom: 96px;              /* ← на 72px выше кнопки "Наверх" (у неё bottom:24px) */
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    color: #fff !important;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(160,107,255,.5);
    z-index: 950;              /* выше .fab (900) */
    transition: transform .3s var(--transition), box-shadow .3s var(--transition);
    opacity: 1;
    pointer-events: auto;
}

.fab-home:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 40px rgba(255,77,157,.6);
}

.fab-home:active {
    transform: translateY(-1px) scale(.98);
}

.fab-home .material-icons-round {
    font-size: 28px;
    color: #fff;
    transition: transform .3s var(--transition);
}

.fab-home:hover .material-icons-round {
    transform: scale(1.15);
}

/* Мобильная версия */
@media (max-width: 600px) {
    .fab-home {
        right: 16px;
        bottom: 84px;
        width: 52px;
        height: 52px;
    }
    .fab-home .material-icons-round { font-size: 24px; }
}
/* Подсказка о входе под плеером */
.login-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 18px;
    margin-top: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(160,107,255,.12), rgba(255,77,157,.08));
    border: 1px solid rgba(160,107,255,.25);
    color: var(--md-text);
    font-size: 14px;
    line-height: 1.4;
    animation: fadeUp .6s var(--transition) both;
}
.login-hint .material-icons-round {
    font-size: 20px;
    color: var(--md-primary);
    flex: 0 0 auto;
}
.login-hint span:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--md-text-secondary);
}
.login-hint a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 100px;
    background: linear-gradient(135deg, var(--md-primary), var(--md-accent));
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    transition: transform .25s var(--transition), box-shadow .25s var(--transition);
}
.login-hint a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(160,107,255,.4);
}
@media (max-width: 600px) {
    .login-hint { font-size: 13px; padding: 12px 14px; }
    .login-hint a { width: 100%; justify-content: center; margin-top: 6px; }
}