* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --slate-950: #020617;
    --slate-925: #06101f;
    --slate-900: #0f172a;
    --slate-850: #152033;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --white: #ffffff;
    --orange: #f97316;
    --orange-2: #fb923c;
    --red: #dc2626;
    --pink: #ec4899;
    --blue: #38bdf8;
    --purple: #a855f7;
    --green: #22c55e;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(180deg, var(--slate-950), var(--slate-900) 45%, var(--slate-950));
    color: var(--slate-300);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: var(--white);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
}

.brand-name {
    font-size: clamp(18px, 2vw, 24px);
    background: linear-gradient(90deg, var(--orange-2), #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.nav-link {
    color: var(--slate-300);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--orange-2);
}

.header-search,
.mobile-search,
.big-search {
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    overflow: hidden;
}

.header-search input,
.mobile-search input,
.big-search input {
    width: 210px;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
    padding: 11px 12px;
}

.header-search button,
.mobile-search button,
.big-search button {
    border: 0;
    color: var(--white);
    cursor: pointer;
    padding: 11px 14px;
    background: linear-gradient(90deg, var(--orange), var(--red));
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-search {
    margin-bottom: 14px;
}

.mobile-search input {
    flex: 1;
    width: auto;
}

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

.mobile-link {
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 12px;
    color: var(--slate-300);
    font-weight: 700;
}

.hero {
    position: relative;
    height: 610px;
    overflow: hidden;
    background: var(--slate-950);
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--slate-950) 0%, rgba(15, 23, 42, 0.88) 43%, rgba(15, 23, 42, 0.45) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
}

.hero-content > * {
    max-width: 720px;
}

.hero-badges,
.hero-tags,
.hero-actions,
.tag-row,
.card-labels,
.detail-meta,
.filter-bar,
.hero-category-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-badges span,
.hero-badges a,
.hero-tags span,
.tag-row span {
    color: var(--slate-200, #e2e8f0);
    background: rgba(51, 65, 85, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero-badges span:first-child {
    background: var(--orange);
    color: var(--white);
}

.hero h1 {
    margin: 18px 0 14px;
    color: var(--white);
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0 0 22px;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.72;
    color: var(--slate-300);
}

.primary-btn,
.ghost-btn,
.section-more,
.category-detail-link > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    color: var(--white);
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 16px 35px rgba(220, 38, 38, 0.28);
}

.ghost-btn,
.section-more {
    color: var(--slate-200, #e2e8f0);
    background: rgba(15, 23, 42, 0.48);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.movie-card:hover,
.category-card:hover,
.rank-row:hover,
.related-row:hover {
    transform: translateY(-3px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(2, 6, 23, 0.56);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

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

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

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: var(--slate-500);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--orange);
}

.hero-category-strip {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 82px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
}

.hero-chip {
    padding: 10px 14px;
    color: var(--slate-200, #e2e8f0);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.content-section,
.category-section,
.ranking-panel,
.detail-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section,
.category-section,
.ranking-panel {
    padding: 64px 0;
}

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

.eyebrow {
    margin: 0 0 8px;
    color: var(--orange-2);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-head h2,
.inner-hero h1,
.detail-main h1,
.sticky-card h2,
.movie-info-panel h2 {
    margin: 0;
    color: var(--white);
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--slate-800);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #3f1d13);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.26) 58%, rgba(0, 0, 0, 0.08));
}

.card-labels {
    position: absolute;
    top: 12px;
    right: 12px;
}

.card-labels span,
.rank-badge {
    padding: 6px 8px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.88);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.card-labels span:first-child,
.rank-badge {
    background: var(--orange);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 34px;
    text-align: center;
}

.play-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--orange);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.75);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
    padding: 16px;
}

.card-body h2 {
    margin: 0 0 8px;
    color: var(--white);
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    margin: 0 0 10px;
    color: var(--slate-300);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-line {
    margin: 0 0 12px;
    color: var(--slate-400);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-row {
    gap: 6px;
}

.tag-row span {
    padding: 5px 8px;
    font-size: 12px;
    color: var(--slate-300);
}

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

.category-card,
.category-detail-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: var(--slate-800);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    opacity: 0.52;
}

.category-glow,
.category-card::after,
.category-detail-card::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.72), rgba(220, 38, 38, 0.52));
    mix-blend-mode: screen;
}

.category-card strong,
.category-card small {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-card strong {
    bottom: 62px;
    color: var(--white);
    font-size: 22px;
}

.category-card small {
    bottom: 18px;
    color: var(--slate-200, #e2e8f0);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ranking-panel {
    padding-top: 38px;
}

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

.rank-row,
.related-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover,
.related-row:hover {
    border-color: rgba(249, 115, 22, 0.5);
}

.rank-num {
    width: 42px;
    color: var(--orange-2);
    font-weight: 900;
    font-size: 20px;
    text-align: center;
}

.rank-row img,
.related-row img {
    width: 120px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--slate-800);
}

.rank-info,
.related-row span {
    min-width: 0;
}

.rank-info strong,
.related-row strong {
    display: block;
    color: var(--white);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-info small,
.related-row small {
    color: var(--slate-400);
}

.inner-hero {
    min-height: 280px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 20% 10%, rgba(249, 115, 22, 0.22), transparent 34%), linear-gradient(135deg, #160f0b, var(--slate-950) 48%, #111827);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.inner-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 50px 0;
}

.inner-hero h1 {
    font-size: clamp(38px, 6vw, 58px);
    line-height: 1.08;
    margin-bottom: 16px;
}

.inner-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--slate-300);
    line-height: 1.75;
    font-size: 18px;
}

.filter-bar {
    margin-top: 24px;
}

.filter-bar button {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--slate-300);
    background: rgba(15, 23, 42, 0.76);
    padding: 9px 13px;
    cursor: pointer;
}

