:root {
    --bg: #0f172a;
    --bg-deep: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: #111827;
    --card: #1e293b;
    --card-soft: rgba(30, 41, 59, 0.82);
    --line: rgba(148, 163, 184, 0.22);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --white: #ffffff;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 34rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 30rem),
        var(--bg);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

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

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 34px rgba(6, 182, 212, 0.3);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #cbd5e1;
    font-weight: 650;
}

.nav-links a,
.mobile-nav a,
.footer-links a {
    transition: color 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: #67e8f9;
}

.nav-toggle {
    display: none;
    border: 0;
    color: var(--text);
    background: rgba(148, 163, 184, 0.12);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 16px 18px;
}

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

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.08);
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: var(--bg-deep);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    background-position: center;
    background-size: cover;
    transition: opacity 900ms ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0.2)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.18) 60%);
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 118px 0 72px;
    max-width: 840px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    color: #a5f3fc;
    background: rgba(6, 182, 212, 0.18);
    border: 1px solid rgba(103, 232, 249, 0.28);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 16px;
    line-height: 1.05;
    font-size: clamp(2.3rem, 6vw, 5.6rem);
    letter-spacing: -0.04em;
    color: var(--white);
}

.hero-content h2 {
    font-size: clamp(2rem, 5vw, 4.6rem);
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 26px;
    color: #cbd5e1;
    font-size: clamp(1rem, 2vw, 1.22rem);
    line-height: 1.85;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

.btn-ghost {
    color: #e0f2fe;
    border-color: rgba(226, 232, 240, 0.25);
    background: rgba(15, 23, 42, 0.56);
}

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2));
    bottom: 44px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(226, 232, 240, 0.25);
    border-radius: 999px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.62);
    cursor: pointer;
}

.quick-search {
    margin-top: -36px;
    position: relative;
    z-index: 5;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-box input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.74);
    padding: 0 16px;
}

.search-box button {
    border: 0;
    cursor: pointer;
}

.section {
    padding: 72px 0 0;
}

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

.section-heading h2,
.page-title h1,
.detail-copy h1,
.detail-section h2 {
    margin: 0;
    color: var(--white);
    letter-spacing: -0.03em;
}

.section-heading h2,
.page-title h1 {
    font-size: clamp(1.8rem, 3vw, 3rem);
}

.section-heading p,
.page-title p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background-position: center;
    background-size: cover;
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.26);
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.9));
}

.category-tile > div {
    position: absolute;
    inset: auto 0 0 0;
    padding: 22px;
}

.category-tile strong {
    display: block;
    margin-bottom: 8px;
    color: var(--white);
    font-size: 1.28rem;
}

.category-tile span {
    display: block;
    color: #cbd5e1;
    line-height: 1.65;
}

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.18);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(103, 232, 249, 0.34);
    box-shadow: 0 24px 70px rgba(8, 145, 178, 0.18);
}

.movie-poster {
    position: relative;
    margin: 0;
    height: 268px;
    overflow: hidden;
    background: #111827;
}

.movie-card-large .movie-poster {
    height: 340px;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 520ms ease;
}

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

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

.movie-meta-line {
    margin-bottom: 8px;
    color: #67e8f9;
    font-size: 0.82rem;
    font-weight: 700;
}

.movie-card h3 {
    margin: 0 0 9px;
    color: var(--white);
    font-size: 1.05rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p {
    min-height: 4.8em;
    margin: 0 0 12px;
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.movie-tags span,
.meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(8, 145, 178, 0.18);
    border: 1px solid rgba(103, 232, 249, 0.18);
    font-size: 0.78rem;
    font-weight: 700;
}

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

.rank-card {
    display: grid;
    grid-template-columns: auto 96px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.72);
    transition: transform 180ms ease, border-color 180ms ease;
}

.rank-card:hover {
    transform: translateY(-3px);
    border-color: rgba(103, 232, 249, 0.34);
}

.rank-index {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

.rank-card img {
    width: 96px;
    height: 70px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-card strong,
.rank-card span,
.rank-card p {
    display: block;
}

.rank-card strong {
    color: var(--white);
    margin-bottom: 5px;
}

.rank-card span,
.rank-card p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.page-hero {
    padding: 78px 0 34px;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.72), rgba(15, 23, 42, 0)),
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.22), transparent 30rem);
}

.page-title {
    max-width: 900px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 170px 170px;
    gap: 14px;
    margin: 28px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.64);
}

.no-results {
    display: none;
    margin: 22px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(30, 41, 59, 0.6);
}

.no-results.is-visible {
    display: block;
}

.detail-hero {
    padding: 32px 0 64px;
    background: linear-gradient(180deg, #020617, rgba(15, 23, 42, 0));
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumbs a:hover {
    color: #67e8f9;
}

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

.movie-player {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: var(--white);
    background:
        radial-gradient(circle, rgba(6, 182, 212, 0.16), transparent 18rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.86));
    cursor: pointer;
    transition: opacity 220ms ease;
}

.player-cover span:first-child {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 2rem;
    box-shadow: 0 20px 48px rgba(6, 182, 212, 0.32);
}

.player-cover span:last-child {
    font-weight: 800;
    letter-spacing: 0.06em;
}

.movie-player.is-ready .player-cover {
    opacity: 0;
    pointer-events: none;
}

.player-status {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    display: none;
    padding: 12px 14px;
    border-radius: 14px;
    color: #fee2e2;
    background: rgba(127, 29, 29, 0.82);
}

.player-status.is-visible {
    display: block;
}

.detail-copy,
.detail-side,
.detail-section {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.18);
}

.detail-copy {
    margin-top: 22px;
    padding: 24px;
}

.detail-copy h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.18;
}

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

.detail-copy p,
.detail-section p,
.detail-side p {
    color: #cbd5e1;
    line-height: 1.85;
}

.detail-side {
    padding: 18px;
    position: sticky;
    top: 92px;
}

.detail-side img {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #111827;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px 14px;
    margin: 18px 0 0;
    color: #cbd5e1;
}

.detail-side dt {
    color: var(--muted);
}

.detail-section {
    padding: 26px;
    margin-bottom: 24px;
}

.detail-section h2 {
    margin-bottom: 12px;
    font-size: 1.55rem;
}

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

.site-footer {
    margin-top: 88px;
    padding: 54px 0 24px;
    color: #cbd5e1;
    background: #020617;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
}

.footer-grid p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-grid h3 {
    margin: 0 0 12px;
    color: var(--white);
}

.footer-links {
    display: grid;
    gap: 10px;
    color: var(--muted);
}

.footer-bottom {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: #64748b;
    font-size: 0.9rem;
}

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

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        padding: 96px 0 108px;
    }

    .hero-controls {
        left: 16px;
        right: auto;
        bottom: 34px;
    }

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

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

    .detail-side {
        position: static;
    }

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

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

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

    .search-box {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: block;
    }

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

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

    .movie-poster {
        height: 220px;
    }

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

    .movie-card p {
        min-height: 0;
        -webkit-line-clamp: 2;
    }

    .rank-card {
        grid-template-columns: auto 76px 1fr;
        gap: 12px;
    }

    .rank-card img {
        width: 76px;
        height: 62px;
    }
}
