:root {
    color-scheme: dark;
    --ice-950: #020617;
    --ice-900: #0f172a;
    --ice-850: #111c33;
    --ice-800: #1e293b;
    --ice-700: #334155;
    --ice-500: #64748b;
    --ice-300: #cbd5e1;
    --ice-100: #f1f5f9;
    --frost-700: #0369a1;
    --frost-600: #0284c7;
    --frost-500: #0ea5e9;
    --glacier-500: #06b6d4;
    --gold: #fbbf24;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.28);
    --shadow-glow: 0 22px 60px rgba(14, 165, 233, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.16), transparent 28rem), var(--ice-950);
    color: var(--ice-100);
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--frost-600), var(--glacier-500));
    box-shadow: var(--shadow-glow);
    flex: 0 0 auto;
}

.logo-mark svg {
    width: 26px;
    height: 26px;
    fill: rgba(255, 255, 255, 0.96);
}

.logo-mark svg path + path {
    fill: var(--ice-950);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.18;
}

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

.logo-text em {
    color: var(--ice-300);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--ice-300);
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 12px;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(14, 165, 233, 0.16);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.9);
    padding: 11px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: white;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px 16px;
}

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

.hero-section {
    position: relative;
    height: min(82vh, 780px);
    min-height: 560px;
    overflow: hidden;
    background: var(--ice-950);
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 900ms 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-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.35) 68%, rgba(2, 6, 23, 0.78) 100%), linear-gradient(0deg, var(--ice-950) 0%, transparent 35%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    padding-top: 24px;
}

.hero-badges,
.hero-tags,
.detail-tags,
.movie-meta-line,
.tag-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-badges span,
.detail-tags span,
.tag-row span,
.tag-row a,
.hero-tags span,
.hero-tags a {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(30, 41, 59, 0.82);
    color: var(--ice-100);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 13px;
}

.hero-badges span:first-child {
    background: var(--frost-600);
    border-color: rgba(255, 255, 255, 0.16);
}

.hero-badges span:last-child,
.detail-tags span:first-child {
    color: var(--gold);
    font-weight: 800;
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.48);
}

.hero-copy p {
    max-width: 760px;
    margin: 0 0 24px;
    color: var(--ice-300);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.72;
}

.hero-search-form {
    margin: 26px 0 22px;
    display: flex;
    align-items: center;
    width: min(620px, 100%);
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow-card);
}

.hero-search-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: white;
    padding: 13px 14px;
}

.hero-search-form button,
.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    transition: 0.25s ease;
}

.hero-search-form button,
.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--frost-600), var(--glacier-500));
    padding: 13px 22px;
    box-shadow: var(--shadow-glow);
}

.btn-ghost {
    padding: 12px 20px;
    color: var(--ice-100);
    background: rgba(30, 41, 59, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.btn-primary:hover,
.btn-ghost:hover,
.hero-search-form button:hover {
    transform: translateY(-2px);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.78);
    color: white;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(14, 165, 233, 0.88);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 99px;
    background: rgba(203, 213, 225, 0.42);
    cursor: pointer;
    transition: 0.25s ease;
}

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

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

.frost-section {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.3), rgba(14, 165, 233, 0.08));
}

.section-head,
.inner-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.section-head h2,
.inner-head h2,
.ranking-panel h2,
.detail-side h2,
.detail-article h2,
.footer-grid h2 {
    margin: 0;
    color: white;
}

.section-kicker {
    margin: 0 0 8px;
    color: var(--frost-500);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-head a,
.inner-head a {
    color: var(--frost-500);
    font-weight: 700;
}

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

.movie-grid-home,
.latest-grid,
.related-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: var(--shadow-card);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(14, 165, 233, 0.36);
}

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

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(14, 165, 233, 0.9);
    box-shadow: var(--shadow-glow);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.92);
    color: var(--ice-950);
}

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

.movie-meta-line {
    color: var(--ice-300);
    font-size: 12px;
    gap: 8px;
}

.movie-meta-line span {
    white-space: nowrap;
}

.movie-card h2 {
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.3;
}

.movie-card h2 a:hover {
    color: var(--frost-500);
}

.movie-card p {
    margin: 0 0 12px;
    color: var(--ice-300);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row span,
.tag-row a {
    color: var(--ice-300);
    font-size: 12px;
    padding: 5px 9px;
}

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

.category-tile,
.category-overview-card,
.ranking-panel,
.filter-panel,
.detail-article,
.detail-side,
.player-card {
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: var(--shadow-card);
}

.category-tile {
    padding: 20px;
    min-height: 180px;
}

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

.category-tile span,
.category-tile p {
    color: var(--ice-300);
    line-height: 1.7;
}

.category-mini-links {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-mini-links a {
    color: var(--frost-500);
    font-size: 14px;
}

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

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.ranking-panel ol {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-panel li a {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.64);
}

.ranking-panel b {
    color: var(--gold);
}

.ranking-panel em {
    color: var(--frost-500);
    font-style: normal;
    font-weight: 800;
}

.page-hero {
    position: relative;
    padding: 88px 0 62px;
    background: radial-gradient(circle at 18% 10%, rgba(14, 165, 233, 0.22), transparent 28rem), linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.95));
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    letter-spacing: -0.04em;
}

