:root {
    --cyan-900: #164e63;
    --cyan-800: #155e75;
    --cyan-700: #0e7490;
    --cyan-600: #0891b2;
    --cyan-500: #06b6d4;
    --teal-500: #14b8a6;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --container: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-800);
    background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--cyan-800), var(--cyan-600), var(--teal-500));
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.25);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.2);
}

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

.brand-text small {
    display: block;
    color: #cffafe;
    font-size: 12px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.site-nav a {
    color: var(--white);
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.site-nav a:hover {
    color: #ecfeff;
    opacity: 0.9;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-search input,
.page-search input,
.focus-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    outline: none;
}

.header-search input {
    width: 230px;
    padding: 10px 14px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.header-search input::placeholder {
    color: #cffafe;
}

.header-search button,
.page-search button,
.focus-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: var(--cyan-800);
    background: var(--white);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.page-search button:hover,
.focus-search button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(255, 255, 255, 0.18);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

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

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade,
.detail-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 20%, rgba(6, 182, 212, 0.2), transparent 38%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.55) 54%, rgba(2, 6, 23, 0.38));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 70vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: end;
    gap: 48px;
    padding-top: 88px;
    padding-bottom: 72px;
}

.hero-copy {
    max-width: 760px;
    color: var(--white);
}

.hero-type,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    background: var(--cyan-600);
    color: var(--white);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-type {
    padding: 6px 14px;
    margin-bottom: 18px;
}

.eyebrow {
    padding: 5px 12px;
    margin-bottom: 10px;
    font-size: 12px;
    text-transform: uppercase;
}

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

.hero-copy p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #e2e8f0;
    font-size: clamp(18px, 2.2vw, 24px);
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.16);
    color: #ecfeff;
    font-size: 13px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
    color: var(--white);
    background: var(--cyan-600);
    box-shadow: 0 12px 28px rgba(8, 145, 178, 0.32);
}

.btn.primary:hover {
    background: var(--cyan-700);
    transform: translateY(-2px);
}

.btn.ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

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

.btn.small {
    padding: 9px 17px;
    font-size: 14px;
}

.hero-poster {
    align-self: end;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-poster span {
    display: block;
    padding: 14px;
    color: var(--white);
    font-weight: 700;
}

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

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

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

.content-section {
    padding: 64px 0;
}

.content-section:nth-of-type(even) {
    background: var(--white);
}

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

.compact-heading {
    width: 100%;
    margin: 0 0 18px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: var(--slate-800);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
}

.section-more {
    color: var(--cyan-700);
    font-weight: 800;
}

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

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 320px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    scroll-snap-align: start;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.movie-card.compact {
    border-radius: 16px;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-200), #cffafe);
}

.poster {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.quality-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.quality-badge {
    right: 12px;
    padding: 5px 9px;
    color: var(--white);
    background: var(--cyan-600);
}

.rank-badge {
    left: 12px;
    min-width: 34px;
    height: 34px;
    color: var(--cyan-800);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

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

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

.movie-card h3 {
    margin: 9px 0 8px;
    color: var(--slate-900);
    font-size: 19px;
    line-height: 1.25;
}

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

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

.movie-card.compact p {
    min-height: 0;
    font-size: 14px;
}

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

.split-section {
    background: linear-gradient(135deg, var(--slate-900), var(--cyan-900));
}

.split-section .section-heading h2,
.split-section .movie-card h3,
.split-section .compact-heading h2 {
    color: var(--white);
}

.split-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
    align-items: start;
}

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

.focus-search {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.focus-search input,
.page-search input {
    min-width: 0;
    flex: 1;
    padding: 13px 16px;
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
}

.focus-search input::placeholder,
.page-search input::placeholder {
    color: #cffafe;
}

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

.quick-category-list a {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 16px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, transform 0.2s ease;
}

.quick-category-list a:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
}

.quick-category-list span {
    display: block;
    margin-top: 4px;
    color: #cffafe;
    font-size: 13px;
}

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

.category-panel,
.category-card {
    border-radius: var(--radius-lg);
    padding: 22px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.category-panel-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.category-panel h3,
.category-card h2 {
    margin: 0;
    color: var(--slate-900);
}

.category-panel-head a {
    color: var(--cyan-700);
    font-weight: 800;
    white-space: nowrap;
}

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

.page-hero {
    padding: 72px 0;
    color: var(--white);
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.48), transparent 32%),
        linear-gradient(120deg, var(--cyan-800), var(--cyan-600), var(--teal-500));
}

.page-hero h1 {
    color: var(--white);
}

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

.page-search {
    display: flex;
    max-width: 720px;
    gap: 10px;
    margin-top: 28px;
}

.filter-bar-section {
    padding: 22px 0;
    background: var(--white);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select,
#search-category,
#search-type,
#search-year {
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid var(--slate-200);
    color: var(--slate-700);
    background: var(--slate-50);
}

.filter-bar input {
    flex: 1 1 320px;
}

.filter-bar select,
#search-category,
#search-type,
#search-year {
    flex: 0 1 180px;
    border-radius: 999px;
}

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

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

.category-sample {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.category-sample a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--slate-50);
    color: var(--slate-700);
    font-weight: 700;
}

.category-sample span {
    color: var(--slate-500);
    font-weight: 500;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: var(--slate-950);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 44px;
    padding-bottom: 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    color: #cffafe;
    font-weight: 700;
}

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

.detail-top {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

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

.detail-info {
    color: var(--white);
}

.detail-info h1 {
    color: var(--white);
    font-size: clamp(36px, 5vw, 62px);
}

.detail-info p {
    max-width: 840px;
    color: #e2e8f0;
    font-size: 19px;
}

.detail-meta {
    margin: 20px 0;
}

.player-section {
    padding: 54px 0 72px;
}

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

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--slate-950);
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--slate-950);
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.64));
    cursor: pointer;
    z-index: 2;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--cyan-800);
    background: var(--white);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
    font-size: 28px;
}

.detail-content,
.related-aside {
    margin-top: 24px;
    border-radius: var(--radius-lg);
    padding: 26px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.detail-content h2,
.related-aside h2 {
    margin: 0 0 14px;
    color: var(--slate-900);
}

.detail-content p {
    margin: 0 0 24px;
    color: var(--slate-700);
    font-size: 17px;
}

.related-aside {
    margin-top: 0;
}

.related-list {
    display: grid;
    gap: 16px;
}

.search-status {
    margin-bottom: 20px;
    color: var(--slate-600);
    font-weight: 700;
}

.site-footer {
    padding: 54px 0;
    color: #cbd5e1;
    background: var(--slate-950);
}

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

.footer-logo {
    margin-bottom: 12px;
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.site-footer h4 {
    margin: 0 0 12px;
    color: var(--white);
}

.site-footer ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

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

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

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

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

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

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

    .site-nav {
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 16px 18px;
        background: var(--cyan-800);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
        align-items: end;
    }

    .hero-poster {
        display: none;
    }

    .detail-top {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 260px;
    }

    .category-panel-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .brand-text small {
        display: none;
    }

    .hero-carousel,
    .hero-track,
    .hero-slide,
    .hero-content {
        min-height: 620px;
    }

    .hero-copy p {
        font-size: 17px;
    }

    .movie-grid {
        grid-template-columns: 1fr;
    }

    .movie-rail {
        grid-auto-columns: minmax(240px, 82vw);
    }

    .section-heading,
    .category-panel-head,
    .page-search,
    .focus-search {
        align-items: stretch;
        flex-direction: column;
    }

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

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