:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.86);
    --bg-card-strong: #111827;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --pink: #f472b6;
    --orange: #fb923c;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.22), transparent 32rem),
        radial-gradient(circle at 80% 8%, rgba(59, 130, 246, 0.18), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body.nav-open {
    overflow: hidden;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 28px rgba(34, 211, 238, 0.25);
    transition: transform 0.2s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-3deg);
}

.brand-text strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--muted-2);
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    white-space: nowrap;
    padding: 8px 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

.top-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.88);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
    width: 220px;
    height: 40px;
    padding: 0 16px;
}

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

.top-search button,
.hero-actions a,
.hero-actions button,
.play-button,
.section-more,
.filter-panel button,
.load-more,
.link-button {
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 38px rgba(34, 211, 238, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.hero-actions a:hover,
.hero-actions button:hover,
.play-button:hover,
.section-more:hover,
.filter-panel button:hover,
.load-more:hover,
.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(34, 211, 238, 0.28);
}

.top-search button {
    height: 40px;
    padding: 0 18px;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.86);
}

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

.hero {
    position: relative;
    width: 100%;
    min-height: 590px;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid var(--line);
}

.hero-bg,
.hero-bg img,
.hero-bg-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-bg img {
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.55s ease, transform 1.2s ease;
}

.hero-bg img.active {
    opacity: 0.78;
    transform: scale(1);
}

.hero-bg-fallback {
    z-index: -2;
    background:
        radial-gradient(circle at 16% 24%, rgba(34, 211, 238, 0.34), transparent 34rem),
        radial-gradient(circle at 78% 28%, rgba(244, 114, 182, 0.25), transparent 30rem),
        linear-gradient(135deg, #020617, #172554 55%, #0f172a);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.25) 44%, rgba(2, 6, 23, 0.04) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 590px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: center;
    gap: 42px;
    padding: 64px 0 46px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(34, 211, 238, 0.38);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 47, 73, 0.48);
    backdrop-filter: blur(10px);
    font-size: 14px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero h1 span {
    display: block;
    background: linear-gradient(90deg, #fff, #67e8f9 55%, #93c5fd);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-summary {
    width: min(680px, 100%);
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.9;
}

.hero-meta,
.detail-meta,
.breadcrumbs,
.small-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

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

.hero-meta span,
.detail-meta span,
.breadcrumbs a,
.breadcrumbs span,
.small-meta span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.58);
}

.hero-meta span,
.detail-meta span,
.breadcrumbs a,
.breadcrumbs span,
.small-meta span {
    padding: 7px 12px;
    font-size: 13px;
}

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

.hero-actions a,
.hero-actions button,
.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 700;
}

.hero-actions .ghost,
.link-button.ghost {
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: var(--text);
    background: rgba(15, 23, 42, 0.54);
    backdrop-filter: blur(12px);
}

.hero-side {
    align-self: stretch;
    display: grid;
    align-content: center;
    gap: 14px;
}

.hero-feature-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hero-feature-card:hover,
.hero-feature-card.active {
    transform: translateX(-4px);
    border-color: rgba(34, 211, 238, 0.56);
    background: rgba(15, 23, 42, 0.92);
}

.hero-feature-card img {
    width: 96px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #172554, #0e7490);
}

.image-missing {
    opacity: 0;
}

.hero-feature-card h3,
.movie-title,
.rank-title,
.category-card h3 {
    transition: color 0.2s ease;
}

.hero-feature-card:hover h3,
.movie-title:hover,
.rank-row:hover .rank-title,
.category-card:hover h3 {
    color: var(--cyan);
}

.hero-feature-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.hero-feature-card p {
    margin: 0;
    color: var(--muted-2);
    font-size: 13px;
    line-height: 1.6;
}

.content-section,
.detail-section,
.filter-panel,
.category-card,
.info-card,
.player-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.content-section {
    margin: 38px 0;
    padding: 26px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    letter-spacing: -0.03em;
}

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

.section-heading p,
.page-title p,
.category-card p,
.info-card p,
.detail-section p,
.empty-tip {
    color: var(--muted-2);
}

.section-heading p {
    margin: 6px 0 0;
}

.section-more {
    flex: 0 0 auto;
    padding: 10px 18px;
    font-size: 14px;
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.52);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(15, 23, 42, 0.88);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 15%, rgba(34, 211, 238, 0.42), transparent 40%),
        linear-gradient(135deg, #172554, #0f172a 60%, #083344);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 52%, rgba(2, 6, 23, 0.84));
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: rgba(34, 211, 238, 0.92);
    box-shadow: 0 12px 24px rgba(34, 211, 238, 0.32);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #020617;
    background: linear-gradient(135deg, #fde68a, #fb923c);
}

.movie-info {
    padding: 15px;
}

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.4;
}

