:root {
    --pink: #ec4899;
    --purple: #8b5cf6;
    --blue: #3b82f6;
    --cyan: #14b8a6;
    --dark: #111827;
    --muted: #6b7280;
    --light: #fdf2f8;
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 24px 70px rgba(31, 41, 55, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
    box-shadow: 0 18px 38px rgba(76, 29, 149, 0.25);
}

.nav-wrap {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.brand-text {
    font-size: 22px;
}

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

.nav-link,
.mobile-link {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.7s ease, visibility 0.7s ease, transform 1.2s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06);
}

.hero-shade,
.detail-hero::before,
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 78% 30%, rgba(236, 72, 153, 0.32), transparent 26%), linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.64) 48%, rgba(17, 24, 39, 0.1));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 48px;
    color: #ffffff;
}

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

.eyebrow,
.section-heading span,
.category-overview-head span {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.16), rgba(59, 130, 246, 0.16));
    color: #db2777;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy .eyebrow {
    color: #fde68a;
    background: rgba(255, 255, 255, 0.14);
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy h2 {
    font-size: clamp(28px, 4vw, 48px);
}

.hero-copy p,
.page-hero p,
.detail-copy .lead-text {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 700;
}

.tag-row span {
    color: #7c3aed;
    background: #f5f3ff;
    border-color: #ede9fe;
}

.detail-meta span {
    color: #ffffff;
}

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

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

.primary-button,
.small-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    box-shadow: 0 14px 30px rgba(236, 72, 153, 0.32);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.primary-button:hover,
.ghost-button:hover,
.small-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(79, 70, 229, 0.28);
}

.hero-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.hero-card span {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #111827;
    background: #fde047;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

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

.hero-arrow,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.section-block {
    padding: 58px 0 0;
}

.section-heading {
    margin-bottom: 26px;
}

.section-heading h2,
.content-card h2,
.category-overview-head h2 {
    margin: 12px 0 8px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.14;
    letter-spacing: -0.03em;
}

.section-heading p,
.content-card p,
.category-overview-head p,
.movie-card-body p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.split-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}

.text-link {
    color: #7c3aed;
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: end;
    gap: 18px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.wide-filter {
    grid-template-columns: minmax(220px, 1fr) 180px auto;
}

.search-box,
.select-box {
    display: grid;
    gap: 8px;
    color: #4b5563;
    font-weight: 800;
}

.search-box input,
.select-box select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 13px 15px;
    color: var(--dark);
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.select-box select:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 0;
    padding: 11px 14px;
    border-radius: 999px;
    color: #6d28d9;
    background: #ede9fe;
    cursor: pointer;
    font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    background: linear-gradient(90deg, var(--pink), var(--purple));
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 14px 40px rgba(17, 24, 39, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #1f2937;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.year-badge,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.year-badge {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(17, 24, 39, 0.72);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 42px;
    height: 34px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

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

.movie-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #8b5cf6;
    font-size: 13px;
    font-weight: 800;
}

.movie-card-body h2 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card-body h2 a:hover,
.category-overview-head h2 a:hover {
    color: #db2777;
}

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

.compact-card .movie-card-body h2 {
    font-size: 16px;
}

.compact-card .movie-card-body p,
.compact-card .tag-row {
    display: none;
}

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

.category-tile {
    position: relative;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 22px;
    color: #ffffff;
    box-shadow: var(--shadow);
}

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

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.88));
}

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

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 1;
}

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

.category-tile p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.65;
}

.ranking-list {
    display: grid;
    gap: 10px;
}

.rank-item {
    display: grid;
    grid-template-columns: 58px 58px minmax(0, 1fr) auto 58px;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(6px);
    background: #ffffff;
}

.rank-number {
    color: #db2777;
    font-weight: 900;
    font-size: 20px;
}

.rank-item img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-title {
    font-weight: 900;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-meta {
    color: var(--muted);
    font-size: 14px;
}

.rank-score {
    color: #111827;
    background: #fde047;
    padding: 8px 9px;
    border-radius: 999px;
    font-weight: 900;
    text-align: center;
}

.page-main {
    min-height: 60vh;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
}

.page-hero .container,
.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 70px;
    padding-bottom: 86px;
}

.compact-hero .container {
    padding-top: 70px;
    padding-bottom: 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

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

.category-overview-list {
    display: grid;
    gap: 28px;
}

.category-overview-card {
    overflow: hidden;
    border-radius: 30px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
}

.category-overview-head {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}

.category-overview-head img {
    width: 180px;
    height: 220px;
    object-fit: cover;
    border-radius: 24px;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.detail-hero-inner {
    padding-bottom: 70px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
}

.detail-cover {
    width: 300px;
    border-radius: 30px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
}

.detail-copy .lead-text {
    font-size: 18px;
}

.player-block {
    scroll-margin-top: 86px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000000;
    box-shadow: 0 34px 80px rgba(17, 24, 39, 0.22);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.28), rgba(17, 24, 39, 0.6));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding-left: 5px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    box-shadow: 0 18px 44px rgba(236, 72, 153, 0.38);
    font-size: 34px;
}

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

.content-card {
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.content-card p {
    margin: 0 0 14px;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
    margin-bottom: 12px;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.site-footer a:not(.footer-brand) {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    margin: 8px 0;
}

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

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-size: 14px;
}

.movie-card.is-hidden,
.rank-item.is-hidden {
    display: none;
}

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

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

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

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

    .nav-toggle {
        display: flex;
    }

    .brand-text {
        font-size: 19px;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
        padding-top: 60px;
        padding-bottom: 100px;
    }

    .hero-card {
        width: min(240px, 70vw);
        transform: rotate(0deg);
    }

    .filter-panel,
    .wide-filter {
        grid-template-columns: 1fr;
    }

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

    .detail-layout,
    .detail-content-grid,
    .category-overview-head,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-cover,
    .category-overview-head img {
        width: min(300px, 82vw);
    }

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

    .rank-item {
        grid-template-columns: 42px 52px minmax(0, 1fr) 48px;
    }

    .rank-meta {
        display: none;
    }
}

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

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

    .movie-grid,
    .large-list,
    .mini-grid,
    .related-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-body p {
        min-height: 0;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .hero-controls {
        bottom: 18px;
    }
}
