:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: #1e293b;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --panel-deep: #0b1120;
    --text: #ffffff;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --line: rgba(148, 163, 184, 0.18);
    --amber: #f59e0b;
    --orange: #ea580c;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.28);
    font-size: 15px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    color: var(--muted-strong);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 600;
    transition: background 0.25s ease, color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.16);
}

.top-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px;
}

.top-search input,
.large-search input,
.filter-bar input,
.filter-bar select {
    min-width: 0;
    color: #ffffff;
    background: transparent;
    border: 0;
    outline: 0;
}

.top-search input {
    width: 170px;
    padding: 8px 10px;
}

.top-search button,
.large-search button {
    color: #ffffff;
    cursor: pointer;
    border: 0;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 1px solid var(--line);
    background: rgba(30, 41, 59, 0.75);
    border-radius: 12px;
    padding: 9px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.hero-slider {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.04);
}

.hero-bg span {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18), transparent 32%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.56) 48%, rgba(0, 0, 0, 0.10));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
}

.hero-kicker,
.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-kicker span {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 800;
}

.hero-kicker span:first-child {
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.hero-copy h1 {
    margin: 20px 0 14px;
    color: #ffffff;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 18px;
}

.hero-meta {
    margin-top: 20px;
    color: var(--muted);
}

.hero-meta strong {
    color: #ffffff;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.primary-btn,
.ghost-btn,
.text-btn,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    padding: 14px 24px;
    box-shadow: 0 18px 35px rgba(234, 88, 12, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.ghost-btn,
.section-link {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.55);
    padding: 13px 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 28px;
    height: 5px;
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 42px;
    background: var(--amber);
}

.content-section {
    padding: 68px 0;
}

.tinted-section {
    background: rgba(30, 41, 59, 0.32);
}

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

.section-heading h2,
.rail-heading h2,
.side-card h2,
.detail-card h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.catalog-grid,
.ranking-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    position: relative;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(245, 158, 11, 0.38);
    box-shadow: var(--shadow);
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--panel-deep);
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.08);
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.72));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .movie-cover::after {
    opacity: 1;
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
}

.year-badge {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--amber);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.65);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.movie-body {
    padding: 16px;
}

.movie-body.compact {
    padding: 14px;
}

.movie-body h3 {
    min-height: 52px;
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-body h3 a:hover {
    color: #fbbf24;
}

.movie-body p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.meta-row span,
.tag-row span,
.detail-tags span,
.detail-meta span {
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
}

.tag-row {
    margin-top: 10px;
}

.tag-row span {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
}

.movie-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

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

.rail-item {
    flex: 0 0 245px;
    scroll-snap-align: start;
}

.rail-controls {
    display: flex;
    gap: 10px;
}

.rail-controls button {
    width: 42px;
    height: 42px;
    color: #ffffff;
    cursor: pointer;
    border: 0;
    background: #334155;
    border-radius: 12px;
    font-size: 28px;
    line-height: 1;
}

.rail-controls button:hover {
    background: #475569;
}

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

.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 22px;
    background: var(--panel);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-card span {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.92));
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 2;
}

.category-card strong {
    font-size: 24px;
}

.category-card em {
    margin-top: 8px;
    color: var(--muted-strong);
    font-style: normal;
    font-size: 14px;
}

.category-card:hover img {
    transform: scale(1.08);
    opacity: 0.55;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.22), transparent 34%),
        radial-gradient(circle at 82% 10%, rgba(234, 88, 12, 0.12), transparent 32%),
        linear-gradient(135deg, #020617, #111827 56%, #1e293b);
}

.small-hero {
    padding: 66px 0 58px;
}

.eyebrow {
    margin: 0 0 10px;
    color: #fbbf24;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.page-hero h1 {
    max-width: 900px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 14px 0 0;
    color: var(--muted-strong);
    font-size: 18px;
}

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

.breadcrumb a:hover {
    color: #fbbf24;
}

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

.overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.overview-cover {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border-radius: 15px;
    background: #020617;
}

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

.overview-cover span {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
}

.overview-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.overview-card p {
    margin: 0;
    color: var(--muted);
}

.mini-title-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.mini-title-list span {
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.58);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
}

.text-btn {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.36);
    padding: 9px 14px;
}

