:root {
    color-scheme: dark;
    --bg-950: #020617;
    --bg-925: #07111f;
    --bg-900: #0f172a;
    --bg-850: #111c30;
    --bg-800: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #2563eb;
    --line: rgba(148, 163, 184, 0.18);
    --panel: rgba(15, 23, 42, 0.68);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
    --radius: 18px;
    --max: 1220px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
        linear-gradient(180deg, var(--bg-950), var(--bg-900) 42%, var(--bg-950));
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    width: min(100%, var(--max));
    height: 64px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 999px;
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
    font-size: 14px;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: transparent;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--soft);
    font-size: 15px;
}

.nav-link {
    transition: color 0.2s ease;
}

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

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    color: var(--text);
    background: transparent;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--soft);
    border-radius: 999px;
}

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

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

.mobile-link {
    padding: 9px 0;
    color: var(--soft);
}

main,
.page-main,
.detail-main {
    padding-top: 64px;
}

.hero {
    position: relative;
    height: 74vh;
    min-height: 540px;
    overflow: hidden;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, var(--bg-950), rgba(15, 23, 42, 0.35) 45%, transparent 74%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: max(24px, calc((100vw - var(--max)) / 2 + 22px));
    right: 22px;
    bottom: 10vh;
    max-width: 760px;
}

.hero-kicker {
    margin: 0 0 12px;
    color: var(--cyan);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-summary {
    max-width: 680px;
    margin: 0 0 24px;
    color: var(--soft);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.18);
    border: 1px solid rgba(34, 211, 238, 0.42);
    border-radius: 999px;
    font-size: 13px;
}

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

.primary-button,
.ghost-button,
.quick-search button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.primary-button,
.quick-search button,
.text-button {
    color: #ffffff;
    border: 0;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
    box-shadow: 0 12px 38px rgba(8, 145, 178, 0.35);
}

.ghost-button {
    color: var(--soft);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.quick-search button:hover,
.text-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 46px rgba(8, 145, 178, 0.34);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.52);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #64748b;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section {
    width: min(100%, var(--max));
    margin: 0 auto;
    padding: 70px 22px;
}

.muted-section {
    width: 100%;
    max-width: none;
    padding-right: max(22px, calc((100vw - var(--max)) / 2 + 22px));
    padding-left: max(22px, calc((100vw - var(--max)) / 2 + 22px));
    background: rgba(15, 23, 42, 0.36);
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
}

.section-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.14);
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: 12px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    backdrop-filter: blur(14px);
    box-shadow: 0 0 0 rgba(34, 211, 238, 0);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.48);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-850);
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.18) 52%, rgba(2, 6, 23, 0.92));
}

.type-pill,
.score-pill {
    position: absolute;
    z-index: 2;
    top: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.type-pill {
    right: 12px;
    color: #ffffff;
    background: rgba(6, 182, 212, 0.9);
}

.score-pill {
    left: 12px;
    color: #fde68a;
    background: rgba(2, 6, 23, 0.68);
    border: 1px solid rgba(253, 230, 138, 0.24);
}

.poster-caption {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 12px;
    left: 12px;
}

.poster-caption strong,
.poster-caption em {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.poster-caption strong {
    -webkit-line-clamp: 2;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.25;
}

.poster-caption em {
    -webkit-line-clamp: 1;
    margin-top: 4px;
    color: var(--soft);
    font-size: 12px;
    font-style: normal;
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta {
    justify-content: space-between;
    margin-bottom: 10px;
}

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

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

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

.compact-card .card-body p {
    min-height: auto;
}

.category-grid,
.category-card-grid,
.year-grid,
.two-column-section,
.ranking-layout {
    display: grid;
    gap: 22px;
}

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

.category-tile,
.year-box,
.category-card,
.ranking-panel,
.catalog-controls {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    backdrop-filter: blur(14px);
}

.category-tile {
    min-height: 150px;
    padding: 22px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-tile span {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.category-tile em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.two-column-section {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
}

.ranking-list,
.ranking-panel ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-list li + li,
.ranking-panel li + li {
    border-top: 1px solid var(--line);
}

.ranking-list a,
.ranking-panel a {
    display: grid;
    grid-template-columns: 46px 1fr 48px;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
}

.rank-number,
.ranking-panel li span {
    color: var(--cyan);
    font-weight: 900;
}

.rank-title,
.ranking-panel strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score,
.ranking-panel em {
    color: #fde68a;
    font-style: normal;
    text-align: right;
}

.text-link {
    display: inline-flex;
    margin-top: 18px;
    color: var(--cyan);
    font-weight: 800;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.quick-search input,
.catalog-controls input,
.catalog-controls select {
    width: 100%;
    min-height: 44px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.56);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    outline: none;
}

.quick-search input:focus,
.catalog-controls input:focus,
.catalog-controls select:focus {
    border-color: rgba(34, 211, 238, 0.7);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.quick-links a {
    padding: 8px 12px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 999px;
}

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

.year-box {
    padding: 18px;
}

.year-box h3 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 20px;
}

.year-box a {
    display: block;
    overflow: hidden;
    padding: 7px 0;
    color: var(--soft);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    display: grid;
    align-items: end;
    padding: 90px max(22px, calc((100vw - var(--max)) / 2 + 22px)) 54px;
    background:
        radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.24), transparent 36rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96));
    border-bottom: 1px solid var(--line);
}

.small-hero h1,
.category-hero h1 {
    font-size: clamp(38px, 5vw, 58px);
}

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

.category-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
}

.page-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.54));
}

