:root {
    --rose: #e11d48;
    --pink: #db2777;
    --orange: #f97316;
    --amber-soft: #fffbeb;
    --rose-soft: #fff1f2;
    --pink-soft: #fdf2f8;
    --ink: #111827;
    --muted: #6b7280;
    --line: rgba(17, 24, 39, 0.10);
    --shadow: 0 20px 45px rgba(190, 18, 60, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, var(--amber-soft), var(--rose-soft) 48%, var(--pink-soft));
    min-height: 100vh;
}

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

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

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: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(255, 241, 242, 0.96), rgba(253, 242, 248, 0.94));
    border-bottom: 1px solid rgba(225, 29, 72, 0.12);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.nav-shell {
    display: grid;
    grid-template-columns: auto 1fr minmax(240px, 320px);
    align-items: center;
    gap: 24px;
    padding: 16px 0;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 24px;
    background: linear-gradient(90deg, var(--rose), var(--pink), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: white;
    background: linear-gradient(135deg, var(--rose), var(--pink), var(--orange));
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(225, 29, 72, 0.25);
    font-size: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.nav-links a {
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--rose);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    border: 0;
    background: rgba(225, 29, 72, 0.08);
    color: var(--rose);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
}

.nav-search {
    position: relative;
}

.nav-search input,
.home-search-box input,
.catalog-tools input,
.catalog-tools select {
    width: 100%;
    border: 1px solid rgba(225, 29, 72, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    padding: 12px 18px;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.nav-search input:focus,
.home-search-box input:focus,
.catalog-tools input:focus,
.catalog-tools select:focus {
    border-color: rgba(225, 29, 72, 0.55);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.10);
}

.search-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 60;
    width: min(420px, calc(100vw - 32px));
    display: none;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(225, 29, 72, 0.15);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-search-box {
    position: relative;
}

.search-popover.is-open {
    display: grid;
    gap: 8px;
}

.search-result {
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.search-result:hover {
    background: #fff1f2;
}

.search-result img {
    width: 54px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
}

.search-result strong,
.search-result span {
    display: block;
}

.search-result span {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(90deg, #be123c, #db2777, #f97316);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg,
.detail-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.38) 45%, rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: relative;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 56px;
    color: white;
}

.hero-text h1 {
    margin: 14px 0 20px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.03;
    max-width: 760px;
}

.hero-text p {
    max-width: 720px;
    font-size: 20px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.90);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff7ed;
}

.eyebrow.dark {
    color: var(--rose);
}

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

.hero-tags span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: white;
    background: linear-gradient(90deg, var(--rose), var(--pink), var(--orange));
    box-shadow: 0 14px 28px rgba(225, 29, 72, 0.28);
}

.btn-ghost {
    color: white;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    display: block;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.hero-poster span,
.play-badge {
    position: absolute;
    inset: 0;
    margin: auto;
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    color: white;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.25);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);
}

.hero-controls button {
    border: 0;
    color: white;
    cursor: pointer;
}

.hero-controls > button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 26px;
    line-height: 1;
}

.hero-controls div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
    width: 28px;
    background: white;
}

.search-panel {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr minmax(260px, 380px);
    gap: 22px;
    margin-top: -50px;
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(225, 29, 72, 0.12);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2,
.section-head h2,
.ranking-panel h2,
.story-panel h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
}

.search-panel p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.quick-cats {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-cats a,
.tag,
.year-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.quick-cats a {
    padding: 10px 14px;
    color: #9f1239;
    background: #fff1f2;
}

.section {
    margin-top: 68px;
}

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

.section-head a {
    color: var(--rose);
    font-weight: 900;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
}

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(225, 29, 72, 0.10);
    box-shadow: 0 14px 35px rgba(17, 24, 39, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 52px rgba(225, 29, 72, 0.18);
}

.card-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #111827;
}

.movie-card-large .card-poster {
    aspect-ratio: 16 / 9;
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.06));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.play-badge {
    z-index: 2;
    width: 52px;
    height: 52px;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
    transform: scale(1.04);
}

.year-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    padding: 6px 10px;
    color: white;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 18px;
}

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

.card-body h3 a:hover,
.rank-card h2 a:hover {
    color: var(--rose);
}

.card-body p {
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.65;
    min-height: 52px;
}

