:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(34, 211, 238, 0.35);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #60a5fa;
    --yellow: #facc15;
    --shadow: 0 24px 90px rgba(8, 145, 178, 0.18);
    --radius: 26px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 18% -10%, rgba(34, 211, 238, 0.24), transparent 34rem),
        radial-gradient(circle at 88% 8%, rgba(59, 130, 246, 0.18), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
    color: var(--text);
    min-height: 100vh;
}

body.no-scroll {
    overflow: hidden;
}

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

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

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

.nav-wrap {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

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

.desktop-nav,
.mobile-nav,
.footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.desktop-nav a,
.mobile-nav a {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-pill {
    width: min(32vw, 320px);
    min-width: 210px;
    height: 42px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.66);
    color: var(--muted);
}

.search-pill input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: white;
    font: inherit;
}

.search-pill input::placeholder {
    color: #64748b;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 0 22px 18px;
    flex-wrap: wrap;
    justify-content: center;
}

.search-panel {
    position: fixed;
    top: 74px;
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, calc(100vw - 30px));
    max-height: 68vh;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
    padding: 12px;
    display: none;
}

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

.search-result {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.search-result:hover {
    background: rgba(34, 211, 238, 0.1);
}

.search-result img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

.search-result strong {
    display: block;
    margin-bottom: 4px;
}

.search-result span,
.search-empty {
    color: var(--muted);
    font-size: 13px;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #164e63 52%, #020617 100%);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    filter: saturate(1.1);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.88)),
        linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.16) 56%, rgba(2, 6, 23, 0.78));
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 600px;
    margin: 0 auto;
    padding: 72px 22px 64px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 430px;
    align-items: center;
    gap: 48px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 13px;
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: #a5f3fc;
    font-size: 13px;
    font-weight: 700;
}

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

.hero h1 span,
.gradient-title {
    background: linear-gradient(90deg, #67e8f9, #60a5fa, #f8fafc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.85;
    max-width: 720px;
}

.hero-tags,
.detail-tags,
.category-pills,
.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin: 24px 0 0;
}

.tag,
.hero-tags span,
.category-pills a,
.mini-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.58);
    color: #cbd5e1;
    font-size: 12px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.72);
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn.primary {
    background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
    box-shadow: 0 16px 42px rgba(8, 145, 178, 0.28);
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 18px 48px rgba(8, 145, 178, 0.18);
}

.hero-poster {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.42);
}

.hero-poster img {
    width: 100%;
    height: 560px;
    object-fit: cover;
}

.hero-poster-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
}

.hero-poster-caption strong {
    display: block;
    font-size: 24px;
    margin-bottom: 6px;
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--cyan);
}

main,
.section,
.page-hero,
.detail-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 22px;
    padding-right: 22px;
}

.section {
    padding-top: 70px;
}

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

.section-title {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-subtitle,
.page-hero p,
.detail-lead,
.site-footer p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.16);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.45s ease;
}

.movie-card:hover img,
.category-card:hover img,
.related-card:hover img {
    transform: scale(1.07);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 55%);
}

.play-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.92);
    color: #00141a;
    font-size: 13px;
    font-weight: 900;
}

.rank-mark {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--yellow), #f97316);
    color: #111827;
    font-weight: 900;
}

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

.movie-meta-line,
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #94a3b8;
    font-size: 13px;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: 26px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.25), rgba(37, 99, 235, 0.14)),
        rgba(15, 23, 42, 0.8);
    border: 1px solid var(--line);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

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

.category-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.75;
    font-size: 14px;
}

.page-hero {
    padding-top: 58px;
    padding-bottom: 32px;
}

.page-hero h1 {
    margin-bottom: 16px;
}

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

.filter-bar {
    margin: 28px 0 28px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
}

.filter-bar input,
.filter-bar select {
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 15px;
    background: rgba(15, 23, 42, 0.82);
    color: white;
    outline: 0;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 94px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.35);
}

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

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

.rank-row h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

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

.detail-wrap {
    padding-top: 44px;
}

.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #a5f3fc;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    border: 1px solid rgba(34, 211, 238, 0.22);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.42);
    aspect-ratio: 16 / 9;
}

.player-shell video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-shell video {
    background: #000;
}

.player-cover {
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000;
    color: white;
    z-index: 3;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.18));
}

.player-cover span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: inline-grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00141a;
    font-size: 28px;
    font-weight: 900;
    box-shadow: 0 20px 60px rgba(34, 211, 238, 0.35);
}

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

.detail-title {
    padding: 10px 0 30px;
}

.detail-title h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-lead {
    margin-top: 18px;
    font-size: 18px;
}

.detail-meta-card {
    border-radius: 28px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    padding: 20px;
}

.detail-meta-card img {
    width: 100%;
    border-radius: 22px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    margin-bottom: 18px;
}

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

.meta-list div {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px;
    font-size: 14px;
}

.meta-list span:first-child {
    color: var(--muted);
}

.article-panel {
    margin-top: 34px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.68);
    padding: 28px;
}

.article-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.article-panel p {
    margin: 0;
    color: #cbd5e1;
    line-height: 2;
}

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

.related-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.related-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.related-card strong {
    display: block;
    padding: 12px;
    line-height: 1.45;
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 22px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.footer-links {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.footer-links a {
    color: #cbd5e1;
    font-size: 14px;
}

@media (max-width: 1120px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .hero-poster {
        max-width: 520px;
    }

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

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

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .mobile-nav.open {
        display: flex;
    }

    .search-pill {
        width: 42vw;
        min-width: 150px;
    }

    .hero,
    .hero-inner {
        min-height: 680px;
    }

    .hero-inner {
        padding-top: 46px;
        gap: 28px;
    }

    .hero-poster img {
        height: 360px;
    }

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

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

    .section-head,
    .footer-inner,
    .filter-bar,
    .rank-row {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: flex-start;
    }

    .rank-row {
        display: grid;
        grid-template-columns: 48px 80px 1fr;
    }

    .rank-row .btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .footer-links {
        justify-content: flex-start;
    }

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

@media (max-width: 520px) {
    .nav-wrap {
        padding: 0 14px;
    }

    .brand span:last-child {
        display: none;
    }

    .search-pill {
        width: 54vw;
        min-width: 0;
    }

    .hero-inner,
    .section,
    .page-hero,
    .detail-wrap,
    main {
        padding-left: 14px;
        padding-right: 14px;
    }

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

    .movie-card h3 {
        font-size: 16px;
    }

    .player-cover span {
        width: 68px;
        height: 68px;
        font-size: 22px;
    }

    .article-panel {
        padding: 20px;
    }
}
