* {
    box-sizing: border-box;
}

:root {
    --pink: #ec4899;
    --purple: #8b5cf6;
    --blue: #3b82f6;
    --orange: #f97316;
    --dark: #0f172a;
    --muted: #64748b;
    --soft: #f8fafc;
    --card: #ffffff;
    --line: rgba(148, 163, 184, 0.24);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: #1e293b;
    background: linear-gradient(180deg, #fff7fb 0%, #f8fafc 28%, #eef2ff 100%);
    min-height: 100vh;
}

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

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

main {
    min-height: 60vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.22);
}

.top-nav {
    width: min(1240px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7c2d12;
    background: linear-gradient(135deg, #fde047, #fb7185);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
}

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

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    padding: 9px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.hero-section {
    width: min(1240px, calc(100% - 32px));
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
}

.hero-slider {
    position: relative;
    min-height: 560px;
    border-radius: 34px;
    overflow: hidden;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: clamp(28px, 5vw, 70px);
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.9s ease;
    pointer-events: none;
}

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

.hero-copy {
    max-width: 660px;
    color: #ffffff;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.36);
}

.hero-kicker,
.eyebrow {
    color: #fde68a;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.hero-copy h1,
.page-hero h1,
.detail-intro h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    font-weight: 950;
}

.hero-copy p,
.page-hero p,
.detail-intro .lead-text {
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.8;
    margin: 20px 0 0;
}

.hero-tags,
.detail-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-tags span,
.detail-meta span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.detail-tags a {
    background: linear-gradient(135deg, #eff6ff, #f5f3ff);
    color: #6d28d9;
}

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

.primary-button,
.ghost-button,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.ghost-button {
    min-height: 48px;
    padding: 0 24px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.44);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.text-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
}

.compact-actions {
    margin-top: 24px;
}

.hero-dots {
    position: absolute;
    left: 42px;
    bottom: 34px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

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

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

.hero-side,
.search-band,
.content-section,
.page-hero,
.detail-layout {
    width: min(1240px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.hero-side {
    padding: 24px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-side h2,
.section-heading h2,
.detail-content h2,
.detail-sidebar h2,
.site-footer h2 {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
    font-weight: 950;
}

.hero-side p,
.section-heading p,
.category-overview-card p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.hero-mini-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 18px;
}

.search-band {
    margin-top: 26px;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    border-radius: 30px;
    background: linear-gradient(135deg, #fff, #f5f3ff);
    border: 1px solid rgba(139, 92, 246, 0.18);
    box-shadow: var(--shadow);
}

.search-band h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 950;
}

.search-band p {
    margin: 0;
    color: var(--muted);
}

.global-search {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.global-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 0;
    outline: 0;
    color: #0f172a;
    font: inherit;
    background: transparent;
}

.global-search input {
    padding: 0 16px;
}

.global-search button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    padding: 12px 22px;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    cursor: pointer;
}

.content-section {
    margin-top: 46px;
}

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

.section-heading h2 {
    font-size: clamp(26px, 3vw, 38px);
    background: linear-gradient(90deg, #db2777, #7c3aed, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-heading p {
    margin: 6px 0 0;
}

.section-more,
.text-link {
    color: #7c3aed;
    background: #ffffff;
    padding: 10px 16px;
    box-shadow: 0 12px 26px rgba(124, 58, 237, 0.14);
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fce7f3, #ddd6fe);
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.78));
}

.poster-year,
.poster-play,
.rank-number {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.poster-year {
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.66);
    backdrop-filter: blur(8px);
}

.poster-play {
    left: 12px;
    bottom: 12px;
    color: #ffffff;
    padding: 7px 11px;
    background: linear-gradient(90deg, var(--pink), var(--purple));
}

.rank-number {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7c2d12;
    background: linear-gradient(135deg, #fde047, #fb923c);
}

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

.movie-title {
    display: block;
    color: #111827;
    font-size: 18px;
    font-weight: 950;
    line-height: 1.35;
    margin-bottom: 8px;
}

.movie-title:hover {
    color: #7c3aed;
}

.movie-card-body p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.movie-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #7c3aed;
    font-weight: 800;
    font-size: 12px;
    background: #f5f3ff;
}

.tag-line {
    color: #94a3b8;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    padding: 18px;
    border-radius: 26px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.94), rgba(124, 58, 237, 0.92), rgba(37, 99, 235, 0.9));
    box-shadow: var(--shadow);
}

.category-title {
    display: block;
    position: relative;
    z-index: 2;
    font-size: 22px;
    font-weight: 950;
}

.category-desc {
    display: block;
    position: relative;
    z-index: 2;
    margin-top: 10px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.86);
}

.category-thumbs {
    position: absolute;
    right: -18px;
    bottom: -20px;
    display: flex;
    transform: rotate(-8deg);
}

