:root {
    color-scheme: dark;
    --bg: #070b14;
    --bg-soft: #0f172a;
    --bg-card: rgba(31, 41, 55, 0.62);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(249, 115, 22, 0.32);
    --text: #f9fafb;
    --muted: #cbd5e1;
    --muted-dark: #94a3b8;
    --orange: #f97316;
    --orange-soft: #fb923c;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --radius: 1.25rem;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 32rem),
        linear-gradient(180deg, #111827 0%, #070b14 44%, #050712 100%);
    color: var(--text);
    line-height: 1.65;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(75, 85, 99, 0.45);
    background: rgba(7, 11, 20, 0.86);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--orange-soft), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, var(--orange), var(--cyan-deep));
    color: #fff;
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
    font-size: 0.82rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted);
}

.site-nav > a,
.nav-dropdown > button {
    position: relative;
    border: 0;
    padding: 8px 0;
    background: transparent;
    color: var(--muted);
    transition: color 0.2s ease;
}

.site-nav > a:hover,
.nav-dropdown > button:hover,
.site-nav > a.is-active {
    color: var(--orange-soft);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 14px);
    display: grid;
    gap: 10px;
    min-width: 180px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-panel a {
    color: var(--muted);
}

.nav-dropdown-panel a:hover {
    color: var(--cyan);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    padding: 8px 14px;
    color: var(--text);
    background: rgba(31, 41, 55, 0.65);
}

.hero-carousel {
    position: relative;
    min-height: clamp(620px, 82vh, 840px);
    overflow: hidden;
    border-bottom: 1px solid rgba(75, 85, 99, 0.32);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.06);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 11, 20, 0.96) 0%, rgba(7, 11, 20, 0.72) 42%, rgba(7, 11, 20, 0.35) 100%),
        linear-gradient(180deg, rgba(7, 11, 20, 0.28) 0%, rgba(7, 11, 20, 0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 112px 0 96px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    border: 1px solid rgba(249, 115, 22, 0.35);
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--orange-soft);
    background: rgba(249, 115, 22, 0.08);
    font-size: 0.83rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.02;
    background: linear-gradient(90deg, #fff, #fed7aa 42%, #67e8f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content h1,
.hero-content h2 {
    font-size: clamp(2.5rem, 7vw, 5.6rem);
}

.hero-title {
    margin: 18px 0 0;
    color: #fff7ed;
    font-size: clamp(1.22rem, 2.4vw, 1.75rem);
    font-weight: 800;
}

.hero-summary {
    max-width: 660px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.64);
    font-size: 0.86rem;
}

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

.primary-btn,
.secondary-btn,
.filter-form button,
.outline-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.filter-form button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--cyan-deep));
    box-shadow: 0 16px 42px rgba(249, 115, 22, 0.28);
}

.secondary-btn,
.outline-link {
    border: 1px solid rgba(148, 163, 184, 0.32);
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
}

.primary-btn:hover,
.secondary-btn:hover,
.filter-form button:hover,
.outline-link:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, 0.56);
    box-shadow: 0 20px 48px rgba(249, 115, 22, 0.22);
}

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

.hero-controls button,
.hero-dots button {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.58);
    color: #fff;
    backdrop-filter: blur(12px);
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 1.75rem;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: max(16px, calc((100% - 1180px) / 2));
    bottom: 52px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 42px;
    height: 5px;
    border-radius: 999px;
    padding: 0;
    opacity: 0.55;
}

.hero-dots button.is-active {
    opacity: 1;
    background: linear-gradient(90deg, var(--orange), var(--cyan));
}

.quick-search {
    position: relative;
    z-index: 5;
    margin-top: -36px;
}

.quick-search form,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.quick-search form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px;
}

.quick-search input,
.filter-form input,
.filter-form select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    outline: none;
    padding: 13px 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
}

.quick-search button {
    border: 0;
    border-radius: 999px;
    padding: 0 24px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--orange), var(--cyan-deep));
}

.section-block,
.page-shell {
    margin-top: 56px;
}

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

.section-heading h2,
.content-card h2,
.site-footer h2 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2.15rem);
    line-height: 1.1;
}

.section-heading a {
    color: var(--orange-soft);
    font-weight: 800;
}

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

.category-card,
.category-overview-card,
.content-card,
.ranking-panel,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(34, 211, 238, 0.05)),
        var(--bg-card);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.category-card,
.category-overview-card {
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.5);
}

.category-card span,
.category-overview-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 900;
}

.category-card p,
.category-overview-card p,
.site-footer p {
    margin: 10px 0 0;
    color: var(--muted-dark);
}

.category-sample-links {
    display: grid;
    gap: 8px;
    margin: 18px 0;
}

.category-sample-links a {
    color: var(--muted);
}

