:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #38bdf8;
    --green: #34d399;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, #000, transparent 70%);
    z-index: -1;
}

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

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

button,
input {
    font: inherit;
}

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

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

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    color: #00111a;
    box-shadow: 0 14px 38px rgba(34, 211, 238, 0.34);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #cbd5e1;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: white;
    background: rgba(34, 211, 238, 0.13);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box,
.wide-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 10px 14px;
}

.search-box input,
.wide-search input {
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    min-width: 190px;
}

.search-box input::placeholder,
.wide-search input::placeholder {
    color: #64748b;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.92);
    border-radius: 14px;
    width: 44px;
    height: 44px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.96);
}

.search-panel {
    position: fixed;
    top: 78px;
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, calc(100% - 32px));
    max-height: 72vh;
    overflow: auto;
    display: none;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    padding: 12px;
}

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

.search-result {
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 14px;
    padding: 10px;
    border-radius: 18px;
    color: #e2e8f0;
}

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

.search-result img {
    width: 66px;
    height: 88px;
    object-fit: cover;
    border-radius: 14px;
}

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

.search-result p,
.search-empty {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.hero {
    position: relative;
    height: 620px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #020617;
}

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

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

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.16) 100%), linear-gradient(0deg, #020617 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-top: 30px;
}

.eyebrow {
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 14px;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(38px, 6vw, 82px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.lead-text {
    max-width: 720px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-actions,
.rank-card-head,
.section-head,
.filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.wide-search button,
.filter-row button {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
}

.primary-btn,
.wide-search button {
    background: linear-gradient(135deg, var(--cyan), var(--green));
    color: #00111a;
    box-shadow: 0 18px 44px rgba(34, 211, 238, 0.28);
}

.ghost-btn,
.filter-row button {
    color: #dbeafe;
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.72);
}

.filter-row button.is-active,
.filter-row button:hover,
.ghost-btn:hover {
    color: white;
    border-color: rgba(34, 211, 238, 0.72);
    background: rgba(34, 211, 238, 0.12);
}

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

.hero-dots button {
    width: 32px;
    height: 6px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    background: rgba(226, 232, 240, 0.35);
}

.hero-dots button.is-active {
    background: var(--cyan);
}

.lead-search {
    margin-top: -34px;
    position: relative;
    z-index: 5;
}

.wide-search {
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 12px;
    box-shadow: var(--shadow);
}

.wide-search input {
    flex: 1;
    min-width: 0;
    padding-left: 10px;
}

section.container {
    padding: 58px 0;
}

.section-head {
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-head h2,
.rank-card h2,
.article-content h2,
.category-overview h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
}

.section-head p,
.category-overview p,
.footer-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-head a,
.rank-card-head a {
    color: var(--cyan);
    font-weight: 800;
}

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

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #111827);
}

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

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

.rating,
.rank-num {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    font-weight: 900;
}

.rank-num {
    left: 12px;
    right: auto;
    min-width: 34px;
    text-align: center;
}

.movie-info {
    padding: 16px;
}

.movie-title {
    display: block;
    color: white;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 8px;
}

.movie-info p {
    margin: 0 0 12px;
    color: #a5b4fc;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-meta span,
.tag-row span,
.detail-meta span,
.detail-tags a {
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
}

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

.category-tile {
    display: flex;
    min-height: 230px;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.8);
    padding: 18px;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.16));
}

.category-posters {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    opacity: 0.75;
}

.category-posters img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-tile strong,
.category-tile span {
    position: relative;
    z-index: 2;
}

.category-tile strong {
    font-size: 22px;
}

.category-tile span {
    color: #cbd5e1;
    line-height: 1.6;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.rank-card {
    position: sticky;
    top: 96px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.rank-card-head {
    justify-content: space-between;
    margin-bottom: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 34px 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-row span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(34, 211, 238, 0.15);
    color: var(--cyan);
    font-weight: 900;
}

.rank-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row em {
    color: var(--muted);
    font-style: normal;
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row b {
    color: var(--green);
}

.page-hero {
    min-height: 360px;
    display: grid;
    align-items: center;
    background: radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.22), transparent 34rem), linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.96));
    border-bottom: 1px solid var(--line);
}

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

.small-hero {
    min-height: 300px;
}

.filter-panel {
    padding-bottom: 0 !important;
}

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

.category-overview {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 18px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.overview-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: hidden;
    border-radius: 18px;
    min-height: 180px;
}

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

.overview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.overview-links a {
    color: #dbeafe;
    background: rgba(30, 41, 59, 0.86);
    border-radius: 999px;
    padding: 6px 10px;
}

.detail-layout {
    padding-top: 34px !important;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    margin: 14px 0 22px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 24px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: var(--shadow);
}

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

.movie-video {
    background: #000;
}

.player-cover {
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: #020617;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 0%, rgba(2, 6, 23, 0.28) 42%, rgba(2, 6, 23, 0.78) 100%);
}

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

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    font-size: 34px;
    box-shadow: 0 20px 60px rgba(34, 211, 238, 0.38);
}

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

.detail-info h1 {
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -0.04em;
}

.detail-meta,
.detail-tags {
    margin-top: 16px;
}

.article-content {
    max-width: 960px;
}

.article-content p {
    color: #cbd5e1;
    font-size: 17px;
    line-height: 2;
}

.mini-card {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 10px;
    align-items: center;
    color: white;
}

.mini-card img {
    width: 62px;
    height: 82px;
    object-fit: cover;
    border-radius: 12px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.98));
    margin-top: 40px;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 30px;
}

.footer-grid h3 {
    margin: 0 0 14px;
}

.footer-grid a {
    display: block;
    color: #cbd5e1;
    margin: 9px 0;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

    .rank-card {
        position: static;
    }
}

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

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

    .mobile-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 76px;
    }

    .movie-grid,
    .compact-grid,
    .related-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-row {
        grid-template-columns: 34px 1fr auto;
    }

    .rank-row em {
        display: none;
    }

    .wide-search {
        border-radius: 24px;
        flex-direction: column;
        align-items: stretch;
    }

    .wide-search input {
        width: 100%;
        padding: 12px;
    }
}

@media (max-width: 520px) {
    .movie-grid {
        gap: 16px;
    }

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

    .hero h1,
    .hero h2,
    .page-hero h1 {
        font-size: 38px;
    }

    .player-shell {
        border-radius: 18px;
    }

    .play-circle {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
