:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --cyan-700: #0e7490;
    --cyan-600: #0891b2;
    --cyan-500: #06b6d4;
    --cyan-400: #22d3ee;
    --blue-500: #3b82f6;
    --orange-500: #f97316;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 24px 70px rgba(15, 23, 42, 0.28);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-900);
    background: #f8fafc;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), #164e63);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
}

.header-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

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

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
    box-shadow: 0 14px 30px rgba(34, 211, 238, 0.26);
    color: var(--white);
    font-size: 18px;
}

.brand-copy strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0.01em;
}

.brand-copy small {
    color: #cbd5e1;
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(226, 232, 240, 0.16);
}

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

.mobile-nav-inner {
    display: grid;
    gap: 12px;
    padding: 14px 0 18px;
}

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(circle at 15% 12%, rgba(34, 211, 238, 0.28), transparent 28%), linear-gradient(135deg, var(--slate-900), var(--slate-800) 48%, #164e63);
}

.hero-track {
    position: relative;
    min-height: 650px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 46px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

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

.hero-backdrop {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 0;
    width: 100vw;
    height: 100%;
    opacity: 0.22;
    filter: blur(14px) saturate(1.1);
    transform: translateX(-50%) scale(1.08);
}

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

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.8), rgba(8, 145, 178, 0.38));
}

.hero-content,
.hero-cover {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(6, 182, 212, 0.18);
    border: 1px solid rgba(34, 211, 238, 0.32);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero h1,
.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 0 0 18px;
    color: var(--cyan-400);
    font-size: clamp(24px, 3vw, 38px);
}

.hero p,
.page-hero p {
    max-width: 760px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

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

.primary-button,
.search-main button {
    border: 0;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 16px 35px rgba(6, 182, 212, 0.28);
}

.ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-button:hover,
.ghost-button:hover,
.search-main button:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-cover {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-strong);
    aspect-ratio: 4 / 5;
}

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

.hero-cover:hover img {
    transform: scale(1.05);
}

.hero-cover span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(8, 145, 178, 0.86);
    font-weight: 800;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

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

.search-panel {
    position: relative;
    z-index: 5;
    margin: -42px 0 42px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.search-main {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(130px, 0.45fr)) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
}

.search-main label {
    display: grid;
    gap: 7px;
    color: var(--slate-700);
    font-weight: 700;
    font-size: 13px;
}

.search-main input,
.search-main select {
    width: 100%;
    height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 13px;
    color: var(--slate-900);
    background: var(--white);
    outline: none;
}

.search-main input:focus,
.search-main select:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.section-block {
    padding: 54px 0;
}

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

.section-heading span,
.panel-heading span {
    display: block;
    margin-bottom: 4px;
    color: var(--cyan-600);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-heading h2,
.panel-heading h2 {
    margin: 0;
    color: var(--slate-900);
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.12;
}

.section-heading a,
.text-link {
    color: var(--cyan-700);
    font-weight: 800;
}

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

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

.movie-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scroll-snap-type: x proximity;
}

.movie-row .movie-card {
    width: 270px;
    flex: 0 0 270px;
    scroll-snap-align: start;
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--slate-200);
}

.movie-card-compact .movie-poster {
    aspect-ratio: 16 / 11;
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.76));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.play-dot {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--cyan-500);
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.35);
}

.movie-region,
.rank-badge {
    position: absolute;
    top: 12px;
    border-radius: 10px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

.movie-region {
    right: 12px;
    padding: 5px 9px;
}

.rank-badge {
    left: 12px;
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--orange-500), #ef4444);
}

.movie-card-body {
    padding: 16px;
}

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

.movie-card h2 a:hover {
    color: var(--cyan-700);
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-500);
    font-size: 13px;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #94a3b8;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    color: var(--slate-700);
    background: var(--slate-100);
}

.soft-section {
    padding: 64px 0;
    background: linear-gradient(90deg, #f1f5f9, #ecfeff);
}

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

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

.category-tile {
    position: relative;
    display: grid;
    min-height: 150px;
    overflow: hidden;
    align-content: end;
    border-radius: var(--radius-lg);
    padding: 18px;
    color: var(--white);
    box-shadow: var(--shadow-soft);
}

.category-tile img,
.category-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.category-tile img {
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-layer {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.82));
}

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

