:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(30, 41, 59, 0.58);
    --panel-strong: rgba(15, 23, 42, 0.9);
    --line: rgba(30, 64, 175, 0.32);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #60a5fa;
    --purple: #c084fc;
    --red: #f87171;
    --yellow: #facc15;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(6, 182, 212, 0.2), transparent 30rem),
        radial-gradient(circle at top right, rgba(88, 28, 135, 0.26), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #000 100%);
    color: var(--text);
}

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

img {
    user-select: none;
}

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-shell {
    min-height: 100vh;
}

.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);
}

.navbar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.95rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.logo-mark {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 36px rgba(34, 211, 238, 0.26);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #e5e7eb;
    font-weight: 600;
}

.nav-links a {
    transition: color 0.2s ease;
}

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

.nav-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 0.8rem;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem 1rem;
    border-top: 1px solid var(--line);
}

.mobile-nav a {
    display: block;
    padding: 0.8rem 0;
    color: #e5e7eb;
    font-weight: 600;
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.page-main {
    padding: 3rem 0 5rem;
}

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

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

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

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 70vh;
    object-fit: cover;
    transform: scale(1.03);
    transition: transform 8s ease;
}

.hero-slide.is-active .hero-image {
    transform: scale(1);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.26) 70%, rgba(2, 6, 23, 0.12) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: clamp(3.5rem, 8vw, 7rem);
    width: min(1280px, calc(100% - 2.5rem));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(15rem, 0.6fr);
    gap: 2rem;
    align-items: end;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 0.5rem;
    color: var(--cyan);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    font-weight: 700;
    font-size: 0.85rem;
}

.hero-title {
    margin: 1.25rem 0 1rem;
    max-width: 54rem;
    font-size: clamp(2.4rem, 5vw, 5.25rem);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.52);
}

.hero-site-title {
    margin: 0 0 0.65rem;
    color: #dbeafe;
    font-size: clamp(1rem, 1.7vw, 1.35rem);
    font-weight: 800;
    letter-spacing: 0.12em;
}

.hero-desc {
    max-width: 48rem;
    margin: 0 0 1.6rem;
    color: #e2e8f0;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.72;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.8rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.78rem 1.25rem;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
    box-shadow: 0 16px 34px rgba(6, 182, 212, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0891b2, #1d4ed8);
}

.btn-ghost {
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.72);
    color: #e5e7eb;
}

.btn-ghost:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.45);
}

.hero-side-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.hero-side-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.hero-side-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-side-body {
    padding: 1.2rem;
}

.hero-meta,
.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    color: var(--subtle);
    font-size: 0.9rem;
}

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

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

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

.section {
    margin-top: 4.5rem;
}

.section-panel {
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 8px);
    padding: clamp(1.2rem, 3vw, 2rem);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.22), rgba(88, 28, 135, 0.18));
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title {
    margin: 0.7rem 0 0;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 0.55rem 0 0;
    color: var(--subtle);
    line-height: 1.7;
}

.grid {
    display: grid;
    gap: 1.25rem;
}

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

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

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

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

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

.poster-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.poster-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 1rem;
    background: #0f172a;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.poster-cover img,
.wide-cover img,
.rank-cover img,
.related-cover img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.movie-card:hover img,
.related-card:hover img,
.rank-card:hover img,
.category-card:hover .category-glow {
    transform: scale(1.08);
}

.poster-overlay,
.wide-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-overlay,
.movie-card:hover .wide-overlay {
    opacity: 1;
}

.play-chip {
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #020617;
    background: var(--cyan);
    box-shadow: 0 12px 34px rgba(34, 211, 238, 0.4);
}

.poster-body h3,
.wide-body h3,
.rank-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 800;
    transition: color 0.2s ease;
}

.movie-card:hover h3,
.rank-card:hover h3,
.related-card:hover h3 {
    color: var(--cyan);
}

.poster-body p,
.wide-body p,
.rank-card p,
.related-card p {
    margin: 0.42rem 0 0;
    color: var(--subtle);
    font-size: 0.9rem;
    line-height: 1.55;
}

