:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --panel-card: rgba(15, 23, 42, 0.82);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --red: #ef4444;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(245, 158, 11, 0.16), transparent 32rem),
        radial-gradient(circle at 82% 6%, rgba(59, 130, 246, 0.14), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

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

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.34);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

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

.main-nav a:hover,
.main-nav a.is-active {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.16);
    transform: translateY(-1px);
}

.nav-search {
    position: relative;
    width: 260px;
}

.nav-search input,
.inline-search input,
.big-search input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.26);
    outline: none;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.88);
    border-radius: 14px;
    padding: 12px 46px 12px 16px;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input:focus,
.inline-search input:focus,
.big-search input:focus {
    border-color: rgba(245, 158, 11, 0.82);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
    background: rgba(15, 23, 42, 0.96);
}

.nav-search button {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    color: var(--text);
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.18);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.86);
    border-radius: 14px;
    cursor: pointer;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, #020617 0%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(720px, calc(100% - 32px));
    margin-left: max(24px, calc((100vw - 1280px) / 2));
    padding-top: 50px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 16px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 660px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.filter-chip-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(245, 158, 11, 0.24);
    color: #fed7aa;
    background: rgba(245, 158, 11, 0.11);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    line-height: 1;
}

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

.primary-btn,
.ghost-btn,
.big-search button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn,
.big-search button {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 20px 44px rgba(245, 158, 11, 0.34);
    padding: 14px 22px;
}

.ghost-btn {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid rgba(226, 232, 240, 0.18);
    padding: 13px 20px;
}

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

.hero-panel {
    position: absolute;
    z-index: 4;
    right: max(24px, calc((100vw - 1280px) / 2));
    bottom: 46px;
    width: min(520px, calc(100% - 48px));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hero-dot {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 18px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(16px);
    padding: 10px;
    cursor: pointer;
    text-align: left;
}

.hero-dot span {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    background-color: rgba(148, 163, 184, 0.14);
}

.hero-dot strong {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
    line-height: 1.35;
}

.hero-dot.is-active {
    border-color: rgba(245, 158, 11, 0.72);
    color: #ffffff;
    background: rgba(245, 158, 11, 0.17);
}

.quick-search-section,
.content-section,
.page-main,
.site-footer {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search-section {
    padding: 70px 0 34px;
}

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

.section-head.center {
    display: block;
    text-align: center;
    max-width: 820px;
    margin: 0 auto 28px;
}

.section-head.compact {
    align-items: center;
    margin-bottom: 18px;
}

.section-head h2,
.page-hero h1,
.detail-copy h1 {
    margin: 8px 0 0;
    letter-spacing: -0.04em;
}

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

.section-head p,
.page-hero p {
    color: var(--muted);
    line-height: 1.8;
}

.section-head a,
.text-link {
    color: #fbbf24;
}

.big-search {
    display: flex;
    gap: 12px;
    max-width: 820px;
    margin: 0 auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow);
}

.big-search input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 16px 18px;
}

.big-search button {
    padding: 0 24px;
}

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

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

.category-tile,
.category-hero-link {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: end;
    border: 1px solid rgba(226, 232, 240, 0.14);
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    padding: 22px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    transition: transform 0.24s ease, border 0.24s ease;
}

.category-tile:hover,
.category-hero-link:hover {
    border-color: rgba(245, 158, 11, 0.64);
    transform: translateY(-4px);
}

.category-tile strong,
.category-hero-link h2 {
    margin: 0;
    font-size: 24px;
}

.category-tile em,
.category-hero-link p {
    margin-top: 9px;
    color: var(--muted-strong);
    font-style: normal;
    line-height: 1.6;
}

.tile-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 14px;
    color: #fde68a;
    font-size: 13px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 20px;
    background: var(--panel-card);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.52);
    background: rgba(15, 23, 42, 0.96);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(120, 53, 15, 0.38));
}

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

.movie-card:hover .poster img {
    transform: scale(1.06);
    opacity: 0.86;
}

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.poster-badge {
    top: 10px;
    left: 10px;
    padding: 6px 9px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #111827;
    background: rgba(251, 191, 36, 0.92);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
}

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

.movie-meta {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card h3 {
    margin: 0;
    min-height: 46px;
    font-size: 16px;
    line-height: 1.45;
}

.movie-card h3 a:hover,
.ranking-card h2 a:hover {
    color: #fbbf24;
}

.movie-desc {
    min-height: 62px;
    margin: 8px 0 12px;
    color: var(--muted-strong);
    font-size: 13px;
    line-height: 1.58;
}

.tag-row span {
    padding: 6px 9px;
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(148, 163, 184, 0.1);
}

.rank-box,
.content-card,
.video-shell,
.detail-hero,
.category-overview-block {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.66);
    box-shadow: var(--shadow);
}

