:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(168, 85, 247, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --brand: #a855f7;
    --brand-2: #ec4899;
    --brand-3: #22d3ee;
    --danger: #fb7185;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(168, 85, 247, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.16), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.36);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 14px 34px rgba(168, 85, 247, 0.38);
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(90deg, #c084fc, #f0abfc, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-panel a {
    padding: 10px 14px;
    border-radius: 14px;
    color: #dbeafe;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-panel input,
.filter-panel input,
.filter-panel select {
    min-width: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(216, 180, 254, 0.28);
    border-radius: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    width: 230px;
    padding: 10px 14px;
}

.header-search input:focus,
.mobile-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(216, 180, 254, 0.9);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.16);
}

.header-search button,
.mobile-panel button {
    padding: 10px 16px;
    border: 0;
    color: #fff;
    border-radius: 16px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.mobile-panel {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 22px 18px;
    border-top: 1px solid rgba(216, 180, 254, 0.16);
}

.mobile-panel nav,
.mobile-panel form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.mobile-panel input {
    width: 100%;
    padding: 12px 14px;
}

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

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.75) 42%, rgba(15, 23, 42, 0.22) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, transparent 44%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 92px 22px 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-tags,
.detail-meta,
.movie-meta,
.tag-row,
.source-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-meta span,
.movie-meta span,
.tag-row span {
    padding: 6px 12px;
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    font-size: 13px;
}

.hero-tags span:first-child {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.9), rgba(236, 72, 153, 0.9));
}

.hero-content h1 {
    max-width: 900px;
    margin: 20px 0 16px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 780px;
    margin: 0 0 28px;
    color: #e2e8f0;
    font-size: clamp(17px, 2.2vw, 24px);
}

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

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

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 44px rgba(168, 85, 247, 0.34);
}

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

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.62);
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
    backdrop-filter: blur(14px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

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

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: -54px;
    position: relative;
    z-index: 4;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(88, 28, 135, 0.55));
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 8px;
    color: #c084fc;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.intro-strip h2,
.section-heading h2,
.page-hero h1,
.text-panel h2,
.side-panel h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.intro-strip h2 {
    font-size: clamp(28px, 4vw, 48px);
}

.intro-strip p:last-child,
.section-heading p,
.page-hero p,
.text-panel p,
.side-panel p {
    color: var(--muted);
}

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

.section-heading h2 {
    font-size: clamp(28px, 3vw, 42px);
}

.section-heading p {
    margin: 8px 0 0;
    max-width: 760px;
}

.section-heading > a {
    color: #d8b4fe;
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.82));
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(216, 180, 254, 0.45);
    box-shadow: 0 28px 68px rgba(88, 28, 135, 0.24);
}

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

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

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

.poster-badge,
.play-chip {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    background: rgba(2, 6, 23, 0.74);
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 26px rgba(236, 72, 153, 0.26);
}

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

.movie-meta {
    margin-bottom: 10px;
}

.movie-meta span {
    padding: 4px 9px;
    font-size: 12px;
    color: #c4b5fd;
    background: rgba(88, 28, 135, 0.3);
}

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

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

.tag-row span {
    color: #e9d5ff;
    padding: 4px 9px;
    font-size: 12px;
    background: rgba(168, 85, 247, 0.16);
}

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

.category-tile,
.overview-tile {
    position: relative;
    overflow: hidden;
    min-height: 154px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.24), transparent 12rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.78), rgba(88, 28, 135, 0.44));
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.24);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.overview-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(216, 180, 254, 0.5);
}

.category-tile span,
.overview-tile span {
    display: block;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong,
.overview-tile strong {
    display: block;
    margin-top: 10px;
    color: #f0abfc;
    font-size: 34px;
}

.category-tile em {
    position: absolute;
    right: 22px;
    bottom: 20px;
    color: var(--muted);
    font-style: normal;
}

.overview-tile {
    min-height: 250px;
}

.overview-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
}

