:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.72);
    --bg-card-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(250, 204, 21, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --yellow: #facc15;
    --amber: #f59e0b;
    --blue: #1d4ed8;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(250, 204, 21, 0.16), transparent 28rem),
        radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.26), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #0f1f45 48%, #020617 100%);
    line-height: 1.6;
}

body.is-menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    color: #111827;
    background: linear-gradient(135deg, var(--yellow), var(--amber));
    box-shadow: 0 10px 35px rgba(250, 204, 21, 0.28);
}

.brand-name {
    font-size: 22px;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--yellow);
    background: rgba(250, 204, 21, 0.08);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.66);
}

.header-search input {
    width: 220px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    padding: 6px 8px 6px 14px;
}

.header-search input::placeholder {
    color: #64748b;
}

.header-search button,
.primary-button,
.ghost-button,
.section-link,
.quick-actions a,
.filter-bar button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.22s ease;
}

.header-search button,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    color: #111827;
    background: linear-gradient(135deg, var(--yellow), var(--amber));
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.22);
}

.header-search button:hover,
.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(245, 158, 11, 0.33);
}

.ghost-button,
.section-link,
.quick-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    color: var(--yellow);
    border: 1px solid rgba(250, 204, 21, 0.28);
    background: rgba(250, 204, 21, 0.08);
}

.ghost-button:hover,
.section-link:hover,
.quick-actions a:hover {
    border-color: rgba(250, 204, 21, 0.55);
    background: rgba(250, 204, 21, 0.16);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    flex: none;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.78);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--text);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 44px;
    align-items: center;
    padding: 100px max(32px, calc((100vw - 1200px) / 2)) 86px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.68), rgba(2, 6, 23, 0.96)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-content {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--yellow);
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    max-width: 960px;
    font-size: clamp(34px, 6vw, 70px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero h2 {
    margin: 24px 0 12px;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.12;
}

.hero-summary,
.page-hero p,
.detail-one-line,
.intro-section p,
.section-heading p,
.rank-layout p {
    color: var(--muted-strong);
    font-size: 18px;
}

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

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(250, 204, 21, 0.22);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.7);
    box-shadow: var(--shadow);
}

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

.hero-poster span,
.play-dot,
.detail-cover span {
    position: absolute;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--yellow), var(--amber));
    box-shadow: 0 20px 48px rgba(245, 158, 11, 0.32);
}

.hero-poster span {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.hero-poster:hover img {
    transform: scale(1.08);
}

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

.hero-dots button {
    width: 38px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.is-active {
    background: var(--yellow);
}

.section {
    padding: 76px 0;
}

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

.section-heading h2,
.intro-grid h2,
.rank-layout h2,
.detail-article h2,
.detail-side h2,
.category-block-head h2,
.sticky-panel h2 {
    margin: 0 0 10px;
    font-size: clamp(26px, 3.2vw, 40px);
    line-height: 1.14;
    letter-spacing: -0.04em;
}

.with-link,
.category-block-head,
.with-filter {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.intro-section {
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.38);
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    align-items: center;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

.category-chip {
    position: relative;
    display: flex;
    min-height: 154px;
    overflow: hidden;
    align-items: flex-end;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.52));
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
    transition: 0.22s ease;
}

.category-chip::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.12), transparent 60%);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.category-chip:hover {
    transform: translateY(-5px);
    border-color: rgba(250, 204, 21, 0.48);
    box-shadow: 0 26px 70px rgba(245, 158, 11, 0.12);
}

.category-chip:hover::after {
    opacity: 1;
}

.category-chip img {
    position: absolute;
    inset: 0 0 0 auto;
    width: 52%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    mask-image: linear-gradient(90deg, transparent, #000);
}

.category-icon {
    position: absolute;
    top: 22px;
    left: 24px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: var(--yellow);
    background: rgba(250, 204, 21, 0.1);
}

.category-chip span:not(.category-icon) {
    position: relative;
    z-index: 1;
}

.category-chip strong {
    display: block;
    color: var(--text);
    font-size: 20px;
}

.category-chip small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 24px;
    background: var(--bg-card);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(250, 204, 21, 0.42);
    background: rgba(15, 23, 42, 0.94);
    box-shadow: 0 28px 70px rgba(245, 158, 11, 0.12);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 11;
    background: #0f172a;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.78));
}

.play-dot {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition: 0.22s ease;
}

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

.card-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #111827;
    background: rgba(250, 204, 21, 0.95);
    font-size: 12px;
    font-weight: 900;
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

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