.category-sample-links a:hover {
    color: var(--cyan);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: 0 24px 62px rgba(0, 0, 0, 0.32);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

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

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

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.year-badge {
    right: 10px;
    bottom: 10px;
    background: rgba(15, 23, 42, 0.76);
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, var(--orange), var(--cyan-deep));
}

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

.meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted-dark);
    font-size: 0.78rem;
}

.movie-card h2 {
    margin: 10px 0 8px;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.35;
}

.movie-card h2 a:hover {
    color: var(--orange-soft);
}

.card-text {
    display: -webkit-box;
    min-height: 3.3em;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.92rem;
}

.card-text.compact {
    min-height: 2.8em;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.tag-row span {
    font-size: 0.75rem;
    padding: 3px 8px;
}

.two-column-block {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
    gap: 24px;
}

.ranking-panel {
    align-self: start;
    padding: 22px;
    position: sticky;
    top: 96px;
}

.compact-heading {
    margin-bottom: 18px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: auto 54px 1fr;
    grid-template-areas:
        "rank img title"
        "rank img meta";
    align-items: center;
    gap: 6px 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1rem;
    padding: 9px;
    background: rgba(2, 6, 23, 0.34);
}

.ranking-row:hover {
    border-color: rgba(34, 211, 238, 0.45);
}

.list-rank {
    grid-area: rank;
    min-width: 30px;
    color: var(--orange-soft);
    font-weight: 900;
    text-align: center;
}

.ranking-row img {
    grid-area: img;
    width: 54px;
    height: 72px;
    border-radius: 0.7rem;
    object-fit: cover;
}

.ranking-title {
    grid-area: title;
    color: #fff;
    font-weight: 800;
}

.ranking-meta {
    grid-area: meta;
    color: var(--muted-dark);
    font-size: 0.82rem;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 0.45rem);
    padding: clamp(34px, 6vw, 70px);
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.16), transparent 24rem),
        radial-gradient(circle at 0% 0%, rgba(249, 115, 22, 0.22), transparent 22rem),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.page-hero h1,
.detail-copy h1 {
    font-size: clamp(2rem, 5vw, 4.3rem);
}

.page-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.filter-panel {
    margin: 24px 0;
    padding: 14px;
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(140px, 160px) auto;
    gap: 12px;
}

.filter-form button {
    min-height: 48px;
}

.filter-empty {
    margin: 12px 0 0;
    color: var(--orange-soft);
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted-dark);
    font-size: 0.92rem;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 360px);
    gap: 28px;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 0.45rem);
    padding: clamp(24px, 4vw, 42px);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 28rem),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.detail-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-tags {
    margin-top: 22px;
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.4);
}

.player-section {
    margin-top: 28px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: calc(var(--radius) + 0.35rem);
    background: #000;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    aspect-ratio: 16 / 9;
}

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 0;
    padding: 0;
    background: #000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: blur(1px) saturate(1.05);
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.18), rgba(2, 6, 23, 0.72));
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-ring {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    width: clamp(74px, 12vw, 108px);
    height: clamp(74px, 12vw, 108px);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.88), rgba(8, 145, 178, 0.86));
    box-shadow: 0 22px 70px rgba(249, 115, 22, 0.34);
}

.play-ring span {
    transform: translateX(3px);
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 24px;
    margin-top: 28px;
}

.detail-main,
.detail-side {
    display: grid;
    gap: 20px;
    align-content: start;
}

.content-card {
    padding: clamp(22px, 3vw, 32px);
}

.content-card p {
    margin: 14px 0 0;
    color: var(--muted);
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding-bottom: 10px;
}

.info-list dt {
    color: var(--muted-dark);
}

.info-list dd {
    margin: 0;
    color: #fff;
    text-align: right;
}

.info-list a,
.side-links a {
    color: var(--cyan);
}

.side-links {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgba(75, 85, 99, 0.45);
    background: rgba(2, 6, 23, 0.78);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.site-footer h2 {
    margin-bottom: 14px;
    font-size: 1rem;
}

.site-footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a,
.footer-bottom {
    color: var(--muted-dark);
}

.site-footer a:hover {
    color: var(--orange-soft);
}

.footer-bottom {
    border-top: 1px solid rgba(75, 85, 99, 0.34);
    padding: 20px 0;
    font-size: 0.88rem;
    text-align: center;
}

[hidden] {
    display: none !important;
}

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

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

    .two-column-block,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }

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

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: fixed;
        inset: 72px 16px auto 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        padding: 18px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

    .nav-dropdown-panel {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        margin-top: 10px;
        box-shadow: none;
    }

    .hero-content {
        padding-top: 92px;
    }

    .hero-controls {
        right: 16px;
        bottom: 78px;
    }

    .hero-dots {
        left: 16px;
        bottom: 36px;
    }

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

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

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

    .detail-poster img {
        min-height: 0;
        max-height: 520px;
    }
}

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

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

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

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

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

    .ranking-row {
        grid-template-columns: auto 48px 1fr;
    }
}
