:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --brand: #f59e0b;
    --brand-2: #fb923c;
    --danger: #ef4444;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
    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(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(251, 146, 60, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

img {
    display: block;
    max-width: 100%;
    background: rgba(15, 23, 42, 0.86);
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.32);
}

.brand-text {
    font-size: 1.22rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: var(--soft);
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--brand);
}

.nav-dropdown {
    position: relative;
    padding: 24px 0;
}

.dropdown-panel {
    position: absolute;
    top: 66px;
    left: 0;
    width: 190px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 9px 12px;
    color: var(--soft);
    border-radius: 10px;
    font-size: 0.94rem;
}

.dropdown-panel a:hover,
.dropdown-panel .dropdown-all {
    color: var(--brand);
    background: rgba(245, 158, 11, 0.08);
}

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

.header-search input,
.mobile-search input,
.page-filter-input,
.page-filter-select {
    color: var(--text);
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button,
.mobile-search button {
    border: 0;
    color: #111827;
    background: var(--brand);
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 750;
}

.header-search input:focus,
.mobile-search input:focus,
.page-filter-input:focus,
.page-filter-select:focus {
    border-color: rgba(245, 158, 11, 0.72);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 999px;
}

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

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 12px;
}

.mobile-search input {
    padding: 12px 16px;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.mobile-link.is-active {
    color: var(--brand);
}

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

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

.hero-carousel {
    width: min(1440px, calc(100% - 32px));
    margin: 26px auto 0;
}

.hero-stage {
    position: relative;
    height: min(72vh, 720px);
    min-height: 520px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    box-shadow: var(--shadow);
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.5s ease, transform 0.8s ease;
    pointer-events: none;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, transparent 45%);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 7vw, 92px);
    bottom: clamp(34px, 8vw, 92px);
    width: min(680px, calc(100% - 48px));
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 12px 0 16px;
    font-size: clamp(2.2rem, 5vw, 5.4rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    color: var(--soft);
    font-size: clamp(1rem, 2vw, 1.26rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 28px 0 16px;
}

.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.26);
}

.btn-secondary,
.btn-outline {
    color: var(--text);
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid var(--line);
}

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

.hero-meta,
.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.hero-meta span,
.card-meta span,
.detail-meta span {
    padding: 5px 9px;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    cursor: pointer;
    transform: translateY(-50%);
    font-size: 2rem;
    line-height: 1;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

.hero-dots button.is-active {
    width: 30px;
    background: var(--brand);
}

.hero-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.hero-thumb {
    position: relative;
    min-height: 126px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.hero-thumb img {
    width: 100%;
    height: 126px;
    object-fit: cover;
    opacity: 0.66;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.hero-thumb span {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    font-weight: 800;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.hero-thumb:hover img {
    opacity: 0.9;
    transform: scale(1.06);
}

.intro-strip,
.panel-section,
.rank-panel,
.info-card,
.detail-content article {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.54));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.intro-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-top: 44px;
    padding: 30px;
}

.intro-strip h2,
.section-title h2,
.compact-title h2,
.detail-content h2,
.info-card h2 {
    margin: 6px 0 0;
    color: var(--text);
    line-height: 1.18;
}

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

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 58px 0 24px;
}

.section-title h2 {
    font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.section-title a {
    color: var(--brand);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.46);
    background: rgba(15, 23, 42, 0.95);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), transparent 58%);
}

.play-mark {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #111827;
    background: var(--brand);
    border-radius: 50%;
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-radius: 12px;
}

.card-body {
    padding: 16px;
}

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

.card-body h2 a:hover,
.wide-card h2 a:hover {
    color: var(--brand);
}

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

.movie-card-compact .card-body p {
    -webkit-line-clamp: 2;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.78rem;
}

.panel-section {
    padding: 1px 24px 28px;
    margin-top: 58px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    margin-top: 58px;
}

.compact-title {
    margin-top: 0;
}

