:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(34, 211, 238, 0.20);
    --line-soft: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --blue: #2563eb;
    --orange: #fb923c;
    --green: #34d399;
    --shadow: 0 24px 60px rgba(6, 182, 212, 0.10);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 34rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 50%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.08);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.35);
}

.brand-text strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(90deg, #67e8f9, #93c5fd, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    display: block;
    color: rgba(34, 211, 238, 0.66);
    font-size: 12px;
    margin-top: 2px;
}

.header-search {
    flex: 1;
    display: flex;
    align-items: center;
    max-width: 430px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    background: rgba(15, 23, 42, 0.7);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
}

.header-search input {
    padding: 12px 18px;
}

.header-search button,
.mobile-search button,
.filter-bar button {
    border: 0;
    color: white;
    background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
    cursor: pointer;
    white-space: nowrap;
}

.header-search button {
    padding: 12px 18px;
}

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

.nav-link,
.mobile-link {
    color: #cbd5e1;
    border-radius: 14px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 14px;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--cyan);
    background: rgba(6, 182, 212, 0.12);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    color: var(--cyan);
    background: rgba(15, 23, 42, 0.78);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

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

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

.mobile-search {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
}

.mobile-search input {
    padding: 12px 14px;
}

.mobile-search button {
    padding: 0 16px;
}

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

.mobile-link {
    padding: 12px;
    background: rgba(15, 23, 42, 0.56);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.26) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 45%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 780px;
    justify-self: center;
    transform: translateX(-18%);
}

.hero-kicker,
.section-heading span,
.page-hero span,
.detail-kicker,
.category-card > span,
.category-overview-head span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-kicker strong {
    color: #e0f2fe;
    font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
    margin: 16px 0 20px;
    max-width: 760px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.05em;
    background: linear-gradient(90deg, #ffffff, #cffafe, #dbeafe);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content p {
    max-width: 690px;
    margin: 0 0 28px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    padding: 0 28px;
    color: white;
    background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
    box-shadow: 0 18px 40px rgba(6, 182, 212, 0.28);
}

.ghost-btn,
.section-more {
    padding: 0 22px;
    color: var(--cyan);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.56);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: rgba(34, 211, 238, 0.45);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.5);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.section-block {
    padding: 56px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-section h2,
.side-panel h2 {
    margin: 8px 0 0;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(26px, 4vw, 38px);
}

.section-heading p,
.page-hero p,
.category-overview-head p,
.category-card p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
}

.horizontal-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 280px);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 0 14px;
    scrollbar-width: thin;
}

.compact-card {
    position: relative;
    display: grid;
    gap: 8px;
    color: var(--text);
}

.compact-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.compact-card span {
    font-weight: 800;
    line-height: 1.35;
}

.compact-card small {
    color: var(--muted);
}

.compact-card:hover img,
.movie-card:hover img,
.category-card:hover img,
.rank-item:hover img {
    transform: scale(1.04);
    border-color: rgba(34, 211, 238, 0.45);
}

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

.movie-card {
    min-width: 0;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: var(--panel);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 52%);
    opacity: 0.88;
}

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

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.88);
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.32);
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge,
.poster-link:focus .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.year-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.82);
    color: #e2e8f0;
    font-size: 12px;
}

.movie-card-body {
    padding: 14px 2px 0;
}

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

.movie-card-body h3 a:hover,
.rank-content h3 a:hover,
.category-overview-head h2 a:hover {
    color: var(--cyan);
}

.movie-meta,
.movie-one-line {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.movie-one-line {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 10px;
}

.tag-row span {
    min-height: 24px;
    padding: 3px 9px;
    font-size: 12px;
}

.category-band {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.82));
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    padding: 22px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.18), rgba(37, 99, 235, 0.08)),
        rgba(15, 23, 42, 0.75);
    box-shadow: var(--shadow);
}

.category-card strong {
    display: block;
    margin-top: 10px;
    font-size: 19px;
    line-height: 1.35;
}

.category-stack {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    align-items: end;
    gap: 0;
}

.category-stack img {
    width: 78px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    margin-left: -24px;
    border: 2px solid rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.32);
    transition: transform 0.25s ease;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
    gap: 28px;
}