.badge,
.tag {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 0.24rem 0.56rem;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.18);
    border: 1px solid rgba(34, 211, 238, 0.2);
    font-size: 0.76rem;
    font-weight: 700;
}

.badge-hot {
    color: white;
    background: rgba(239, 68, 68, 0.92);
    border-color: rgba(239, 68, 68, 0.92);
}

.badge-yellow {
    color: #111827;
    background: var(--yellow);
    border-color: var(--yellow);
}

.wide-card {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 16rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--panel);
}

.wide-cover {
    position: absolute;
    inset: 0;
}

.wide-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wide-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.1));
}

.wide-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.25rem;
}

.rank-card {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    overflow: hidden;
    border-radius: 1rem;
    background: rgba(30, 41, 59, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-card:hover {
    background: rgba(30, 41, 59, 0.86);
    transform: translateY(-2px);
}

.rank-cover {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.rank-num {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(239, 68, 68, 0.92);
    font-weight: 900;
}

.rank-body {
    padding: 1rem;
    min-width: 0;
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 12rem;
    border-radius: var(--radius);
    padding: 1.35rem;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

.category-glow {
    position: absolute;
    inset: auto -15% -45% -15%;
    height: 8rem;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.34), transparent 62%);
    transition: transform 0.5s ease;
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 900;
}

.category-card p {
    position: relative;
    margin: 0.7rem 0 0;
    color: var(--subtle);
    line-height: 1.65;
}

.filters {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) 10rem 10rem;
    gap: 0.9rem;
    margin: 1.6rem 0 2rem;
}

.input,
.select {
    width: 100%;
    min-height: 3rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 0.75rem 1rem;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
    outline: none;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--subtle);
    font-size: 0.92rem;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.9fr);
    gap: 1.5rem;
    align-items: start;
}

.player-panel,
.detail-side,
.text-panel {
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.stream-player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.stream-player video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18)),
        rgba(2, 6, 23, 0.2);
}

.play-overlay span {
    width: clamp(4rem, 10vw, 5.8rem);
    height: clamp(4rem, 10vw, 5.8rem);
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    box-shadow: 0 18px 52px rgba(34, 211, 238, 0.38);
}

.stream-player.is-playing .play-overlay {
    display: none;
}

.player-copy {
    padding: 1.2rem;
}

.player-copy h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-side {
    padding: 1rem;
}

.detail-cover {
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 2 / 3;
    background: #0f172a;
}

.detail-tags,
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.detail-tags {
    margin-top: 1rem;
}

.text-panel {
    margin-top: 1.5rem;
    padding: clamp(1.1rem, 2.5vw, 1.6rem);
}

.text-panel h2 {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    font-weight: 900;
}

.text-panel p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.9;
}

.text-panel p + p {
    margin-top: 1rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}

.related-card {
    display: block;
}

.related-cover {
    overflow: hidden;
    border-radius: 0.9rem;
    aspect-ratio: 2 / 3;
    background: #0f172a;
}

.related-card h3 {
    margin: 0.65rem 0 0;
    font-size: 0.95rem;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.34);
    color: var(--subtle);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.line-clamp-1,
.line-clamp-2,
.line-clamp-3,
.line-clamp-4 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-1 {
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

.line-clamp-4 {
    -webkit-line-clamp: 4;
}

[hidden] {
    display: none !important;
}

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

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

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

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

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

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

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

    .hero-side-card {
        display: none;
    }

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

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

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

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

@media (max-width: 560px) {
    .container,
    .navbar {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-carousel {
        min-height: 74vh;
    }

    .hero-image {
        min-height: 74vh;
    }

    .hero-content {
        bottom: 4rem;
        width: calc(100% - 2rem);
    }

    .hero-title {
        font-size: 2.45rem;
    }

    .grid-posters,
    .grid-categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rank-card {
        grid-template-columns: 6.2rem minmax(0, 1fr);
    }

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

    .footer-inner {
        display: block;
    }

    .footer-links {
        margin-top: 1rem;
    }
}
