:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #1e293b;
    --panel-strong: #111827;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #64748b;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #06b6d4;
    --cyan-strong: #0891b2;
    --blue: #2563eb;
    --orange: #f97316;
    --green: #22c55e;
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: radial-gradient(circle at top left, rgba(8, 145, 178, 0.28), transparent 38%),
        linear-gradient(180deg, #0f172a 0%, #020617 48%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(18px);
}

.header-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

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

.brand-mark {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: -0.08em;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.28);
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, #67e8f9, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link,
.mobile-link {
    color: #cbd5e1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    color: #ffffff;
}

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

.header-search input,
.mobile-search input,
.intro-search input,
.filter-panel input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    outline: none;
    color: var(--text);
    background: rgba(30, 41, 59, 0.88);
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input,
.mobile-search input {
    height: 42px;
    border-radius: 999px;
    padding: 0 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.intro-search input:focus,
.filter-panel input:focus {
    border-color: rgba(6, 182, 212, 0.72);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
    background: rgba(30, 41, 59, 1);
}

.header-search button,
.mobile-search button,
.intro-search button,
.btn-primary {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.22);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button,
.mobile-search button {
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    white-space: nowrap;
}

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

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.9);
}

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

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-menu.is-open {
    display: grid;
    gap: 14px;
}

.mobile-search {
    display: flex;
    gap: 8px;
}

.mobile-link {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

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

.mobile-cats a {
    color: #a5f3fc;
    border: 1px solid rgba(6, 182, 212, 0.24);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(8, 145, 178, 0.08);
}

.hero-slider {
    position: relative;
    height: 540px;
    overflow: hidden;
    background: #020617;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.68) 42%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.38) 35%, transparent 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 72px;
    width: min(680px, calc(100% - 64px));
}

.hero-kicker,
.eyebrow,
.section-heading span {
    display: inline-flex;
    color: #a5f3fc;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    margin: 16px 0;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1;
    letter-spacing: -0.07em;
}

.hero-content p {
    max-width: 620px;
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags a,
.hero-tags span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

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

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.48);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.75);
    transform: translateY(-1px);
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.42);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-nav:hover {
    background: rgba(6, 182, 212, 0.8);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.home-intro,
.page-hero {
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.66), rgba(2, 6, 23, 0));
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 32px;
    align-items: center;
    padding: 56px 0;
}

.intro-grid h2,
.page-hero h1,
.section-heading h2,
.detail-info h1,
.detail-article h2,
.footer-column h2 {
    margin: 10px 0;
    color: #ffffff;
    letter-spacing: -0.045em;
}

.intro-grid h2,
.page-hero h1 {
    font-size: clamp(30px, 5vw, 48px);
}

.intro-grid p,
.page-hero p,
.section-heading p,
.footer-brand p,
.category-tile p,
.overview-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.intro-search {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.intro-search input {
    height: 48px;
    padding: 0 18px;
    border-radius: 999px;
}

.intro-search button {
    min-width: 118px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
}

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

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

.section-heading h2 {
    font-size: 30px;
}

.section-more,
.overview-head a {
    color: #a5f3fc;
    font-weight: 800;
}

.scroll-row {
    display: grid;
    grid-auto-columns: minmax(280px, 320px);
    grid-auto-flow: column;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 0 20px;
    scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.86);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.65);
    box-shadow: 0 28px 65px rgba(6, 182, 212, 0.12);
}

.card-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

.card-image img,
.detail-poster img,
.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .card-image img,
.category-tile:hover img {
    transform: scale(1.08);
}

.play-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 46px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.34);
    transition: opacity 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

.card-duration,
.rank-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    background: rgba(2, 6, 23, 0.78);
}

