* {
    box-sizing: border-box;
}

:root {
    --bg: #fff7fb;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --text: #1f1720;
    --muted: #6f6571;
    --line: rgba(190, 65, 100, 0.15);
    --accent: #ec4899;
    --accent-2: #ef4444;
    --accent-3: #f97316;
    --shadow: 0 24px 70px rgba(190, 24, 93, 0.16);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(236, 72, 153, 0.18), transparent 30rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 26rem),
        var(--bg);
    color: var(--text);
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px);
    background: rgba(255, 247, 251, 0.84);
    border-bottom: 1px solid var(--line);
}

.nav-wrap {
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-3));
    -webkit-background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
    border-radius: 999px;
    box-shadow: 0 16px 36px rgba(236, 72, 153, 0.28);
}

.desktop-nav {
    display: flex;
    gap: 8px;
}

.desktop-nav a,
.mobile-nav a {
    padding: 10px 16px;
    border-radius: 14px;
    color: #524853;
    font-weight: 700;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fff;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 26px rgba(236, 72, 153, 0.22);
}

.mobile-menu-btn {
    display: none;
    border: 0;
    border-radius: 14px;
    padding: 10px 14px;
    background: #fff;
    color: var(--accent-2);
    font-size: 22px;
    box-shadow: var(--shadow);
}

.mobile-nav {
    display: none;
    padding: 10px 24px 20px;
    border-top: 1px solid var(--line);
}

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

main {
    min-height: 70vh;
}

.hero {
    position: relative;
    height: min(78vh, 760px);
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, #ec4899, #ef4444 46%, #f97316);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.32), transparent 21rem),
        linear-gradient(90deg, rgba(15, 10, 20, 0.72), rgba(15, 10, 20, 0.22));
    z-index: 1;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 800ms ease;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 390px;
    align-items: center;
    gap: 44px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 24px 58px;
    color: #fff;
    z-index: 2;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    opacity: 0.42;
}

.hero-content {
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section-kicker {
    color: var(--accent-2);
    background: rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.14);
    font-size: 12px;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(44px, 7vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.08em;
}

.hero p {
    margin: 0;
    max-width: 680px;
    font-size: 19px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.88);
}

