:root {
    --pink: #ec4899;
    --pink-dark: #db2777;
    --purple: #8b5cf6;
    --purple-dark: #581c87;
    --yellow: #facc15;
    --ink: #1f2937;
    --muted: #6b7280;
    --soft: #fff1f8;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(126, 34, 206, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #fff1f8 0%, #f5edff 45%, #fff7fb 100%);
}

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

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

img.is-missing {
    opacity: 0;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #ec4899, #8b5cf6, #f472b6);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.28);
}

.nav-wrap {
    max-width: 1280px;
    min-height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: rgba(250, 204, 21, 0.92);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
    font-size: 16px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.nav-links a {
    color: #ffffff;
    padding: 9px 14px;
    border-radius: 999px;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.94);
    color: var(--pink-dark);
    transform: translateY(-1px);
}

.site-search {
    width: 270px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
}

.site-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 8px 8px 8px 12px;
    color: var(--ink);
}

.site-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    padding: 8px 15px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(236, 72, 153, 0.24);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 8px 11px;
    cursor: pointer;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.65), transparent 32%), linear-gradient(135deg, #111827, #581c87);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08));
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, calc(100% - 48px));
    margin-left: max(24px, calc((100% - 1180px) / 2));
    color: #ffffff;
}

.hero-label {
    display: inline-flex;
    padding: 9px 17px;
    border-radius: 999px;
    background: var(--pink);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.36);
}

.hero-copy h1 {
    margin: 22px 0 16px;
    font-size: clamp(36px, 7vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 22px rgba(0, 0, 0, 0.42);
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
    line-height: 1.7;
}

.hero-tags,
.detail-tags,
.card-tags,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 13px;
    line-height: 1;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

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

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

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

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(8px);
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 18px 36px rgba(139, 92, 246, 0.28);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 38px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.34);
    transform: translateY(-50%) scale(1.05);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.home-search-panel,
.section-wrap,
.page-main,
.detail-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.home-search-panel {
    margin-top: -44px;
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.home-search-panel h2 {
    margin: 0 0 6px;
    font-size: 30px;
}

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

.home-search-panel form,
.search-page-form {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid rgba(236, 72, 153, 0.12);
}

.home-search-panel input,
.search-page-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 11px 15px;
}

.section-wrap {
    padding: 46px 0 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 22px;
}

.section-title span {
    font-size: 26px;
}

.section-title h2 {
    margin: 0;
    font-size: 30px;
}

.section-title a {
    margin-left: auto;
    color: var(--pink-dark);
    font-weight: 700;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 12px 28px rgba(126, 34, 206, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(236, 72, 153, 0.22);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
}

.poster-bg {
    display: block;
    aspect-ratio: 3 / 4;
    background: radial-gradient(circle at 22% 16%, rgba(250, 204, 21, 0.34), transparent 24%), linear-gradient(135deg, #ec4899, #7c3aed);
}

.poster-bg img,
.rank-poster img,
.category-tile img,
.detail-poster img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-bg img,
.category-tile:hover img {
    transform: scale(1.08);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(236, 72, 153, 0.92);
    box-shadow: 0 8px 18px rgba(236, 72, 153, 0.26);
}

.card-body {
    padding: 17px;
}

.card-body h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--pink-dark);
}

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

.movie-card.compact .card-body h3 {
    font-size: 15px;
}

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

.card-tags span {
    color: #be185d;
    background: #fce7f3;
}

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

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

.category-tile {
    position: relative;
    min-height: 176px;
    overflow: hidden;
    border-radius: 24px;
    padding: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #db2777, #7c3aed);
    box-shadow: var(--shadow);
}

.category-tile strong,
.category-tile em {
    position: relative;
    z-index: 2;
    display: block;
}

.category-tile strong {
    font-size: 22px;
    margin-bottom: 9px;
}

.category-tile em {
    max-width: 76%;
    color: rgba(255, 255, 255, 0.84);
    font-style: normal;
    line-height: 1.55;
}

.category-tile img {
    position: absolute;
    right: -10px;
    bottom: -22px;
    width: 128px;
    height: 170px;
    border-radius: 16px;
    opacity: 0.78;
    transform: rotate(7deg);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.tile-glow {
    position: absolute;
    inset: auto -50px -70px auto;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.35);
    filter: blur(8px);
}

