:root {
    color-scheme: dark;
    --bg-950: #020617;
    --bg-900: #0f172a;
    --bg-850: #111c31;
    --bg-800: #1e293b;
    --bg-700: #334155;
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(148, 163, 184, 0.32);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
        linear-gradient(180deg, var(--bg-950), var(--bg-900) 45%, var(--bg-950));
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.94));
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.26);
}

.nav-shell {
    width: min(1280px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand,
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 14px;
    color: var(--text);
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 36px rgba(34, 211, 238, 0.28);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy strong,
.footer-logo strong {
    font-size: 21px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-copy em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

.nav-link {
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--soft);
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan);
    background: rgba(51, 65, 85, 0.62);
}

.nav-link-soft {
    color: #94a3b8;
}

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-search input,
.library-search,
.filter-select {
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 14px;
    outline: 0;
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
}

.site-search input {
    width: 210px;
    padding: 0 14px;
}

.site-search input:focus,
.library-search:focus,
.filter-select:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.site-search button,
.primary-button,
.secondary-button,
.ghost-button,
.hero-dot,
.menu-toggle,
.player-overlay {
    cursor: pointer;
}

.site-search button,
.primary-button {
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    box-shadow: 0 14px 36px rgba(14, 165, 233, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-search button {
    height: 42px;
    padding: 0 16px;
}

.site-search button:hover,
.primary-button:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 18px 44px rgba(14, 165, 233, 0.38);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(51, 65, 85, 0.55);
}

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

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.96);
}

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

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.mobile-search input {
    width: 100%;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s 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-layer,
.detail-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, var(--bg-900) 0%, rgba(15, 23, 42, 0.78) 36%, rgba(15, 23, 42, 0.18) 100%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.28) 56%, rgba(15, 23, 42, 0.58));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    height: 100%;
    min-height: 78vh;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    padding: 110px 0 96px;
}

.hero-copy {
    width: min(720px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-copy p {
    margin: 18px 0 0;
    color: var(--soft);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
}

.hero-meta {
    margin-top: 18px;
}

.hero-meta span,
.detail-meta span,
.meta-pill {
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
}

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

.primary-button,
.secondary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
}

.secondary-button,
.ghost-button {
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.secondary-button:hover,
.ghost-button:hover {
    border-color: rgba(34, 211, 238, 0.62);
    background: rgba(34, 211, 238, 0.12);
    transform: translateY(-1px);
}

.hero-controls {
    position: absolute;
    right: max(16px, calc((100% - 1280px) / 2));
    bottom: 42px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

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

.main-shell,
.page-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.main-shell {
    padding: 72px 0;
}

.section-block {
    margin-top: 72px;
}

.section-block:first-child {
    margin-top: 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-heading a {
    color: var(--cyan);
    font-weight: 700;
}

.rail {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scrollbar-width: thin;
}

.rail-card {
    flex: 0 0 320px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.55);
    box-shadow: var(--shadow);
}

.rail-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.rail-card:hover img,
.card-cover:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.rail-card span,
.rail-card small {
    display: block;
    padding: 0 16px;
}

.rail-card span {
    margin-top: 14px;
    font-size: 18px;
    font-weight: 800;
}

.rail-card small {
    margin: 6px 0 16px;
    color: var(--muted);
}

.category-grid,
.movie-grid,
.feature-grid {
    display: grid;
    gap: 22px;
}

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

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

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

.category-card,
.feature-card,
.info-panel,
.movie-card,
.ranking-panel,
.filter-panel,
.article-panel,
.related-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.72));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.category-card,
.feature-card,
.info-panel,
.ranking-panel,
.filter-panel,
.article-panel,
.related-panel {
    padding: 22px;
}

.category-card:hover,
.feature-card:hover,
.movie-card:hover,
.ranking-row:hover {
    border-color: rgba(34, 211, 238, 0.42);
    transform: translateY(-2px);
}

.category-card,
.feature-card,
.movie-card,
.ranking-row {
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card strong,
.feature-card strong {
    display: block;
    font-size: 20px;
    margin-bottom: 10px;
}

.category-card p,
.feature-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.movie-card {
    overflow: hidden;
}

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

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 55%);
    opacity: 0.86;
}

.play-mark {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.36);
}

.rank-chip {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 7px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

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

.card-body p {
    min-height: 48px;
    margin: 10px 0 14px;
    color: var(--soft);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.card-meta {
    margin-bottom: 12px;
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #a5f3fc;
    font-size: 12px;
    background: rgba(34, 211, 238, 0.12);
}

.ranking-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 42px 92px minmax(0, 1fr) 56px;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.52);
}

.ranking-row img {
    width: 92px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-number {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.ranking-copy strong,
.ranking-copy em {
    display: block;
}

.ranking-copy em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-row b {
    color: var(--cyan);
    font-size: 18px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.18), transparent 30rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.78));
}

.page-hero .page-shell {
    position: relative;
    z-index: 1;
}

.page-shell {
    padding: 54px 0 72px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr repeat(3, 180px);
    gap: 14px;
    margin-bottom: 28px;
}

.library-search {
    width: 100%;
    padding: 0 14px;
}

.filter-select {
    padding: 0 12px;
}

.no-result {
    display: none;
    margin-top: 20px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.62);
}

.no-result.is-visible {
    display: block;
}

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

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

.detail-copy {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 130px 0 72px;
}

.detail-meta {
    margin-top: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
}

.player-card {
    margin-bottom: 24px;
}

.video-box {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    background: #000;
    box-shadow: var(--shadow);
}

.video-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.74));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    font-size: 34px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 22px 60px rgba(14, 165, 233, 0.38);
}

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

.article-panel {
    margin-bottom: 24px;
}

.article-panel h2,
.related-panel h2,
.info-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.article-panel p,
.info-panel p {
    margin: 0 0 14px;
    color: var(--soft);
    line-height: 1.85;
}

.side-poster {
    overflow: hidden;
    padding: 0;
}

.side-poster img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.side-poster .info-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

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

.related-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-card img {
    width: 116px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    transition: transform 0.35s ease;
}

.related-card strong,
.related-card span {
    display: block;
}

.related-card strong {
    line-height: 1.35;
}

.related-card span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), var(--bg-950));
}

.footer-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 34px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

.footer-brand p,
.footer-col a {
    color: var(--muted);
}

.footer-brand p {
    max-width: 460px;
    line-height: 1.8;
}

.footer-col h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

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

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

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 34px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

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

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

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

@media (max-width: 920px) {
    .desktop-nav,
    .nav-shell > .site-search {
        display: none;
    }

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

    .hero,
    .hero-content {
        min-height: 720px;
    }

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

    .hero-controls {
        left: 16px;
        right: auto;
    }

    .category-grid,
    .movie-grid,
    .feature-grid,
    .ranking-layout,
    .detail-layout,
    .footer-shell {
        grid-template-columns: 1fr;
    }

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

    .detail-hero {
        min-height: 460px;
    }
}

@media (max-width: 640px) {
    .nav-shell {
        width: min(100% - 20px, 1280px);
        height: 68px;
    }

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

    .main-shell,
    .page-shell,
    .detail-copy,
    .footer-shell,
    .footer-bottom {
        width: min(100% - 24px, 1280px);
    }

    .hero h1,
    .hero h2,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

    .rail-card {
        flex-basis: 260px;
    }

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

    .ranking-row {
        grid-template-columns: 34px 82px minmax(0, 1fr);
    }

    .ranking-row b {
        display: none;
    }

    .related-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .related-card img {
        width: 96px;
    }
}