.hero-cover {
    height: 530px;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 40px 90px rgba(56, 20, 31, 0.42);
    transform: rotate(3deg);
    background: linear-gradient(135deg, #fb7185, #fb923c);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.tag-row span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 13px;
    font-weight: 700;
}

.detail-info .tag-row span,
.movie-card .movie-meta span,
.rank-item .movie-meta span {
    color: #7a2f43;
    background: rgba(236, 72, 153, 0.09);
    border-color: rgba(236, 72, 153, 0.14);
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 16px;
    padding: 0 20px;
    font-weight: 900;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: 0 16px 36px rgba(236, 72, 153, 0.32);
}

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

.ghost-btn.dark {
    color: var(--accent-2);
    border-color: rgba(236, 72, 153, 0.16);
    background: rgba(236, 72, 153, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-card:hover,
.rank-item:hover {
    transform: translateY(-3px);
}

.section-block {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-text h2,
.rank-side h2 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

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

.section-head.light,
.section-head.light .section-kicker,
.section-head.light a {
    color: #fff;
}

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

.movie-grid.narrow {
    grid-template-columns: 1fr;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 18px 46px rgba(190, 24, 93, 0.09);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.35), transparent 6rem),
        linear-gradient(135deg, #fb7185, #ef4444, #fb923c);
}

.poster-year {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(10px);
    font-weight: 900;
    font-size: 12px;
}

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

.movie-title,
.rank-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.movie-card p,
.rank-item p,
.category-card span,
.category-overview-card p,
.page-hero p,
.detail-intro,
.detail-text p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.movie-card p {
    min-height: 76px;
    margin: 10px 0 14px;
    font-size: 14px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.search-panel {
    padding-top: 28px;
    padding-bottom: 22px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 40px rgba(190, 24, 93, 0.08);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    height: 50px;
    border: 1px solid rgba(236, 72, 153, 0.18);
    border-radius: 16px;
    padding: 0 16px;
    outline: none;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
}

.gradient-panel,
.rank-hero {
    max-width: 1240px;
    margin-top: 30px;
    border-radius: 34px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.26), transparent 25rem),
        linear-gradient(135deg, #db2777, #ef4444 50%, #f97316);
    color: #fff;
    box-shadow: 0 30px 90px rgba(190, 24, 93, 0.2);
}

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

.category-card,
.category-overview-card {
    display: grid;
    gap: 12px;
    border-radius: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(16px);
    transition: transform 180ms ease;
}

.category-card strong,
.category-overview-card h2 {
    font-size: 24px;
}

.category-card em,
.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-style: normal;
}

.category-card em a,
.mini-links a {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 999px;
    padding: 7px 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 800;
}

.category-overview-card {
    color: var(--text);
    background: var(--surface);
    border-color: var(--line);
    box-shadow: 0 18px 46px rgba(190, 24, 93, 0.08);
}

.category-overview-card span {
    color: var(--accent-2);
    font-weight: 900;
}

.category-overview-card .mini-links a {
    color: #7a2f43;
    background: rgba(236, 72, 153, 0.09);
}

.page-hero,
.detail-hero {
    max-width: 1280px;
    margin: 30px auto 0;
    padding: 54px 24px;
}

.small-hero {
    min-height: 250px;
    display: flex;
    align-items: center;
}

.small-hero > div,
.rank-hero > div {
    max-width: 760px;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
    align-items: start;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 88px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 32px rgba(190, 24, 93, 0.07);
    transition: transform 180ms ease;
}

.rank-num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
    font-size: 20px;
    font-weight: 900;
}

.rank-poster {
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #fb7185, #fb923c);
}

.rank-side {
    position: sticky;
    top: 92px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.breadcrumb {
    max-width: 1280px;
    margin: 24px auto 0;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-weight: 800;
}

.breadcrumb a {
    color: var(--accent-2);
}

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

.detail-poster {
    border-radius: 32px;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    font-size: clamp(42px, 6vw, 76px);
}

.player-section {
    padding-top: 18px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #09070a;
    box-shadow: 0 30px 90px rgba(32, 12, 20, 0.32);
}

.video-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #09070a;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42));
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: 0 24px 56px rgba(236, 72, 153, 0.38);
    font-size: 34px;
}

.play-overlay.is-hidden {
    display: none;
}

.detail-text {
    max-width: 980px;
}

.detail-text p {
    font-size: 17px;
}

.compact-card .movie-card-body {
    padding: 14px;
}

.compact-card .movie-card p {
    min-height: auto;
}

.site-footer {
    max-width: 1280px;
    margin: 40px auto 0;
    padding: 36px 24px 50px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--line);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    font-weight: 800;
    color: var(--accent-2);
}

.is-filtered-out {
    display: none !important;
}

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

    .mobile-menu-btn {
        display: inline-grid;
    }

    .hero {
        height: auto;
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
    }

    .hero-cover {
        height: 340px;
        max-width: 250px;
        transform: none;
    }

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

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

    .rank-side {
        position: static;
    }

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

@media (max-width: 640px) {
    .nav-wrap {
        height: 64px;
        padding: 0 16px;
    }

    .site-logo {
        font-size: 20px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
    }

    .hero {
        min-height: 650px;
    }

    .hero-slide,
    .section-block,
    .page-hero,
    .detail-hero,
    .site-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .hero p {
        font-size: 16px;
    }

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

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

    .section-head,
    .site-footer {
        display: grid;
    }

    .rank-item {
        grid-template-columns: 44px 74px minmax(0, 1fr);
        gap: 12px;
    }
}
