:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #e2e8f0;
    --title: #ffffff;
    --amber: #f59e0b;
    --orange: #ea580c;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 22px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 28rem),
        radial-gradient(circle at 85% 10%, rgba(234, 88, 12, 0.13), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(16px);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.brand-icon {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
    transition: transform 220ms ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08) rotate(-3deg);
}

.brand-text {
    font-size: clamp(1.1rem, 2vw, 1.55rem);
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #cbd5e1;
    font-weight: 650;
}

.nav-link {
    transition: color 180ms ease;
}

.nav-link:hover {
    color: #fbbf24;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(51, 65, 85, 0.8);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 4px auto;
    background: #e2e8f0;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    border-top: 1px solid var(--line);
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.6);
}

.mobile-link:hover {
    color: #fbbf24;
    background: rgba(51, 65, 85, 0.8);
}

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

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

.hero-slide {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 680ms ease, transform 900ms ease;
    pointer-events: none;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.3) 50%, rgba(2, 6, 23, 0.15) 100%);
}

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

.hero-label,
.section-kicker {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.76rem;
}

.hero-content h1 {
    max-width: 850px;
    margin: 18px 0 16px;
    font-size: clamp(2.8rem, 8vw, 6.8rem);
    line-height: 0.98;
    color: #ffffff;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
}

.hero-line {
    max-width: 680px;
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: clamp(1.04rem, 2vw, 1.35rem);
    line-height: 1.75;
}

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

.hero-tags span,
.tag-list span {
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 999px;
    padding: 6px 10px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.65);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.text-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 45px rgba(234, 88, 12, 0.28);
}

.ghost-button,
.section-more {
    color: #e2e8f0;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.62);
}

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

.ghost-button:hover,
.section-more:hover {
    border-color: rgba(251, 191, 36, 0.55);
    color: #fbbf24;
}

.text-button {
    min-height: 36px;
    padding: 0;
    color: #fbbf24;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.58);
    cursor: pointer;
    font-size: 2rem;
}

.hero-prev {
    left: 28px;
}

.hero-next {
    right: 28px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.36);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 32px;
    background: #f59e0b;
}

.search-section {
    position: relative;
    z-index: 10;
    margin-top: -34px;
}

.search-box {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-box input,
.local-filter input {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    outline: none;
    padding: 0 16px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.65);
}

.search-box button {
    border: 0;
    border-radius: 16px;
    padding: 0 22px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    cursor: pointer;
}

.search-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 12px;
    right: 12px;
    display: none;
    max-height: 420px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
}

.search-panel.is-open {
    display: grid;
    gap: 8px;
}

.search-result {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
}

.search-result:hover {
    background: rgba(51, 65, 85, 0.62);
}

.search-result img {
    width: 50px;
    height: 34px;
    object-fit: cover;
    border-radius: 10px;
    background: #0f172a;
}

.search-result strong {
    display: block;
    color: #ffffff;
}

.search-result span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.86rem;
}

.content-section {
    padding: 64px 0;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    padding: 76px 0 28px;
}

.small-hero h1,
.section-heading h2,
.detail-copy h1 {
    margin: 10px 0 12px;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.08;
}

.small-hero p {
    max-width: 800px;
    color: #cbd5e1;
    font-size: 1.08rem;
    line-height: 1.8;
}

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

.section-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.compact-heading {
    margin-bottom: 18px;
}

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

.category-card {
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.category-card img,
.category-card span {
    position: absolute;
    inset: 0;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    transition: transform 420ms ease;
}

.category-card span {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.12));
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 2;
}

.category-card strong {
    color: #ffffff;
    font-size: 1.25rem;
}

.category-card em {
    margin-top: 8px;
    color: #cbd5e1;
    font-style: normal;
    line-height: 1.55;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.42);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 460ms ease;
}

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

.poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 60%);
    opacity: 0;
    transition: opacity 260ms ease;
}

.movie-card:hover .poster-glow {
    opacity: 1;
}

.poster-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #fbbf24;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

.movie-card-body {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.movie-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: #fbbf24;
}

.movie-card p {
    min-height: 3.1em;
    margin: 0;
    color: #94a3b8;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.86rem;
}

.movie-meta span {
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(15, 23, 42, 0.7);
}

