:root {
    --cyan-700: #0e7490;
    --cyan-600: #0891b2;
    --cyan-500: #06b6d4;
    --teal-600: #0d9488;
    --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-md: 0 12px 30px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.18);
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--cyan-700), var(--cyan-600), var(--teal-600));
    color: var(--white);
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.24);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.brand-text {
    display: grid;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.02em;
}

.brand-text span {
    font-size: 12px;
    color: rgba(236, 254, 255, 0.86);
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #cffafe;
    transform: translateY(-1px);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(280px, 28vw);
}

.header-search input,
.mobile-search input,
.large-search input,
.filter-panel input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    outline: none;
}

.header-search input {
    padding: 10px 48px 10px 18px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.header-search input::placeholder {
    color: rgba(207, 250, 254, 0.82);
}

.header-search button {
    position: absolute;
    right: 5px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    color: var(--cyan-700);
    background: var(--white);
    cursor: pointer;
}

.mobile-menu-button {
    display: none;
    border: 0;
    color: var(--white);
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(14, 116, 144, 0.98);
}

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

.mobile-panel-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 20px;
}

.mobile-search {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.mobile-search input {
    padding: 11px 16px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
}

.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    color: var(--cyan-700);
    background: var(--white);
    cursor: pointer;
}

.mobile-nav {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.mobile-nav-link {
    padding: 10px 0;
    font-weight: 700;
}

.mobile-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-category-pills a {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ecfeff;
    font-size: 13px;
}

.hero {
    position: relative;
    height: min(72vh, 720px);
    min-height: 520px;
    overflow: hidden;
    background: var(--slate-900);
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.46) 45%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 86px;
    color: var(--white);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    padding: 7px 13px;
    color: var(--white);
    background: var(--cyan-600);
    font-size: 14px;
    font-weight: 800;
}

.hero-content h1 {
    max-width: 900px;
    margin: 18px 0 14px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(226, 232, 240, 0.94);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.65;
}

.hero-tags,
.tag-row,
.filter-buttons,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-row a,
.category-chip {
    border-radius: 999px;
    padding: 7px 12px;
    color: #0e7490;
    background: #ecfeff;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions {
    margin-top: 26px;
}

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    padding: 12px 24px;
    color: var(--white);
    background: var(--cyan-600);
    box-shadow: 0 10px 26px rgba(6, 182, 212, 0.3);
}

.primary-button:hover {
    transform: translateY(-2px);
    background: var(--cyan-700);
    box-shadow: 0 16px 34px rgba(6, 182, 212, 0.36);
}

.primary-button.full {
    width: 100%;
}

.ghost-button {
    padding: 11px 22px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

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

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 36px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 7px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    padding: 0;
    opacity: 0.72;
}

.hero-dot.is-active {
    width: 28px;
    background: var(--cyan-500);
    opacity: 1;
}

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

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

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

.section-heading h2 {
    margin: 0 0 8px;
    color: var(--slate-800);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.1;
}

.section-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--slate-600);
    line-height: 1.7;
}

.section-more {
    color: var(--cyan-700);
    white-space: nowrap;
}

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

.rail .movie-card {
    width: 300px;
    min-width: 300px;
    scroll-snap-align: start;
}

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

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.cover-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--slate-200);
}

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

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

.cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .cover-gradient {
    opacity: 1;
}

.type-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.type-badge {
    top: 12px;
    right: 12px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.66);
    backdrop-filter: blur(8px);
}

.type-badge.solid {
    position: static;
    color: var(--white);
    background: var(--cyan-600);
}

.rank-badge {
    top: 12px;
    left: 12px;
    color: #111827;
    background: #facc15;
}

.play-hover {
    position: absolute;
    inset: auto 0 18px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: auto;
    border-radius: 999px;
    color: var(--white);
    background: var(--cyan-600);
    opacity: 0;
    transform: scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
    transform: scale(1);
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-card-body strong {
    color: var(--slate-800);
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover .movie-card-body strong {
    color: var(--cyan-700);
}

.movie-card-desc {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: var(--slate-600);
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.movie-card.compact .movie-card-body strong {
    font-size: 16px;
}

.ranking-strip {
    padding: 70px 0;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-700), var(--teal-600));
}

.ranking-strip-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    gap: 44px;
    align-items: center;
}

.ranking-strip h2 {
    margin: 18px 0 12px;
    font-size: clamp(30px, 4vw, 48px);
}

.ranking-strip p {
    max-width: 560px;
    color: #cffafe;
    line-height: 1.75;
}

.ranking-mini-list,
.latest-list,
.sidebar-list {
    display: grid;
    gap: 14px;
}

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

.mini-card {
    display: flex;
    gap: 14px;
    align-items: center;
    overflow: hidden;
    border-radius: var(--radius-md);
    padding: 12px;
    background: rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, background 0.2s ease;
}

.latest-list .mini-card,
.sidebar-list .mini-card {
    background: var(--slate-50);
}

.mini-card:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.22);
}

.latest-list .mini-card:hover,
.sidebar-list .mini-card:hover {
    background: #ecfeff;
}

