:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-strong: rgba(30, 41, 59, 0.92);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.2);
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.24);
}

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

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

.logo-icon {
    width: 38px;
    height: 38px;
    color: var(--cyan);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.45));
}

.brand strong {
    display: block;
    font-size: 24px;
    line-height: 1.05;
    letter-spacing: 0.05em;
}

.brand small {
    display: block;
    color: var(--cyan);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    color: #e2e8f0;
    font-weight: 650;
    white-space: nowrap;
}

.desktop-nav a,
.footer-links a {
    transition: color 0.22s ease, transform 0.22s ease;
}

.desktop-nav a:hover,
.footer-links a:hover {
    color: var(--cyan);
}

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

.header-search input,
.mobile-search input,
.inline-filter input {
    width: 230px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.86);
    color: var(--text);
    padding: 10px 16px;
    outline: none;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, width 0.22s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.inline-filter input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.header-search button,
.mobile-search button,
.inline-filter button,
.primary-button,
.ghost-button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.header-search button,
.mobile-search button,
.inline-filter button,
.primary-button {
    color: #00131a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    padding: 10px 18px;
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.22);
    transition: transform 0.22s ease, filter 0.22s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.inline-filter button:hover,
.primary-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
    cursor: pointer;
}

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

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

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.mobile-panel a {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.7);
    padding: 10px 12px;
}

main {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    min-height: 620px;
    margin: 28px auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

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

.hero-slide {
    display: grid;
    align-items: center;
    padding: 64px;
    opacity: 0;
    pointer-events: none;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-shade {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.08));
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.eyebrow,
.section-heading span,
.rank-copy span,
.panel-title span {
    display: inline-flex;
    align-items: center;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 12px 0 18px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-line,
.rank-copy p,
.site-footer p {
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.tag-row span,
.card-tags span {
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 999px;
    background: var(--cyan-soft);
    color: #a5f3fc;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    backdrop-filter: blur(12px);
    transition: background 0.22s ease, transform 0.22s ease;
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    left: 64px;
    bottom: 38px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--cyan);
}

.hero-panel {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 3;
    width: 330px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.panel-title a,
.text-link {
    color: var(--cyan);
    font-weight: 800;
}

.mini-list {
    display: grid;
    gap: 12px;
}

.mini-card {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.72);
    transition: transform 0.22s ease, background 0.22s ease;
}

.mini-card:hover {
    transform: translateX(4px);
    background: rgba(51, 65, 85, 0.88);
}

.mini-card img {
    width: 62px;
    height: 82px;
    border-radius: 14px;
    object-fit: cover;
    background: #111827;
}

.mini-card strong,
.mini-card small {
    display: block;
}

.mini-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.content-section,
.rank-section,
.detail-layout,
.player-section {
    width: min(1280px, calc(100% - 32px));
    margin: 42px auto;
}

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

.section-heading h2,
.rank-copy h2,
.related-panel h2,
.detail-block h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.12;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.3);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 24px 60px rgba(8, 145, 178, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.06);
    filter: saturate(1.12);
}

.play-chip,
.rank-mark {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00131a;
    padding: 7px 12px;
}

.rank-mark {
    left: 12px;
    top: 12px;
    background: rgba(2, 6, 23, 0.72);
    color: #fff;
    padding: 7px 10px;
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 16px;
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.card-tags span {
    padding: 4px 9px;
    font-size: 12px;
}

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

.card-body p {
    min-height: 54px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: end;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    background: var(--bg-card);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.18));
}

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

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

.category-card span {
    font-size: 22px;
    font-weight: 950;
}

.category-card p {
    margin: 8px 0 0;
    color: #cbd5e1;
    font-size: 14px;
}

.rank-section {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    gap: 28px;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.55), rgba(15, 23, 42, 0.84));
    padding: 28px;
    box-shadow: var(--shadow);
}

.rank-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.rank-list {
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.68);
    padding: 12px 14px;
    transition: transform 0.22s ease, background 0.22s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    background: rgba(30, 41, 59, 0.88);
}

.rank-row strong {
    color: var(--cyan);
    font-size: 20px;
}

.rank-row span {
    overflow: hidden;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row em {
    color: var(--muted);
    font-style: normal;
    white-space: nowrap;
}

.page-hero {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.22), transparent 34rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.7));
    padding: 54px;
    box-shadow: var(--shadow);
}

.slim-hero {
    min-height: 280px;
    display: grid;
    align-items: center;
}

.category-hero {
    min-height: 330px;
    display: grid;
    align-items: center;
}

.inline-filter {
    flex-wrap: wrap;
    margin-top: 26px;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    display: grid;
    align-items: center;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(8px) saturate(1.05);
    transform: scale(1.05);
    opacity: 0.45;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72)),
        linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.18));
}

.detail-inner {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

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

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

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--cyan);
    font-weight: 800;
}

.detail-copy h1 {
    max-width: 850px;
}

.player-section {
    margin-top: -80px;
    position: relative;
    z-index: 2;
}

.video-player {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 32px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.main-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-content: center;
    gap: 16px;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.24));
    color: var(--text);
    cursor: pointer;
    text-align: center;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-symbol {
    width: 78px;
    height: 78px;
    display: inline-grid;
    place-items: center;
    justify-self: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00131a;
    font-size: 32px;
    box-shadow: 0 20px 46px rgba(34, 211, 238, 0.28);
}

.player-cover strong {
    font-size: clamp(22px, 4vw, 36px);
}

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

.detail-content,
.related-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--bg-card);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
}

.detail-content {
    padding: 30px;
}

.related-panel {
    position: sticky;
    top: 98px;
    padding: 24px;
}

.detail-block + .detail-block {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.detail-block p {
    margin: 14px 0 0;
    color: #dbeafe;
    font-size: 17px;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 16px 0 0;
}

.info-list div {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.58);
    padding: 14px;
}

.info-list dt {
    color: var(--muted);
    font-size: 13px;
}

.info-list dd {
    margin: 4px 0 0;
    font-weight: 850;
}

.stacked .mini-card {
    grid-template-columns: 74px minmax(0, 1fr);
}

.stacked .mini-card img {
    width: 74px;
    height: 98px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.95));
    margin-top: 70px;
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    gap: 16px;
}

.footer-brand {
    color: var(--cyan);
    font-size: 24px;
    font-weight: 950;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #cbd5e1;
}

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

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

    .menu-button {
        display: block;
    }

    .header-search {
        margin-left: auto;
    }

    .hero-panel {
        display: none;
    }

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

    .rank-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .related-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 68px;
    }

    .header-search {
        display: none;
    }

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

    .hero-carousel {
        min-height: 590px;
        border-radius: 24px;
    }

    .hero-slide,
    .page-hero {
        padding: 30px 24px;
    }

    .hero-dots {
        left: 24px;
        bottom: 26px;
    }

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

    .card-body {
        padding: 13px;
    }

    .card-body h3 {
        font-size: 17px;
    }

    .rank-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rank-row em {
        grid-column: 2;
    }

    .detail-inner {
        grid-template-columns: 1fr;
        padding: 36px 0 90px;
    }

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

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

    .detail-content,
    .related-panel {
        padding: 20px;
    }

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

@media (max-width: 480px) {
    .movie-grid,
    .wide-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .hero-copy p,
    .page-hero p,
    .detail-line {
        font-size: 16px;
    }

    .mobile-panel nav {
        grid-template-columns: 1fr;
    }
}
