:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #10b981;
    --accent-strong: #059669;
    --amber: #f59e0b;
    --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;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 15% 5%, rgba(16, 185, 129, 0.18), transparent 32rem),
        radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.10), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 50%, #020617 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

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

.brand-mark,
.footer-brand span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.32);
}

.brand-text {
    font-size: 1.45rem;
}

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

.nav-link {
    color: var(--muted-strong);
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #34d399;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    width: min(360px, 32vw);
}

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

.header-search input:focus,
.mobile-search input:focus,
.filter-box input:focus {
    border-color: rgba(16, 185, 129, 0.75);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    padding: 11px 16px;
    font-weight: 800;
}

.search-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
}

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

.search-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--muted-strong);
}

.search-panel a:hover {
    background: rgba(16, 185, 129, 0.12);
    color: #ffffff;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
    padding: 8px 11px;
}

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

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

.mobile-panel-inner {
    display: grid;
    gap: 14px;
    padding: 16px 0 20px;
}

.mobile-search {
    display: flex;
    gap: 8px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    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-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52) 46%, rgba(0, 0, 0, 0.10)),
        linear-gradient(0deg, #020617 0%, transparent 32%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding-top: 72px;
}

.hero-copy {
    width: min(680px, 100%);
}

.hero-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.card-tags span {
    border: 1px solid rgba(16, 185, 129, 0.32);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: #a7f3d0;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 6px 10px;
}

.hero h1,
.hero h2 {
    margin: 18px 0 16px;
    font-size: clamp(2.8rem, 7vw, 6.2rem);
    line-height: 0.96;
    letter-spacing: -0.07em;
}

.hero p {
    margin: 0;
    max-width: 620px;
    color: #dbeafe;
    font-size: clamp(1rem, 1.7vw, 1.24rem);
    line-height: 1.85;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 26px 0 30px;
    color: #cbd5e1;
    font-weight: 700;
}

.hero-meta span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-button,
.ghost-button,
.section-link,
.inline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    background: var(--accent);
    color: white;
    padding: 13px 24px;
    box-shadow: 0 18px 42px rgba(16, 185, 129, 0.28);
}

.primary-button:hover,
.inline-button:hover {
    transform: translateY(-2px);
    background: var(--accent-strong);
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.34);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(15, 23, 42, 0.62);
    color: white;
    padding: 13px 22px;
}

.ghost-button:hover {
    border-color: rgba(16, 185, 129, 0.55);
    color: #a7f3d0;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.62);
    color: white;
    font-size: 2rem;
    line-height: 1;
    backdrop-filter: blur(12px);
}

.hero-control:hover {
    background: rgba(2, 6, 23, 0.82);
}

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

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

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

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

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

.content-section,
.page-main {
    padding: 70px 0;
}

.page-main {
    padding-top: 124px;
}

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

.page-heading {
    align-items: flex-start;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: #34d399;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-heading h2,
.page-heading h1,
.detail-title h1 {
    margin: 0;
    color: white;
    font-size: clamp(2rem, 4.2vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.page-heading p,
.section-heading p {
    max-width: 720px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.8;
}

.section-link {
    color: #34d399;
    min-height: 0;
}

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

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

.category-tile {
    position: relative;
    display: grid;
    gap: 10px;
    min-height: 160px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(15, 23, 42, 0.88)),
        radial-gradient(circle at 85% 15%, rgba(52, 211, 153, 0.30), transparent 38%);
    padding: 24px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.52);
}

.category-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.13);
}

.category-tile strong {
    font-size: 1.28rem;
}

.category-tile span:last-child {
    color: #cbd5e1;
    line-height: 1.65;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(16, 185, 129, 0.48);
    background: rgba(15, 23, 42, 0.94);
}

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

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

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

.rating-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.95);
    color: white;
    font-weight: 900;
    padding: 5px 9px;
}

.movie-card-body {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.movie-card h2 {
    margin: 0;
    color: white;
    font-size: 1.12rem;
    line-height: 1.35;
}

.movie-card h2 a:hover {
    color: #34d399;
}

.movie-card p {
    margin: 0;
    min-height: 68px;
    color: var(--muted);
    line-height: 1.65;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.movie-meta span {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.11);
    padding: 5px 8px;
}

.compact-card {
    display: grid;
    grid-template-columns: 86px 1fr;
}

.compact-card .poster-link {
    aspect-ratio: auto;
    min-height: 126px;
}

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

.compact-card p {
    min-height: 0;
    font-size: 0.92rem;
}

.feature-panel {
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.52);
    padding: 34px;
}