.mini-card img {
    width: 118px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.mini-card span {
    display: grid;
    gap: 5px;
    min-width: 0;
}

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

.latest-list .mini-card strong,
.sidebar-list .mini-card strong {
    color: var(--slate-800);
}

.mini-card em {
    color: rgba(207, 250, 254, 0.82);
    font-size: 13px;
    font-style: normal;
}

.latest-list .mini-card em,
.sidebar-list .mini-card em {
    color: var(--slate-500);
}

.page-hero {
    padding: 74px 0;
    color: var(--white);
    background: radial-gradient(circle at 20% 10%, rgba(103, 232, 249, 0.3), transparent 35%), linear-gradient(120deg, var(--cyan-700), var(--teal-600));
}

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

.page-hero h1 {
    max-width: 900px;
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #cffafe;
    font-size: 18px;
    line-height: 1.75;
}

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

.category-card {
    display: grid;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    height: 118px;
    overflow: hidden;
    background: var(--slate-200);
}

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

.category-card-body {
    display: grid;
    gap: 8px;
    padding: 20px;
}

.category-card-body strong {
    color: var(--slate-800);
    font-size: 22px;
}

.category-card-body span {
    color: var(--slate-600);
    line-height: 1.65;
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 26px;
    border-radius: var(--radius-lg);
    padding: 20px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.filter-panel input {
    border-color: var(--slate-200);
    padding: 13px 18px;
    color: var(--slate-800);
    background: var(--slate-50);
}

.filter-buttons button {
    border: 0;
    border-radius: 999px;
    padding: 9px 15px;
    color: var(--slate-700);
    background: var(--slate-100);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.filter-buttons button:hover,
.filter-buttons button.is-active {
    color: var(--white);
    background: var(--cyan-600);
}

.filter-group-title {
    color: var(--slate-700);
    font-weight: 800;
}

.empty-state {
    border-radius: var(--radius-md);
    padding: 28px;
    text-align: center;
    color: var(--slate-600);
    background: var(--white);
}

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

.large-search input {
    border-color: rgba(255, 255, 255, 0.38);
    padding: 14px 20px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
}

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

.large-search button {
    border: 0;
    border-radius: 999px;
    padding: 0 26px;
    color: var(--cyan-700);
    background: var(--white);
    font-weight: 800;
    cursor: pointer;
}

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

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

.sidebar-card,
.detail-card,
.player-card,
.poster-card {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.sidebar-card {
    padding: 20px;
}

.sidebar-card h2 {
    margin: 0 0 16px;
    color: var(--slate-800);
    font-size: 22px;
}

.sticky-card {
    position: sticky;
    top: 96px;
}

.detail-shell {
    padding: 30px 0 64px;
}

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

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

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

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

.player-card {
    overflow: hidden;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.12));
    cursor: pointer;
}

.player-overlay.is-hidden {
    display: none;
}

.big-play {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: var(--cyan-600);
    box-shadow: 0 20px 50px rgba(6, 182, 212, 0.32);
    font-size: 34px;
}

.player-message {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--white);
    text-align: center;
    background: rgba(2, 6, 23, 0.76);
}

.detail-card {
    padding: 26px;
}

.detail-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.detail-card h1 {
    margin: 0 0 18px;
    color: var(--slate-800);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
}

.detail-card h2 {
    margin: 26px 0 12px;
    color: var(--slate-800);
    font-size: 24px;
}

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--slate-200);
    color: var(--slate-600);
}

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

.review-box {
    border-radius: var(--radius-md);
    padding: 20px;
    background: linear-gradient(135deg, var(--slate-50), #ecfeff);
}

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

.poster-card {
    overflow: hidden;
    padding: 14px;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-md);
    object-fit: cover;
    margin-bottom: 14px;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--white);
    font-size: 22px;
}

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

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

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

.site-footer a {
    color: #cbd5e1;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #67e8f9;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    padding: 18px 0;
    color: #94a3b8;
    font-size: 14px;
}

[data-movie-card][hidden] {
    display: none;
}

@media (max-width: 1100px) {
    .movie-grid,
    .preview-grid,
    .ranking-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .ranking-layout,
    .detail-layout,
    .ranking-strip-inner {
        grid-template-columns: 1fr;
    }

    .sticky-card {
        position: static;
    }
}

@media (max-width: 860px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

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

    .hero-content {
        padding-bottom: 104px;
    }

    .hero-controls {
        right: 16px;
        left: 16px;
        justify-content: space-between;
    }

    .section-heading {
        display: grid;
    }

    .movie-grid,
    .preview-grid,
    .ranking-grid,
    .latest-list,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .header-inner {
        min-height: 66px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

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

    .brand-text span {
        display: none;
    }

    .hero {
        min-height: 530px;
    }

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

    .hero-actions,
    .large-search {
        display: grid;
        width: 100%;
    }

    .movie-grid,
    .preview-grid,
    .ranking-grid,
    .latest-list,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rail .movie-card {
        width: 270px;
        min-width: 270px;
    }

    .detail-card {
        padding: 20px;
    }

    .big-play {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
