:root {
    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --red-600: #dc2626;
    --pink-700: #be185d;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
    --soft-shadow: 0 12px 34px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--slate-900);
    background: #f8fafc;
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--red-600), var(--rose-600), var(--pink-700));
    box-shadow: 0 12px 30px rgba(190, 24, 93, 0.32);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

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

.brand-text strong {
    font-size: 20px;
    line-height: 1.1;
}

.brand-text em {
    font-style: normal;
    font-size: 12px;
    color: #ffe4e6;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #fff;
    font-weight: 600;
}

.desktop-nav a {
    opacity: 0.92;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: #ffe4e6;
    opacity: 1;
    border-color: #ffe4e6;
}

.mobile-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    width: 42px;
    height: 42px;
}

.mobile-nav {
    display: none;
    padding: 0 22px 16px;
    background: rgba(127, 29, 29, 0.28);
}

.mobile-nav a {
    display: block;
    color: #fff;
    padding: 10px 0;
}

.mobile-nav.open {
    display: block;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: var(--slate-950);
}

.hero-slides {
    position: relative;
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    gap: 48px;
    align-items: center;
    max-width: 1240px;
    margin: 0 auto;
    padding: 86px 22px 140px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.18);
    transform: scale(1.08);
    opacity: 0.55;
}

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 18%, rgba(244, 63, 94, 0.36), transparent 35%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.78) 48%, rgba(136, 19, 55, 0.62));
}

.hero-content {
    position: relative;
    color: #fff;
    z-index: 2;
}

.eyebrow,
.section-heading span,
.panel-title span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fb7185;
    background: rgba(255, 228, 230, 0.14);
    border: 1px solid rgba(251, 113, 133, 0.32);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 22px 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    max-width: 780px;
}

.hero-content p {
    max-width: 680px;
    margin: 0;
    font-size: 19px;
    color: #ffe4e6;
}

.hero-tags,
.card-tags,
.side-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

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

.hero-tags span,
.card-tags span,
.side-tags span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    padding: 6px 12px;
    font-size: 13px;
}