.page-main {
    padding: 34px 0 60px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 30px;
    padding: 46px;
    color: #ffffff;
    background: radial-gradient(circle at 78% 12%, rgba(250, 204, 21, 0.3), transparent 26%), linear-gradient(120deg, #db2777, #7c3aed 58%, #4c1d95);
    box-shadow: var(--shadow);
}

.page-hero.slim {
    min-height: 190px;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 52px);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.7;
}

.page-hero span {
    width: max-content;
    margin-bottom: 12px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.hero-inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-inline-links a {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 86px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(126, 34, 206, 0.1);
}

.rank-num {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--pink), var(--purple));
}

.rank-num.wide {
    font-size: 13px;
}

.rank-poster {
    width: 86px;
    height: 116px;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #ec4899, #7c3aed);
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info h3 a:hover {
    color: var(--pink-dark);
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.6;
}

.rank-meta span {
    color: #6d28d9;
    background: #ede9fe;
}

.rank-action {
    padding: 10px 18px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
    background: var(--pink);
}

.detail-main {
    padding: 28px 0 60px;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 32px;
    padding: 30px;
    border-radius: 30px;
    color: #ffffff;
    background: radial-gradient(circle at 78% 20%, rgba(250, 204, 21, 0.26), transparent 28%), linear-gradient(135deg, #111827, #581c87 50%, #db2777);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #ec4899, #7c3aed);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.26);
}

.detail-info {
    align-self: center;
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.12;
}

.detail-line {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
    line-height: 1.75;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

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

.detail-tags {
    margin-bottom: 24px;
}

.detail-tags span {
    color: #ffffff;
    background: rgba(236, 72, 153, 0.5);
}

.player-section,
.content-section {
    margin-top: 28px;
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 32px rgba(126, 34, 206, 0.12);
}

.player-section h2,
.content-section h2 {
    margin: 0 0 18px;
    font-size: 26px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #030712;
    aspect-ratio: 16 / 9;
}

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #111827;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.25));
}

.player-cover[hidden] {
    display: none;
}

.play-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 5;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    box-shadow: 0 18px 42px rgba(236, 72, 153, 0.38);
    transform: translate(-50%, -50%);
}

.content-section p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.detail-related {
    width: 100%;
}

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

.search-hero {
    gap: 22px;
}

.search-page-form {
    width: min(720px, 100%);
    background: rgba(255, 255, 255, 0.96);
}

.site-footer {
    margin-top: 64px;
    color: #ffffff;
    background: linear-gradient(90deg, #4c1d95, #831843, #581c87);
}

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

.footer-inner strong {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
}

.footer-inner p {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-links a {
    padding: 8px 13px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 1100px) {
    .site-search {
        display: none;
    }

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

    .poster-strip,
    .related-grid,
    .category-grid.large {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .nav-wrap {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-bottom: 8px;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.12);
    }

    .hero-carousel {
        height: 500px;
    }

    .hero-copy {
        margin: 0 auto;
        width: calc(100% - 36px);
    }

    .hero-copy p {
        font-size: 17px;
    }

    .home-search-panel {
        grid-template-columns: 1fr;
        margin-top: -28px;
    }

    .movie-grid,
    .feature-grid,
    .poster-strip,
    .category-grid,
    .category-grid.large,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .rank-action {
        grid-column: 3;
        width: max-content;
    }

    .rank-poster {
        width: 70px;
        height: 94px;
    }

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

    .detail-poster {
        width: min(300px, 100%);
        margin: 0 auto;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .brand {
        font-size: 21px;
    }

    .hero-control {
        display: none;
    }

    .hero-copy h1 {
        font-size: 34px;
    }

    .home-search-panel,
    .page-hero,
    .detail-hero,
    .player-section,
    .content-section {
        border-radius: 20px;
        padding: 20px;
    }

    .home-search-panel form,
    .search-page-form {
        border-radius: 18px;
        flex-direction: column;
    }

    .movie-grid,
    .feature-grid,
    .poster-strip,
    .category-grid,
    .category-grid.large,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 1fr;
    }

    .rank-num,
    .rank-poster {
        display: none;
    }

    .rank-action {
        grid-column: auto;
    }
}