.category-hero > div:last-child {
    position: relative;
    z-index: 2;
}

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

.category-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 190px 1fr;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-cover {
    position: relative;
    min-height: 230px;
    overflow: hidden;
}

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

.category-cover span {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    font-weight: 900;
    font-size: 22px;
}

.category-copy {
    padding: 22px;
}

.category-copy h2 {
    margin: 0 0 10px;
}

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

.category-samples {
    display: grid;
    gap: 8px;
}

.category-samples a {
    overflow: hidden;
    color: var(--soft);
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.catalog-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px;
}

.catalog-controls label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}

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

.ranking-layout {
    width: min(100%, var(--max));
    grid-template-columns: 320px 1fr;
    align-items: start;
}

.ranking-panel {
    position: sticky;
    top: 86px;
    padding: 20px;
}

.ranking-panel h2 {
    margin: 0 0 14px;
}

.detail-main {
    width: min(100%, var(--max));
    margin: 0 auto;
    padding-right: 22px;
    padding-left: 22px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 24px 0;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
    gap: 28px;
    align-items: start;
}

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

.player-panel video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    align-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.74));
    cursor: pointer;
}

.play-layer.hidden {
    display: none;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
    border-radius: 999px;
    box-shadow: 0 16px 48px rgba(8, 145, 178, 0.45);
    font-size: 30px;
}

.play-layer strong {
    font-size: 18px;
}

.detail-info {
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    backdrop-filter: blur(14px);
}

.detail-info h1 {
    font-size: clamp(34px, 4vw, 54px);
}

.detail-one-line {
    margin: 0 0 18px;
    color: var(--soft);
    font-size: 18px;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-meta span,
.detail-meta a {
    padding: 7px 10px;
    background: rgba(2, 6, 23, 0.52);
    border: 1px solid var(--line);
    border-radius: 999px;
}

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

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

.detail-copy article {
    padding: 26px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
}

.detail-copy h2 {
    margin: 0 0 12px;
    font-size: 25px;
}

.detail-copy p {
    margin: 0;
    color: var(--soft);
}

.related-section {
    padding-right: 0;
    padding-left: 0;
}

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

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

.footer-inner {
    width: min(100%, var(--max));
    margin: 0 auto;
    padding: 44px 22px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 28px;
}

.footer-brand h2,
.footer-column h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.footer-brand p,
.footer-column a {
    color: var(--muted);
}

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

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

[hidden] {
    display: none !important;
}

@media (max-width: 1120px) {
    .desktop-nav {
        gap: 14px;
        font-size: 14px;
    }

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

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

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

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

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

    .menu-button {
        display: block;
    }

    .hero {
        height: 72vh;
        min-height: 520px;
    }

    .hero-content {
        left: 22px;
        bottom: 84px;
    }

    .hero-arrow {
        display: none;
    }

    .two-column-section,
    .ranking-layout,
    .detail-hero,
    .detail-copy,
    .footer-inner,
    .category-card-grid {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }

    .category-card {
        grid-template-columns: 150px 1fr;
    }

    .catalog-controls {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .header-inner {
        padding: 0 16px;
    }

    .logo-text {
        font-size: 17px;
    }

    .content-section,
    .muted-section,
    .detail-main {
        padding-right: 16px;
        padding-left: 16px;
    }

    .content-section,
    .muted-section {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .hero {
        min-height: 560px;
    }

    .hero-content {
        right: 16px;
        left: 16px;
    }

    .hero-actions,
    .quick-search {
        grid-template-columns: 1fr;
        display: grid;
    }

    .movie-grid,
    .catalog-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .category-grid,
    .year-grid,
    .catalog-controls {
        grid-template-columns: 1fr;
    }

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

    .category-cover {
        min-height: 220px;
    }

    .card-body {
        padding: 12px;
    }

    .poster-caption strong {
        font-size: 15px;
    }

    .detail-info,
    .detail-copy article {
        padding: 20px;
    }
}
