:root {
    --pink: #ec4899;
    --pink-dark: #db2777;
    --orange: #f97316;
    --amber: #f59e0b;
    --blue: #2563eb;
    --teal: #14b8a6;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #f3f4f6;
    --page: #fff7ed;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #fff7ed 0%, #fdf2f8 50%, #eff6ff 100%);
    min-height: 100vh;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 10px 35px rgba(236, 72, 153, 0.08);
}

.nav-wrap {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: nowrap;
    color: var(--pink-dark);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    box-shadow: 0 12px 24px rgba(236, 72, 153, 0.25);
    font-size: 15px;
}

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

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 700;
    transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    box-shadow: 0 12px 20px rgba(249, 115, 22, 0.18);
}

.top-search {
    display: flex;
    align-items: center;
    width: min(310px, 28vw);
    background: #fff;
    border: 1px solid #fce7f3;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.top-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 11px 14px;
    background: transparent;
    color: var(--ink);
}

.top-search button,
.hero-search button,
.search-panel button {
    border: 0;
    padding: 11px 16px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    cursor: pointer;
}

.menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    font-size: 22px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 660px;
    background: #111827;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(236, 72, 153, 0.5), transparent 32%),
        radial-gradient(circle at 82% 20%, rgba(249, 115, 22, 0.5), transparent 34%),
        linear-gradient(135deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.55));
    z-index: 2;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: opacity 0.75s ease, transform 5s ease;
}

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

.hero-content {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 42px;
    align-items: center;
    min-height: 660px;
    padding: 90px 0 80px;
    color: #fff;
}

.hero-copy {
    max-width: 740px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 800;
}

.hero h1 {
    margin: 24px 0 18px;
    max-width: 850px;
    font-size: clamp(42px, 7vw, 80px);
    line-height: 0.96;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.85;
}

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

.button-primary,
.button-secondary,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: all 0.2s ease;
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    box-shadow: 0 18px 36px rgba(236, 72, 153, 0.28);
}

.button-secondary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.button-ghost {
    color: var(--pink-dark);
    background: #fff;
    border: 1px solid #fce7f3;
}

.button-primary:hover,
.button-secondary:hover,
.button-ghost:hover {
    transform: translateY(-2px);
}

.hero-search {
    display: flex;
    width: min(620px, 100%);
    overflow: hidden;
    margin-top: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.hero-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 16px 20px;
    background: transparent;
    font-size: 16px;
}

.hero-panel {
    align-self: end;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.hero-panel img {
    width: 100%;
    height: 440px;
    object-fit: cover;
}

.hero-panel-body {
    padding: 22px;
}

.hero-panel-body h2 {
    margin: 8px 0 10px;
    font-size: 24px;
}

.hero-panel-body p {
    font-size: 14px;
    line-height: 1.7;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.section {
    padding: 70px 0;
}

.section.alt {
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.75), rgba(252, 231, 243, 0.86));
}

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

.section-head h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
    max-width: 760px;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    border-radius: 26px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 14px 36px rgba(31, 41, 55, 0.08);
    transition: all 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(236, 72, 153, 0.18);
}

.movie-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4.1;
    background: linear-gradient(135deg, #fce7f3, #ffedd5);
}

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

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

.category-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(236, 72, 153, 0.2);
}

.rank-badge {
    left: auto;
    right: 12px;
    background: rgba(17, 24, 39, 0.74);
    backdrop-filter: blur(8px);
}

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

.movie-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--pink-dark);
    font-size: 12px;
    font-weight: 900;
}

.movie-card h3 {
    margin: 9px 0 8px;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p {
    margin: 0;
    min-height: 48px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.movie-card-tags span,
.detail-tags span,
.category-chip,
.stats-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #be185d;
    background: #fce7f3;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 26px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    box-shadow: 0 24px 50px rgba(249, 115, 22, 0.18);
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, var(--blue), var(--teal));
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #8b5cf6, var(--pink));
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 950;
}

.category-card span {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.page-title {
    padding: 64px 0 34px;
}

.search-panel {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0 0 28px;
    padding: 14px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(31, 41, 55, 0.08);
}

.search-panel input {
    width: 100%;
    border: 1px solid #fce7f3;
    border-radius: 16px;
    outline: 0;
    padding: 14px 16px;
    color: var(--ink);
    background: #fff7ed;
}

.search-panel button {
    border-radius: 16px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: #111827;
    color: #fff;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    filter: blur(3px);
    transform: scale(1.04);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.45));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 72px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-copy h1 {
    margin: 18px 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.detail-copy p {
    max-width: 800px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 17px;
    line-height: 1.9;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.detail-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    padding: 56px 0 76px;
}

.content-card,
.sidebar-card {
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(31, 41, 55, 0.08);
}

.content-card {
    padding: 30px;
}

.content-card h2,
.sidebar-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
    font-weight: 950;
}

.content-card p {
    margin: 0 0 24px;
    color: #4b5563;
    line-height: 1.95;
    font-size: 16px;
}

.player-box {
    overflow: hidden;
    margin-bottom: 28px;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

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

.player-stage video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle at center, rgba(236, 72, 153, 0.38), transparent 28%),
        linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    box-shadow: 0 20px 45px rgba(236, 72, 153, 0.38);
    font-size: 34px;
    padding-left: 5px;
}

.sidebar-card {
    padding: 22px;
    position: sticky;
    top: 96px;
}

.compact-list {
    display: grid;
    gap: 12px;
}

.compact-link {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 92px;
    padding: 8px;
    border-radius: 18px;
    background: #fff7ed;
    transition: all 0.2s ease;
}

.compact-link:hover {
    background: #fce7f3;
    transform: translateX(2px);
}

.compact-link img {
    width: 78px;
    height: 78px;
    border-radius: 14px;
    object-fit: cover;
}

.compact-link strong {
    display: block;
    font-size: 15px;
    line-height: 1.35;
}

.compact-link em {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.mini-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 6px;
    border-radius: 999px;
    color: #fff;
    background: var(--pink);
    font-size: 12px;
    font-weight: 900;
}

.site-footer {
    color: #fff;
    background: linear-gradient(135deg, #1f2937, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding: 54px 0 38px;
}

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

.site-footer p,
.site-footer a {
    color: #d1d5db;
    line-height: 1.8;
}

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

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

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

.empty-state {
    display: none;
    padding: 38px;
    border-radius: 22px;
    text-align: center;
    background: #fff;
    color: var(--muted);
}

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

@media (max-width: 1024px) {
    .movie-grid,
    .movie-grid.compact-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .hero-panel {
        display: none;
    }

    .detail-hero-inner {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .top-search {
        display: none;
    }
}

@media (max-width: 760px) {
    .container-wrap {
        width: min(100% - 24px, 1180px);
    }

    .nav-wrap {
        min-height: 66px;
        flex-wrap: wrap;
    }

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .main-nav {
        display: none;
        width: 100%;
        padding: 0 0 14px;
        margin: 0;
        flex-wrap: wrap;
    }

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

    .main-nav a {
        flex: 1 1 auto;
        text-align: center;
        background: #fff7ed;
    }

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero-search {
        border-radius: 22px;
        flex-direction: column;
        align-items: stretch;
    }

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

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        padding: 42px 0;
    }

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

    .detail-layout {
        padding: 34px 0 54px;
    }

    .content-card {
        padding: 20px;
    }

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

@media (max-width: 520px) {
    .movie-grid,
    .movie-grid.compact-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .brand {
        font-size: 19px;
    }

    .hero h1,
    .page-title h1,
    .section-head h2 {
        font-size: 36px;
    }
}