.wide-list {
    display: grid;
    gap: 16px;
}

.wide-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--line);
    border-radius: 20px;
}

.wide-cover {
    overflow: hidden;
    border-radius: 14px;
}

.wide-cover img {
    width: 100%;
    height: 124px;
    object-fit: cover;
}

.wide-card h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.wide-card p {
    margin: 0 0 12px;
    color: var(--muted);
}

.rank-panel {
    padding: 24px;
    align-self: start;
}

.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.rank-list a {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(2, 6, 23, 0.32);
    border: 1px solid transparent;
    border-radius: 14px;
}

.rank-list a:hover {
    border-color: rgba(245, 158, 11, 0.34);
}

.rank-list b {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #111827;
    background: var(--brand);
    border-radius: 10px;
}

.rank-list span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-list em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.88rem;
}

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

.category-card {
    min-height: 132px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.76)),
        rgba(15, 23, 42, 0.76);
    border: 1px solid var(--line);
    border-radius: 20px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.42);
}

.category-card span {
    display: block;
    color: var(--text);
    font-size: 1.18rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
}

.page-category-grid {
    margin-top: 42px;
}

.page-hero {
    padding: 74px 0 48px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0));
    border-bottom: 1px solid var(--line);
}

.small-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.5rem);
}

.toolbar-section {
    margin-top: 26px;
}

.list-toolbar {
    display: grid;
    grid-template-columns: 1fr 180px 220px;
    gap: 12px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid var(--line);
    border-radius: 22px;
}

.page-filter-input,
.page-filter-select {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 54px;
    border-bottom: 1px solid var(--line);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(24px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.22;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.44), #020617 94%);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    margin: 0 0 28px;
}

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

.breadcrumb em {
    color: var(--soft);
    font-style: normal;
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    max-width: 860px;
}

.detail-meta {
    margin: 22px 0 0;
}

.detail-tags {
    margin: 22px 0 28px;
}

.player-wrap {
    margin-top: 44px;
}

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

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    cursor: pointer;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #111827;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.54));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-start span {
    width: clamp(72px, 10vw, 108px);
    height: clamp(72px, 10vw, 108px);
    display: grid;
    place-items: center;
    padding-left: 5px;
    color: #111827;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-radius: 50%;
    font-size: clamp(2rem, 5vw, 3.2rem);
    box-shadow: 0 18px 50px rgba(245, 158, 11, 0.34);
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 34px;
}

.detail-content article {
    padding: 26px;
}

.detail-content p,
.info-card p {
    color: var(--soft);
    margin: 14px 0 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 42px;
}

.info-card {
    padding: 26px;
}

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

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1fr 220px 220px;
    gap: 36px;
}

.footer-brand p {
    max-width: 520px;
    color: var(--muted);
}

.footer-col {
    display: grid;
    gap: 8px;
    align-content: start;
}

.footer-col h2 {
    margin: 0 0 8px;
    font-size: 1rem;
}

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

.footer-col a:hover {
    color: var(--brand);
}

.footer-bottom {
    padding: 18px 0;
    color: #64748b;
    text-align: center;
    border-top: 1px solid var(--line);
}

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

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

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

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

    .rank-panel {
        margin-top: 8px;
    }
}

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

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

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

    .hero-overlay {
        background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.32));
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 58px;
        width: auto;
    }

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

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

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

    .list-toolbar {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 560px) {
    .header-inner,
    .section-shell,
    .hero-carousel,
    .footer-inner,
    .mobile-panel {
        width: min(100% - 22px, 1240px);
    }

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

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

    .hero-arrow {
        display: none;
    }

    .hero-thumbs,
    .movie-grid,
    .category-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .panel-section {
        padding: 1px 14px 20px;
    }

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

    .detail-poster {
        max-width: 100%;
    }

    .detail-info h1,
    .hero-content h1,
    .page-hero h1 {
        font-size: 2.2rem;
    }
}
