:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.58);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --subtle: #64748b;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --glow: rgba(34, 211, 238, 0.25);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.48);
}

* {
    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.14), transparent 34rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 32rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 12px 32px var(--glow);
}

.brand-mark.small {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.brand-text,
.footer-brand span:last-child {
    font-size: 1.16rem;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: var(--cyan);
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #cbd5e1;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 18px;
    border-top: 1px solid var(--line);
}

.mobile-nav a {
    display: block;
    padding: 12px 4px;
    color: #cbd5e1;
}

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

main {
    min-height: 65vh;
}

.hero-carousel {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 34px auto 0;
    border-radius: 32px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

.hero-slide {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    gap: 48px;
    align-items: end;
    padding: 72px;
    opacity: 0;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.78) 50%, rgba(15, 23, 42, 0.18)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.65), rgba(2, 6, 23, 0.12)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    transition: opacity 0.65s ease;
}

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

.hero-copy {
    max-width: 680px;
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.14);
    color: #67e8f9;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 1.06rem;
    line-height: 1.8;
}

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

.hero-tags,
.detail-tags {
    margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.meta-pills span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(103, 232, 249, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #dbeafe;
    font-size: 0.78rem;
}

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

.primary-button,
.secondary-button,
.text-link,
.ghost-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
    min-height: 46px;
    padding: 0 22px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.22);
}

.secondary-button {
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid rgba(226, 232, 240, 0.22);
    background: rgba(15, 23, 42, 0.62);
    color: #e2e8f0;
}

.primary-button:hover,
.secondary-button:hover,
.text-link:hover,
.ghost-link:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-poster {
    align-self: center;
    position: relative;
    z-index: 2;
    border-radius: 26px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(34, 211, 238, 0.28), rgba(37, 99, 235, 0.12));
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

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

.dark-band {
    width: 100%;
    max-width: none;
    padding: 54px max(16px, calc((100% - 1180px) / 2));
    background: rgba(15, 23, 42, 0.36);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.45rem);
    letter-spacing: -0.04em;
}

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

.section-more,
.text-link,
.ghost-link {
    color: #67e8f9;
}

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

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

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

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

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.poster-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 15%, rgba(34, 211, 238, 0.24), transparent 36%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.4));
}

.poster-wrap img {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

.poster-wrap img.image-missing,
.category-collage img.image-missing,
.rank-thumb img.image-missing,
.hero-poster img.image-missing,
.detail-poster-card img.image-missing {
    opacity: 0;
}

.poster-wrap:hover img {
    transform: scale(1.08);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 48%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.poster-wrap:hover::after {
    opacity: 1;
}

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #e2e8f0;
    font-size: 0.78rem;
    backdrop-filter: blur(10px);
}

.play-bubble {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 4;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    padding-left: 3px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.92);
    color: white;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.poster-wrap:hover .play-bubble {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card h3,
.ranking-row h3 {
    margin: 0;
    color: white;
    font-size: 1rem;
    line-height: 1.45;
}

.movie-card h3 a:hover,
.ranking-row h3 a:hover,
.category-overview-card h2 a:hover {
    color: var(--cyan);
}

.movie-meta,
.movie-desc,
.rank-main p,
.rank-meta,
.category-overview-card p,
.site-footer p {
    color: var(--muted);
    line-height: 1.65;
}

.movie-meta {
    margin: 5px 0 0;
    font-size: 0.83rem;
}

.movie-desc {
    margin: 8px 0 0;
    font-size: 0.88rem;
}

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

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.18);
}

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

.category-card {
    position: relative;
    min-height: 168px;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.18);
}

.category-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(145deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.62)),
        var(--category-image);
    background-size: cover;
    background-position: center;
    transition: transform 0.45s ease;
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 1;
    display: block;
}

.category-card strong {
    font-size: 1.35rem;
}

.category-card em {
    margin-top: 10px;
    color: #cbd5e1;
    font-style: normal;
    line-height: 1.55;
}

