:root {
    color-scheme: light;
    --bg: #fff7fb;
    --surface: #ffffff;
    --surface-strong: #fff0f7;
    --text: #171923;
    --muted: #667085;
    --soft: #f5d7e6;
    --line: #f3c6d9;
    --primary: #ec4899;
    --primary-dark: #be185d;
    --rose: #fb7185;
    --violet: #8b5cf6;
    --shadow: 0 20px 60px rgba(190, 24, 93, 0.14);
    --radius: 24px;
    --container: 1180px;
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(251, 113, 133, 0.18), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(139, 92, 246, 0.12), transparent 32rem),
        var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark,
.footer-brand span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--rose));
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.32);
}

.brand-text {
    display: grid;
}

.brand-text strong {
    font-size: 1.45rem;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary), var(--rose));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.78rem;
}

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

.main-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #3f3f46;
    font-weight: 700;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--primary-dark);
    background: #ffe4f1;
}

.header-search {
    width: 245px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.header-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 6px 8px;
    background: transparent;
}

.header-search button,
.search-panel button,
.btn-primary {
    border: 0;
    color: #fff;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--rose));
    box-shadow: 0 12px 26px rgba(236, 72, 153, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.search-panel button:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(236, 72, 153, 0.32);
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 14px;
    padding: 8px 12px;
    background: #ffe4f1;
    color: var(--primary-dark);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(236, 72, 153, 0.12);
}

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

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: #180916;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(24, 9, 22, 0.88) 0%, rgba(24, 9, 22, 0.58) 48%, rgba(24, 9, 22, 0.24) 100%),
        radial-gradient(circle at 20% 30%, rgba(236, 72, 153, 0.38), transparent 34rem),
        linear-gradient(135deg, rgba(139, 92, 246, 0.36), rgba(236, 72, 153, 0.18));
    z-index: 1;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    filter: saturate(1.05);
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    color: #fff;
    padding: 86px 0 120px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffe4f1;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h1 {
    max-width: 850px;
    font-size: clamp(2.5rem, 7vw, 5.9rem);
}

.hero h2 {
    margin: 16px 0 10px;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.hero-desc {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.08rem;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.btn-ghost {
    border: 1px solid rgba(236, 72, 153, 0.25);
    border-radius: 999px;
    padding: 10px 18px;
    color: var(--primary-dark);
    font-weight: 800;
    background: rgba(255, 255, 255, 0.86);
    transition: 0.2s ease;
}

.hero .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(14px);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    background: #fff;
    color: var(--primary-dark);
}

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

.hero-dot {
    width: 42px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #fff;
}

.section {
    padding: 74px 0;
}

.section-soft {
    background: rgba(255, 255, 255, 0.52);
}

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

.section-head h2,
.page-hero h1,
.detail-content h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.section-head p,
.page-hero p,
.category-card p,
.detail-title p {
    color: var(--muted);
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(236, 72, 153, 0.14);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 40px rgba(190, 24, 93, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(236, 72, 153, 0.28);
    box-shadow: var(--shadow);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(139, 92, 246, 0.16)),
        var(--poster-image) center / cover no-repeat,
        #2a1226;
}

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

.poster-frame.image-failed img {
    display: none;
}

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

.poster-year,
.poster-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
}

.poster-year {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--rose));
}

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

.movie-card-title {
    display: block;
    overflow: hidden;
    color: #111827;
    font-size: 1.08rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-card-title:hover {
    color: var(--primary-dark);
}

.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.movie-card-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 6px;
    color: #d9468d;
}

.movie-card-desc {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0 0 14px;
    overflow: hidden;
    color: #52525b;
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span,
.inline-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--primary-dark);
    background: #ffe4f1;
    font-size: 0.78rem;
    font-weight: 800;
}

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

.category-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(236, 72, 153, 0.16);
    border-radius: var(--radius);
    padding: 24px;
    background: linear-gradient(145deg, #fff, #fff0f7);
    box-shadow: 0 16px 44px rgba(190, 24, 93, 0.08);
    transition: 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(236, 72, 153, 0.32);
    box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
}

.category-card p {
    margin: 0;
}

.category-card span {
    color: var(--primary-dark);
    font-weight: 900;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 228, 241, 0.72)),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.24), transparent 30rem);
}

