:root {
    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-300: #cbd5e1;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), #22d3ee);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.35);
}

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

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

.nav-link {
    color: rgba(255, 255, 255, 0.78);
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 14px;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(6, 182, 212, 0.18);
}

.menu-toggle {
    display: none;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 8px 11px;
    cursor: pointer;
}

.hero-shell {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: var(--slate-950);
}

.hero-track,
.hero-slide {
    min-height: 78vh;
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    filter: saturate(1.08) contrast(1.04);
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 35%, rgba(6, 182, 212, 0.26), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.76) 42%, rgba(15, 23, 42, 0.24) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 54%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    min-height: 78vh;
    padding: 110px 20px 86px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--white);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: max-content;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 760px;
    margin: 14px 0 16px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.tag-row,
.detail-tags,
.quick-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags a,
.category-chip {
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(6, 182, 212, 0.12);
    color: var(--cyan-dark);
    font-size: 12px;
    font-weight: 700;
}

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

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-btn {
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    box-shadow: 0 16px 35px rgba(6, 182, 212, 0.28);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 45px rgba(6, 182, 212, 0.34);
}

.primary-btn.slim {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 12px;
}

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

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: 0.2s ease;
}

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

.section-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 20px;
}

.section-inner.compact {
    padding-top: 28px;
    padding-bottom: 28px;
}

.quick-search-section {
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

.quick-search-card,
.filter-panel,
.story-card,
.player-card,
.category-overview-card {
    background: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.quick-search-card {
    padding: 24px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
    align-items: center;
}

.quick-search-card h2,
.section-title-row h2,
.category-overview-head h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.quick-search-card p,
.category-overview-head p,
.page-hero p,
.story-card p {
    color: var(--slate-600);
    line-height: 1.8;
}

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

.section-title-row a {
    color: var(--cyan-dark);
    font-weight: 800;
}

.section-title-row.light h2,
.section-title-row.light a {
    color: var(--white);
}

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

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

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

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

.movie-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.14);
}

.movie-card.large .poster {
    aspect-ratio: 16 / 9;
}

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

.poster img,
.wide-poster img,
.detail-poster img {
    transition: transform 0.5s ease;
}

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

.play-dot,
.big-play {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(6, 182, 212, 0.92);
    box-shadow: 0 14px 32px rgba(6, 182, 212, 0.34);
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.92;
}

.play-dot.small {
    width: 40px;
    height: 40px;
}

.pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
}

.top-left {
    left: 10px;
    top: 10px;
}

.rank-badge {
    right: 10px;
    top: 10px;
    background: rgba(6, 182, 212, 0.92);
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--slate-600);
    font-size: 12px;
    font-weight: 700;
}

.movie-card h3,
.wide-card h3 {
    margin: 9px 0 8px;
    font-size: 17px;
    line-height: 1.4;
}

.movie-card h3 a:hover,
.wide-card h3 a:hover {
    color: var(--cyan-dark);
}

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

.dark-band {
    background: linear-gradient(135deg, var(--slate-900), var(--slate-950));
}

.movie-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
}

.rail-item {
    width: 290px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: end;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.search-box {
    display: grid;
    gap: 8px;
    color: var(--slate-600);
    font-size: 13px;
    font-weight: 800;
}

.search-box input,
.filter-controls select {
    height: 44px;
    border: 1px solid #dbe4ee;
    border-radius: 14px;
    padding: 0 14px;
    color: var(--slate-900);
    background: #f8fafc;
    outline: none;
}

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

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

.page-main {
    background: #f8fafc;
}

.page-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 72% 20%, rgba(6, 182, 212, 0.3), transparent 30%),
        linear-gradient(135deg, var(--slate-950), var(--slate-800));
    padding: 88px 20px 74px;
}

.page-hero > div {
    max-width: 1240px;
    margin: 0 auto;
}

.page-hero h1 {
    margin: 12px 0 14px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 740px;
    color: #dbeafe;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.category-overview-list {
    display: grid;
    gap: 26px;
}

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

.category-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.ranking-list {
    display: grid;
    gap: 14px;
}

.wide-card {
    display: grid;
    grid-template-columns: 176px 1fr;
    gap: 18px;
    overflow: hidden;
    padding: 12px;
    background: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    transition: 0.22s ease;
}

.wide-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.13);
}

.wide-poster {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 15px;
    background: var(--slate-800);
}

.wide-info {
    align-self: center;
}

.mini-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 24px;
    border-radius: 999px;
    color: var(--white);
    background: var(--cyan);
}

.detail-main {
    background: #f8fafc;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-950);
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    filter: blur(4px);
    transform: scale(1.02);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 15%, rgba(6, 182, 212, 0.22), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72));
}

.detail-wrap {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    padding: 64px 20px;
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    background: var(--slate-800);
}

.detail-intro h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.11);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 800;
}

.detail-intro p {
    max-width: 760px;
    margin: 0 0 28px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.detail-content {
    display: grid;
    gap: 28px;
}

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

.video-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.video-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.36)),
        transparent;
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.video-cover strong {
    font-size: clamp(20px, 3vw, 36px);
}

.video-cover em {
    font-style: normal;
    color: #cbd5e1;
}

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

.story-card {
    padding: 28px;
}

.story-card h2 {
    margin: 0 0 12px;
    font-size: 25px;
}

.story-card h2:not(:first-child) {
    margin-top: 28px;
}

.related-section {
    margin-top: 10px;
}

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

@media (max-width: 1080px) {
    .movie-grid,
    .featured-grid,
    .library-grid,
    .mini-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 820px) {
    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 68px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .quick-search-card,
    .filter-panel,
    .category-overview-head,
    .detail-wrap {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 240px;
    }

    .movie-grid,
    .featured-grid,
    .library-grid,
    .editor-grid,
    .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .hero-content {
        padding-top: 88px;
    }
}

@media (max-width: 560px) {
    .nav-wrap {
        padding-left: 14px;
        padding-right: 14px;
    }

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

    .hero-shell,
    .hero-track,
    .hero-slide {
        min-height: 72vh;
    }

    .hero-content {
        min-height: 72vh;
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-inner {
        padding: 52px 16px;
    }

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

    .movie-grid,
    .featured-grid,
    .library-grid,
    .editor-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
    }

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

    .wide-poster {
        aspect-ratio: 16 / 9;
    }

    .page-hero {
        padding: 68px 16px 56px;
    }

    .detail-wrap {
        padding: 42px 16px;
    }

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