.filter-bar,
.large-search {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
}

.filter-bar input,
.filter-bar select,
.large-search input {
    color: #ffffff;
    background: rgba(30, 41, 59, 0.86);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 14px;
}

.filter-bar input {
    flex: 1 1 280px;
}

.filter-bar select {
    flex: 0 1 180px;
}

.large-search {
    margin-top: 26px;
    max-width: 680px;
}

.large-search input {
    flex: 1 1 300px;
}

.large-search button {
    padding: 12px 24px;
}

.empty-filter {
    display: none;
    margin: 30px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 18px;
}

.empty-filter.is-visible {
    display: block;
}

.detail-wrap {
    padding: 30px 0 76px;
    background:
        radial-gradient(circle at 70% 0%, rgba(245, 158, 11, 0.14), transparent 32%),
        var(--bg);
}

.detail-breadcrumb {
    margin: 4px 0 22px;
}

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

.detail-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.player-box {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 5;
    cursor: pointer;
    border: 0;
    padding: 0;
    overflow: hidden;
    color: #ffffff;
    background: #000000;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover-bg,
.player-cover-shade {
    position: absolute;
    inset: 0;
}

.player-cover-bg {
    background-position: center;
    background-size: cover;
    filter: blur(2px) saturate(1.08);
    transform: scale(1.02);
}

.player-cover-shade {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.76), rgba(0, 0, 0, 0.46));
}

.player-cover-center {
    position: relative;
    z-index: 2;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    font-size: 18px;
}

.big-play {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 999px;
    box-shadow: 0 18px 40px rgba(234, 88, 12, 0.34);
    font-size: 28px;
}

.detail-card,
.side-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.detail-card h1 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.lead-text {
    margin: 0 0 18px;
    color: #fbbf24;
    font-size: 20px;
    font-weight: 700;
}

.detail-meta {
    margin-bottom: 16px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.detail-tags span {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
}

.detail-card section {
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.detail-card section + section {
    margin-top: 22px;
}

.detail-card h2,
.side-card h2 {
    margin-bottom: 14px;
    font-size: 24px;
}

.detail-card p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 17px;
    line-height: 1.9;
}

.detail-side {
    position: sticky;
    top: 96px;
}

.side-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.side-list .movie-card {
    display: grid;
    grid-template-columns: 110px 1fr;
}

.side-list .movie-cover {
    aspect-ratio: 3 / 4;
}

.side-list .movie-body h3 {
    min-height: auto;
    font-size: 15px;
}

.side-list .movie-body p,
.side-list .tag-row {
    display: none;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #0b1120;
    padding: 44px 0;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 28px;
}

.footer-inner p {
    max-width: 520px;
    margin: 12px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: start;
}

.footer-links a {
    color: var(--muted-strong);
    background: rgba(30, 41, 59, 0.72);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 14px;
}

.footer-links a:hover {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.18);
}

@media (max-width: 1080px) {
    .movie-grid,
    .catalog-grid,
    .ranking-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 860px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        order: 4;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        background: rgba(15, 23, 42, 0.96);
        border: 1px solid var(--line);
        border-radius: 18px;
        padding: 10px;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        border-radius: 12px;
    }

    .top-search {
        order: 5;
        width: 100%;
    }

    .top-search input {
        width: 100%;
        flex: 1;
    }

    .hero-slider {
        height: 620px;
    }

    .hero-bg span {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.88));
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 82px;
    }

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

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

    .overview-card {
        grid-template-columns: 1fr;
    }

    .overview-cover {
        aspect-ratio: 16 / 8;
    }

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

@media (max-width: 620px) {
    .container,
    .header-inner,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

    .logo {
        font-size: 19px;
    }

    .hero-slider {
        height: 560px;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

    .hero-copy p {
        font-size: 16px;
    }

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

    .movie-grid,
    .catalog-grid,
    .ranking-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .movie-body {
        padding: 12px;
    }

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

    .movie-body p,
    .tag-row {
        display: none;
    }

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

    .rail-item {
        flex-basis: 210px;
    }

    .small-hero {
        padding: 46px 0 42px;
    }

    .detail-card,
    .side-card {
        padding: 18px;
    }

    .side-list .movie-card {
        grid-template-columns: 92px 1fr;
    }
}