.overview-tile span,
.overview-tile strong,
.overview-tile p {
    position: relative;
    z-index: 1;
}

.page-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(88, 28, 135, 0.42), rgba(2, 6, 23, 0.92)),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.26), transparent 28rem);
    border-bottom: 1px solid var(--line);
}

.page-hero > div {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 22px;
}

.page-hero h1 {
    font-size: clamp(40px, 6vw, 76px);
}

.page-hero p {
    max-width: 780px;
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px;
    gap: 12px;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.66);
}

.filter-panel.wide {
    grid-template-columns: minmax(220px, 1fr) 150px 150px 150px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 13px 14px;
}

.result-count {
    margin-bottom: 20px;
    color: var(--subtle);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 92px minmax(0, 1fr) 96px;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.7);
}

.rank-number {
    font-size: 26px;
    font-weight: 950;
    color: #f0abfc;
    text-align: center;
}

.rank-thumb {
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    background: #1e293b;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-body h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-body p {
    margin: 0 0 10px;
    color: var(--muted);
}

.rank-action {
    justify-self: end;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 900;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    background: #020617;
}

.detail-bg,
.detail-mask {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.detail-bg {
    object-fit: cover;
    filter: blur(16px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.52;
}

.detail-mask {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.62)),
        linear-gradient(0deg, #020617 0%, transparent 34%);
}

.detail-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 640px;
    margin: 0 auto;
    padding: 82px 22px;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(216, 180, 254, 0.28);
    box-shadow: 0 35px 85px rgba(2, 6, 23, 0.48);
}

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

.breadcrumb {
    display: flex;
    gap: 8px;
    color: #d8b4fe;
    margin-bottom: 12px;
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 850px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 20px;
}

.detail-tags {
    margin: 18px 0 26px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
    align-content: start;
}

.player-card,
.text-panel,
.side-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.18), rgba(2, 6, 23, 0.62));
}

.player-overlay span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 20px 48px rgba(168, 85, 247, 0.38);
    font-size: 30px;
}

.player-overlay strong {
    font-size: 22px;
}

.player-overlay em {
    color: var(--muted);
    font-style: normal;
}

.player-overlay.hidden {
    display: none;
}

.source-row {
    padding: 14px;
    background: rgba(2, 6, 23, 0.38);
}

.source-row button {
    padding: 8px 14px;
    border: 1px solid rgba(216, 180, 254, 0.22);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.source-row button.active {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.text-panel,
.side-panel {
    padding: 24px;
}

.text-panel p {
    margin: 14px 0 0;
    font-size: 17px;
}

.side-panel dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 18px 0 0;
}

.side-panel dt {
    color: var(--subtle);
}

.side-panel dd {
    margin: 0;
    color: #fff;
}

.wide-btn {
    width: 100%;
    margin-top: 12px;
}

.site-footer {
    margin-top: 52px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.7);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
    gap: 28px;
}

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 12px;
}

.footer-grid p {
    color: var(--muted);
}

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

.footer-grid a:hover {
    color: #d8b4fe;
}

.copyright {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 22px 34px;
    color: var(--subtle);
    border-top: 1px solid rgba(168, 85, 247, 0.14);
}

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

@media (max-width: 1180px) {
    .movie-grid,
    .compact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

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

    .menu-toggle {
        display: grid;
        place-items: center;
    }

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

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

    .intro-strip,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .detail-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

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

    .rank-item {
        grid-template-columns: 48px 78px minmax(0, 1fr);
    }

    .rank-action {
        grid-column: 3;
        justify-self: start;
    }

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

@media (max-width: 640px) {
    .brand-text {
        font-size: 18px;
    }

    .hero-content {
        padding-top: 70px;
    }

    .hero-arrow {
        display: none;
    }

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

    .content-section {
        padding: 36px 16px;
    }

    .page-hero > div,
    .detail-inner,
    .header-inner,
    .mobile-panel {
        padding-left: 16px;
        padding-right: 16px;
    }

    .rank-item {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .rank-thumb {
        display: none;
    }

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