.page-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -35% 50%;
    height: 360px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.12);
    filter: blur(6px);
}

.page-hero .container,
.detail-hero .container {
    position: relative;
    z-index: 2;
}

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

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

.category-feature {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 34px;
}

.feature-panel,
.rank-panel,
.search-panel,
.detail-content,
.player-section {
    border: 1px solid rgba(236, 72, 153, 0.14);
    border-radius: var(--radius);
    padding: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 42px rgba(190, 24, 93, 0.08);
}

.feature-panel {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    align-items: center;
}

.feature-panel img {
    width: 180px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    background: #2a1226;
}

.feature-panel h2,
.rank-panel h2,
.search-panel h1,
.detail-content h2 {
    margin-top: 0;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 14px;
    align-items: center;
    border: 1px solid rgba(236, 72, 153, 0.1);
    border-radius: 18px;
    padding: 14px;
    background: #fff;
}

.rank-num {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--rose));
}

.rank-item a {
    display: grid;
    gap: 4px;
}

.rank-item strong {
    font-size: 1rem;
}

.rank-item small,
.rank-item em {
    color: var(--muted);
    font-style: normal;
}

.search-panel {
    margin-bottom: 32px;
}

.search-controls {
    display: grid;
    grid-template-columns: 1fr 170px 150px;
    gap: 12px;
}

.search-controls input,
.search-controls select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px;
    outline: 0;
    background: #fff;
}

.search-controls input:focus,
.search-controls select:focus {
    border-color: var(--primary);
}

.no-results {
    display: none;
    padding: 28px;
    text-align: center;
    color: var(--muted);
}

.no-results.is-visible {
    display: block;
}

.detail-hero {
    padding: 62px 0;
    background:
        linear-gradient(90deg, rgba(255, 247, 251, 0.98), rgba(255, 247, 251, 0.78)),
        var(--detail-image) center / cover no-repeat;
}

.detail-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    border-radius: 28px;
    padding: 10px;
    background: #fff;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
    background: #2a1226;
}

.detail-title h1 {
    font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.inline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 24px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #3f3f46;
    font-weight: 700;
}

.detail-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.8);
}

.player-section {
    margin-top: -24px;
    position: relative;
    z-index: 3;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #09090b;
    box-shadow: 0 22px 70px rgba(24, 9, 22, 0.28);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #09090b;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(9, 9, 11, 0.78), rgba(190, 24, 93, 0.46)),
        var(--poster-image) center / cover no-repeat;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover span {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--rose));
    box-shadow: 0 18px 40px rgba(236, 72, 153, 0.42);
    font-size: 1.6rem;
}

.player-cover strong {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.player-cover em {
    font-style: normal;
    color: #ffe4f1;
    font-weight: 800;
}

.detail-content {
    margin: 30px 0;
}

.detail-content p {
    color: #3f3f46;
}

.detail-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.site-footer {
    margin-top: 70px;
    padding: 54px 0 26px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 36px;
}

.footer-brand {
    color: #fff;
}

.site-footer p {
    max-width: 420px;
    color: #9ca3af;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

.site-footer nav {
    display: grid;
    gap: 9px;
}

.site-footer a {
    color: #9ca3af;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

@media (max-width: 980px) {
    .main-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .hero {
        min-height: 590px;
    }

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

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

    .category-feature,
    .detail-grid,
    .detail-columns,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .search-controls {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 24px, var(--container));
    }

    .header-inner {
        min-height: 66px;
    }

    .brand-mark,
    .footer-brand span {
        width: 42px;
        height: 42px;
    }

    .brand-text strong {
        font-size: 1.22rem;
    }

    .hero {
        min-height: 560px;
    }

    .hero-content {
        padding: 58px 0 100px;
    }

    .section,
    .page-hero,
    .detail-hero {
        padding: 48px 0;
    }

    .section-head {
        display: grid;
        align-items: start;
    }

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

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

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

    .feature-panel img {
        width: 100%;
        max-width: 220px;
    }

    .rank-item {
        grid-template-columns: 42px 1fr;
    }

    .rank-item em {
        grid-column: 2;
    }

    .footer-bottom {
        display: grid;
    }
}