.card-meta {
    gap: 6px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 13px;
}

.card-meta span {
    padding: 5px 8px;
    border-radius: 8px;
    background: #f9fafb;
}

.tag-row {
    gap: 7px;
}

.tag {
    padding: 6px 9px;
    color: #9f1239;
    background: #fff1f2;
}

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: 24px;
    border-radius: 26px;
    color: white;
    background: linear-gradient(135deg, var(--rose), var(--pink), var(--orange));
    box-shadow: 0 18px 42px rgba(225, 29, 72, 0.22);
}

.category-tile::after,
.category-card::after {
    content: "";
    position: absolute;
    right: -50px;
    bottom: -50px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.category-tile span,
.category-card h2 {
    display: block;
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile p,
.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
}

.category-card b,
.category-icon {
    position: relative;
    z-index: 1;
}

.category-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.20);
}

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

.ranking-panel,
.story-panel,
.catalog-tools,
.rank-card {
    border: 1px solid rgba(225, 29, 72, 0.12);
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(12px);
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
    border-radius: 26px;
}

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

.compact-item {
    display: grid;
    grid-template-columns: 30px 82px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.compact-item:hover {
    background: #fff1f2;
}

.compact-item img {
    width: 82px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-item strong,
.compact-item em {
    display: block;
}

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

.rank-num {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    color: white;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    font-weight: 900;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: white;
    background: linear-gradient(120deg, #9f1239, #db2777, #f97316);
}

.page-hero {
    padding: 90px 0;
}

.page-hero h1 {
    max-width: 860px;
    margin: 14px 0 16px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.12;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.90);
}

.catalog-tools {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 24px;
}

.empty-state {
    display: none;
    padding: 28px;
    text-align: center;
    color: var(--muted);
}

.empty-state.is-open {
    display: block;
}

.ranking-page {
    max-width: 980px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 62px 180px 1fr;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 24px;
}

.rank-num.big {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    font-size: 20px;
}

.rank-cover img {
    width: 180px;
    height: 110px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.rank-card p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.7;
}

.detail-hero {
    min-height: 560px;
}

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

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.18));
}

.detail-head {
    position: relative;
    padding: 48px 0 62px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.82);
}

.breadcrumb a:hover {
    color: white;
}

.detail-grid {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
}

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

.detail-intro h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.07;
}

.detail-intro p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.90);
    font-size: 19px;
    line-height: 1.85;
}

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

.big-tags .tag {
    color: white;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #050505;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.25);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #050505;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(225, 29, 72, 0.18), rgba(0, 0, 0, 0.42));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose), var(--pink), var(--orange));
    box-shadow: 0 22px 52px rgba(225, 29, 72, 0.38);
    font-size: 30px;
}

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

.story-panel {
    padding: 32px;
    border-radius: 28px;
}

.story-panel h2 {
    margin: 0 0 16px;
}

.story-panel h2:not(:first-child) {
    margin-top: 34px;
}

.story-panel p {
    color: #374151;
    font-size: 17px;
    line-height: 1.95;
}

.site-footer {
    margin-top: 80px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 34px;
    padding: 48px 0;
}

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

.site-footer p {
    color: #9ca3af;
    line-height: 1.75;
}

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

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

.copyright {
    padding: 18px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
}

@media (max-width: 980px) {
    .nav-shell {
        grid-template-columns: auto auto;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
        justify-self: end;
    }

    .nav-links,
    .nav-search {
        grid-column: 1 / -1;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.86);
    }

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

    .nav-links a {
        padding: 12px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 72px 0;
    }

    .hero-poster {
        display: none;
    }

    .search-panel,
    .split-section,
    .catalog-tools,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

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

    .hero-carousel {
        height: 620px;
    }

    .hero-text h1 {
        font-size: 40px;
    }

    .hero-text p,
    .detail-intro p,
    .page-hero p {
        font-size: 16px;
    }

    .search-panel,
    .story-panel,
    .ranking-panel {
        padding: 20px;
        border-radius: 22px;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }

    .card-body {
        padding: 14px;
    }

    .card-body h3 {
        font-size: 16px;
    }

    .rank-card {
        grid-template-columns: 44px 1fr;
    }

    .rank-cover {
        grid-column: 1 / -1;
    }

    .rank-cover img {
        width: 100%;
        height: 180px;
    }

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