:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #111827;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --green: #10b981;
    --orange: #f97316;
    --red: #ef4444;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.14), transparent 28rem),
        radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 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;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.nav-shell {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    font-size: 15px;
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.24);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link,
.mobile-link {
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--cyan);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    color: white;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    margin: 0 auto;
    border-radius: 20px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transform: scale(1.02);
    background-position: center;
    background-size: cover;
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.25) 100%),
        linear-gradient(to right, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.26));
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 120px 0 72px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.home-hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(34px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-movie-title {
    margin: 14px 0 12px;
    font-size: clamp(24px, 4vw, 44px);
    line-height: 1.1;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #d1d5db;
    font-size: 18px;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.hero-tags span,
.detail-tags span,
.card-tags span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: 999px;
    padding: 7px 12px;
    color: #cffafe;
    background: rgba(15, 23, 42, 0.76);
    font-size: 13px;
    font-weight: 700;
}

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

.btn-primary,
.btn-ghost,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.22);
}

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

.btn-ghost {
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.76);
    color: white;
}

.btn-soft {
    background: rgba(34, 211, 238, 0.12);
    color: #a5f3fc;
}

.hero-dots {
    position: absolute;
    z-index: 2;
    right: max(28px, calc((100vw - 1180px) / 2));
    bottom: 54px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.45);
    cursor: pointer;
}

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

.main-space {
    padding: 58px 0 78px;
}

.stack {
    display: grid;
    gap: 72px;
}

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

.section-heading > div:first-child {
    display: grid;
    gap: 8px;
}

.section-heading h2 {
    margin: 0;
    color: white;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
}

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

.section-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(59, 130, 246, 0.95));
    box-shadow: 0 16px 40px rgba(34, 211, 238, 0.16);
}

.section-more {
    color: var(--cyan);
    font-weight: 800;
}

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

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

.movie-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.56));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.45);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.76));
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

.movie-card-large .poster-link {
    aspect-ratio: 16 / 9;
}

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

.movie-card:hover .poster-link img,
.wide-card:hover .wide-thumb img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent 62%);
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.9);
    color: white;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-circle {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.year-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    border-radius: 10px;
    padding: 5px 9px;
    background: rgba(2, 6, 23, 0.74);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

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

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    margin-bottom: 8px;
    overflow: hidden;
    color: white;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover,
.wide-title:hover {
    color: var(--cyan);
}

.movie-card-body p,
.wide-card p,
.category-card p,
.detail-copy p,
.detail-review p {
    color: var(--muted);
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.wide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.movie-meta a,
.wide-meta a {
    color: var(--cyan);
}

.panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(22px, 4vw, 34px);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62));
    box-shadow: var(--shadow);
}

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

.wide-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.62);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.wide-card:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.42);
}

.wide-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

.wide-thumb span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(2, 6, 23, 0.28);
    color: white;
    font-size: 28px;
}

.wide-title {
    color: white;
    font-size: 19px;
    font-weight: 800;
}

.wide-card p {
    display: -webkit-box;
    margin: 8px 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-card {
    min-height: 176px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.2), transparent 9rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.62));
    transition: transform 0.24s ease, border-color 0.24s ease;
}

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

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

.category-card p {
    margin: 0;
    font-size: 14px;
}

.category-card span {
    color: var(--cyan);
    font-weight: 800;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 20% 5%, rgba(34, 211, 238, 0.2), transparent 30rem),
        linear-gradient(135deg, #020617, #0f172a);
}

.page-hero .container {
    padding: 74px 0 54px;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

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

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.76);
    color: white;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 128px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px 16px 12px 12px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(59, 130, 246, 0.18));
    color: #a5f3fc;
    font-weight: 900;
}

.rank-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

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

.rank-title {
    color: white;
    font-size: 18px;
    font-weight: 900;
}

.rank-row p {
    display: -webkit-box;
    margin: 6px 0 0;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-score {
    color: #fde68a;
    font-weight: 900;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background-position: center;
    background-size: cover;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.8) 48%, rgba(2, 6, 23, 0.5) 100%),
        linear-gradient(to right, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.4));
}

.detail-hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    padding: 70px 0 52px;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.detail-title p {
    max-width: 820px;
    color: #d1d5db;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta a,
.detail-meta span {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.72);
    color: #e5e7eb;
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.player-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #030712;
    box-shadow: var(--shadow);
}

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

.player-box video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    background: #020617;
    color: white;
    cursor: pointer;
}

.player-cover[hidden] {
    display: none;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.12));
}

.player-cover img {
    position: absolute;
    inset: 0;
}

.player-start {
    position: relative;
    z-index: 1;
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 22px 54px rgba(34, 211, 238, 0.28);
    font-size: 28px;
}

.player-caption {
    padding: 18px 20px;
    color: #cbd5e1;
    font-weight: 800;
}

.detail-copy,
.detail-review,
.side-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.66);
}

.detail-copy h2,
.detail-review h2,
.side-panel h2 {
    margin: 0 0 12px;
    color: white;
    font-size: 24px;
}

.detail-copy p,
.detail-review p {
    margin: 0;
    font-size: 16px;
}

.detail-main-stack {
    display: grid;
    gap: 22px;
}

.side-panel {
    display: grid;
    gap: 16px;
}

.side-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-card img {
    width: 104px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

.side-card a {
    color: white;
    font-weight: 800;
}

.side-card p {
    display: -webkit-box;
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), #020617);
}

.footer-inner {
    display: grid;
    gap: 18px;
    padding: 36px 0;
    color: var(--muted);
    text-align: center;
}

.footer-logo {
    justify-content: center;
    font-size: 20px;
}

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

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

.hidden-by-filter {
    display: none !important;
}

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

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

    .detail-cover {
        width: min(320px, 100%);
    }
}

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

    .menu-toggle {
        display: flex;
    }

    .home-hero {
        min-height: 78vh;
    }

    .hero-inner {
        padding: 96px 0 70px;
    }

    .hero-dots {
        left: 16px;
        right: auto;
        bottom: 28px;
    }

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

    .movie-grid,
    .movie-grid.three,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .wide-card,
    .rank-row,
    .side-card {
        grid-template-columns: 1fr;
    }

    .wide-thumb,
    .rank-thumb {
        width: 100%;
    }

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

    .rank-score {
        display: none;
    }

    .detail-hero .container {
        padding-top: 44px;
    }
}