.category-tile strong,
.category-tile small {
    position: relative;
    z-index: 1;
}

.category-tile strong {
    font-size: 22px;
}

.category-tile small {
    color: #bae6fd;
    font-weight: 800;
}

.rank-panel,
.side-card,
.detail-card,
.player-card,
.category-overview-card {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.rank-panel {
    padding: 20px;
}

.rank-list,
.rank-wide-list,
.compact-list {
    display: grid;
    gap: 12px;
}

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

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

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

.list-rank {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--cyan-600);
    font-weight: 900;
    font-size: 13px;
}

.list-rank.muted {
    color: var(--cyan-600);
    background: #cffafe;
}

.rank-row img {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

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

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

.rank-copy strong {
    line-height: 1.25;
}

.rank-copy small {
    margin-top: 3px;
    color: var(--slate-500);
    font-size: 12px;
}

.page-hero {
    padding: 88px 0;
    color: var(--white);
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.25), transparent 30%), linear-gradient(135deg, var(--slate-900), var(--slate-800), #164e63);
}

.slim-hero {
    padding: 78px 0;
}

.category-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 410px;
    gap: 32px;
    align-items: center;
}

.category-stack {
    display: grid;
    gap: 10px;
}

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

.category-overview-card {
    overflow: hidden;
    padding: 24px;
}

.category-overview-head span {
    color: var(--cyan-600);
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
}

.category-overview-head h2 {
    margin: 7px 0 8px;
    font-size: 28px;
}

.category-overview-head p {
    color: var(--slate-600);
}

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

.category-mini-list a {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 3 / 4;
    color: var(--white);
    background: var(--slate-800);
}

.category-mini-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.82;
}

.category-mini-list span {
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-wrap {
    padding: 34px 0 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--slate-600);
    font-size: 14px;
}

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

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

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

.player-card {
    overflow: hidden;
    padding: 0;
    background: var(--slate-950);
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    padding: 24px;
    color: var(--white);
    text-align: center;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 22px 50px rgba(6, 182, 212, 0.4);
    cursor: pointer;
}

.player-button span {
    margin-left: 4px;
    font-size: 31px;
}

.player-overlay.is-loading .player-button {
    animation: pulse-ring 0.9s ease infinite alternate;
}

@keyframes pulse-ring {
    from {
        transform: scale(0.96);
    }
    to {
        transform: scale(1.04);
    }
}

.player-overlay strong {
    max-width: min(90%, 680px);
    font-size: clamp(20px, 3vw, 32px);
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.detail-card,
.side-card {
    padding: 24px;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.1;
}

.detail-card h2,
.side-card h2 {
    margin: 28px 0 10px;
    font-size: 22px;
}

.detail-card p {
    color: var(--slate-700);
}

.lead-text {
    font-weight: 800;
    color: var(--slate-900) !important;
}

.detail-meta span {
    color: var(--cyan-700);
    background: #ecfeff;
}

.detail-tags span {
    color: var(--slate-700);
}

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
}

.poster-side img {
    width: 100%;
    border-radius: 16px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.full-button {
    width: 100%;
    margin-top: 16px;
}

.site-footer {
    margin-top: 58px;
    color: #cbd5e1;
    background: var(--slate-950);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 42px 0;
}

.footer-brand {
    margin-bottom: 14px;
    color: var(--white);
    font-size: 22px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px 0;
    text-align: center;
}

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

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

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

    .hero {
        min-height: 760px;
    }

    .hero-track {
        min-height: 760px;
    }

    .hero-slide {
        align-content: center;
        padding: 40px 0 82px;
    }

    .hero-cover {
        max-width: 360px;
        width: 100%;
    }

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

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

    .detail-side {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

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

    .hero,
    .hero-track {
        min-height: 820px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 36px;
    }

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

    .search-main,
    .movie-grid,
    .dense-grid,
    .category-grid,
    .category-overview-grid,
    .category-mini-list,
    .rank-wide-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .movie-row .movie-card {
        width: 238px;
        flex-basis: 238px;
    }

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

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

    .detail-card,
    .side-card {
        padding: 18px;
    }
}
