:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(30, 41, 59, 0.62);
    --panel-strong: rgba(15, 23, 42, 0.88);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f97316;
    --accent-soft: rgba(249, 115, 22, 0.16);
    --accent-2: #f59e0b;
    --radius: 18px;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 0%, rgba(249, 115, 22, 0.16), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.icon {
    width: 1.1em;
    height: 1.1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.84);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    width: min(1180px, calc(100% - 2rem));
    min-height: 72px;
    margin: 0 auto;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 0.8rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 32px rgba(249, 115, 22, 0.35);
}

.brand-text {
    font-size: 1.18rem;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a {
    padding: 0.7rem 0.85rem;
    border-radius: 999px;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: #fed7aa;
}

.desktop-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-search {
    display: flex;
    align-items: center;
    width: min(290px, 30vw);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.48);
}

.nav-search input {
    width: 100%;
    min-width: 0;
    padding: 0.65rem 0.15rem 0.65rem 1rem;
    color: #fff;
    background: transparent;
    border: 0;
    outline: 0;
}

.nav-search button {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    color: var(--muted-strong);
    background: transparent;
    border: 0;
}

.mobile-menu-button {
    display: none;
    width: 2.7rem;
    height: 2.7rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    border-radius: 0.9rem;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 0 0 1rem;
}

.mobile-nav.is-open {
    display: grid;
    gap: 0.55rem;
}

.mobile-nav a {
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(2, 6, 23, 0.38);
}

.hero-carousel {
    position: relative;
    height: min(760px, 72vh);
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

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

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.62) 44%, rgba(15, 23, 42, 0.08) 100%),
        linear-gradient(0deg, #020617 0%, transparent 48%);
}

.hero-content {
    position: absolute;
    left: max(1rem, calc((100vw - 1180px) / 2));
    bottom: clamp(3rem, 8vw, 7rem);
    width: min(720px, calc(100% - 2rem));
}

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: max-content;
    margin-bottom: 1rem;
    padding: 0.35rem 0.75rem;
    color: #fdba74;
    background: var(--accent-soft);
    border: 1px solid rgba(251, 146, 60, 0.32);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-content h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    max-width: 46rem;
    margin: 0 0 1.4rem;
    color: #e2e8f0;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.75;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.6rem;
}

.hero-meta span,
.detail-meta span,
.detail-meta a {
    padding: 0.42rem 0.72rem;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    min-height: 3rem;
    padding: 0.78rem 1.25rem;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 14px 34px rgba(249, 115, 22, 0.32);
}

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

.hero-dots {
    position: absolute;
    right: max(1rem, calc((100vw - 1180px) / 2));
    bottom: 3rem;
    display: flex;
    gap: 0.45rem;
}

.hero-dot {
    width: 0.7rem;
    height: 0.7rem;
    padding: 0;
    background: rgba(255, 255, 255, 0.55);
    border: 0;
    border-radius: 999px;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 2.2rem;
    background: #fb923c;
}

.search-band,
.content-section,
.page-shell,
.detail-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.search-band {
    margin-top: -2.4rem;
    position: relative;
    z-index: 3;
}

.search-band-inner {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 520px);
    gap: 1rem;
    align-items: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.84);
    border: 1px solid var(--line);
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-band h2 {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 2rem);
}

.hero-search,
.page-filter {
    display: flex;
    gap: 0.7rem;
}

.hero-search input,
.page-filter input {
    flex: 1;
    min-width: 0;
    padding: 0.9rem 1rem;
    color: #fff;
    background: rgba(2, 6, 23, 0.62);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
}

.hero-search input:focus,
.page-filter input:focus,
.nav-search input:focus {
    border-color: rgba(251, 146, 60, 0.55);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

.hero-search button,
.page-filter button {
    padding: 0 1.2rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: 0;
    border-radius: 999px;
    font-weight: 800;
}

.content-section {
    padding: clamp(3rem, 7vw, 5rem) 0 0;
}

.content-section--flush {
    width: 100%;
    padding-top: 2rem;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.5rem;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    letter-spacing: -0.03em;
}

.section-heading p {
    max-width: 48rem;
    margin: 0.55rem 0 0;
    color: var(--muted);
}

.section-more,
.text-link {
    color: #fdba74;
    font-weight: 800;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    background: rgba(30, 41, 59, 0.86);
    border-color: rgba(251, 146, 60, 0.44);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

.poster-link,
.wide-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link {
    aspect-ratio: 2 / 3;
}

.poster-link img,
.wide-poster img,
.category-card img,
.category-cover-stack img,
.detail-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.poster-gradient,
.category-card-mask {
    position: absolute;
    inset: auto 0 0;
    height: 55%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    color: #fff;
    background: rgba(249, 115, 22, 0.92);
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.rank-badge {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    z-index: 2;
    min-width: 2.1rem;
    padding: 0.32rem 0.55rem;
    color: #fff;
    text-align: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 999px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.movie-card-body,
.wide-info {
    padding: 0.95rem;
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    color: #fff;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.movie-card:hover .movie-title {
    color: #fdba74;
}

.movie-meta,
.movie-desc {
    margin: 0.42rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.tag-row a,
.tag-row span,
.detail-tags span {
    padding: 0.33rem 0.62rem;
    color: #fed7aa;
    background: var(--accent-soft);
    border: 1px solid rgba(251, 146, 60, 0.2);
    border-radius: 999px;
    font-size: 0.8rem;
    font-style: normal;
}

.scroller {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 250px);
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
}

.feature-panel {
    padding: 2rem;
    margin-top: 4rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.58), rgba(15, 23, 42, 0.76));
    border: 1px solid var(--line);
    border-radius: 2rem;
}

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

.category-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1.4rem;
    background: #0f172a;
}

.category-card strong,
.category-card em {
    position: absolute;
    left: 1rem;
    right: 1rem;
    z-index: 2;
}

.category-card strong {
    bottom: 3.6rem;
    font-size: 1.3rem;
}

.category-card em {
    bottom: 1rem;
    display: -webkit-box;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-style: normal;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.2rem;
    align-items: start;
}

.ranking-list,
.compact-list,
.ranking-page-list {
    display: grid;
    gap: 0.8rem;
}

.movie-card--wide {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 0;
}

.movie-card--wide .wide-poster {
    aspect-ratio: 16 / 10;
    min-height: 100%;
}

.movie-card--wide .poster-play {
    width: 2.6rem;
    height: 2.6rem;
}

.side-panel {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid var(--line);
    border-radius: 1.5rem;
}

.side-panel h2 {
    margin: 0 0 1rem;
}

.page-shell,
.detail-shell {
    padding: 2rem 0 4rem;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 6vw, 4rem);
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.68)),
        var(--hero-cover, linear-gradient(135deg, #111827, #0f172a));
    background-size: cover;
    background-position: center;
    border: 1px solid var(--line);
    border-radius: 2rem;
    box-shadow: var(--shadow);
}

.page-hero--compact {
    background:
        radial-gradient(circle at 8% 0%, rgba(249, 115, 22, 0.2), transparent 24rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.84), rgba(2, 6, 23, 0.92));
}

