:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: rgba(255, 255, 255, 0.86);
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --pink: #ec4899;
    --pink-dark: #db2777;
    --blue: #60a5fa;
    --purple: #8b5cf6;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --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", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 40%, #fdf2f8 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.nav-shell {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #f472b6, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-logo {
    font-size: 26px;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pink), var(--blue));
    color: #fff;
    font-size: 15px;
    box-shadow: 0 12px 24px rgba(236, 72, 153, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #374151;
    font-weight: 650;
    font-size: 15px;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--pink);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #374151;
}

.mobile-nav {
    display: none;
    padding: 10px 24px 22px;
    border-top: 1px solid var(--line);
    background: #fff;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.65s ease;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 54px;
    padding: 80px max(24px, calc((100vw - 1280px) / 2 + 24px)) 86px;
}

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

.hero-copy {
    color: #fff;
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 13px;
    font-weight: 800;
    color: var(--pink);
}

.hero-copy h1,
.page-hero h1,
.detail-intro h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-summary {
    margin: 22px 0 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    backdrop-filter: blur(12px);
}

.tag-list span {
    background: #fdf2f8;
    color: var(--pink-dark);
}

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

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

.primary-btn,
.home-search button {
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    box-shadow: 0 16px 28px rgba(236, 72, 153, 0.35);
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.home-search button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    width: min(360px, 100%);
    aspect-ratio: 3 / 4;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
    transform: rotate(2deg);
    background: rgba(255, 255, 255, 0.08);
}

.hero-poster img,
.detail-poster img,
.poster-link img,
.ranking-cover img,
.category-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

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

.home-search {
    max-width: 1180px;
    margin: -46px auto 0;
    position: relative;
    z-index: 5;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 26px;
    box-shadow: var(--shadow);
    padding: 18px;
    backdrop-filter: blur(18px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.site-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.site-search-form input,
.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.site-search-form input:focus,
.filter-grid input:focus,
.filter-grid select:focus {
    border-color: rgba(236, 72, 153, 0.62);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

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

.hot-links a {
    padding: 10px 14px;
    border-radius: 999px;
    background: #f9fafb;
    color: #4b5563;
    font-weight: 700;
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px 0;
}

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

.section-head h2,
.filter-panel h2,
.story-card h2,
.detail-side h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.text-link {
    color: var(--pink-dark);
    font-weight: 800;
}

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

.category-tile,
.category-overview-card,
.filter-panel,
.story-card,
.detail-side {
    background: var(--panel-soft);
    border: 1px solid rgba(229, 231, 235, 0.82);
    border-radius: var(--radius);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.07);
}

.category-tile {
    padding: 22px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover,
.ranking-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.13);
}

.category-tile > span,
.category-overview-card h2 {
    font-size: 22px;
    font-weight: 850;
}

.category-tile p,
.category-overview-card p,
.filter-panel p,
.movie-line,
.story-card p,
.ranking-info p,
.detail-side dd,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.category-samples a {
    font-size: 13px;
    color: var(--pink-dark);
    background: #fdf2f8;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 700;
}

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

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

.movie-card {
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    transition: transform 0.45s ease;
}

.poster-link:hover img {
    transform: scale(1.08);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.76));
    opacity: 0.82;
}

.poster-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.poster-type {
    right: 12px;
    background: rgba(236, 72, 153, 0.9);
}

.rank-badge {
    left: 12px;
    background: rgba(17, 24, 39, 0.82);
}

.poster-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%) scale(0.92);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--pink-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.poster-link:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card h3,
.ranking-card h3,
.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a,
.ranking-card h3 a,
.category-overview-card h2 a {
    transition: color 0.2s ease;
}

.movie-card h3 a:hover,
.ranking-card h3 a:hover,
.category-overview-card h2 a:hover {
    color: var(--pink-dark);
}

.movie-meta {
    margin: 0 0 10px;
    color: #6b7280;
    font-size: 13px;
}