.rank-box {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 32px 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.32);
    padding: 10px;
    transition: transform 0.2s ease, border 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.48);
}

.rank-num {
    color: #fbbf24;
    font-weight: 900;
}

.rank-cover {
    width: 58px;
    height: 76px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    background-color: rgba(148, 163, 184, 0.12);
}

.rank-text strong,
.rank-text em {
    display: block;
}

.rank-text strong {
    line-height: 1.45;
}

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

.page-main {
    padding: 32px 0 70px;
}

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

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

.page-hero {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 82% 8%, rgba(245, 158, 11, 0.25), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.88));
    padding: clamp(32px, 6vw, 68px);
    box-shadow: var(--shadow);
}

.small-hero {
    margin-bottom: 34px;
}

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

.inline-search {
    width: min(640px, 100%);
    margin-top: 24px;
}

.large-inline-search {
    width: min(860px, 100%);
}

.filter-chip-row {
    margin-top: 20px;
}

.filter-chip {
    cursor: pointer;
}

.filter-chip:hover {
    color: #111827;
    background: #fbbf24;
}

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

.overview-stack {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.category-overview-block {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
}

.category-hero-link {
    min-height: 100%;
}

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

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

.ranking-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 18px;
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.76);
    padding: 14px;
}

.ranking-cover {
    position: relative;
    min-height: 152px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    background-color: rgba(148, 163, 184, 0.14);
}

.ranking-cover span {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #111827;
    background: #fbbf24;
    font-weight: 900;
}

.ranking-card h2 {
    margin: 4px 0 8px;
    font-size: 20px;
}

.ranking-card p {
    color: var(--muted-strong);
    line-height: 1.7;
}

.detail-main {
    max-width: 1180px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    padding: 28px;
    background:
        radial-gradient(circle at 92% 8%, rgba(245, 158, 11, 0.22), transparent 26rem),
        rgba(15, 23, 42, 0.76);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(120, 53, 15, 0.38));
    box-shadow: 0 28px 66px rgba(0, 0, 0, 0.44);
}

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

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

.detail-one-line {
    max-width: 760px;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.detail-meta-grid span {
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.26);
    padding: 14px;
    color: #ffffff;
}

.detail-meta-grid strong {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

.detail-tags {
    margin-bottom: 24px;
}

.player-section,
.detail-text {
    margin-top: 34px;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.22), transparent 20rem),
        rgba(2, 6, 23, 0.36);
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 24px 54px rgba(245, 158, 11, 0.38);
    font-size: 28px;
}

.play-overlay strong {
    font-size: 18px;
}

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

.player-status {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    margin: 0;
    border-radius: 14px;
    color: #fee2e2;
    background: rgba(127, 29, 29, 0.78);
    padding: 12px 14px;
}

.content-card {
    padding: 28px;
}

.content-card h2 {
    margin-top: 0;
    font-size: 28px;
}

.content-card p {
    color: var(--muted-strong);
    font-size: 16px;
    line-height: 2;
}

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

.site-footer {
    padding: 54px 0 34px;
    border-top: 1px solid var(--line);
}

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

.site-footer h3 {
    margin: 0 0 14px;
}

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

.site-footer a {
    display: block;
    margin: 6px 0;
}

.site-footer a:hover {
    color: #fbbf24;
}

.footer-bottom {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 13px;
}

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

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

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

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

    .rank-box {
        position: static;
    }
}

@media (max-width: 860px) {
    .nav-shell {
        min-height: 64px;
    }

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

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

    .main-nav a {
        padding: 13px 15px;
    }

    .nav-search {
        display: none;
    }

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

    .hero-carousel {
        min-height: 760px;
    }

    .hero-content {
        margin: 0 auto;
        padding-top: 88px;
    }

    .hero-panel {
        left: 16px;
        right: 16px;
        bottom: 28px;
        width: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-grid,
    .movie-grid,
    .category-movie-grid,
    .mini-grid,
    .related-grid,
    .ranking-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .big-search {
        flex-direction: column;
    }

    .big-search button {
        min-height: 48px;
    }

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

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

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

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

@media (max-width: 560px) {
    .logo {
        font-size: 17px;
    }

    .hero-content h1,
    .detail-copy h1,
    .page-hero h1 {
        letter-spacing: -0.035em;
    }

    .hero-panel,
    .category-grid,
    .movie-grid,
    .category-movie-grid,
    .mini-grid,
    .related-grid,
    .ranking-list {
        grid-template-columns: 1fr;
    }

    .hero-dot:nth-child(n + 4) {
        display: none;
    }

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

    .ranking-cover {
        min-height: 128px;
    }
}
