:root {
    --rose: #f43f5e;
    --rose-dark: #be123c;
    --orange: #fb923c;
    --amber: #fbbf24;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #f4d7dc;
    --paper: #ffffff;
    --soft: #fff7ed;
    --shadow: 0 24px 80px rgba(190, 18, 60, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(244, 63, 94, 0.10), transparent 34rem),
        radial-gradient(circle at top right, rgba(251, 146, 60, 0.12), transparent 30rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 36%, #fff7ed 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 247, 237, 0.92);
    border-bottom: 1px solid rgba(244, 63, 94, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 34px rgba(190, 18, 60, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    width: min(1200px, calc(100% - 2rem));
    height: 4.35rem;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 12px 28px rgba(244, 63, 94, 0.32);
}

.brand-text,
.footer-brand {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.desktop-nav a,
.mobile-nav a {
    font-weight: 700;
    color: #4b5563;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--rose);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 18rem;
    border: 1px solid rgba(244, 63, 94, 0.18);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(190, 18, 60, 0.08);
    overflow: hidden;
}

.header-search input,
.wide-search input {
    width: 100%;
    border: 0;
    outline: none;
    color: var(--ink);
    background: transparent;
}

.header-search input {
    padding: 0.72rem 0.85rem 0.72rem 1rem;
}

.header-search button,
.wide-search button,
.primary-button,
.ghost-button,
.clear-search,
.filter-button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button {
    margin-right: 0.28rem;
    padding: 0.48rem 0.85rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.mobile-menu-button {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 0.9rem;
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 0 0 1rem;
}

.hero-carousel {
    position: relative;
    min-height: 42rem;
    overflow: hidden;
    background: #111827;
}

.hero-track {
    position: relative;
    min-height: 42rem;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(17rem, 0.48fr);
    gap: 3rem;
    align-items: center;
    width: 100%;
    padding: 5rem max(2rem, calc((100vw - 1200px) / 2)) 4rem;
    opacity: 0;
    transform: scale(1.03);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.7s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.60), rgba(190, 18, 60, 0.45)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(1px);
    transform: scale(1.08);
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 30%, rgba(251, 146, 60, 0.32), transparent 22rem),
        linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.74));
}

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

.hero-copy {
    max-width: 46rem;
    color: #ffffff;
}

.eyebrow,
.section-heading span,
.page-hero > span {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 0.85rem;
    padding: 0.36rem 0.78rem;
    color: #fff1f2;
    font-size: 0.84rem;
    font-weight: 900;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 10px 22px rgba(244, 63, 94, 0.28);
}

.hero-copy h1 {
    max-width: 48rem;
    margin: 0 0 1rem;
    font-size: clamp(2.3rem, 5vw, 5.2rem);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.hero-copy h2 {
    margin: 0 0 0.85rem;
    color: #fed7aa;
    font-size: clamp(1.5rem, 2.4vw, 2.6rem);
}

.hero-copy p {
    max-width: 42rem;
    margin: 0 0 1.25rem;
    color: #ffedd5;
    font-size: 1.1rem;
    line-height: 1.85;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hero-tags span,
.tag-list span {
    padding: 0.34rem 0.72rem;
    color: #9f1239;
    font-size: 0.84rem;
    font-weight: 800;
    border-radius: 999px;
    background: #ffe4e6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0 1.35rem;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 16px 30px rgba(244, 63, 94, 0.30);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.46);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.header-search button:hover,
.wide-search button:hover,
.clear-search:hover,
.filter-button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    display: block;
    width: min(100%, 24rem);
    justify-self: end;
    aspect-ratio: 3 / 4;
    border: 8px solid rgba(255, 255, 255, 0.16);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 34px 88px rgba(0, 0, 0, 0.42);
}

.hero-poster img,
.category-tile img,
.category-card img,
.poster-wrap img,
.rank-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-prev,
.hero-next {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    color: #ffffff;
    font-size: 2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-dots {
    display: flex;
    gap: 0.55rem;
}

.hero-dot {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
}

.hero-dot.is-active {
    width: 2.2rem;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.section-block,
.detail-layout {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
}

.section-block {
    padding: 4.5rem 0 0;
}

.intro-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.55fr);
    gap: 2rem;
    align-items: end;
}

.section-heading {
    margin-bottom: 1.55rem;
}

.section-heading h2,
.page-hero h1,
.detail-content h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
    max-width: 46rem;
    margin: 0.85rem 0 0;
    color: var(--muted);
    line-height: 1.85;
}

.row-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.row-heading > a {
    flex: 0 0 auto;
    color: var(--rose);
    font-weight: 900;
}

.wide-search {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    border: 1px solid rgba(244, 63, 94, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 54px rgba(190, 18, 60, 0.12);
}

.wide-search input {
    min-height: 3.25rem;
    padding: 0 1rem;
    font-size: 1rem;
}

.wide-search button,
.clear-search {
    padding: 0 1.35rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.inline-filter {
    max-width: 48rem;
    margin-top: 1.3rem;
}

.category-grid,
.category-directory {
    display: grid;
    gap: 1rem;
}

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.4rem;
    background: #111827;
    box-shadow: 0 18px 44px rgba(190, 18, 60, 0.12);
    isolation: isolate;
}

.category-tile {
    min-height: 13rem;
}

.category-tile::after,
.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.92) 100%);
    z-index: 1;
}