.category-thumbs img {
    width: 64px;
    height: 92px;
    object-fit: cover;
    border-radius: 14px;
    margin-left: -18px;
    border: 3px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.28);
}

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

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

.rank-list a {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.rank-list span {
    grid-row: span 2;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 950;
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

.rank-list strong {
    color: #111827;
}

.rank-list em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    margin-top: 34px;
    padding: clamp(34px, 7vw, 78px);
    border-radius: 34px;
    color: #ffffff;
    background: linear-gradient(120deg, #ec4899, #8b5cf6, #3b82f6);
    box-shadow: var(--shadow);
}

.soft-hero {
    background: linear-gradient(120deg, #f97316, #ec4899, #8b5cf6);
}

.category-hero {
    background: linear-gradient(120deg, #2563eb, #8b5cf6, #ec4899);
}

.rank-hero {
    background: linear-gradient(120deg, #f97316, #ec4899, #7c3aed);
}

.search-hero {
    background: linear-gradient(120deg, #0ea5e9, #8b5cf6, #ec4899);
}

.page-hero > div {
    max-width: 860px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    padding: 20px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 22px;
}

.category-cover img {
    width: 100%;
    height: 104px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 4px 0 10px;
    font-size: 24px;
    font-weight: 950;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 14px;
    margin-bottom: 22px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}

.detail-hero {
    color: #ffffff;
    background-size: cover;
    background-position: center;
}

.detail-hero-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0 54px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 800;
}

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

.detail-head-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    width: 100%;
    border-radius: 28px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.34);
}

.detail-intro {
    max-width: 820px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    margin-top: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.28), rgba(15, 23, 42, 0.74));
    font-size: 18px;
    font-weight: 950;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #831843;
    background: linear-gradient(135deg, #ffffff, #fde68a);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
    padding-left: 6px;
    font-size: 32px;
}

.detail-content,
.detail-sidebar {
    margin-top: 24px;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.detail-content h2 {
    margin-top: 26px;
    margin-bottom: 12px;
}

.detail-content h2:first-child {
    margin-top: 0;
}

.detail-content p {
    margin: 0;
    color: #475569;
    line-height: 1.9;
    font-size: 16px;
}

.detail-sidebar {
    margin-top: 0;
    align-self: start;
    position: sticky;
    top: 92px;
}

.sidebar-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.sidebar-list a {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.sidebar-list img {
    width: 72px;
    height: 100px;
    object-fit: cover;
    border-radius: 14px;
}

.sidebar-list strong,
.sidebar-list em {
    display: block;
}

.sidebar-list strong {
    color: #111827;
    font-weight: 950;
}

.sidebar-list em {
    color: var(--muted);
    font-style: normal;
    margin-top: 6px;
    font-size: 13px;
}

.prev-next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.prev-next a {
    padding: 16px;
    border-radius: 18px;
    color: #6d28d9;
    font-weight: 900;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.site-footer {
    margin-top: 64px;
    color: #cbd5e1;
    background: linear-gradient(90deg, #0f172a, #1e1b4b, #111827);
}

.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.3fr;
    gap: 28px;
}

.site-footer h2 {
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 14px;
}

.site-footer a {
    display: block;
    color: #c4b5fd;
    margin: 9px 0;
    font-weight: 800;
}

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

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

@media (max-width: 1180px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .hero-side,
    .detail-sidebar {
        position: static;
    }

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

@media (max-width: 860px) {
    .top-nav {
        min-height: 62px;
    }

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

    .nav-toggle {
        display: inline-block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        padding: 12px;
        border-radius: 22px;
        background: linear-gradient(135deg, rgba(236, 72, 153, 0.98), rgba(124, 58, 237, 0.98));
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-section,
    .search-band,
    .content-section,
    .page-hero,
    .detail-layout,
    .hero-side {
        width: min(100% - 24px, 760px);
    }

    .hero-slider {
        min-height: 510px;
        border-radius: 26px;
    }

    .hero-slide {
        padding: 28px;
        align-items: flex-end;
    }

    .search-band,
    .filter-panel,
    .detail-head-grid,
    .category-overview-card,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .prev-next {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .top-nav {
        width: calc(100% - 20px);
    }

    .brand-mark {
        width: 32px;
        height: 32px;
        border-radius: 12px;
    }

    .hero-slider {
        min-height: 480px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-intro h1 {
        font-size: 32px;
    }

    .hero-actions,
    .global-search {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-dots {
        left: 28px;
        bottom: 22px;
    }

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

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

    .movie-title {
        font-size: 16px;
    }

    .movie-card-body p,
    .tag-line {
        font-size: 12px;
    }

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

    .page-hero,
    .detail-content,
    .detail-sidebar {
        border-radius: 22px;
    }
}
