:root {
    --bg: #030712;
    --bg-soft: #0f172a;
    --bg-card: rgba(31, 41, 55, 0.42);
    --bg-card-strong: rgba(31, 41, 55, 0.72);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --chip: rgba(55, 65, 81, 0.72);
    --accent: #ffffff;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 22px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 0%, rgba(71, 85, 105, 0.28), transparent 32rem),
        radial-gradient(circle at 90% 12%, rgba(30, 41, 59, 0.42), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(3, 7, 18, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(148, 163, 184, 0.08));
    color: var(--accent);
    box-shadow: 0 0 34px rgba(148, 163, 184, 0.24);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 0.12em;
}

.brand-text small {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

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

.nav-link,
.mobile-link,
.category-chip {
    border-radius: 12px;
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active,
.category-chip:hover {
    background: rgba(31, 41, 55, 0.78);
    color: var(--text);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(31, 41, 55, 0.74);
    color: var(--text);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

.mobile-link {
    display: block;
    padding: 12px 14px;
}

.quick-categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.category-chip {
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 1px solid var(--line);
    font-size: 13px;
}

.home-hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #030712 2%, rgba(3, 7, 18, 0.82) 42%, transparent 100%),
        linear-gradient(to right, rgba(3, 7, 18, 0.76), transparent 72%);
}

.hero-copy {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 70px;
    width: min(650px, calc(100% - 48px));
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 14px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h2,
.hero-intro h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: var(--text);
    font-weight: 300;
    line-height: 1.1;
}

.hero-copy h2 {
    font-size: clamp(36px, 6vw, 76px);
}

.hero-copy p,
.hero-intro p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 19px);
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 30px;
}

.hero-tags span,
.detail-tags span {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    padding: 7px 12px;
    color: var(--muted-strong);
    font-size: 13px;
    backdrop-filter: blur(14px);
}

.hero-actions,
.hero-entry-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-button,
.ghost-button,
.hero-entry-row a,
.section-title a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 0 18px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    background: var(--accent);
    color: #020617;
    font-weight: 600;
}

.ghost-button,
.hero-entry-row a,
.section-title a {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.56);
    color: var(--muted-strong);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.hero-entry-row a:hover,
.section-title a:hover {
    transform: translateY(-2px);
}

.hero-intro {
    position: relative;
    z-index: 2;
    padding-top: 118px;
}

.hero-intro h1 {
    max-width: 780px;
    font-size: clamp(30px, 4.8vw, 58px);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 40px;
    z-index: 3;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.72);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.section-block {
    padding: 64px 0;
}

.band-section {
    background: linear-gradient(to bottom, transparent, rgba(15, 23, 42, 0.44), transparent);
}

.section-title {
    margin-bottom: 28px;
}

.section-title.with-link {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-title span {
    color: var(--muted);
    font-size: 14px;
    letter-spacing: 0.16em;
}

.section-title h2,
.footer-block h2,
.detail-text h2 {
    margin: 4px 0 0;
    color: var(--text);
    font-weight: 300;
}

.section-title h2 {
    font-size: clamp(26px, 4vw, 38px);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 14px 60px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
    transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(226, 232, 240, 0.22);
    background: var(--bg-card-strong);
    box-shadow: var(--shadow);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
}

.movie-card-large .card-poster {
    aspect-ratio: 16 / 11;
}

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

.movie-card:hover .card-poster img,
.category-tile:hover img,
.category-panel:hover img {
    transform: scale(1.08);
}

.card-poster::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 62%);
}

.card-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: var(--muted-strong);
    font-size: 12px;
}

.card-year {
    right: 12px;
    bottom: 12px;
    padding: 4px 9px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    color: #ffffff;
    font-weight: 700;
}

.card-content {
    display: flex;
    min-height: 198px;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.card-content h2,
.list-content h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;
}

.card-content p,
.list-content p,
.category-tile p,
.category-panel p,
.footer-brand p,
.detail-text p {
    margin: 0;
    color: var(--muted);
}

.card-content p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 45px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta,
.card-links,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-meta span,
.hot-score,
.mini-link,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--chip);
    padding: 5px 9px;
    color: var(--muted-strong);
    font-size: 12px;
}

.card-links {
    margin-top: auto;
    align-items: center;
    justify-content: space-between;
}

.mini-link:hover {
    color: var(--text);
}

