:root {
    --bg: #0a0e27;
    --bg-soft: #10192a;
    --card: #1a2332;
    --card-strong: #2d3e50;
    --text: #e8eef5;
    --muted: #a8b5c7;
    --quiet: #6b7b8c;
    --blue: #4a9eff;
    --blue-deep: #3a8eef;
    --green: #00d4aa;
    --gold: #f4c430;
    --orange: #ff6b35;
    --line: rgba(168, 181, 199, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(74, 158, 255, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(0, 212, 170, 0.12), transparent 30rem),
        var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

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

img {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

.container-custom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(10, 14, 39, 0.9);
    border-bottom: 1px solid rgba(168, 181, 199, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-shell {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--green));
    box-shadow: 0 12px 30px rgba(74, 158, 255, 0.32);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-text strong,
.footer-logo strong,
.text-gradient,
.section-heading h2,
.page-hero h1 {
    background: linear-gradient(135deg, var(--blue), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-text strong {
    font-size: 22px;
    letter-spacing: 0.02em;
}

.logo-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    margin-top: 4px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link,
.mobile-nav-link {
    color: #c5d0de;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--blue);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--text);
    background: var(--card);
    cursor: pointer;
}

.mobile-nav {
    background: var(--card);
    border-top: 1px solid var(--line);
}

.mobile-nav-inner {
    display: grid;
    gap: 12px;
    padding: 16px 0 20px;
}

.hero-carousel {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: #050816;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.025);
    transition: opacity 0.6s ease, transform 0.9s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 14, 39, 0.92), rgba(10, 14, 39, 0.58), rgba(10, 14, 39, 0.18)),
        linear-gradient(0deg, var(--bg), rgba(10, 14, 39, 0.14) 45%, rgba(10, 14, 39, 0.05));
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 72px;
}

.hero-copy {
    width: min(760px, 100%);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.detail-title-block h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.44);
}

.hero-desc,
.detail-title-block p {
    width: min(720px, 100%);
    color: #c5d0de;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-meta,
.hero-tags,
.hero-actions,
.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.hero-meta span {
    color: var(--muted);
    font-weight: 650;
}

.hero-tags span,
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #dce8f6;
    background: rgba(26, 35, 50, 0.78);
    border: 1px solid rgba(168, 181, 199, 0.14);
}

.hero-actions {
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.wide-button,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    padding: 0 22px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue), var(--green));
    cursor: pointer;
    box-shadow: 0 14px 36px rgba(74, 158, 255, 0.26);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.primary-button:hover,
.ghost-button:hover,
.wide-button:hover,
.quick-search button:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

.ghost-button {
    color: var(--text);
    background: rgba(26, 35, 50, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 38px;
    display: flex;
    gap: 12px;
    z-index: 4;
}

.hero-controls button {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    font-size: 32px;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-controls button:hover {
    background: rgba(0, 0, 0, 0.68);
    transform: translateY(-2px);
}

.quick-search-wrap {
    margin-top: -38px;
    position: relative;
    z-index: 8;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(168, 181, 199, 0.16);
    border-radius: 22px;
    background: rgba(26, 35, 50, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.quick-search input,
.catalog-filter input,
.catalog-filter select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(168, 181, 199, 0.14);
    border-radius: 14px;
    color: var(--text);
    background: #111a2b;
    padding: 0 14px;
    outline: none;
}

.quick-search input:focus,
.catalog-filter input:focus,
.catalog-filter select:focus {
    border-color: rgba(74, 158, 255, 0.72);
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.11);
}

.hero-category-links {
    margin-top: 18px;
}

.hero-category-links a,
.text-link {
    color: var(--blue);
    font-weight: 750;
}

.section-spacing {
    padding: 72px 0;
}

.gradient-section {
    background: linear-gradient(180deg, rgba(10, 14, 39, 0), rgba(26, 35, 50, 0.78), rgba(10, 14, 39, 0));
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.14;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.compact-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card,
.card,
.content-card,
.category-tile,
.ranking-item {
    background: rgba(26, 35, 50, 0.86);
    border: 1px solid rgba(168, 181, 199, 0.13);
    border-radius: var(--radius);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(74, 158, 255, 0.52);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

.movie-card-small .poster-link {
    aspect-ratio: 4 / 5;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.09);
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12) 54%, rgba(0, 0, 0, 0.08));
}

.poster-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 9px;
    padding: 0 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 750;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(10px);
}

.poster-badge-left {
    left: 12px;
}

.poster-badge-right {
    right: 12px;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(74, 158, 255, 0.88);
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
    padding: 16px;
}

.movie-card-body h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-body h3 a:hover {
    color: var(--blue);
}

.movie-meta,
.movie-line {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.movie-line {
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.category-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-tile {
    display: block;
    min-height: 150px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(74, 158, 255, 0.13), rgba(0, 212, 170, 0.08)),
        rgba(26, 35, 50, 0.92);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(74, 158, 255, 0.5);
}

.category-tile span {
    display: block;
    margin-bottom: 12px;
    color: var(--text);
    font-size: 22px;
    font-weight: 850;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(74, 158, 255, 0.16), rgba(0, 212, 170, 0.08)),
        var(--bg-soft);
}

.slim-hero {
    padding: 76px 0 54px;
}

.page-hero p {
    max-width: 780px;
    color: var(--muted);
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--blue);
}

