:root {
    color-scheme: dark;
    --bg: #09090b;
    --bg-soft: #111116;
    --bg-card: rgba(24, 24, 27, 0.78);
    --bg-card-strong: rgba(31, 31, 36, 0.94);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #f7f7f8;
    --muted: #a1a1aa;
    --muted-strong: #d4d4d8;
    --orange: #f97316;
    --orange-soft: #fb923c;
    --red: #dc2626;
    --rose: #f43f5e;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
    --radius: 24px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(220, 38, 38, 0.16), transparent 28rem),
        linear-gradient(180deg, #050506 0%, var(--bg) 42%, #0f0f12 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(9, 9, 11, 0.74);
    backdrop-filter: blur(20px);
    transition: background 0.24s ease, box-shadow 0.24s ease;
}

.site-header.is-scrolled {
    background: rgba(9, 9, 11, 0.92);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.nav-shell,
.footer-inner,
.page-shell,
.hero-content,
.hero-tools,
.detail-hero,
.inner-hero {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.nav-shell {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.36);
}

.brand-text {
    font-size: 1.12rem;
}

.main-nav,
.mobile-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--muted-strong);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(249, 115, 22, 0.16);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: #fff;
}

.mobile-nav {
    display: none;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(18, 18, 22, 0.92);
}

.hero-slider {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.9s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 5, 6, 0.94) 0%, rgba(9, 9, 11, 0.78) 42%, rgba(9, 9, 11, 0.38) 100%),
        linear-gradient(180deg, rgba(9, 9, 11, 0.24), #09090b 100%),
        var(--hero-image) center / cover no-repeat;
    filter: saturate(1.08);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 42%, rgba(249, 115, 22, 0.32), transparent 20rem),
        radial-gradient(circle at 72% 36%, rgba(244, 63, 94, 0.22), transparent 24rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 118px 0 148px;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px 12px;
    border: 1px solid rgba(249, 115, 22, 0.38);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.13);
    font-size: 0.86rem;
    font-weight: 800;
}

.hero-copy h1,
.inner-hero h1,
.detail-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.5rem, 7vw, 5.4rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.hero-copy p,
.inner-hero p,
.detail-copy p {
    max-width: 720px;
    margin: 24px 0 0;
    color: var(--muted-strong);
    font-size: clamp(1rem, 2vw, 1.25rem);
}

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

.hero-meta,
.detail-meta {
    margin: 24px 0 0;
}

.hero-meta span,
.detail-meta span,
.meta-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #f4f4f5;
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.82rem;
}

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

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

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

.primary-button,
.hero-search button {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.28);
}

.ghost-button,
.section-more {
    border: 1px solid var(--line-strong);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 34px;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.28), rgba(220, 38, 38, 0.16));
    box-shadow: var(--shadow);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 14px;
    z-index: -1;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.46), rgba(244, 63, 94, 0.35));
    filter: blur(32px);
}

.hero-poster img,
.movie-card img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-tools {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    transform: translateX(-50%);
}

.hero-search {
    display: flex;
    width: min(560px, 100%);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(18, 18, 22, 0.74);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.hero-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    padding: 0 16px;
}

.hero-search input::placeholder {
    color: var(--muted);
}

.hero-dots {
    display: inline-flex;
    gap: 9px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(18, 18, 22, 0.62);
    backdrop-filter: blur(16px);
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 30px;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.page-shell {
    padding: 44px 0 72px;
}

.content-section {
    margin-top: 36px;
}

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

.section-head h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.42);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.poster-link img {
    transition: transform 0.35s ease, filter 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.56), transparent 54%);
}

.card-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

.card-body {
    padding: 16px;
}

.meta-row {
    gap: 6px;
    margin-bottom: 10px;
}

.meta-row span {
    min-height: 24px;
    padding: 3px 8px;
    color: #f4f4f5;
    font-size: 0.74rem;
}

.movie-card h2 {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.32;
}