.rank-badge {
    left: 10px;
    right: auto;
    background: linear-gradient(135deg, var(--orange), #ef4444);
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover .card-title {
    color: #67e8f9;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 10px 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    gap: 7px;
    font-size: 12px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: #a5f3fc;
    font-size: 12px;
    background: rgba(8, 145, 178, 0.14);
    border: 1px solid rgba(6, 182, 212, 0.18);
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(30, 41, 59, 0.86);
}

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

.category-tile img {
    position: absolute;
    inset: 0;
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 1;
    display: block;
    padding: 0 18px;
}

.category-tile span {
    margin-top: 116px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.category-tile p {
    margin-top: 8px;
    font-size: 13px;
}

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

.movie-card-list {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: stretch;
}

.movie-card-list .card-image {
    aspect-ratio: auto;
    min-height: 160px;
}

.movie-card-list .card-title {
    min-height: auto;
    font-size: 20px;
}

.page-main {
    min-height: 68vh;
}

.compact-hero {
    padding: 64px 0;
}

.filter-panel {
    display: grid;
    gap: 18px;
    margin-top: 34px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
}

.filter-panel input {
    height: 52px;
    padding: 0 18px;
    border-radius: 16px;
}

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

.filter-buttons button {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    padding: 9px 16px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.78);
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.filter-buttons button:hover,
.filter-buttons button.is-active {
    color: #ffffff;
    border-color: rgba(6, 182, 212, 0.55);
    background: rgba(6, 182, 212, 0.32);
}

.empty-state {
    display: none;
    padding: 44px;
    border: 1px dashed rgba(148, 163, 184, 0.24);
    border-radius: 22px;
    color: var(--muted);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.category-overview {
    display: grid;
    gap: 36px;
    padding: 46px 0 80px;
}

.category-overview-block {
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.52);
}

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

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

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    background: #020617;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px);
    transform: scale(1.08);
    opacity: 0.46;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.46)),
        linear-gradient(0deg, #020617 0%, transparent 64%);
}

.detail-shell {
    position: relative;
    z-index: 1;
    padding: 34px 0 62px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 34px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumbs a {
    color: #a5f3fc;
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    margin: 14px 0 18px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.05;
}

.detail-line {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.8;
}

.detail-tags {
    margin: 20px 0 28px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 32px;
    align-items: start;
    margin-top: -80px;
    position: relative;
    z-index: 2;
}

.player-panel,
.detail-article {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
}

.player-panel {
    overflow: hidden;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    align-content: center;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), rgba(2, 6, 23, 0.18));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-play {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    padding-left: 6px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 22px 60px rgba(6, 182, 212, 0.32);
}

.player-overlay span {
    font-size: 16px;
    font-weight: 800;
}

.detail-article {
    padding: 28px;
}

.detail-article h2 {
    font-size: 24px;
}

.detail-article p {
    color: #cbd5e1;
    line-height: 1.9;
}

.related-section {
    padding-top: 72px;
}

.ranking-stack {
    margin-bottom: 34px;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), #020617);
}

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(260px, 1.3fr) repeat(2, minmax(180px, 0.7fr));
    gap: 44px;
    padding: 48px 0;
}

.footer-column h2 {
    font-size: 18px;
}

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

.footer-column a {
    color: var(--muted);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: var(--muted-strong);
    text-align: center;
}

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

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

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

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

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

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

    .brand-name {
        font-size: 19px;
    }

    .hero-slider {
        height: 620px;
    }

    .hero-content {
        left: 24px;
        bottom: 76px;
        width: calc(100% - 48px);
    }

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

    .hero-nav {
        display: none;
    }

    .intro-grid,
    .detail-grid,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .intro-search {
        border-radius: 22px;
        flex-direction: column;
    }

    .intro-search button {
        height: 46px;
    }

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

    .movie-card-list {
        grid-template-columns: 170px minmax(0, 1fr);
    }

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

@media (max-width: 560px) {
    .container,
    .header-shell,
    .mobile-menu,
    .footer-shell,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

    .header-shell {
        min-height: 64px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .brand-name {
        max-width: 170px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-slider {
        height: 580px;
    }

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

    .hero-tags {
        gap: 7px;
    }

    .btn-primary,
    .btn-ghost {
        width: 100%;
    }

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

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

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

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

    .movie-card-list .card-image {
        aspect-ratio: 16 / 9;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-shell {
        padding-bottom: 120px;
    }

    .detail-info h1 {
        font-size: 34px;
    }

    .detail-content {
        margin-top: -92px;
    }

    .player-play {
        width: 72px;
        height: 72px;
    }
}
