:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --panel-soft: rgba(30, 41, 59, 0.64);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(34, 211, 238, 0.36);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --orange: #fb923c;
    --yellow: #facc15;
    --shadow: 0 24px 80px 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 top left, rgba(34, 211, 238, 0.16), transparent 30rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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: 80;
    border-bottom: 1px solid rgba(30, 41, 59, 0.9);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

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

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

.brand-icon,
.footer-brand span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.3);
}

.brand-text {
    font-size: 24px;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--cyan);
}

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

.header-search input,
.mobile-search input,
.hero-search input,
.filter-bar input {
    width: 260px;
    border: 1px solid rgba(71, 85, 105, 0.92);
    border-radius: 12px;
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.9);
    padding: 10px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.filter-bar input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.header-search button,
.mobile-search button,
.hero-search button {
    border: 0;
    color: white;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    padding: 10px 16px;
    font-weight: 700;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.72);
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: var(--text);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
    padding: 18px 16px 22px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-search input {
    width: 100%;
}

.mobile-nav {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.mobile-link {
    color: var(--muted);
    font-weight: 600;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 46%, rgba(2, 6, 23, 0.48) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    padding-bottom: 82px;
}

.hero-copy {
    width: min(680px, 100%);
}

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

.eyebrow span,
.hero-tags span,
.tag-row span,
.detail-tags a {
    border: 1px solid rgba(34, 211, 238, 0.38);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.12);
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero p {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 18px;
    max-width: 640px;
}

.hero-actions {
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    padding: 12px 22px;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.22);
}

.ghost-button {
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.62);
    padding: 11px 21px;
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.18);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.42);
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-dots {
    position: absolute;
    right: 42px;
    bottom: 42px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.48);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 32px;
    background: var(--cyan);
}

.category-strip,
.page-sections,
.detail-sections {
    padding: 56px 0 0;
}

.strip-head,
.section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.strip-head h2,
.section-title h2,
.content-card h2,
.site-footer h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
}

.strip-head p,
.section-title p {
    margin: 6px 0 0;
    color: var(--subtle);
}

.section-title span,
.page-hero span {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.section-title a,
.text-link {
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-pills a,
.filter-chips button {
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.72);
    padding: 9px 15px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-pills a:hover,
.filter-chips button:hover,
.filter-chips button.active {
    color: var(--text);
    border-color: var(--cyan);
    background: rgba(34, 211, 238, 0.14);
}

.section-block {
    margin-bottom: 64px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.94));
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
}

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

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

.movie-card:hover .poster img,
.category-preview a:hover img,
.detail-poster:hover img {
    transform: scale(1.06);
    filter: brightness(1.06);
}

.poster::after {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.poster-score {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    border-radius: 999px;
    color: #111827;
    background: var(--yellow);
    padding: 4px 9px;
    font-size: 13px;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-body h2,
.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.28;
}

.compact-body h3,
.compact-body h2 {
    font-size: 16px;
}

.card-body a:hover {
    color: var(--cyan);
}

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

.card-meta {
    margin-bottom: 12px;
    color: var(--subtle);
    font-size: 13px;
}

.tag-row span,
.detail-tags a {
    color: var(--subtle);
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.62);
    padding: 4px 9px;
    font-size: 12px;
}

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

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 138px 1fr;
}

.poster-horizontal {
    aspect-ratio: 3 / 4;
    height: 100%;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

.ranking-panel,
.content-card,
.filter-bar,
.table-card,
.category-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
}

.ranking-panel {
    align-self: start;
    padding: 24px;
    position: sticky;
    top: 88px;
}

.ranking-panel ol {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-panel li {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

.ranking-panel li span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    color: white;
    background: rgba(34, 211, 238, 0.16);
}

.ranking-panel li a:hover {
    color: var(--cyan);
}

.ranking-panel li em {
    color: var(--yellow);
    font-style: normal;
    font-weight: 900;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent 38%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.96));
}

.small-page-hero .container {
    padding: 72px 0;
}

.page-hero h1 {
    margin: 10px 0 12px;
    font-size: clamp(34px, 4.5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.page-actions {
    margin-top: 26px;
}

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

.category-card {
    overflow: hidden;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    height: 180px;
    background: rgba(2, 6, 23, 0.8);
}

.category-preview a {
    overflow: hidden;
}

.category-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.category-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

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

.filter-bar {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
    padding: 22px;
}

.filter-bar label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 800;
}

.filter-bar input {
    width: min(560px, 100%);
}

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

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

.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.05);
    transform: scale(1.08);
}

.detail-hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.86)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.34) 55%, rgba(2, 6, 23, 0.9) 100%);
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    padding: 48px 0 72px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: var(--subtle);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: var(--cyan);
}

.detail-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

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

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.detail-poster span {
    position: absolute;
    right: 16px;
    bottom: 16px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    padding: 8px 15px;
    font-weight: 900;
}

.detail-copy h1 {
    margin: 16px 0;
    font-size: clamp(36px, 5vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.lead {
    max-width: 780px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 19px;
}

.detail-meta span {
    color: var(--muted);
    border-right: 1px solid var(--line);
    padding-right: 12px;
}

.detail-meta span:last-child {
    color: var(--yellow);
    border-right: 0;
    font-weight: 900;
}

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

.detail-sections {
    margin-top: -40px;
    position: relative;
    z-index: 5;
}

.player-section {
    margin-bottom: 28px;
}

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

.movie-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: radial-gradient(circle at center, rgba(34, 211, 238, 0.24), rgba(2, 6, 23, 0.64));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 22px 58px rgba(34, 211, 238, 0.32);
    font-size: 32px;
}

.content-card {
    margin-bottom: 28px;
    padding: 28px;
}

.content-card p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px 12px;
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--subtle);
    font-size: 13px;
}

td {
    color: var(--muted);
}

td a {
    color: var(--text);
    font-weight: 700;
}

td a:hover {
    color: var(--cyan);
}

.table-card {
    padding: 24px;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgba(30, 41, 59, 0.9);
    background: rgba(15, 23, 42, 0.92);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding: 48px 0;
}

.site-footer p,
.site-footer a,
.footer-bottom {
    color: var(--subtle);
    font-size: 14px;
}

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

.site-footer a:hover {
    color: var(--cyan);
}

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

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

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

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

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

    .ranking-panel {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        padding-bottom: 92px;
    }

    .hero-control {
        display: none;
    }

    .hero-dots {
        right: auto;
        left: 16px;
        bottom: 34px;
    }

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

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

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

    .detail-poster {
        width: min(260px, 72vw);
    }

    .movie-card-horizontal {
        grid-template-columns: 112px 1fr;
    }
}

@media (max-width: 540px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .brand-text {
        font-size: 20px;
    }

    .hero {
        height: 74vh;
        min-height: 560px;
    }

    .hero p,
    .page-hero p,
    .lead {
        font-size: 16px;
    }

    .movie-grid,
    .category-grid,
    .compact-grid {
        gap: 14px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body h2,
    .card-body h3 {
        font-size: 15px;
    }

    .card-body p,
    .tag-row,
    .detail-meta {
        display: none;
    }

    .movie-card-horizontal {
        grid-template-columns: 96px 1fr;
    }

    .category-preview {
        height: 140px;
    }

    .small-page-hero .container {
        padding: 52px 0;
    }

    .detail-hero-content {
        padding-top: 28px;
    }

    .content-card {
        padding: 22px;
    }
}