.movie-line {
    margin: 0 0 12px;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.compact-card .movie-line,
.compact-card .tag-list {
    display: none;
}

.ranking-section {
    max-width: 1160px;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 54px 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 22px;
    padding: 14px 18px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-no {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    color: #fff;
    font-weight: 900;
}

.ranking-cover {
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    background: #111827;
}

.ranking-info p {
    margin: 0 0 10px;
}

.page-hero,
.detail-hero {
    color: #fff;
    background-size: cover;
    background-position: center;
}

.page-hero {
    max-width: 1280px;
    margin: 34px auto 0;
    border-radius: 34px;
    padding: 76px 56px;
    background-color: #111827;
    background-image: linear-gradient(135deg, #111827, #831843 62%, #1e3a8a);
    box-shadow: var(--shadow);
}

.page-hero p {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.8;
}

.small-hero h1 {
    font-size: clamp(38px, 5vw, 64px);
}

.filter-panel {
    max-width: 1280px;
    margin: 34px auto 0;
    padding: 28px;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 28px;
    align-items: center;
}

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

.filter-grid label {
    display: grid;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #374151;
}

.empty-state {
    display: none;
    padding: 40px;
    border: 1px dashed #f9a8d4;
    border-radius: 24px;
    text-align: center;
    color: var(--muted);
    background: #fff;
}

.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: 24px;
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-cover {
    min-height: 260px;
    border-radius: 22px;
    display: flex;
    align-items: flex-end;
    padding: 22px;
    overflow: hidden;
    color: #fff;
    background-size: cover;
    background-position: center;
    font-size: 24px;
    font-weight: 900;
}

.detail-hero {
    min-height: 560px;
    padding: 48px 24px 78px;
}

.detail-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: rgba(255, 255, 255, 0.76);
    margin-bottom: 34px;
    font-size: 14px;
}

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

.detail-intro {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    background: rgba(255, 255, 255, 0.08);
}

.movie-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.movie-facts span {
    padding: 9px 13px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.player-section {
    max-width: 1180px;
    margin: -56px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 4;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #030712;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.28);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #030712;
}

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.18), rgba(3, 7, 18, 0.76));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.big-play {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    box-shadow: 0 18px 40px rgba(236, 72, 153, 0.38);
    font-size: 28px;
}

.player-overlay strong {
    max-width: 80%;
    font-size: clamp(22px, 3vw, 38px);
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.story-card,
.detail-side {
    padding: 28px;
}

.story-card p {
    font-size: 17px;
}

.detail-side dl {
    margin: 18px 0 0;
    display: grid;
    gap: 14px;
}

.detail-side dt {
    color: #374151;
    font-weight: 850;
}

.detail-side dd {
    margin: -8px 0 0;
}

.site-footer {
    margin-top: 86px;
    background: linear-gradient(180deg, #ffffff, #f3f4f6);
    border-top: 1px solid var(--line);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px 36px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
}

.footer-grid h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.footer-grid a {
    color: #6b7280;
}

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

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px 24px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

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

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

    .nav-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

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

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

@media (max-width: 820px) {
    .nav-shell {
        padding: 0 18px;
    }

    .site-logo {
        font-size: 21px;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding: 58px 20px 78px;
    }

    .hero-poster {
        display: none;
    }

    .home-search,
    .site-search-form,
    .filter-panel,
    .detail-content,
    .detail-intro,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

    .content-section {
        padding: 52px 18px 0;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .ranking-card {
        grid-template-columns: 42px 78px minmax(0, 1fr);
    }

    .ranking-card .text-link {
        grid-column: 3;
    }

    .page-hero {
        margin: 22px 18px 0;
        padding: 54px 24px;
    }

    .detail-hero {
        padding: 32px 18px 76px;
    }

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

    .player-section {
        margin-top: -38px;
        padding: 0 18px;
    }
}

@media (max-width: 560px) {
    .category-grid,
    .movie-grid,
    .compact-grid,
    .category-overview-grid,
    .filter-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .home-search {
        margin: -28px 18px 0;
    }

    .ranking-card {
        grid-template-columns: 42px 74px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .ranking-info p,
    .ranking-info .tag-list {
        display: none;
    }

    .hero-actions {
        gap: 10px;
    }

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

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