.tag-list span {
    font-size: 0.78rem;
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.64);
}

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

.ranking-panel,
.ranking-table,
.detail-copy,
.detail-poster-card,
.player-shell,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.23);
    backdrop-filter: blur(14px);
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

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

.rank-link {
    display: grid;
    grid-template-columns: 38px 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.58);
}

.rank-link:hover {
    background: rgba(51, 65, 85, 0.76);
}

.rank-number {
    color: #fbbf24;
    font-weight: 900;
}

.rank-link img {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.rank-copy strong,
.rank-copy em {
    display: block;
}

.rank-copy strong {
    color: #ffffff;
}

.rank-copy em {
    margin-top: 3px;
    color: #94a3b8;
    font-size: 0.82rem;
    font-style: normal;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    padding: 18px;
}

.category-cover {
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

.category-cover img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 0 0 10px;
    color: #ffffff;
}

.category-overview-card p {
    margin: 0 0 14px;
    color: #94a3b8;
    line-height: 1.7;
}

.mini-title-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.mini-title-list span {
    border-radius: 999px;
    padding: 5px 9px;
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.62);
    font-size: 0.82rem;
}

.local-filter {
    max-width: 560px;
    margin-top: 26px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: #94a3b8;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.breadcrumb strong {
    color: #e2e8f0;
}

.ranking-table {
    overflow: hidden;
}

.ranking-row {
    display: grid;
    grid-template-columns: 74px 112px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.ranking-row:last-child {
    border-bottom: 0;
}

.ranking-number {
    color: #fbbf24;
    font-weight: 900;
    font-size: 1.3rem;
}

.ranking-thumb img {
    width: 112px;
    height: 72px;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

.ranking-info h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 1.1rem;
}

.ranking-info p {
    margin: 0 0 10px;
    color: #94a3b8;
    line-height: 1.55;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
    padding: 42px 0 20px;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 22px;
}

.player-shell {
    padding: 14px;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.24));
}

.play-overlay.is-hidden {
    display: none;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 55px rgba(234, 88, 12, 0.36);
}

.detail-copy {
    padding: 28px;
}

.detail-copy .lead-text {
    color: #cbd5e1;
    font-size: 1.2rem;
    line-height: 1.8;
}

.detail-copy section {
    margin-top: 26px;
}

.detail-copy h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 1.45rem;
}

.detail-copy p {
    color: #cbd5e1;
    line-height: 1.9;
}

.detail-meta {
    margin: 18px 0 4px;
}

.detail-tags {
    margin-top: 22px;
}

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

.detail-poster-card {
    overflow: hidden;
}

.detail-poster-card img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    background: #0f172a;
}

.detail-poster-card h2 {
    margin: 18px 18px 10px;
    color: #ffffff;
}

.detail-poster-card dl {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0 18px 20px;
}

.detail-poster-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.detail-poster-card dt {
    color: #94a3b8;
}

.detail-poster-card dd {
    margin: 0;
    color: #ffffff;
    text-align: right;
}

.detail-poster-card a {
    color: #fbbf24;
}

.site-footer {
    margin-top: 60px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.96));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 38px;
    padding: 46px 0;
}

.footer-main p,
.site-footer li,
.footer-bottom {
    color: #94a3b8;
    line-height: 1.7;
}

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

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1.05rem;
}

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

.site-footer a:hover {
    color: #fbbf24;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}

.is-filtered-out {
    display: none !important;
}

.empty-state {
    padding: 22px;
    color: #cbd5e1;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
}

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

    .menu-toggle {
        display: block;
    }

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

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

    .ranking-panel,
    .detail-side {
        position: static;
    }
}

@media (max-width: 720px) {
    .site-container,
    .hero-content,
    .mobile-nav,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .hero-carousel,
    .hero-content {
        min-height: 76vh;
    }

    .hero-control {
        display: none;
    }

    .hero-actions,
    .search-box,
    .section-heading {
        flex-direction: column;
        align-items: stretch;
    }

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

    .content-section {
        padding: 42px 0;
    }

    .category-overview-card,
    .ranking-row {
        grid-template-columns: 1fr;
    }

    .category-cover img,
    .ranking-thumb img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .detail-copy {
        padding: 20px;
    }
}
