:root {
    color-scheme: dark;
    --bg: #120815;
    --bg-soft: #1d1025;
    --surface: rgba(255, 255, 255, 0.08);
    --surface-strong: rgba(255, 255, 255, 0.14);
    --text: #fff8fb;
    --muted: #cbbdca;
    --line: rgba(255, 255, 255, 0.14);
    --pink: #ff4ea3;
    --orange: #ff9f3d;
    --purple: #8a5cf6;
    --cyan: #3fd8ff;
    --radius: 24px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 6%, rgba(255, 78, 163, 0.28), transparent 34rem),
        radial-gradient(circle at 88% 12%, rgba(255, 159, 61, 0.24), transparent 28rem),
        linear-gradient(135deg, #17071e 0%, #160f2a 42%, #231009 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
    z-index: -1;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(18, 8, 21, 0.82);
    backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--line);
}

.site-header-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    box-shadow: 0 12px 30px rgba(255, 78, 163, 0.28);
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.11);
}

.nav-search {
    width: 280px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.nav-search input,
.wide-search input,
.inline-filter input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.nav-search input::placeholder,
.wide-search input::placeholder,
.inline-filter input::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.nav-search button,
.wide-search button,
.inline-filter button {
    border: 0;
    color: white;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.nav-search button:hover,
.wide-search button:hover,
.inline-filter button:hover,
.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(255, 78, 163, 0.22);
}

.menu-toggle {
    display: none;
    border: 0;
    color: white;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(24, 12, 31, 0.96);
}

.mobile-panel a {
    display: block;
    padding: 12px;
    color: var(--muted);
    border-radius: 14px;
}

.mobile-panel a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.mobile-panel.is-open {
    display: block;
}

.hero-carousel,
.page-hero,
.detail-hero,
.quick-search-panel,
.section-block,
.split-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-carousel {
    position: relative;
    padding: 34px 0 22px;
}

.hero-stage {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #160b1d;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 48px;
    padding: clamp(28px, 5vw, 74px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(22px) saturate(1.25);
    opacity: 0.34;
    transform: scale(1.14);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(18, 8, 21, 0.94), rgba(18, 8, 21, 0.56), rgba(18, 8, 21, 0.88)),
        radial-gradient(circle at 60% 50%, rgba(255, 78, 163, 0.24), transparent 28rem);
}

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 12px;
    color: #ffd36c;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.45rem, 6vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    color: transparent;
    background: linear-gradient(135deg, #fff, #ffd4e9 42%, #ff9f3d);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-desc,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.9;
}

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

.hero-tags span,
.tag-row span {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #ffe5ef;
    background: rgba(255, 255, 255, 0.1);
}

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

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

.primary-btn {
    color: white;
    background: linear-gradient(135deg, var(--pink), var(--orange));
}

.ghost-btn {
    border: 1px solid var(--line);
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.hero-poster {
    justify-self: end;
    display: block;
    width: min(420px, 100%);
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
}

.hero-poster span {
    position: absolute;
    right: 28px;
    bottom: 28px;
    padding: 10px 14px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--purple), var(--pink));
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
    transition: 0.22s ease;
}

.hero-dots button.is-active {
    width: 36px;
    background: linear-gradient(135deg, var(--pink), var(--orange));
}

.quick-search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 520px);
    gap: 22px;
    align-items: center;
    margin-top: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.quick-search-panel h2 {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.quick-search-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.wide-search,
.inline-filter {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.section-block {
    margin-top: 48px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3.8vw, 3rem);
    letter-spacing: -0.04em;
}

.section-head > a {
    color: #ffd36c;
    font-weight: 800;
}

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

.category-card,
.category-overview-card a {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 159, 61, 0.22), transparent 10rem),
        rgba(255, 255, 255, 0.08);
    transition: transform 0.22s ease, background 0.22s ease;
}

.category-card:hover,
.category-overview-card a:hover,
.movie-card:hover {
    transform: translateY(-6px);
}

.category-card span,
.category-overview-card h2 {
    font-size: 1.2rem;
    font-weight: 900;
}