.catalog-filter {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 160px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(26, 35, 50, 0.86);
    border: 1px solid rgba(168, 181, 199, 0.12);
}

.catalog-filter label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.ranking-list {
    display: grid;
    gap: 14px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 64px 82px 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px;
}

.ranking-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--green));
}

.ranking-poster {
    display: block;
    width: 82px;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    background: #111827;
}

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

.ranking-item h3,
.ranking-item p {
    margin: 0;
}

.ranking-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.ranking-item h3 a:hover {
    color: var(--blue);
}

.ranking-item p,
.ranking-item span {
    color: var(--muted);
    line-height: 1.7;
}

.ranking-item span {
    display: inline-block;
    margin-top: 7px;
    font-size: 13px;
}

.detail-hero {
    position: relative;
    min-height: 440px;
    overflow: hidden;
    background: #050816;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 14, 39, 0.95), rgba(10, 14, 39, 0.68), rgba(10, 14, 39, 0.28)),
        linear-gradient(0deg, var(--bg), rgba(10, 14, 39, 0.18));
}

.detail-hero-inner {
    position: relative;
    min-height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 56px;
}

.detail-title-block {
    max-width: 880px;
}

.detail-layout-section {
    padding-top: 42px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.video-start {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.34);
    cursor: pointer;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.video-start span {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 50%;
    font-size: 34px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    box-shadow: 0 18px 44px rgba(74, 158, 255, 0.34);
}

.video-start:hover {
    background: rgba(0, 0, 0, 0.46);
}

.video-start.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.player-message {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 3;
    border-radius: 14px;
    padding: 12px 14px;
    color: #ffffff;
    background: rgba(255, 107, 53, 0.88);
}

.content-card {
    padding: 26px;
}

.content-card h2 {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 22px;
}

.content-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.92;
    white-space: pre-line;
}

.detail-side {
    display: grid;
    gap: 20px;
    align-content: start;
    position: sticky;
    top: 96px;
}

.side-poster {
    overflow: hidden;
}

.side-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.side-info dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px 12px;
    margin: 0 0 18px;
}

.side-info dt {
    color: var(--quiet);
}

.side-info dd {
    margin: 0;
    color: var(--muted);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.wide-button {
    width: 100%;
}

.related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: rgba(26, 35, 50, 0.86);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0 28px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.footer-grid p,
.footer-links a,
.footer-bottom {
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--blue);
}

.footer-bottom {
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}

[hidden],
.catalog-card.is-hidden {
    display: none !important;
}

@media (max-width: 1100px) {
    .movie-grid,
    .compact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
        grid-template-columns: 220px 1fr;
    }
}

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

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-carousel {
        height: 76vh;
        min-height: 560px;
    }

    .hero-content {
        padding-bottom: 96px;
    }

    .hero-controls {
        left: 16px;
        right: auto;
        bottom: 28px;
    }

    .quick-search {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .compact-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .catalog-filter {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 48px 70px 1fr;
        gap: 12px;
    }

    .ranking-rank {
        width: 44px;
        height: 44px;
        font-size: 17px;
    }

    .ranking-poster {
        width: 70px;
    }

    .detail-side {
        grid-template-columns: 1fr;
    }

    .side-poster {
        max-width: 280px;
    }

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

@media (max-width: 520px) {
    .container-custom {
        width: min(100% - 24px, 1180px);
    }

    .logo-text strong {
        font-size: 18px;
    }

    .logo-text em {
        display: none;
    }

    .hero-copy h1,
    .detail-title-block h1 {
        font-size: 34px;
    }

    .hero-desc,
    .detail-title-block p {
        font-size: 15px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .movie-grid,
    .compact-grid,
    .related-grid,
    .category-grid,
    .category-grid.wide {
        grid-template-columns: 1fr;
    }

    .section-spacing {
        padding: 52px 0;
    }

    .slim-hero {
        padding: 58px 0 42px;
    }

    .content-card {
        padding: 20px;
    }
}
