:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --deep: #020617;
    --deep-soft: #0f172a;
    --accent: #334155;
    --accent-strong: #0f172a;
    --radius: 18px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #334155, #020617);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
}

.brand-copy strong,
.footer-brand strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand-copy small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--ink);
    background: var(--surface-soft);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-soft);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: var(--ink);
}

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

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

.hero-carousel {
    position: relative;
    background: var(--deep);
}

.hero-stage {
    position: relative;
    min-height: 620px;
    overflow: hidden;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72) 38%, rgba(15, 23, 42, 0.18) 72%), linear-gradient(0deg, rgba(2, 6, 23, 0.85), transparent 40%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 104px;
    width: min(660px, calc(100% - 64px));
    color: #fff;
}

.hero-kicker,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-kicker span,
.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    backdrop-filter: blur(10px);
}

.hero-content h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

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

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, #334155, #020617);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.25);
}

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

.ghost-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.38);
    font-size: 34px;
    line-height: 1;
    backdrop-filter: blur(12px);
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dot.active {
    background: #fff;
}

.page-main {
    padding: 34px 0 72px;
}

.page-section {
    padding: 58px 0 0;
}

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

.eyebrow {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.content-card h2,
.category-panel h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-more {
    min-height: 40px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--soft-shadow);
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: var(--radius);
    color: #fff;
    background: var(--deep);
    box-shadow: var(--soft-shadow);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.68;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.82;
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 1;
}

.category-tile span {
    display: block;
    padding: 116px 18px 6px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    padding: 0 18px 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.78);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #334155, #020617);
}

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

.movie-card:hover .card-cover img {
    transform: scale(1.08);
    filter: brightness(0.9);
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.cover-meta {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.68);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-title:hover {
    color: var(--accent);
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 9px 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    color: #64748b;
    font-size: 12px;
}

.card-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

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

.tag-row span {
    padding: 4px 8px;
    border-radius: 8px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
}

.search-panel {
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(14px);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.search-box span {
    color: var(--muted);
    font-size: 22px;
}

.search-box input {
    width: 100%;
    height: 48px;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-chip {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
    color: #fff;
    background: var(--deep-soft);
    border-color: var(--deep-soft);
}

.empty-state {
    display: none;
    margin: 16px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.empty-state.show {
    display: block;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.7fr);
    gap: 28px;
    align-items: start;
}

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

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

.wide-card .card-cover {
    height: 100%;
    aspect-ratio: auto;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--soft-shadow);
}

.rank-list,
.ranking-page-list {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 42px 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: #eef2f7;
    transform: translateX(3px);
}

.rank-number {
    color: #0f172a;
    font-size: 20px;
    font-weight: 950;
    text-align: center;
}

.rank-item img {
    width: 74px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #334155, #020617);
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info strong {
    font-weight: 900;
}

.rank-info small {
    color: var(--muted);
    font-size: 12px;
}

.page-hero {
    margin: 0 0 26px;
    padding: 40px;
    border-radius: 28px;
    color: #fff;
    background: radial-gradient(circle at top right, rgba(148, 163, 184, 0.32), transparent 36%), linear-gradient(135deg, #0f172a, #020617);
    box-shadow: var(--shadow);
}

.compact-hero p {
    max-width: 780px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.75);
}

.compact-hero h1,
.compact-hero .eyebrow {
    color: #fff;
}

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

.category-panel {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--soft-shadow);
}

.category-panel-cover {
    position: relative;
    min-height: 210px;
    background: var(--deep);
}

.category-panel-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-panel-cover span {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.68);
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.category-panel-body {
    padding: 24px;
}

.category-panel-body p {
    color: var(--muted);
}

.category-preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-preview-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin: 4px 0 20px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 28px;
    border-radius: 30px;
    color: #fff;
    background: radial-gradient(circle at top right, rgba(148, 163, 184, 0.28), transparent 30%), linear-gradient(135deg, #111827, #020617);
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: linear-gradient(135deg, #334155, #020617);
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.detail-info .eyebrow {
    color: rgba(255, 255, 255, 0.72);
}

.detail-one-line {
    max-width: 760px;
    margin: 18px 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.detail-tags span {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.12);
}

.detail-info .primary-button {
    margin-top: 24px;
    background: #fff;
    color: var(--ink);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.62));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
    font-size: 34px;
}

.player-start strong {
    font-size: 18px;
}

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

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

.content-card {
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--soft-shadow);
}

.content-card h2 {
    margin-bottom: 12px;
    font-size: 26px;
}

.content-card p {
    margin: 0;
    color: #475569;
}

.related-section {
    padding-top: 42px;
}

.site-footer {
    margin-top: 70px;
    color: #cbd5e1;
    background: #020617;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 0.7fr;
    gap: 36px;
}

.footer-brand .brand-icon {
    box-shadow: none;
}

.footer-brand p {
    max-width: 360px;
    margin: 10px 0 0;
    color: #94a3b8;
    font-size: 14px;
}

.footer-links h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 16px;
}

.footer-link-grid {
    display: grid;
    gap: 8px;
}

.footer-link-grid a {
    color: #94a3b8;
    font-size: 14px;
}

.footer-link-grid a:hover {
    color: #fff;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

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

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

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

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

    .rank-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: flex;
    }

    .brand-copy small {
        display: none;
    }

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

    .hero-content {
        left: 24px;
        bottom: 86px;
        width: calc(100% - 48px);
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .category-grid,
    .movie-grid,
    .all-movie-grid,
    .category-panel-grid,
    .detail-content-grid,
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

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

    .wide-card .card-cover {
        aspect-ratio: 16 / 10;
    }

    .detail-hero,
    .page-hero {
        padding: 22px;
    }

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

@media (max-width: 560px) {
    .container,
    .header-inner,
    .footer-inner,
    .footer-bottom,
    .mobile-nav {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        height: 62px;
    }

    .brand-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .brand-copy strong {
        font-size: 18px;
    }

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

    .hero-content h1 {
        font-size: 42px;
    }

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

    .category-grid,
    .movie-grid,
    .all-movie-grid,
    .category-panel-grid,
    .detail-content-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: 34px 64px minmax(0, 1fr);
    }

    .rank-item img {
        width: 64px;
        height: 48px;
    }
}