.movie-card h2 a:hover,
.footer-links a:hover,
.mini-links a:hover,
.breadcrumbs a:hover {
    color: var(--orange-soft);
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 8px 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.12);
    font-size: 0.78rem;
}

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

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(220, 38, 38, 0.08)),
        rgba(24, 24, 27, 0.7);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.42);
}

.category-tile span,
.category-title-link {
    color: #fff;
    font-size: 1.18rem;
    font-weight: 900;
}

.category-tile p,
.category-overview-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.mini-links {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    color: var(--muted-strong);
    font-size: 0.92rem;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(24, 24, 27, 0.7);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(249, 115, 22, 0.38);
    background: rgba(31, 31, 36, 0.88);
}

.rank-num {
    color: var(--orange-soft);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    color: #fff;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.inner-hero {
    padding: 74px 0 36px;
}

.inner-hero div,
.detail-copy {
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 34px;
    background:
        radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.24), transparent 22rem),
        linear-gradient(135deg, rgba(24, 24, 27, 0.88), rgba(16, 16, 20, 0.78));
    box-shadow: var(--shadow);
}

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

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: rgba(24, 24, 27, 0.74);
}

.search-box {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.search-box span {
    color: var(--muted-strong);
    font-weight: 800;
}

.search-box input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    outline: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    padding: 0 14px;
}

.search-box input:focus {
    border-color: rgba(249, 115, 22, 0.58);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.06);
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #fff;
    border-color: rgba(249, 115, 22, 0.42);
    background: rgba(249, 115, 22, 0.16);
}

.empty-state {
    margin: 0;
    color: #fecaca;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 32px;
    padding: 68px 0 24px;
    align-items: stretch;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

.detail-shell {
    padding-top: 18px;
}

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

.video-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle at center, rgba(249, 115, 22, 0.28), transparent 18rem),
        rgba(0, 0, 0, 0.28);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.42);
    font-size: 2rem;
    transform: translateX(3px);
}

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

.detail-text {
    color: var(--muted-strong);
}

.detail-text p {
    margin: 0;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: rgba(24, 24, 27, 0.74);
    font-size: 1.05rem;
}

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

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 5, 6, 0.72);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr 1fr;
    gap: 28px;
    padding: 46px 0;
    color: var(--muted);
}

.footer-logo {
    margin-bottom: 10px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 900;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 1rem;
}

.site-footer p {
    margin: 0;
}

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

.footer-links a {
    color: var(--muted-strong);
}

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

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

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

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

    .mobile-toggle {
        display: block;
    }

    .mobile-nav.is-open {
        display: flex;
        flex-wrap: wrap;
    }

    .hero-slider {
        min-height: 860px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 92px;
        padding-bottom: 180px;
    }

    .hero-poster {
        width: min(280px, 86vw);
        margin: 0 auto;
    }

    .hero-tools {
        align-items: stretch;
        flex-direction: column;
    }

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

    .hero-dots {
        width: fit-content;
        margin: 0 auto;
    }

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

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

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

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

    .detail-poster {
        width: min(300px, 82vw);
        margin: 0 auto;
    }

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

@media (max-width: 560px) {
    .nav-shell,
    .footer-inner,
    .page-shell,
    .hero-content,
    .hero-tools,
    .detail-hero,
    .inner-hero {
        width: min(100% - 22px, var(--container));
    }

    .brand-text {
        font-size: 1rem;
    }

    .hero-slider {
        min-height: 820px;
    }

    .hero-copy h1,
    .inner-hero h1,
    .detail-copy h1 {
        letter-spacing: -0.05em;
    }

    .hero-search {
        display: grid;
        gap: 8px;
        border-radius: 22px;
    }

    .hero-search input,
    .hero-search button {
        width: 100%;
        min-height: 44px;
    }

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

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

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

    .inner-hero div,
    .detail-copy {
        padding: 24px;
        border-radius: 26px;
    }

    .search-box {
        grid-template-columns: 1fr;
    }

    .video-frame {
        border-radius: 20px;
    }

    .player-overlay span {
        width: 64px;
        height: 64px;
        font-size: 1.55rem;
    }
}