.page-hero h1 {
    max-width: 760px;
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 720px;
    margin: 0 0 1.5rem;
    color: var(--muted-strong);
    line-height: 1.8;
}

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1.5rem;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
    overflow: hidden;
    border-radius: 1rem;
}

.category-cover-stack img {
    aspect-ratio: 1 / 1;
}

.category-overview-card h2 {
    margin: 0.2rem 0 0.45rem;
}

.category-overview-card p {
    color: var(--muted);
    line-height: 1.7;
}

.search-results-section {
    margin-top: 2rem;
}

.search-title {
    margin: 0 0 1rem;
}

.search-results {
    display: grid;
    gap: 0.9rem;
}

.empty-state {
    padding: 2rem;
    color: var(--muted-strong);
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1.5rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.breadcrumb a {
    color: #fdba74;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.2rem;
    align-items: start;
}

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

.movie-player video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-trigger {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    color: #fff;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.22), rgba(2, 6, 23, 0.18) 45%, rgba(2, 6, 23, 0.52));
    border: 0;
}

.player-trigger span {
    display: grid;
    place-items: center;
    width: clamp(4.2rem, 10vw, 6rem);
    height: clamp(4.2rem, 10vw, 6rem);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 999px;
    box-shadow: 0 18px 48px rgba(249, 115, 22, 0.34);
    transition: transform 0.2s ease;
}

.player-trigger:hover span {
    transform: scale(1.05);
}

.movie-player.is-playing .player-trigger {
    opacity: 0;
    pointer-events: none;
}

.detail-content,
.side-card {
    margin-top: 1rem;
    padding: clamp(1.2rem, 3vw, 2rem);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1.5rem;
}

.detail-content h1 {
    margin: 0 0 0.8rem;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: -0.04em;
}

.detail-one-line {
    margin: 0 0 1.1rem;
    color: #fdba74;
    font-size: 1.1rem;
    line-height: 1.7;
}

.detail-content h2 {
    margin: 1.6rem 0 0.6rem;
    font-size: 1.35rem;
}

.detail-content p {
    color: var(--muted-strong);
    line-height: 1.9;
}

.detail-side {
    position: sticky;
    top: 92px;
}

.detail-cover {
    aspect-ratio: 2 / 3;
    border: 1px solid var(--line);
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
}

.side-card p {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.65rem 0;
    color: var(--muted-strong);
}

.side-card strong {
    color: #fff;
}

.related-section {
    margin-top: 1rem;
}

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

.footer-shell {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0;
}

.footer-shell p {
    max-width: 720px;
    margin: 0.75rem 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: flex-end;
    align-content: center;
}

mark {
    color: #fff;
    background: rgba(249, 115, 22, 0.55);
    border-radius: 0.25rem;
}

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

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

    .two-column-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
        display: grid;
        grid-template-columns: 220px 1fr;
        gap: 1rem;
    }

    .detail-side .side-card {
        margin-top: 0;
    }
}

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

    .mobile-menu-button {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-carousel {
        min-height: 580px;
        height: 78vh;
    }

    .hero-mask {
        background:
            linear-gradient(0deg, #020617 0%, rgba(15, 23, 42, 0.76) 62%, rgba(15, 23, 42, 0.28) 100%);
    }

    .hero-content {
        bottom: 5rem;
    }

    .hero-dots {
        left: 1rem;
        right: auto;
        bottom: 2rem;
    }

    .search-band-inner,
    .footer-shell,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

    .hero-search button,
    .page-filter button {
        min-height: 3rem;
    }

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

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

    .movie-card--wide {
        grid-template-columns: 130px 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .brand-text {
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: 2.6rem;
    }

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

    .movie-card-body,
    .wide-info {
        padding: 0.75rem;
    }

    .movie-card--wide {
        grid-template-columns: 110px 1fr;
    }

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

    .category-card {
        min-height: 190px;
    }

    .feature-panel,
    .page-hero,
    .detail-content,
    .side-card {
        border-radius: 1.2rem;
    }

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

    .detail-cover {
        max-width: 260px;
    }
}