.category-card strong,
.category-overview-card p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(255, 159, 61, 0.48);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #1c1223;
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
    filter: saturate(1.16);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.68), transparent 55%);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    padding: 7px 10px;
    border-radius: 999px;
    color: white;
    font-size: 0.82rem;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    background: linear-gradient(135deg, var(--pink), var(--orange));
}

.rank-badge {
    left: 12px;
    top: 12px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.card-body {
    padding: 16px;
}

.card-body h2 {
    margin: 0 0 8px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.card-body h2 a:hover {
    color: #ffd36c;
}

.meta-line {
    margin: 0 0 10px;
    color: #ffd6a8;
    font-size: 0.86rem;
}

.card-desc {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.92rem;
}

.tag-row span {
    padding: 4px 8px;
    font-size: 0.78rem;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
    gap: 24px;
    margin-top: 48px;
}

.inset-block,
.ranking-panel {
    margin: 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.07);
}

.ranking-panel {
    align-self: start;
    position: sticky;
    top: 92px;
}

.small-head h2 {
    font-size: 1.6rem;
}

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 36px 56px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    transition: 0.22s ease;
}

.rank-item:hover {
    background: rgba(255, 255, 255, 0.14);
}

.rank-item span {
    color: #ffd36c;
    font-weight: 900;
}

.rank-item img {
    width: 56px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-item strong {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.page-hero {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 430px);
    gap: 28px;
    align-items: end;
    margin-top: 34px;
    padding: clamp(28px, 5vw, 60px);
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 80% 10%, rgba(255, 159, 61, 0.26), transparent 24rem),
        radial-gradient(circle at 15% 20%, rgba(138, 92, 246, 0.26), transparent 24rem),
        rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

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

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

.category-overview-card h2,
.category-overview-card p {
    margin: 0;
}

.category-overview-card span {
    color: #ffd36c;
    font-weight: 900;
}

.searchable-card.is-hidden {
    display: none;
}

.detail-hero {
    margin-top: 34px;
    padding: clamp(24px, 5vw, 56px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 78, 163, 0.25), transparent 22rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
    color: var(--muted);
}

.breadcrumb a {
    color: #ffd36c;
}

.detail-layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: clamp(24px, 5vw, 56px);
    align-items: center;
}

.detail-poster {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
}

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

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

.detail-copy .primary-btn {
    margin-top: 26px;
}

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

.movie-player {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #050308;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #050308;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: white;
    cursor: pointer;
    text-align: center;
    background: linear-gradient(180deg, rgba(5, 3, 8, 0.28), rgba(5, 3, 8, 0.82));
}

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

.play-circle {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    box-shadow: 0 24px 50px rgba(255, 78, 163, 0.32);
    font-size: 2rem;
}

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

.player-cover em {
    color: #ffd36c;
    font-style: normal;
    font-weight: 900;
}

.detail-content {
    max-width: 980px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 1.8rem;
}

.detail-content h2 + p {
    margin-top: 0;
}

.detail-content p {
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 2;
}

.site-footer {
    width: min(1240px, calc(100% - 32px));
    margin: 68px auto 0;
    padding: 34px 0 30px;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
}

.footer-logo {
    margin-bottom: 14px;
}

.site-footer p,
.footer-bottom {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

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

.footer-links a {
    color: var(--muted);
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.footer-links a:hover {
    color: white;
    border-color: rgba(255, 159, 61, 0.5);
}

.footer-bottom {
    margin-top: 28px;
    font-size: 0.92rem;
}

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

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

    .hero-poster {
        display: none;
    }

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

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .site-header-inner {
        min-height: 64px;
    }

    .site-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-stage {
        min-height: 560px;
    }

    .hero-slide {
        padding: 28px;
    }

    .quick-search-panel,
    .page-hero,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .inline-filter,
    .wide-search {
        border-radius: 20px;
        align-items: stretch;
        flex-direction: column;
    }

    .inline-filter input,
    .wide-search input {
        padding: 10px 12px;
    }

    .player-section {
        width: min(100% - 24px, 1100px);
    }
}

@media (max-width: 480px) {
    .hero-carousel,
    .page-hero,
    .detail-hero,
    .quick-search-panel,
    .section-block,
    .split-section,
    .site-footer {
        width: min(100% - 20px, 1240px);
    }

    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        border-radius: 24px;
    }

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

    .rank-item em {
        display: none;
    }
}