.scroll-row {
    display: grid;
    grid-auto-columns: minmax(270px, 340px);
    grid-auto-flow: column;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 4px 22px;
    scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

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

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

.list-card {
    display: grid;
    grid-template-columns: auto 130px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(31, 41, 55, 0.34);
    padding: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.list-card:hover {
    transform: translateY(-2px);
    background: rgba(31, 41, 55, 0.58);
}

.list-rank {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 999px;
    background: rgba(55, 65, 81, 0.76);
    color: var(--muted-strong);
    font-weight: 700;
}

.list-poster {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
}

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

.list-content {
    min-width: 0;
}

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

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

.category-tile,
.category-panel {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(31, 41, 55, 0.4);
    padding: 20px;
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.2);
}

.category-tile img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    transition: transform 0.52s ease, opacity 0.52s ease;
}

.category-tile:hover img {
    opacity: 0.5;
}

.category-tile::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.24));
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
}

.category-tile span {
    display: block;
    margin-top: 110px;
    font-size: 22px;
    font-weight: 500;
}

.category-tile p {
    margin-top: 8px;
    font-size: 14px;
}

.category-panel {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    min-height: auto;
}

.panel-posters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.panel-posters img {
    aspect-ratio: 3 / 4;
    height: 150px;
    border-radius: 13px;
    object-fit: cover;
}

.category-panel h2 {
    margin: 0 0 8px;
    font-weight: 400;
}

.page-main {
    min-height: 68vh;
}

.page-hero {
    padding: 84px 0 22px;
}

.simple-hero,
.category-hero,
.ranking-hero,
.search-hero {
    position: relative;
}

.page-hero h1 {
    font-size: clamp(34px, 6vw, 62px);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px 180px;
    gap: 12px;
    margin-bottom: 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.66);
    padding: 14px;
    backdrop-filter: blur(16px);
}

.filter-panel .search-box {
    display: grid;
    gap: 6px;
}

.search-box span {
    color: var(--muted);
    font-size: 12px;
}

.search-box input,
.filter-select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: rgba(3, 7, 18, 0.76);
    color: var(--text);
    padding: 0 13px;
}

.search-box input:focus,
.filter-select:focus {
    border-color: rgba(226, 232, 240, 0.42);
}

.movie-card.is-hidden,
.list-card.is-hidden {
    display: none;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #020617;
}

.detail-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image:
        linear-gradient(to top, #030712 0%, rgba(3, 7, 18, 0.84) 45%, rgba(3, 7, 18, 0.64) 100%),
        var(--detail-bg);
    background-position: center;
    background-size: cover;
    filter: blur(0px);
}

.detail-hero-inner {
    position: relative;
    padding: 36px 0 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 38px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow);
}

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

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 72px);
}

.detail-copy {
    max-width: 820px;
}

.detail-meta {
    margin-top: 20px;
}

.player-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2));
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.play-circle {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #020617;
    font-size: 34px;
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
}

.detail-text {
    display: grid;
    gap: 18px;
}

.detail-text h2 {
    font-size: 28px;
}

.detail-text p {
    max-width: 920px;
    color: var(--muted-strong);
    font-size: 17px;
    line-height: 1.95;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(3, 7, 18, 0.92);
}

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

.footer-logo {
    margin-bottom: 16px;
}

.footer-block {
    display: grid;
    gap: 10px;
    align-content: start;
}

.footer-block h2 {
    margin-bottom: 6px;
    font-size: 18px;
}

.footer-block a {
    color: var(--muted);
    font-size: 14px;
}

.footer-block a:hover {
    color: var(--text);
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px 16px;
    color: #64748b;
    text-align: center;
    font-size: 13px;
}

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

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

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

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

    .menu-button {
        display: block;
    }

    .mobile-nav.is-open {
        display: grid;
        gap: 6px;
    }

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

    .home-hero {
        min-height: 82vh;
    }

    .hero-intro {
        padding-top: 96px;
    }

    .hero-copy {
        bottom: 92px;
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 34px;
    }

    .movie-grid,
    .feature-grid,
    .related-grid,
    .list-grid,
    .category-grid,
    .category-grid-large,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .list-card {
        grid-template-columns: auto 110px minmax(0, 1fr);
    }

    .category-panel {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        max-width: 330px;
    }
}

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

    .quick-categories {
        padding-bottom: 10px;
    }

    .hero-copy {
        width: calc(100% - 28px);
        left: 14px;
    }

    .hero-actions,
    .hero-entry-row,
    .section-title.with-link {
        align-items: stretch;
        flex-direction: column;
    }

    .section-block {
        padding: 44px 0;
    }

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

    .list-card {
        grid-template-columns: 80px minmax(0, 1fr);
    }

    .list-rank {
        display: none;
    }

    .list-poster {
        width: 80px;
        aspect-ratio: 3 / 4;
    }

    .card-content {
        min-height: auto;
    }

    .panel-posters img {
        height: 120px;
    }

    .play-circle {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