.movie-meta,
.movie-desc {
    color: var(--muted);
    font-size: 13px;
}

.movie-meta {
    margin: 9px 0 0;
}

.movie-desc {
    display: -webkit-box;
    min-height: 58px;
    margin: 10px 0 0;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

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

.tag-row span,
.detail-tags span {
    padding: 5px 9px;
    font-size: 12px;
}

.page-hero {
    padding: 58px 0 8px;
}

.page-title {
    max-width: 760px;
}

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

.page-title p {
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    margin: 28px 0 0;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr repeat(3, 170px) auto;
    gap: 12px;
    align-items: center;
}

.filter-panel input,
.filter-panel select {
    height: 44px;
    padding: 0 14px;
}

.filter-panel button {
    height: 44px;
    padding: 0 20px;
}

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

.category-card {
    padding: 22px;
    overflow: hidden;
    position: relative;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -36px;
    top: -36px;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.18);
}

.category-card h3 {
    margin: 0;
    font-size: 22px;
}

.category-card p {
    min-height: 70px;
    margin: 12px 0 18px;
    line-height: 1.6;
}

.category-card strong {
    display: inline-flex;
    align-items: center;
    color: var(--cyan);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 70px 88px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.46);
}

.rank-num {
    font-size: 26px;
    font-weight: 900;
    color: var(--cyan);
    text-align: center;
}

.rank-row img {
    width: 88px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #172554, #0e7490);
}

.rank-title {
    display: block;
    margin-bottom: 8px;
    font-size: 19px;
    font-weight: 800;
}

.rank-score {
    padding: 8px 13px;
    border-radius: 999px;
    color: #020617;
    background: linear-gradient(135deg, #67e8f9, #93c5fd);
    font-weight: 900;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.55)),
        radial-gradient(circle at 78% 26%, rgba(34, 211, 238, 0.2), transparent 34rem);
    z-index: 1;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 36px;
    padding: 42px 0;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #172554, #083344);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.breadcrumbs {
    margin-bottom: 18px;
}

.detail-title h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.detail-lead {
    max-width: 850px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-section {
    padding: 26px;
    margin-bottom: 24px;
}

.detail-section h2,
.info-card h2,
.player-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-section p {
    font-size: 16px;
    line-height: 1.9;
}

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

.video-shell {
    position: relative;
    background: #000;
}

.video-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.14), transparent 42%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.76));
}

.play-overlay.hidden {
    display: none;
}

.play-button {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 28px;
}

.player-card h2,
.player-card p {
    padding: 0 22px;
}

.player-card h2 {
    padding-top: 22px;
}

.player-card p {
    color: var(--muted-2);
    line-height: 1.8;
    padding-bottom: 20px;
}

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

.side-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.38);
}

.side-item img {
    width: 70px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
    background: linear-gradient(135deg, #172554, #083344);
}

.side-item strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.side-item span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.info-card {
    padding: 22px;
    margin-bottom: 20px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
}

.load-more {
    display: block;
    min-width: 170px;
    height: 46px;
    margin: 24px auto 0;
    font-weight: 800;
}

.empty-tip {
    display: none;
    padding: 22px;
    text-align: center;
}

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

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted-2);
}

.footer-inner p {
    margin: 8px 0 0;
}

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

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

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

    .hero-inner {
        grid-template-columns: 1fr;
    }

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

    .hero-feature-card {
        grid-template-columns: 72px 1fr;
    }

    .hero-feature-card img {
        width: 72px;
    }

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

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

    .nav-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .main-nav {
        position: fixed;
        top: 74px;
        left: 0;
        right: 0;
        display: none;
        height: calc(100vh - 74px);
        overflow: auto;
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
        background: rgba(2, 6, 23, 0.97);
    }

    body.nav-open .main-nav {
        display: flex;
    }

    .main-nav a {
        padding: 14px 10px;
        border: 1px solid var(--line);
        border-radius: 12px;
    }

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

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

    .detail-inner {
        grid-template-columns: 210px 1fr;
    }
}

@media (max-width: 720px) {
    main,
    .header-inner,
    .footer-inner,
    .hero-inner,
    .detail-inner {
        width: min(100% - 22px, 1280px);
    }

    .brand-text small {
        display: none;
    }

    .hero,
    .hero-inner {
        min-height: auto;
    }

    .hero-inner {
        padding: 52px 0 30px;
    }

    .hero-side {
        grid-template-columns: 1fr;
    }

    .content-section,
    .detail-section {
        padding: 18px;
        border-radius: 18px;
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-desc {
        display: none;
    }

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

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

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

    .detail-poster {
        width: min(260px, 100%);
    }

    .rank-row {
        grid-template-columns: 48px 70px 1fr;
    }

    .rank-score {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 440px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }
}