.card-tags span,
.side-tags span {
    color: var(--rose-600);
    background: var(--rose-50);
}

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

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

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--rose-500), var(--red-600));
    box-shadow: 0 16px 36px rgba(225, 29, 72, 0.34);
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.primary-btn:hover,
.ghost-btn:hover,
.panel-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    z-index: 2;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster img {
    height: 560px;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 38px;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-controls button {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 999px;
    padding: 0;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.active {
    width: 30px;
    background: #fff;
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 94px;
    z-index: 6;
    transform: translateX(-50%);
    width: min(740px, calc(100% - 36px));
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-search input,
.inline-filter input,
.inline-filter select {
    border: 0;
    outline: none;
    border-radius: 999px;
    min-height: 46px;
    padding: 0 18px;
    background: #fff;
    color: var(--slate-800);
}

.hero-search input {
    flex: 1;
}

.hero-search button {
    border: 0;
    border-radius: 999px;
    padding: 0 24px;
    background: linear-gradient(135deg, var(--rose-500), var(--red-600));
    color: #fff;
    font-weight: 800;
}

.hero-category-links {
    position: absolute;
    left: 50%;
    bottom: 13px;
    transform: translateX(-50%);
    z-index: 6;
    width: min(980px, calc(100% - 36px));
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-category-links a {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
}

.section-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 22px;
}

.soft-bg {
    max-width: none;
    background: #fff;
}

.soft-bg > * {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

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

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

.section-heading h2,
.panel-title h2,
.page-hero h1 {
    margin: 12px 0 8px;
    color: var(--slate-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-heading p,
.page-hero p {
    margin: 0;
    color: var(--slate-600);
}

.movie-grid {
    display: grid;
    gap: 24px;
}

.featured-grid,
.library-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.movie-card {
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fecdd3, #f43f5e);
}

.poster-wrap img {
    height: 318px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.year-badge,
.play-mark {
    position: absolute;
    z-index: 2;
}

.year-badge {
    top: 12px;
    right: 12px;
    color: #fff;
    background: var(--rose-500);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 13px;
    font-weight: 800;
}

.play-mark {
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%) scale(0.82);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: var(--rose-600);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--slate-600);
    font-size: 13px;
}

.movie-card h3 {
    margin: 9px 0 8px;
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p {
    margin: 0 0 13px;
    color: var(--slate-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card.compact {
    display: flex;
}

.movie-card.compact a {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    width: 100%;
}

.movie-card.compact .poster-wrap img {
    height: 100%;
    min-height: 190px;
}

.movie-card.compact .year-badge {
    display: none;
}

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

.category-tile,
.overview-card a {
    position: relative;
    display: block;
    min-height: 220px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    background: var(--slate-900);
}

.category-tile img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.82));
}

.category-tile span,
.category-tile strong {
    position: relative;
    z-index: 2;
    display: block;
    color: #fff;
    padding: 0 20px;
}

.category-tile span {
    padding-top: 138px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #ffe4e6;
}

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

.ranking-panel,
.side-card,
.player-card,
.detail-block {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--soft-shadow);
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.ranking-panel ol,
.rank-page-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rank-row a {
    display: grid;
    grid-template-columns: 44px 58px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.rank-number {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--rose-500), var(--red-600));
    color: #fff;
    font-weight: 900;
}

.rank-row img {
    width: 58px;
    height: 74px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--rose-100);
}

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

.rank-info strong {
    color: var(--slate-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    color: var(--slate-600);
    font-style: normal;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-action {
    color: var(--rose-600);
    font-weight: 800;
    font-size: 13px;
}

.panel-link {
    width: 100%;
    margin-top: 18px;
    color: #fff;
    background: var(--slate-900);
}

.page-hero {
    text-align: center;
    padding: 76px 22px;
    color: var(--slate-900);
    background:
        radial-gradient(circle at 30% 15%, rgba(244, 63, 94, 0.22), transparent 35%),
        linear-gradient(135deg, #fff, #fff1f2);
}

.page-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
}

.inline-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 760px;
    margin: 28px auto 0;
}

.inline-filter.wide {
    max-width: 960px;
}

.inline-filter input {
    min-width: 320px;
}

.inline-filter input,
.inline-filter select {
    box-shadow: var(--soft-shadow);
}

.overview-card a {
    min-height: auto;
    background: #fff;
}

.overview-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    height: 170px;
    background: var(--rose-100);
}

.overview-covers img {
    height: 170px;
    object-fit: cover;
}

.overview-body {
    padding: 22px;
}

.overview-body h2 {
    margin: 0 0 8px;
}

.overview-body p {
    margin: 0 0 16px;
    color: var(--slate-600);
}

.overview-body span {
    color: var(--rose-600);
    font-weight: 900;
}

.rank-page-wrap {
    max-width: 980px;
}

.rank-page-list .rank-row a {
    grid-template-columns: 56px 72px minmax(0, 1fr) auto;
    background: #fff;
    margin-bottom: 12px;
    border: 0;
    border-radius: 20px;
    padding: 14px 18px;
    box-shadow: var(--soft-shadow);
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--slate-950);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 22px 72px;
    color: #fff;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    color: #ffe4e6;
    margin-bottom: 36px;
    font-size: 14px;
}

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

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

.detail-cover {
    height: 456px;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.detail-intro h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
}

.detail-intro p {
    color: #ffe4e6;
    font-size: 18px;
    max-width: 760px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 0;
}

.detail-meta span {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 7px 12px;
    color: #fff;
}

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

.main-detail {
    display: grid;
    gap: 24px;
}

.player-card {
    overflow: hidden;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.65;
}

.player-cover span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--rose-600);
    font-size: 34px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.player-cover.is-hidden {
    display: none;
}

.player-title {
    padding: 22px 24px 26px;
}

.player-title h2,
.detail-block h2,
.side-card h2 {
    margin: 0 0 10px;
    color: var(--slate-900);
}

.player-title p,
.detail-block p {
    margin: 0;
    color: var(--slate-600);
}

.detail-block {
    padding: 26px;
}

.detail-block p {
    font-size: 16px;
}

.detail-side {
    display: grid;
    gap: 20px;
    position: sticky;
    top: 96px;
}

.side-card {
    padding: 22px;
}

.side-card dl {
    margin: 0;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px 12px;
}

.side-card dt {
    color: var(--slate-600);
}

.side-card dd {
    margin: 0;
    color: var(--slate-900);
    font-weight: 700;
}

.empty-state {
    display: none;
    text-align: center;
    color: var(--slate-600);
    padding: 44px;
}

.empty-state.show {
    display: block;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 52px 22px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

.footer-logo {
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 12px;
}

.footer-inner p {
    margin: 0;
    color: #94a3b8;
}

.footer-inner h3 {
    color: #fff;
    margin: 0 0 14px;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
    padding: 18px 22px;
    color: #94a3b8;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .featured-grid,
    .library-grid,
    .category-grid,
    .overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .split-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

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

    .mobile-toggle {
        display: block;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 52px;
        padding-bottom: 210px;
    }

    .hero-poster {
        max-width: 270px;
        transform: none;
    }

    .hero-poster img {
        height: 360px;
    }

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

    .hero-search {
        bottom: 112px;
        border-radius: 24px;
        flex-direction: column;
    }

    .hero-search button {
        min-height: 46px;
    }

    .hero-category-links {
        bottom: 18px;
    }

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

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

    .detail-cover {
        width: min(320px, 100%);
        height: 430px;
    }

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

@media (max-width: 560px) {
    .header-inner {
        padding: 12px 16px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .section-wrap {
        padding: 48px 16px;
    }

    .featured-grid,
    .latest-grid,
    .library-grid,
    .related-grid,
    .category-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .movie-card.compact a {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .poster-wrap img {
        height: 360px;
    }

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

    .inline-filter input {
        min-width: 0;
        width: 100%;
    }

    .rank-row a,
    .rank-page-list .rank-row a {
        grid-template-columns: 42px 56px minmax(0, 1fr);
    }

    .rank-action {
        display: none;
    }

    .player-cover span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