.category-tile img,
.category-card img {
    position: absolute;
    inset: 0;
    transition: transform 0.45s ease;
}

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

.category-tile > span,
.category-card-body {
    position: absolute;
    inset: auto 1rem 1rem;
    z-index: 2;
    color: #ffffff;
}

.category-tile strong,
.category-card strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1.18rem;
}

.category-tile em,
.category-card em {
    display: -webkit-box;
    overflow: hidden;
    color: #ffedd5;
    font-size: 0.88rem;
    line-height: 1.55;
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(244, 63, 94, 0.12);
    border-radius: 1.25rem;
    background: var(--paper);
    box-shadow: 0 14px 34px rgba(190, 18, 60, 0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #ffe4e6, #ffedd5);
}

.poster-wrap img {
    transition: transform 0.45s ease;
}

.poster-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    padding: 0.28rem 0.64rem;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 10px 22px rgba(244, 63, 94, 0.28);
}

.movie-card-body {
    display: block;
    padding: 1rem;
}

.movie-card-body strong {
    display: block;
    overflow: hidden;
    margin-bottom: 0.45rem;
    font-size: 1.04rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.movie-card-body em {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.8rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.movie-meta span {
    padding: 0.24rem 0.5rem;
    color: #9f1239;
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: 999px;
    background: #fff1f2;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 2rem;
}

.rank-list {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 3.6rem 7rem minmax(0, 1fr);
    gap: 0.95rem;
    align-items: center;
    min-height: 6.8rem;
    padding: 0.8rem;
    border: 1px solid rgba(244, 63, 94, 0.12);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 26px rgba(190, 18, 60, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item a:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(190, 18, 60, 0.14);
}

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

.rank-item img {
    width: 7rem;
    aspect-ratio: 16 / 10;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #ffe4e6, #ffedd5);
}

.rank-content {
    display: block;
    min-width: 0;
}

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

.rank-content strong {
    overflow: hidden;
    margin-bottom: 0.28rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-content em {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-content span {
    margin-top: 0.45rem;
    color: #9f1239;
    font-size: 0.78rem;
    font-weight: 800;
}

.page-hero {
    position: relative;
    width: min(1200px, calc(100% - 2rem));
    margin: 2rem auto 0;
    padding: clamp(2.4rem, 5vw, 4rem);
    overflow: hidden;
    border-radius: 2rem;
    background:
        linear-gradient(135deg, rgba(255, 247, 237, 0.94), rgba(255, 228, 230, 0.82)),
        var(--page-image);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.slim-hero {
    background:
        radial-gradient(circle at top right, rgba(251, 146, 60, 0.26), transparent 22rem),
        linear-gradient(135deg, #ffffff, #fff1f2);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.2rem;
}

.filter-button {
    padding: 0.55rem 0.9rem;
    color: #9f1239;
    background: #ffe4e6;
}

.filter-button.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

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

.category-card {
    min-height: 16rem;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.category-samples span {
    padding: 0.25rem 0.52rem;
    color: #fff7ed;
    font-size: 0.76rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 1.5rem;
    padding-top: 2rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: var(--rose);
    font-weight: 800;
}

.detail-card,
.detail-side {
    overflow: hidden;
    border: 1px solid rgba(244, 63, 94, 0.12);
    border-radius: 1.6rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

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

.movie-player {
    width: 100%;
    height: 100%;
    background: #111827;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.8rem;
    width: 100%;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.28), rgba(17, 24, 39, 0.82));
    cursor: pointer;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 5rem;
    height: 5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 22px 44px rgba(244, 63, 94, 0.34);
}

.detail-content {
    padding: clamp(1.2rem, 3vw, 2rem);
}

.lead-text {
    color: #4b5563;
    font-size: 1.08rem;
    line-height: 1.9;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1.1rem 0;
}

.detail-meta span {
    padding: 0.42rem 0.72rem;
    color: #9f1239;
    font-weight: 800;
    border-radius: 999px;
    background: #fff1f2;
}

.detail-content section {
    margin-top: 2rem;
}

.detail-content h2,
.detail-side h2 {
    margin: 0 0 0.85rem;
    font-size: 1.35rem;
}

.detail-content p {
    color: #4b5563;
    line-height: 1.95;
}

.review-box {
    padding: 1.2rem;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, #fff1f2, #ffedd5);
}

.detail-side {
    position: sticky;
    top: 5.6rem;
    align-self: start;
    padding: 1.2rem;
}

.side-list {
    display: grid;
    gap: 0.85rem;
}

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 7.6rem minmax(0, 1fr);
}

.movie-card.horizontal .poster-wrap {
    aspect-ratio: 16 / 11;
    height: 100%;
}

.movie-card.horizontal .movie-card-body {
    padding: 0.8rem;
}

.movie-card.horizontal .movie-card-body em {
    min-height: 0;
    -webkit-line-clamp: 2;
}

.site-footer {
    margin-top: 5rem;
    padding: 3rem 0;
    color: #fed7aa;
    background: #111827;
}

.footer-inner {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
}

.footer-inner p {
    max-width: 44rem;
    color: #d1d5db;
    line-height: 1.8;
}

.hidden-card {
    display: none !important;
}

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

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

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

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

    .detail-side {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

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

    .hero-carousel,
    .hero-track {
        min-height: 48rem;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 1.6rem;
        padding: 4rem 1rem 5rem;
    }

    .hero-poster {
        justify-self: start;
        width: min(18rem, 76vw);
    }

    .hero-copy h1 {
        font-size: 2.45rem;
    }

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

    .row-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .rank-item a {
        grid-template-columns: 2.6rem 5.6rem minmax(0, 1fr);
    }

    .rank-number {
        width: 2.35rem;
        height: 2.35rem;
        border-radius: 0.75rem;
    }

    .rank-item img {
        width: 5.6rem;
    }

    .wide-search {
        flex-direction: column;
        align-items: stretch;
        border-radius: 1.4rem;
    }

    .wide-search button,
    .clear-search {
        min-height: 3rem;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .section-block,
    .detail-layout,
    .footer-inner,
    .page-hero,
    .mobile-nav {
        width: min(100% - 1rem, 1200px);
    }

    .brand-text {
        font-size: 1.15rem;
    }

    .hero-carousel,
    .hero-track {
        min-height: 50rem;
    }

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

    .movie-card.horizontal {
        grid-template-columns: 6.8rem minmax(0, 1fr);
    }

    .page-hero {
        padding: 2rem 1rem;
        border-radius: 1.4rem;
    }
}
