:root {
    --bg: #f8fafc;
    --bg-soft: #eef6ff;
    --card: #ffffff;
    --text: #172033;
    --muted: #637083;
    --line: #e4ebf4;
    --blue: #2563eb;
    --blue-dark: #1e40af;
    --rose: #e11d48;
    --gold: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 12px 30px rgba(37, 99, 235, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(20px);
}

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

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

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--rose));
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}

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

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    color: var(--muted);
    border-radius: 999px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--blue);
    background: rgba(37, 99, 235, 0.09);
}

.header-search,
.mobile-search,
.hero-search,
.category-filter,
.search-page-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.category-filter input,
.search-page-form input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 16px;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.category-filter input:focus,
.search-page-form input:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search {
    width: 290px;
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-page-form button,
.primary-button,
.ghost-button,
.text-button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-page-form button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--rose));
    border-radius: 999px;
    padding: 11px 18px;
    box-shadow: var(--shadow-soft);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    padding: 11px 18px;
    backdrop-filter: blur(10px);
}

.text-button {
    color: var(--blue);
    background: rgba(37, 99, 235, 0.08);
    border-radius: 999px;
    padding: 10px 16px;
}

.menu-button {
    width: 44px;
    height: 44px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.08);
}

.menu-button span {
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--text);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 12px 16px 18px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

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

.hero {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    background: #0f172a;
}

.hero-track {
    position: relative;
    min-height: 720px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: center;
    gap: 56px;
    padding: 104px max(32px, calc((100vw - 1180px) / 2)) 150px;
    color: #ffffff;
    opacity: 0;
    transform: scale(1.01);
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 13, 27, 0.94), rgba(15, 23, 42, 0.66) 52%, rgba(15, 23, 42, 0.28)),
        var(--hero-image) center / cover no-repeat;
    filter: saturate(1.05);
    transform: scale(1.08);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, var(--bg), rgba(248, 250, 252, 0));
}

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

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 16px;
    padding: 7px 12px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.22);
    border: 1px solid rgba(147, 197, 253, 0.32);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero h2 {
    margin: 18px 0 10px;
    font-size: clamp(26px, 3.2vw, 46px);
    line-height: 1.1;
}

.hero p,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-style: normal;
}

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

.hero-poster {
    display: block;
    max-width: 430px;
    justify-self: end;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.hero-bottom {
    position: absolute;
    left: 50%;
    bottom: 48px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    transform: translateX(-50%);
}

.hero-search {
    width: min(520px, 100%);
    padding: 8px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(18px);
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 13px;
    height: 13px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

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

.soft-bg {
    background: linear-gradient(180deg, #ffffff, var(--bg-soft));
}

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

.section-heading.align-left {
    text-align: left;
}

.section-heading span,
.rank-panel-head span {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 14px;
    font-weight: 900;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 720px;
    margin: 12px auto 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-heading.align-left p {
    margin-left: 0;
}

.split-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    text-align: left;
}

.split-heading p {
    margin-left: 0;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: var(--text);
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: var(--shadow);
}

.card-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #dbeafe;
}

.card-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.compact-card .card-poster img {
    aspect-ratio: 16 / 10;
}

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

.card-year,
.card-play {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.76);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.card-year {
    right: 12px;
}

.card-play {
    left: 12px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translateY(0);
}

.card-content {
    display: grid;
    gap: 9px;
    padding: 18px;
}

.card-content strong {
    font-size: 18px;
    line-height: 1.25;
}

.card-content em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.card-desc {
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.card-content .tag-row span {
    color: var(--blue-dark);
    background: #dbeafe;
    border-color: transparent;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 24px;
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.82)),
        var(--category-image) center / cover no-repeat;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.category-card span {
    font-size: 24px;
    font-weight: 900;
}

.category-card strong {
    max-width: 92%;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    line-height: 1.65;
}

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

.rank-panel {
    position: sticky;
    top: 94px;
    display: grid;
    gap: 12px;
    padding: 24px;
    background: #111827;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.rank-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.rank-panel-head a {
    color: #bfdbfe;
    font-weight: 800;
}

.rank-mini {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    padding: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
}

.rank-mini span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #111827;
    background: #ffffff;
    border-radius: 12px;
    font-weight: 900;
}

.rank-mini strong,
.rank-mini em {
    grid-column: 2;
}

.rank-mini strong {
    line-height: 1.25;
}

.rank-mini em {
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    font-style: normal;
}

.page-hero,
.detail-hero {
    position: relative;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a 54%, #9f1239);
    overflow: hidden;
}

.page-hero::before,
.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.18), transparent 32%);
}