.filter-bar button.active,
.filter-bar button:hover {
    color: var(--white);
    background: var(--orange);
}

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

.category-detail-link {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 260px;
    flex-direction: column;
    justify-content: flex-end;
    gap: 14px;
    padding: 28px;
}

.category-detail-card::before {
    opacity: 0.42;
}

.category-detail-link h2 {
    margin: 0;
    color: var(--white);
    font-size: 30px;
}

.category-detail-link p {
    margin: 0;
    color: var(--slate-200, #e2e8f0);
    line-height: 1.65;
}

.category-detail-link > span {
    width: fit-content;
    color: var(--white);
    background: linear-gradient(90deg, var(--orange), var(--red));
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-links a {
    color: var(--slate-200, #e2e8f0);
    background: rgba(2, 6, 23, 0.38);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 13px;
}

.big-search {
    width: min(620px, 100%);
    margin-top: 24px;
}

.big-search input {
    flex: 1;
    width: auto;
    padding: 15px 18px;
}

.big-search button {
    padding: 15px 22px;
}

.detail-page {
    padding: 34px 0 70px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--slate-400);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--orange-2);
}

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

.player-card,
.movie-info-panel,
.sticky-card {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.player-card {
    overflow: hidden;
    margin-bottom: 24px;
}

.video-shell {
    position: relative;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.video-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    cursor: pointer;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.08));
}

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

.player-overlay span {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.34);
    font-size: 32px;
}

.movie-info-panel {
    padding: 28px;
}

.movie-info-panel h1 {
    font-size: clamp(30px, 4vw, 48px);
    margin-bottom: 16px;
}

.detail-meta span {
    color: var(--slate-300);
    background: var(--slate-800);
    border-radius: 999px;
    padding: 8px 12px;
}

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

.movie-info-panel section + section {
    margin-top: 28px;
}

.movie-info-panel h2 {
    font-size: 22px;
    margin-bottom: 12px;
}

.movie-info-panel p {
    margin: 0 0 12px;
    line-height: 1.85;
    color: var(--slate-300);
}

.sticky-card {
    position: sticky;
    top: 94px;
    padding: 20px;
}

.sticky-card h2 {
    margin-bottom: 18px;
    font-size: 24px;
}

.sticky-card .related-row + .related-row {
    margin-top: 12px;
}

.more-related {
    width: 100%;
    padding-bottom: 0;
}

.site-footer {
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--slate-400);
}

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

.footer-brand {
    margin-bottom: 16px;
}

.site-footer h2 {
    color: var(--white);
    font-size: 18px;
    margin: 0 0 14px;
}

.site-footer p {
    line-height: 1.75;
    margin: 0;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li + li {
    margin-top: 9px;
}

.site-footer a:hover {
    color: var(--orange-2);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 80;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red));
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-top:hover {
    transform: translateY(-3px);
}

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

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

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

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

    .sticky-card {
        position: static;
    }

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

@media (max-width: 760px) {
    .hero {
        height: 620px;
    }

    .hero-content {
        justify-content: flex-start;
        padding-top: 92px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-control {
        display: none;
    }

    .hero-category-strip {
        bottom: 76px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .hero-chip {
        white-space: nowrap;
    }

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

    .movie-grid,
    .category-grid,
    .rank-list,
    .category-detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-row img,
    .related-row img {
        width: 98px;
        height: 64px;
    }

    .inner-hero {
        min-height: 250px;
    }

    .movie-info-panel,
    .sticky-card {
        padding: 20px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .header-inner,
    .content-section,
    .category-section,
    .ranking-panel,
    .detail-page,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .brand-name {
        font-size: 17px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .hero-content {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-actions {
        width: 100%;
    }
}