.side-panel {
    align-self: start;
    position: sticky;
    top: 100px;
    padding: 22px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.editor-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 104px 54px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-cover {
    overflow: hidden;
    border-radius: 16px;
}

.rank-cover img {
    width: 104px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.rank-number {
    color: var(--orange);
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-content h3 {
    margin: 0;
}

.rank-content p {
    display: -webkit-box;
    margin: 6px 0;
    overflow: hidden;
    color: #cbd5e1;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-content span {
    color: var(--muted);
    font-size: 13px;
}

.page-main {
    padding-top: 38px;
    padding-bottom: 64px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    padding: 52px;
    border: 1px solid var(--line-soft);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.20), transparent 32rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.82));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 60px);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px 120px;
    gap: 12px;
    margin-bottom: 28px;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.46);
}

.filter-bar button {
    border-radius: 14px;
}

.no-result {
    padding: 22px;
    border: 1px solid rgba(251, 146, 60, 0.28);
    border-radius: 18px;
    color: #fed7aa;
    background: rgba(124, 45, 18, 0.18);
}

.category-overview-list {
    display: grid;
    gap: 24px;
}

.category-overview-card {
    padding: 24px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.category-overview-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 24px;
    margin-bottom: 18px;
}

.compact-row {
    grid-auto-columns: minmax(190px, 220px);
}

.detail-main {
    padding-top: 26px;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
    gap: 24px;
    align-items: stretch;
}

.player-card,
.detail-info,
.detail-section {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.75);
    box-shadow: var(--shadow);
}

.player-card {
    padding: 14px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.30));
}

.player-overlay[hidden] {
    display: none;
}

.player-overlay button {
    width: 78px;
    height: 78px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
    box-shadow: 0 0 42px rgba(34, 211, 238, 0.36);
    cursor: pointer;
    font-size: 26px;
}

.player-overlay strong {
    max-width: min(520px, 90%);
    font-size: clamp(22px, 4vw, 38px);
    line-height: 1.2;
}

.detail-info {
    overflow: hidden;
}

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

.detail-copy {
    padding: 24px;
}

.detail-copy h1 {
    font-size: clamp(28px, 4vw, 44px);
}

.detail-copy p {
    color: #cbd5e1;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.detail-meta div {
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.38);
}

.detail-meta dt {
    color: var(--muted);
    font-size: 12px;
}

.detail-meta dd {
    margin: 2px 0 0;
    color: var(--text);
    font-weight: 700;
}

.detail-tags a:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.48);
}

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

.detail-section h2 {
    font-size: clamp(24px, 3vw, 34px);
    margin-bottom: 16px;
}

.detail-section p {
    color: #dbeafe;
    font-size: 16px;
}

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

.site-footer {
    border-top: 1px solid var(--line-soft);
    background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 28px;
    color: var(--muted);
}

.footer-inner strong {
    color: var(--text);
    font-size: 20px;
}

.footer-inner p {
    max-width: 720px;
}

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

.footer-links a {
    padding: 7px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
}

.footer-links a:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.42);
}

[hidden],
.movie-card.is-hidden,
.rank-item.is-hidden {
    display: none !important;
}

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

    .nav-toggle {
        display: inline-flex;
    }

    .hero-content {
        transform: none;
        justify-self: start;
    }

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

    .split-layout,
    .detail-hero,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

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

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

    .brand-text small {
        font-size: 11px;
    }

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

    .hero-carousel {
        min-height: 620px;
        height: 84vh;
    }

    .hero-shade {
        background:
            linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.86) 100%),
            rgba(2, 6, 23, 0.35);
    }

    .hero-content {
        padding-top: 46px;
    }

    .hero-actions {
        display: grid;
    }

    .section-heading,
    .category-overview-head {
        display: grid;
        align-items: start;
    }

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

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

    .rank-item {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .rank-number {
        position: absolute;
        margin-left: 8px;
        margin-top: 8px;
        padding: 2px 8px;
        border-radius: 999px;
        background: rgba(2, 6, 23, 0.76);
        font-size: 16px;
    }

    .rank-cover img {
        width: 92px;
    }

    .page-hero,
    .detail-section {
        padding: 24px;
        border-radius: 24px;
    }

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

@media (max-width: 520px) {
    .container,
    .header-inner,
    .mobile-panel,
    .footer-inner,
    .hero-content {
        width: min(100% - 24px, 1180px);
    }

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

    .horizontal-row {
        grid-auto-columns: minmax(220px, 78vw);
    }

    .category-card {
        min-height: 240px;
    }

    .player-overlay button {
        width: 64px;
        height: 64px;
    }
}