.slim-hero,
.category-hero {
    padding: 92px 0 68px;
}

.page-hero .container,
.detail-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.78);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

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

.category-filter {
    width: min(560px, 100%);
    margin-top: 26px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    min-height: 230px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.category-cover {
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: #ffffff;
    background:
        linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.86)),
        var(--category-image) center / cover no-repeat;
}

.category-cover span {
    font-size: 24px;
    font-weight: 900;
}

.category-overview-body {
    display: grid;
    align-content: center;
    gap: 14px;
    padding: 24px;
}

.category-overview-body h2 {
    margin: 0;
    font-size: 26px;
}

.category-overview-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-samples a {
    color: var(--blue-dark);
    background: #dbeafe;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 700;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 68px 116px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-number {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--rose));
    border-radius: 18px;
    font-weight: 900;
}

.rank-card img {
    width: 116px;
    height: 150px;
    object-fit: cover;
    border-radius: 18px;
}

.rank-info {
    display: grid;
    gap: 8px;
}

.rank-info strong {
    font-size: 21px;
}

.rank-info em,
.rank-info > span:not(.tag-row) {
    color: var(--muted);
    font-style: normal;
    line-height: 1.6;
}

.rank-info .tag-row span {
    color: var(--blue-dark);
    background: #dbeafe;
    border-color: transparent;
}

.search-page-form {
    width: min(700px, 100%);
    margin-top: 28px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.detail-hero {
    padding: 76px 0 70px;
    background:
        linear-gradient(90deg, rgba(7, 13, 27, 0.96), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.38)),
        var(--detail-image) center / cover no-repeat;
}

.detail-grid {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    width: 290px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

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

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

.detail-one-line {
    margin: 0;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 700;
}

.player-section {
    padding-bottom: 28px;
    background: #0f172a;
}

.movie-player {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 28px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.movie-player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.42);
    cursor: pointer;
    overflow: hidden;
}

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

.player-cover-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: blur(12px) brightness(0.45);
    transform: scale(1.08);
}

.play-toggle {
    position: relative;
    z-index: 1;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--rose));
    border-radius: 50%;
    font-weight: 900;
    box-shadow: 0 22px 60px rgba(225, 29, 72, 0.45);
}

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

.detail-article,
.detail-side-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.detail-article {
    padding: 34px;
}

.detail-article h2,
.detail-side-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.detail-article p {
    margin: 0 0 26px;
    color: #334155;
    line-height: 2;
    font-size: 17px;
}

.detail-article p:last-child {
    margin-bottom: 0;
}

.detail-side-card {
    position: sticky;
    top: 94px;
    padding: 26px;
}

.detail-side-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.detail-side-card dt {
    color: var(--muted);
    font-weight: 800;
}

.detail-side-card dd {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.site-footer {
    color: rgba(255, 255, 255, 0.76);
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 32px;
    padding: 54px 0 38px;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
}

.site-footer p {
    max-width: 460px;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

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

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

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

    .rank-panel,
    .detail-side-card {
        position: static;
    }
}

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

    .menu-button {
        display: flex;
        margin-left: auto;
    }

    .hero,
    .hero-track {
        min-height: 780px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 96px 20px 166px;
    }

    .hero-poster {
        max-width: 250px;
        justify-self: start;
        transform: rotate(0deg);
    }

    .hero-bottom {
        display: grid;
    }

    .hero-search,
    .search-page-form {
        border-radius: 28px;
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .detail-poster {
        width: min(260px, 100%);
    }

    .rank-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
    }

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

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

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

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

    .hero p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

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

    .split-heading {
        display: grid;
    }

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

    .detail-article {
        padding: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
}