.movie-card p {
    min-height: 52px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.movie-meta {
    color: #64748b;
    font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #475569;
}

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

.tag-row span,
.side-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--yellow);
    background: rgba(250, 204, 21, 0.09);
    font-size: 12px;
    font-weight: 700;
}

.rank-section {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.42);
}

.rank-layout,
.rank-page-layout,
.detail-content-grid,
.detail-hero-grid {
    display: grid;
    gap: 32px;
}

.rank-layout {
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    align-items: start;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.rank-list.slim {
    grid-template-columns: 1fr;
}

.rank-card {
    display: grid;
    grid-template-columns: auto 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 92px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.68);
    transition: 0.22s ease;
}

.rank-card:hover {
    border-color: rgba(250, 204, 21, 0.38);
    background: rgba(30, 41, 59, 0.86);
}

.rank-card img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-card strong {
    display: block;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-card small {
    display: block;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--yellow), var(--amber));
    font-weight: 900;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 98px 0 78px;
    border-bottom: 1px solid var(--line);
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.96)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

.compact-hero {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(250, 204, 21, 0.14), transparent 34rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.36), rgba(2, 6, 23, 0.96));
}

.category-block {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.54);
}

.stacked-sections {
    display: grid;
    gap: 28px;
}

.inline-filter input,
.search-panel input {
    width: min(360px, 100%);
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.78);
    padding: 0 18px;
}

.search-panel {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.search-panel input {
    width: min(620px, 100%);
}

.search-panel button,
.filter-bar button {
    min-height: 44px;
    padding: 0 16px;
    color: var(--muted-strong);
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.64);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.filter-bar button.is-active,
.filter-bar button:hover,
.search-panel button:hover {
    color: #111827;
    border-color: transparent;
    background: linear-gradient(135deg, var(--yellow), var(--amber));
}

.rank-page-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
}

.sticky-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.74);
}

.movie-card-wide .movie-poster {
    aspect-ratio: 16 / 10;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    border-bottom: 1px solid var(--line);
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.74), rgba(2, 6, 23, 0.98)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

.detail-hero-grid {
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    align-items: center;
}

.detail-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(250, 204, 21, 0.22);
    border-radius: 30px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

.detail-cover span {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.breadcrumb {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
}

.breadcrumb a:hover,
.detail-table a:hover,
.side-tags a:hover {
    color: var(--yellow);
}

.player-section {
    padding-bottom: 30px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(250, 204, 21, 0.2);
    border-radius: 30px;
    background:
        linear-gradient(rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.75)),
        var(--poster-image);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(2, 6, 23, 0.92);
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    align-content: center;
    border: 0;
    color: var(--text);
    background: linear-gradient(rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.64));
}

.play-overlay.is-hidden {
    display: none;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--yellow), var(--amber));
    box-shadow: 0 24px 70px rgba(245, 158, 11, 0.34);
    font-size: 28px;
}

.play-overlay strong {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

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

.detail-article,
.detail-side {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.62);
}

.detail-article p {
    color: var(--muted-strong);
    font-size: 17px;
}

.detail-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.detail-table div {
    padding: 14px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.32);
}

.detail-table dt {
    color: #64748b;
    font-size: 13px;
}

.detail-table dd {
    margin: 4px 0 0;
    color: var(--text);
    font-weight: 800;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.2fr;
    gap: 38px;
    padding: 52px 0 34px;
}

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

.footer-grid h2 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 14px;
}

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

@media (max-width: 1060px) {
    .header-search input {
        width: 150px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: 760px;
    }

    .hero-poster {
        display: none;
    }

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

    .rank-page-layout,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        min-height: 66px;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .main-nav {
        position: fixed;
        inset: 66px 16px auto 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

    body.is-menu-open .main-nav {
        display: flex;
    }

    .nav-link {
        border-radius: 14px;
    }

    .header-search {
        display: none;
    }

    .hero {
        min-height: 680px;
    }

    .hero-slide {
        padding: 78px 20px 80px;
    }

    .hero-actions,
    .detail-actions,
    .search-panel,
    .with-link,
    .category-block-head,
    .with-filter,
    .intro-grid {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }

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

    .detail-hero-grid,
    .rank-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 320px;
    }
}

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

    .brand-name {
        font-size: 19px;
    }

    .section {
        padding: 54px 0;
    }

    .category-grid,
    .movie-grid,
    .movie-grid-small,
    .movie-grid-wide,
    .rank-list,
    .detail-table {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-hero {
        padding: 62px 0;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
