:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --orange: #f97316;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 30rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.02em;
    font-size: 1.35rem;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
    font-size: 0.8rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #cbd5e1;
}

.main-nav a,
.nav-drop button {
    color: #cbd5e1;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.nav-drop button:hover {
    color: var(--cyan);
}

.nav-drop {
    position: relative;
}

.drop-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 190px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-drop:hover .drop-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.drop-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.92rem;
}

.drop-menu a:hover {
    background: rgba(30, 41, 59, 0.9);
}

.menu-toggle,
.mobile-nav {
    display: none;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    isolation: isolate;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    z-index: -3;
}

.hero-bg-grid a {
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.hero-bg-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1);
    transform: scale(1.02);
}

.hero-bg-grid span {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.14));
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.86) 34%, rgba(2, 6, 23, 0.42) 72%, rgba(2, 6, 23, 0.78) 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 190px;
    z-index: -1;
    background: linear-gradient(180deg, transparent, #0f172a);
}

.hero-inner {
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    gap: 42px;
    padding: 70px 0 58px;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 18px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.14);
    backdrop-filter: blur(10px);
}

.hero h1 {
    margin: 0 0 22px;
    font-size: clamp(2.8rem, 7vw, 5.9rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    text-wrap: balance;
}

.hero h1 strong {
    color: var(--cyan);
    text-shadow: 0 0 42px rgba(34, 211, 238, 0.35);
}

.hero-copy p {
    margin: 0 0 28px;
    max-width: 650px;
    color: #cbd5e1;
    font-size: clamp(1.02rem, 2vw, 1.25rem);
    line-height: 1.9;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 13px;
    border: 1px solid transparent;
    color: white;
    font-weight: 800;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 16px 38px rgba(8, 145, 178, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
}

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

.btn.ghost {
    background: rgba(30, 41, 59, 0.78);
    border-color: rgba(148, 163, 184, 0.24);
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.hero-panel {
    align-self: stretch;
    display: grid;
    align-content: center;
    gap: 16px;
}

.focus-card {
    position: relative;
    overflow: hidden;
    min-height: 176px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    transform: translateZ(0);
}

.focus-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.5s ease;
}

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

.focus-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.18));
}

.focus-content {
    position: relative;
    z-index: 2;
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
}

.focus-content b {
    color: var(--cyan);
    font-size: 0.86rem;
}

.focus-content h2,
.focus-content h3 {
    margin: 6px 0 8px;
    font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.focus-content p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.6;
}

.search-shell {
    margin-top: -42px;
    position: relative;
    z-index: 8;
}

.search-box {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-box form,
.filter-bar {
    display: grid;
    grid-template-columns: 1fr 150px 150px auto;
    gap: 12px;
}

.search-box input,
.search-box select,
.filter-bar input,
.filter-bar select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
    color: var(--text);
    background: rgba(2, 6, 23, 0.55);
}

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

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.quick-tags a,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.1);
}

.quick-tags a {
    padding: 8px 12px;
    font-size: 0.9rem;
}

main {
    min-height: 55vh;
}

.page-wrap {
    padding: 54px 0 20px;
}

.content-section {
    margin: 70px 0;
}

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

.section-heading h2,
.page-heading h1,
.detail-title h1 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p,
.detail-title p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-more {
    color: var(--cyan);
    font-weight: 700;
    white-space: nowrap;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.2);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.62);
    box-shadow: 0 22px 60px rgba(8, 145, 178, 0.16);
}

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

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent 56%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.type-badge,
.region-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 8px;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(10px);
}

.type-badge {
    left: 12px;
    background: rgba(249, 115, 22, 0.88);
}

.region-badge {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-badge + .type-badge {
    top: 48px;
}

.play-mark {
    position: absolute;
    inset: 0;
    z-index: 2;
    margin: auto;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: rgba(34, 211, 238, 0.88);
    opacity: 0;
    transform: scale(0.86);
    transition: 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: scale(1);
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 9px;
    font-size: 1.08rem;
    line-height: 1.45;
}

.movie-info h3 a:hover {
    color: var(--cyan);
}

.movie-info p {
    min-height: 3.2em;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span,
.detail-tags span {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    color: var(--muted-2);
    font-size: 0.82rem;
}

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

.category-card {
    min-height: 170px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(37, 99, 235, 0.08)),
        rgba(15, 23, 42, 0.78);
    transition: 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 74px 120px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
}

.rank-num {
    font-size: 2rem;
    font-weight: 900;
    color: var(--cyan);
    text-align: center;
}

.rank-item img {
    width: 120px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
}

.rank-item h2,
.rank-item h3 {
    margin: 0 0 6px;
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 0.95rem;
}

.breadcrumbs a {
    color: #a5f3fc;
}

.breadcrumbs em {
    color: var(--muted-2);
    font-style: normal;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 46px 0 52px;
    border-bottom: 1px solid var(--line);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(30px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.36;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, #020617, rgba(2, 6, 23, 0.78));
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 38px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.detail-title h1 {
    font-size: clamp(2.3rem, 5vw, 4.6rem);
}

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

.detail-meta span {
    padding: 8px 11px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.7);
}

.player-section {
    margin: 54px 0;
}

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

.player-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: #000;
}

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

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.12), rgba(0, 0, 0, 0.55));
}

.big-play {
    position: absolute;
    z-index: 5;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    font-size: 2rem;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 20px 60px rgba(34, 211, 238, 0.28);
}

.player-wrap.is-playing .player-cover {
    display: none;
}

.article-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    margin: 46px 0;
}

.article-card,
.side-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.article-card h2,
.side-card h2 {
    margin: 0 0 15px;
    font-size: 1.45rem;
}

.article-card p,
.side-card p {
    color: #cbd5e1;
    line-height: 1.9;
}

.side-links {
    display: grid;
    gap: 12px;
}

.side-links a {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 9px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.58);
}

.side-links img {
    width: 74px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
}

.side-links b {
    display: block;
    margin-bottom: 3px;
}

.side-links span {
    color: var(--muted);
    font-size: 0.83rem;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
    padding: 46px 0;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

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

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

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

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

.no-results {
    display: none;
    padding: 30px;
    color: var(--muted);
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        width: 42px;
        height: 42px;
        border: 1px solid var(--line);
        border-radius: 12px;
        color: var(--text);
        background: rgba(15, 23, 42, 0.72);
    }

    .mobile-nav {
        display: none;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 0 16px;
    }

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

    .mobile-nav a {
        padding: 10px 12px;
        border-radius: 12px;
        color: #cbd5e1;
        background: rgba(30, 41, 59, 0.62);
    }

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

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

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

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

    .search-box form,
    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    .rank-item {
        grid-template-columns: 54px 96px 1fr;
    }

    .rank-item .btn {
        grid-column: 1 / -1;
    }
}

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

    .hero {
        min-height: auto;
    }

    .hero-bg-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-inner {
        min-height: auto;
        padding: 58px 0 72px;
    }

    .hero-actions,
    .detail-actions,
    .section-heading,
    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .movie-grid,
    .category-grid,
    .search-box form,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 44px 84px 1fr;
        gap: 10px;
    }

    .rank-item img {
        width: 84px;
    }

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