.page-hero p:last-child {
    max-width: 820px;
    color: var(--ice-300);
    font-size: 18px;
    line-height: 1.8;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    padding: 18px;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-cover-stack img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.category-overview-card h2 {
    margin: 4px 0 12px;
}

.category-overview-card p {
    color: var(--ice-300);
    line-height: 1.7;
}

.filter-panel {
    padding: 18px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.filter-search input,
.filter-selects select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.58);
    color: white;
    outline: none;
    padding: 13px 14px;
}

.filter-selects {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-selects select {
    width: auto;
    min-width: 130px;
}

.empty-state {
    display: none;
    margin: 28px 0 0;
    padding: 34px;
    text-align: center;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.72);
    color: var(--ice-300);
}

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

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

.ranking-row {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 18px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.ranking-poster {
    position: relative;
    display: block;
}

.ranking-poster img {
    width: 116px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-poster b {
    position: absolute;
    left: 8px;
    top: 8px;
    background: var(--gold);
    color: var(--ice-950);
    border-radius: 10px;
    padding: 6px 8px;
}

.ranking-row h2 {
    margin: 2px 0 10px;
}

.ranking-row p {
    color: var(--ice-300);
    line-height: 1.75;
}

.detail-hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
}

.detail-backdrop,
.detail-shade {
    position: absolute;
    inset: 0;
}

.detail-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px);
    transform: scale(1.06);
    opacity: 0.46;
}

.detail-shade {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.78)), linear-gradient(0deg, var(--ice-950), transparent 45%);
}

.detail-hero-grid {
    position: relative;
    min-height: 680px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
    padding-top: 36px;
    padding-bottom: 36px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow);
}

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--ice-300);
    margin-bottom: 18px;
}

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

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 860px;
    color: var(--ice-300);
    font-size: 20px;
    line-height: 1.8;
}

.detail-tags {
    margin: 24px 0 16px;
}

.detail-tag-row {
    margin-bottom: 26px;
}

.detail-section {
    padding-top: 36px;
}

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

.player-card {
    overflow: hidden;
    padding: 0;
}

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

.video-player {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    margin: 0;
    padding: 0;
    background: black;
    color: white;
    cursor: pointer;
    overflow: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

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

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.68;
}

.player-cover-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.15), rgba(2, 6, 23, 0.62));
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    height: 58px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--frost-600), var(--glacier-500));
    color: white;
    font-weight: 800;
    box-shadow: var(--shadow-glow);
}

.detail-article {
    margin-top: 24px;
    padding: 28px;
}

.detail-article h2 {
    margin-top: 0;
    margin-bottom: 14px;
}

.detail-article p {
    color: var(--ice-300);
    line-height: 1.9;
    font-size: 16px;
    margin: 0 0 24px;
}

.detail-side {
    position: sticky;
    top: 96px;
    padding: 20px;
}

.side-recommend-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.side-recommend-list a {
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 12px;
    align-items: center;
    padding: 9px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.66);
}

.side-recommend-list img {
    width: 66px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
}

.side-recommend-list span {
    font-weight: 700;
    line-height: 1.45;
}

.site-footer {
    margin-top: 40px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 36px;
    padding: 48px 1rem;
}

.footer-logo {
    margin-bottom: 16px;
}

.footer-grid p {
    color: var(--ice-300);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.8);
    color: var(--ice-300);
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    padding: 18px;
    text-align: center;
    color: var(--ice-300);
    font-size: 14px;
}

@media (max-width: 1280px) {
    .movie-grid,
    .movie-grid-home,
    .latest-grid,
    .related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .menu-toggle {
        display: block;
    }

    .split-grid,
    .detail-main-grid,
    .footer-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .ranking-panel,
    .detail-side {
        position: static;
    }

    .detail-hero-grid {
        grid-template-columns: 240px 1fr;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        height: 68px;
    }

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

    .hero-section {
        min-height: 640px;
        height: 76vh;
    }

    .hero-arrow {
        display: none;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search-form button {
        width: 100%;
    }

    .movie-grid,
    .movie-grid-home,
    .latest-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

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

    .category-overview-card,
    .ranking-row,
    .detail-hero-grid {
        grid-template-columns: 1fr;
    }

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

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

    .filter-selects select {
        width: 100%;
    }

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

@media (max-width: 430px) {
    .movie-grid,
    .movie-grid-home,
    .latest-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }
}
