:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --emerald: #34d399;
    --emerald-dark: #059669;
    --cyan: #22d3ee;
    --amber: #f59e0b;
    --rose: #fb7185;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.2), transparent 28rem),
        radial-gradient(circle at 90% 8%, rgba(34, 211, 238, 0.16), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #020617 58%, #050816 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

body.no-scroll {
    overflow: hidden;
}

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;
    backdrop-filter: blur(18px);
    background: rgba(2, 6, 23, 0.78);
    border-bottom: 1px solid var(--line);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    color: #052e2b;
    box-shadow: 0 12px 32px rgba(34, 211, 238, 0.18);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-menu a {
    color: var(--muted-strong);
    font-size: 15px;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-menu a:hover {
    color: var(--emerald);
}

.header-search {
    position: relative;
    width: min(260px, 25vw);
}

.header-search input,
.filter-search input {
    width: 100%;
    border: 1px solid var(--line);
    outline: none;
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.78);
    padding: 11px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-search input:focus {
    border-color: rgba(52, 211, 153, 0.7);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

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

.mobile-menu {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
    background: rgba(2, 6, 23, 0.96);
}

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

.mobile-menu a {
    display: block;
    padding: 12px 0;
}

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

.hero {
    position: relative;
    margin: 28px auto 0;
    overflow: hidden;
    border-radius: 34px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow);
    background: #07111f;
}

.hero-slider {
    min-height: 580px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: center;
    gap: 42px;
    padding: 64px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 44%, rgba(2, 6, 23, 0.28) 100%),
        var(--hero-cover);
    background-size: cover;
    background-position: center;
    filter: saturate(1.08);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    z-index: -1;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 7px 12px;
    color: #bffbea;
    border: 1px solid rgba(52, 211, 153, 0.32);
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.14);
    font-size: 13px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 22px 0 18px;
    max-width: 760px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-title-gradient,
.section-title span {
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    max-width: 720px;
    color: var(--muted-strong);
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.meta-pill,
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    color: #d1fae5;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    font-size: 13px;
}

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

.primary-btn,
.secondary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 18px 36px rgba(20, 184, 166, 0.22);
}

.secondary-btn {
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.ghost-btn {
    color: var(--emerald);
    border: 1px solid rgba(52, 211, 153, 0.34);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.hero-poster-wrap {
    position: relative;
    justify-self: end;
    width: min(380px, 100%);
}

.hero-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(6, 95, 70, 0.32));
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.56);
}

.hero-poster img,
.card-poster img,
.detail-poster img,
.related-poster img,
.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(6, 95, 70, 0.28));
}

.hero-float-card {
    position: absolute;
    left: -28px;
    bottom: 34px;
    width: 210px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.hero-float-card strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    color: var(--emerald);
}

.hero-float-card span {
    color: var(--muted-strong);
    font-size: 13px;
}

.hero-dots {
    position: absolute;
    left: 64px;
    bottom: 38px;
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.section {
    padding: 66px 0 0;
}

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

.section-title {
    margin: 12px 0 0;
    font-size: clamp(26px, 3.4vw, 42px);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.section-desc {
    max-width: 720px;
    color: var(--muted);
    margin: 10px 0 0;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(52, 211, 153, 0.56);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.card-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

.card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 16px;
    min-height: 210px;
}

.card-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.32;
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
}

.card-tags span {
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.16);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
}

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

.feature-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 22px;
    padding: 16px;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
        radial-gradient(circle at 12% 0%, rgba(52, 211, 153, 0.12), transparent 20rem),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 211, 153, 0.42);
}

.feature-card .card-poster {
    border-radius: 18px;
}

.feature-body h3 {
    margin: 8px 0;
    font-size: 24px;
    line-height: 1.25;
}

.feature-body p {
    color: var(--muted-strong);
    margin: 0;
}

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

.category-card {
    min-height: 176px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(6, 95, 70, 0.28)),
        radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.2), transparent 14rem);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 211, 153, 0.42);
}

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

.category-card p {
    margin: 0;
    color: var(--muted-strong);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 88px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(5px);
    border-color: rgba(245, 158, 11, 0.46);
}

.rank-number {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fef3c7;
    background: rgba(245, 158, 11, 0.14);
    font-size: 22px;
    font-weight: 900;
}

.rank-poster {
    height: 124px;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.9);
}

.rank-body h3 {
    margin: 0 0 8px;
    font-size: 19px;
}

.rank-body p {
    color: var(--muted);
    margin: 0;
    font-size: 14px;
}

.page-hero {
    margin-top: 36px;
    padding: 46px;
    border-radius: 32px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        radial-gradient(circle at 15% 0%, rgba(52, 211, 153, 0.16), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 12px 0;
    font-size: clamp(34px, 4.6vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 820px;
    color: var(--muted-strong);
    font-size: 17px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(120px, 180px));
    gap: 14px;
    margin: 28px 0 26px;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.66);
}

.filter-bar select {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.74);
    padding: 11px 14px;
    outline: none;
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 22px;
    color: var(--muted-strong);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
    display: block;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin: 30px 0 18px;
    font-size: 14px;
}

.crumbs a:hover {
    color: var(--emerald);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 38px;
    padding: 34px;
    border-radius: 32px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        radial-gradient(circle at 18% 0%, rgba(52, 211, 153, 0.16), transparent 24rem),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(34px, 4.8vw, 62px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.detail-info p {
    color: var(--muted-strong);
    font-size: 17px;
}

.watch-section {
    padding-top: 38px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

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

.play-gate {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: var(--text);
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.56));
}

.play-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding-left: 5px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 22px 56px rgba(20, 184, 166, 0.28);
    font-size: 30px;
    transition: transform 0.2s ease;
}

.play-gate:hover .play-icon {
    transform: scale(1.06);
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding-top: 38px;
}

.article-panel,
.related-panel {
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.72);
}

.article-panel {
    padding: 30px;
}

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

.article-panel p {
    color: var(--muted-strong);
    margin: 0 0 20px;
}

.related-panel {
    padding: 18px;
    align-self: start;
    position: sticky;
    top: 96px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
    transform: translateX(3px);
    border-color: rgba(52, 211, 153, 0.34);
}

.related-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
}

.related-body h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.3;
}

.related-body p {
    color: var(--muted);
    margin: 0;
    font-size: 12px;
}

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

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.footer-title {
    font-weight: 900;
    font-size: 22px;
}

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

.footer-links {
    display: grid;
    gap: 10px;
}

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

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 42px;
    }

    .hero-poster-wrap {
        display: none;
    }

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

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

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

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

    .related-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner,
    .page-main,
    .footer-inner {
        width: min(100% - 24px, 1240px);
    }

    .hero-slider {
        min-height: 620px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 30px 24px 74px;
        align-items: end;
    }

    .hero h1,
    .hero h2 {
        font-size: clamp(34px, 10vw, 46px);
    }

    .hero-lead {
        font-size: 16px;
    }

    .hero-dots {
        left: 24px;
        bottom: 26px;
    }

    .section-header {
        display: block;
    }

    .movie-grid,
    .movie-grid.compact-grid,
    .category-grid,
    .rank-list,
    .feature-grid,
    .filter-bar,
    .detail-hero,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: 50px 74px 1fr;
    }

    .rank-poster {
        height: 104px;
    }

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

    .detail-poster {
        max-width: 270px;
    }
}

@media (max-width: 480px) {
    .brand span:last-child {
        max-width: 9em;
        overflow: hidden;
        text-overflow: ellipsis;
    }

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

    .feature-card .card-poster {
        max-width: 210px;
    }
}
