* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --ink: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --purple: #7c3aed;
    --pink: #db2777;
    --slate: #0f172a;
    --radius: 22px;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.14);
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.26);
}

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

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

.nav-link {
    padding: 10px 16px;
    color: #475569;
    border-radius: 999px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
    background: #eff6ff;
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: #eff6ff;
    cursor: pointer;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--blue);
    border-radius: 99px;
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.mobile-menu.is-open {
    display: grid;
    gap: 10px;
}

.mobile-menu a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #334155;
    background: #f8fafc;
    font-weight: 700;
}

.mobile-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

main {
    overflow: hidden;
}

.hero-section {
    position: relative;
    min-height: 760px;
    background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.32), transparent 30%), linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #5b21b6 100%);
    color: #ffffff;
}

.hero-slider {
    position: absolute;
    inset: 0;
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    filter: saturate(1.25) contrast(1.05);
}

.hero-overlay,
.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.48) 52%, rgba(15, 23, 42, 0.88));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    align-items: center;
    gap: 54px;
    padding: 88px 0 210px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h2,
.inner-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1;
    letter-spacing: -0.055em;
}

.hero-copy p,
.inner-hero p,
.detail-one-line {
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #1e40af;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 800;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.32);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.2;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

.hero-poster span,
.play-dot,
.big-play {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--pink));
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.28);
}

.hero-poster span {
    left: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    font-size: 22px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 178px;
    z-index: 4;
    width: min(1180px, calc(100% - 32px));
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

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

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

.hero-search-panel {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    width: min(1180px, calc(100% - 32px));
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    transform: translateX(-50%);
}

.hero-search-panel h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.hero-search-panel p {
    margin: 10px 0 16px;
    color: #cbd5e1;
    line-height: 1.7;
}

.hero-search,
.inline-filter {
    display: flex;
    gap: 10px;
}

.hero-search input,
.inline-filter input {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    outline: none;
}

.hero-search button,
.inline-filter button {
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--blue);
    font-weight: 800;
    cursor: pointer;
}

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

.hero-category-links a {
    padding: 8px 13px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 700;
}

.section-block,
.category-preview {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 0;
}

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

.section-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-head p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-kicker {
    color: var(--blue);
}

.section-head > a {
    flex: 0 0 auto;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--blue);
    background: #eff6ff;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 24px;
    color: #ffffff;
    background: var(--slate);
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.35s ease;
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.92));
}

.category-name,
.category-desc,
.category-sample {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-name {
    bottom: 76px;
    font-size: 24px;
    font-weight: 900;
}

.category-desc {
    bottom: 42px;
    color: #dbeafe;
    line-height: 1.45;
}

.category-sample {
    bottom: 18px;
    color: #bfdbfe;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, 0.82);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, 0.76));
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    font-size: 14px;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #db2777);
    font-weight: 900;
}

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

.movie-meta-line,
.movie-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.movie-meta-line span,
.movie-facts span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.movie-card h2 {
    margin: 11px 0 8px;
    font-size: 18px;
    line-height: 1.32;
}

.movie-card h2 a:hover {
    color: var(--blue);
}

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

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

.compact-grid .movie-card h2 {
    font-size: 16px;
}

.rank-section {
    padding-top: 82px;
}

.inner-hero,
.detail-hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    overflow: hidden;
    border-radius: 34px;
    background: linear-gradient(135deg, #0f172a, #1d4ed8 54%, #7c3aed);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.inner-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 36px;
    align-items: center;
    padding: 54px;
}

.inner-hero h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.category-hero,
.rank-hero {
    min-height: 320px;
}

.side-hot-list,
.rank-panel {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.side-hot-list a,
.rank-panel a {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-weight: 800;
}

.side-hot-list em,
.rank-panel em {
    color: #bfdbfe;
    font-style: normal;
}

.rank-panel {
    max-height: 420px;
    overflow: auto;
}

.rank-panel strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.22);
}

.rank-panel span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-hero {
    min-height: 520px;
    display: block;
}

.detail-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
    padding: 58px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
    aspect-ratio: 3 / 4.18;
    height: 100%;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 16px;
    color: #bfdbfe;
    font-weight: 800;
}

.movie-facts {
    margin-top: 18px;
}

.detail-tags {
    margin-top: 18px;
}

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

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

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 5;
    padding: 0;
    border: 0;
    background: #020617;
    cursor: pointer;
}

.play-cover img {
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
    filter: saturate(1.12) contrast(1.05);
}

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

.big-play {
    left: 50%;
    top: 50%;
    width: 88px;
    height: 88px;
    font-size: 34px;
    transform: translate(-50%, -50%);
}

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

.story-card {
    padding: 30px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.story-card h2 {
    margin: 0 0 16px;
    font-size: 28px;
    letter-spacing: -0.03em;
}

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

.prev-next {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.prev-next a {
    padding: 18px 20px;
    border-radius: 18px;
    color: var(--blue);
    background: #eff6ff;
    font-weight: 800;
}

.site-footer {
    margin-top: 84px;
    color: #cbd5e1;
    background: #0f172a;
}

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

.footer-brand {
    color: #ffffff;
    font-size: 24px;
}

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

.site-footer p {
    max-width: 360px;
    line-height: 1.8;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.is-hidden-by-filter {
    display: none;
}

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

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

    .hero-content,
    .inner-hero,
    .detail-inner,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .side-hot-list,
    .rank-panel {
        display: none;
    }

    .detail-inner {
        padding: 42px;
    }

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

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

    .menu-button {
        display: block;
    }

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

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

    .hero-content {
        padding: 70px 0 250px;
        min-height: 520px;
    }

    .hero-search-panel {
        bottom: 18px;
        padding: 18px;
        border-radius: 22px;
    }

    .hero-controls {
        bottom: 214px;
    }

    .hero-search,
    .inline-filter {
        flex-direction: column;
    }

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

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

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

    .movie-card p,
    .tag-row {
        display: none;
    }

    .movie-card h2 {
        font-size: 15px;
    }

    .inner-hero {
        padding: 30px;
        border-radius: 24px;
    }

    .detail-inner {
        padding: 28px;
    }

    .detail-copy h1 {
        font-size: 36px;
    }

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

    .story-card {
        padding: 22px;
    }

    .footer-inner {
        gap: 20px;
    }
}

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

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

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