.filter-box {
    display: grid;
    gap: 12px;
    width: min(520px, 100%);
}

.filter-box label {
    color: var(--muted-strong);
    font-weight: 800;
}

.empty-state {
    display: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.70);
    padding: 30px;
    color: var(--muted-strong);
    text-align: center;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 26px;
    color: var(--muted);
}

.breadcrumb a:hover {
    color: #34d399;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
    cursor: pointer;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    padding: 0;
    color: white;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.08));
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.player-cover span {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.95);
    box-shadow: 0 24px 60px rgba(16, 185, 129, 0.35);
    font-size: 2.4rem;
    padding-left: 6px;
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 26px 0 20px;
}

.score-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    border-radius: 14px;
    background: var(--amber);
    color: white;
    font-weight: 900;
    padding: 9px 12px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.detail-meta span,
.info-list dd,
.info-list dt {
    color: var(--muted-strong);
}

.detail-meta span {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    padding: 8px 12px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.detail-tags span {
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--line);
    color: #d1fae5;
    padding: 8px 10px;
}

.text-panel,
.sidebar-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.62);
    padding: 24px;
    margin-bottom: 24px;
}

.text-panel h2,
.sidebar-panel h2,
.related-block h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 1.4rem;
}

.text-panel p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
    font-size: 1.03rem;
}

.detail-sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
}

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

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    padding-bottom: 10px;
}

.info-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.info-list dt,
.info-list dd {
    margin: 0;
}

.info-list dd {
    color: white;
    font-weight: 800;
    text-align: right;
}

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

.related-card {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.58);
    padding: 10px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
    transform: translateX(4px);
    border-color: rgba(16, 185, 129, 0.45);
}

.related-card img {
    width: 78px;
    height: 104px;
    object-fit: cover;
    border-radius: 12px;
}

.related-card strong {
    display: block;
    margin-bottom: 7px;
    color: white;
    line-height: 1.35;
}

.related-card em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.9rem;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 94px 1fr auto;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.70);
    padding: 12px 18px 12px 12px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(16, 185, 129, 0.16);
    color: #a7f3d0;
    font-weight: 900;
    font-size: 1.2rem;
}

.rank-item img {
    width: 94px;
    height: 126px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-copy h2 {
    margin: 0 0 8px;
    font-size: 1.18rem;
}

.rank-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.rank-score {
    color: #fbbf24;
    font-weight: 900;
    white-space: nowrap;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding: 54px 0;
}

.footer-brand {
    color: white;
    font-size: 1.35rem;
}

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

.site-footer p {
    margin: 14px 0 0;
    line-height: 1.75;
}

.site-footer ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: #34d399;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 18px;
    text-align: center;
    color: #64748b;
}

@media (min-width: 1280px) {
    .hero {
        height: 85vh;
    }
}

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

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

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

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

    .detail-sidebar {
        position: static;
    }

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

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        min-height: 620px;
    }

    .hero-layer {
        background:
            linear-gradient(0deg, #020617 0%, rgba(0, 0, 0, 0.22) 70%),
            linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.36));
    }

    .hero-control {
        display: none;
    }

    .section-heading,
    .page-heading,
    .detail-title {
        display: grid;
    }

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

    .content-section,
    .page-main {
        padding: 46px 0;
    }

    .page-main {
        padding-top: 104px;
    }

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

    .movie-card p,
    .card-tags {
        display: none;
    }

    .movie-card h2 {
        font-size: 1rem;
    }

    .category-tile {
        min-height: 146px;
        padding: 18px;
    }

    .feature-panel {
        padding: 18px;
        border-radius: 24px;
    }

    .rank-item {
        grid-template-columns: 42px 72px 1fr;
        gap: 12px;
        padding: 10px;
    }

    .rank-number {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .rank-item img {
        width: 72px;
        height: 98px;
    }

    .rank-score {
        grid-column: 3;
    }

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

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

    .brand-text {
        font-size: 1.2rem;
    }

    .hero h1,
    .hero h2 {
        font-size: 2.5rem;
    }
}