.category-card:hover .category-bg {
    transform: scale(1.08);
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: 70px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.7)),
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.18), transparent 34rem),
        var(--panel-strong);
    box-shadow: var(--shadow);
}

.category-hero {
    background-image:
        linear-gradient(135deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.62)),
        var(--page-image);
    background-size: cover;
    background-position: center;
}

.toolbar {
    display: flex;
    margin-bottom: 24px;
}

.search-input {
    width: min(520px, 100%);
    height: 50px;
    padding: 0 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    outline: none;
    background: rgba(15, 23, 42, 0.86);
    color: white;
    font-size: 0.96rem;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--panel);
}

.category-collage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    min-height: 160px;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(145deg, #0f172a, #1e293b);
}

.category-collage img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
}

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

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

.ranking-row {
    display: grid;
    grid-template-columns: 56px 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
}

.rank-num {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
    font-weight: 800;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(145deg, #0f172a, #1e293b);
}

.rank-thumb img {
    width: 72px;
    height: 96px;
    object-fit: cover;
}

.rank-main p {
    margin: 6px 0;
}

.ghost-link {
    padding: 8px 14px;
    border: 1px solid rgba(34, 211, 238, 0.26);
}

.detail-hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.76)),
        var(--detail-image);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 58px;
}

.detail-poster-card {
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(145deg, #0f172a, #1e293b);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #94a3b8;
    font-size: 0.9rem;
}

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

.meta-pills {
    margin-top: 24px;
}

.player-section {
    margin-top: 42px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.18));
    color: white;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 800;
}

.player-start.is-hidden {
    display: none;
}

.player-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    padding-left: 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 22px 52px rgba(34, 211, 238, 0.24);
}

.prose-card {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--panel);
}

.prose-card h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.prose-card h2:not(:first-child) {
    margin-top: 32px;
}

.prose-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.95;
    font-size: 1.02rem;
}

.site-footer {
    margin-top: 86px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

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

.site-footer h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.footer-links {
    display: grid;
    gap: 9px;
    color: #94a3b8;
    font-size: 0.92rem;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    border-top: 1px solid var(--line);
    color: #64748b;
    font-size: 0.9rem;
    text-align: center;
}

.is-filtered-out {
    display: none !important;
}

@media (max-width: 1100px) {
    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 280px;
        padding: 56px;
    }

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

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

    .detail-grid {
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: 760px;
        border-radius: 24px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-items: center;
        gap: 28px;
        padding: 44px 28px 76px;
    }

    .hero-poster {
        width: min(260px, 70%);
        margin: 0 auto;
    }

    .hero-control {
        top: auto;
        bottom: 18px;
        transform: none;
    }

    .hero-control.prev {
        left: 18px;
    }

    .hero-control.next {
        right: 18px;
    }

    .hero-dots {
        bottom: 30px;
    }

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

    .archive-grid,
    .movie-grid,
    .featured-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .detail-grid {
        grid-template-columns: 1fr;
        padding: 34px;
    }

    .detail-poster-card {
        width: min(280px, 78%);
        margin: 0 auto;
    }

    .page-hero {
        padding: 44px 28px;
        border-radius: 24px;
    }

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

    .ranking-row .ghost-link {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .mobile-nav,
    .hero-carousel,
    .content-section,
    .page-hero,
    .detail-hero,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: clamp(2rem, 14vw, 3.4rem);
    }

    .hero-copy p,
    .page-hero p,
    .detail-one-line {
        font-size: 0.98rem;
    }

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

    .movie-desc,
    .tag-row {
        display: none;
    }

    .movie-card h3 {
        font-size: 0.94rem;
    }

    .category-card {
        min-height: 140px;
        padding: 18px;
    }

    .ranking-row {
        grid-template-columns: 42px 1fr;
    }

    .rank-thumb {
        display: none;
    }

    .detail-grid {
        padding: 26px;
    }

    .prose-card {
        padding: 24px;
    }
}
