:root {
    --bg: #fff7fb;
    --bg-soft: #fdf2f8;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #f2d5e6;
    --pink: #ec4899;
    --purple: #8b5cf6;
    --blue: #3b82f6;
    --orange: #f97316;
    --shadow: 0 18px 45px rgba(124, 58, 237, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(236, 72, 153, 0.14), transparent 28rem),
        radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.12), transparent 24rem),
        linear-gradient(180deg, #fff7fb 0%, #ffffff 38%, #f8fbff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.top-ribbon {
    height: 4px;
    background: linear-gradient(90deg, #f472b6, #a855f7, #60a5fa);
    position: relative;
    overflow: hidden;
}

.top-ribbon::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
    animation: ribbon-shine 4s linear infinite;
}

@keyframes ribbon-shine {
    0% { transform: translateX(-100%); }
    55%, 100% { transform: translateX(100%); }
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.08);
}

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

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

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
    box-shadow: 0 12px 22px rgba(236, 72, 153, 0.28);
}

.brand-text strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text em {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
    font-weight: 500;
}

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

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: #374151;
    font-weight: 650;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--pink);
    background: #fdf2f8;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid #f3d2e5;
    border-radius: 999px;
    background: #fff;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select,
.search-hero input {
    border: 0;
    outline: none;
    background: transparent;
}

.header-search input {
    width: 190px;
    padding: 6px 8px;
}

.header-search button,
.mobile-search button,
.primary-button,
.ghost-button,
.search-hero button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button,
.search-hero button {
    color: #fff;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    box-shadow: 0 12px 24px rgba(236, 72, 153, 0.22);
}

.ghost-button {
    color: var(--pink);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.ghost-button:hover,
.search-hero button:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fdf2f8;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--pink);
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    background: #fff;
}

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

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid #f3d2e5;
    border-radius: 18px;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
}

.hero {
    position: relative;
    padding: 42px 0 30px;
    overflow: hidden;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0.62) 48%, rgba(17, 24, 39, 0.18) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.72), transparent 52%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: clamp(24px, 6vw, 76px);
    top: 50%;
    width: min(620px, calc(100% - 48px));
    transform: translateY(-50%);
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    color: #fce7f3;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-tags,
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.badge-row span,
.detail-tags span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #db2777;
    background: #fce7f3;
    font-size: 12px;
    font-weight: 750;
}

.hero .hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

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

.hero-controls {
    position: absolute;
    z-index: 4;
    left: clamp(24px, 6vw, 76px);
    bottom: 34px;
    display: flex;
    gap: 10px;
}

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

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--pink), #fff);
}

.hero-side-card {
    position: absolute;
    z-index: 3;
    right: clamp(22px, 5vw, 64px);
    bottom: 44px;
    width: min(320px, 34%);
    padding: 20px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

.main-section {
    padding: 48px 0;
}

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

.section-heading span {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--pink);
    font-weight: 800;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
}

.section-heading p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    padding: 22px;
    border: 1px solid rgba(236, 72, 153, 0.16);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 90% 10%, rgba(168, 85, 247, 0.2), transparent 48%),
        #fff;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-tile strong {
    display: block;
    margin-bottom: 12px;
    font-size: 22px;
}

.category-tile p {
    margin: 0 0 18px;
    color: var(--muted);
}

.category-tile em {
    color: var(--pink);
    font-style: normal;
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(236, 72, 153, 0.14);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

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

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.72), transparent);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.26);
}

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

.card-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.movie-card h2 {
    margin: 7px 0 8px;
    font-size: 19px;
    line-height: 1.25;
}

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

.compact-card .poster-link {
    aspect-ratio: 16 / 10;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.rank-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(236, 72, 153, 0.14);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.rank-item img {
    width: 110px;
    height: 140px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 20px;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
}

.filter-panel {
    position: sticky;
    top: 82px;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr 180px 180px 180px;
    gap: 12px;
    padding: 14px;
    margin-bottom: 24px;
    border: 1px solid rgba(236, 72, 153, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
}

.filter-panel input,
.filter-panel select,
.search-hero input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #f0d0e4;
    border-radius: 16px;
    background: #fff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--pink);
    font-weight: 750;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 30px;
    align-items: start;
}

.detail-main,
.detail-side,
.text-panel,
.search-panel {
    border: 1px solid rgba(236, 72, 153, 0.14);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.detail-main {
    overflow: hidden;
}

.video-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111827;
}

.video-player video {
    width: 100%;
    height: 100%;
    display: block;
    background: #111827;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.12), rgba(17, 24, 39, 0.68));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 50%;
    font-size: 34px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    box-shadow: 0 18px 40px rgba(236, 72, 153, 0.34);
}

.detail-copy {
    padding: 24px;
}

.detail-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
}

.detail-copy p {
    color: var(--muted);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.detail-side {
    padding: 18px;
}

.detail-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
}

.info-list {
    margin: 18px 0 0;
    display: grid;
    gap: 10px;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px dashed #f0d0e4;
}

.info-list span {
    color: var(--muted);
}

.info-list strong {
    text-align: right;
}

.text-panel {
    padding: 24px;
    margin-top: 24px;
}

.text-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: #4b5563;
    white-space: pre-line;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.search-hero {
    padding: 42px;
    border-radius: 34px;
    color: #fff;
    background:
        radial-gradient(circle at 90% 10%, rgba(96, 165, 250, 0.45), transparent 34%),
        linear-gradient(135deg, #ec4899, #8b5cf6 58%, #3b82f6);
    box-shadow: var(--shadow);
}

.search-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 58px);
}

.search-hero p {
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.84);
}

.search-hero form {
    display: flex;
    gap: 12px;
    max-width: 760px;
}

.search-hero input {
    border-color: rgba(255, 255, 255, 0.24);
}

.search-panel {
    margin-top: 24px;
    padding: 24px;
}

.site-footer {
    margin-top: 56px;
    border-top: 1px solid #f0d0e4;
    background: linear-gradient(180deg, #fff, #fdf2f8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
    padding: 42px 0 24px;
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

.footer-grid p {
    margin: 8px 0 0;
    color: var(--muted);
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #4b5563;
}

.footer-grid a:hover {
    color: var(--pink);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding: 20px 0 28px;
    color: var(--muted);
    border-top: 1px solid #f0d0e4;
    font-size: 14px;
}

.hidden-card {
    display: none !important;
}

.empty-state {
    padding: 28px;
    border: 1px dashed #f0b7d6;
    border-radius: 22px;
    color: var(--muted);
    background: #fff;
    text-align: center;
}

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

    .menu-toggle {
        display: block;
    }

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

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

    .hero-side-card {
        display: none;
    }

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

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

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

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

    .hero {
        padding-top: 18px;
    }

    .hero-shell {
        min-height: 520px;
        border-radius: 24px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        width: auto;
    }

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

    .hero-controls {
        left: 22px;
        bottom: 22px;
    }

    .category-grid,
    .cards-grid,
    .rank-list,
    .related-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-item img {
        width: 92px;
        height: 118px;
    }

    .filter-panel {
        position: static;
        grid-template-columns: 1fr;
    }

    .search-hero {
        padding: 28px;
        border-radius: 24px;
    }

    .search-hero form {
        flex-direction: column;
    }
}
