:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.72);
    --border: rgba(148, 163, 184, 0.22);
    --text: #ffffff;
    --muted: #cbd5e1;
    --muted-2: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --gold: #facc15;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(8, 47, 73, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.16), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.22), transparent 32%),
        linear-gradient(135deg, #020617 0%, #0f172a 42%, #0b2a4a 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #00111c;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.45);
    font-size: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--muted);
}

.nav-links a,
.nav-dropdown > button {
    border: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-dropdown > button:hover {
    color: #ffffff;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    display: grid;
    min-width: 170px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

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

.nav-dropdown-menu a {
    padding: 10px 12px;
    border-radius: 10px;
}

.nav-dropdown-menu a:hover {
    background: rgba(34, 211, 238, 0.12);
    color: var(--cyan);
}

.header-search {
    flex: 0 1 240px;
}

.header-search input,
.big-search input,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    padding: 12px 14px;
}

.header-search input:focus,
.big-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(34, 211, 238, 0.8);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.86);
}

.hero {
    position: relative;
    height: clamp(520px, 70vh, 680px);
    overflow: hidden;
    border-bottom: 1px solid rgba(34, 211, 238, 0.12);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    height: 100%;
}

.hero-text {
    max-width: 680px;
}

.eyebrow,
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-kicker::before,
.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero h1 {
    margin: 18px 0 18px;
    max-width: 820px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.hero-tags span,
.detail-tags span {
    padding: 8px 12px;
    border: 1px solid rgba(34, 211, 238, 0.42);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.18);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.button,
.big-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.button.primary,
.big-search button {
    color: #ffffff;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.32);
}

.button.ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
}

.button.full {
    width: 100%;
}

.button:hover,
.big-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 46px rgba(34, 211, 238, 0.28);
}

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

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

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

.section-block {
    padding: 56px 0;
}

.quick-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
    align-items: center;
    gap: 28px;
    margin-top: -42px;
    padding: 28px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.quick-search-panel p,
.page-hero p {
    color: var(--muted);
    line-height: 1.75;
}

.big-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.big-search input {
    padding: 0 18px;
    min-height: 54px;
}

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

.section-heading.tight {
    align-items: center;
}

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

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

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 12px 36px rgba(2, 6, 23, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-cover {
    position: relative;
    height: 238px;
    margin: 0;
    overflow: hidden;
    background: #000000;
}

.movie-card.compact .movie-cover {
    height: 188px;
}

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

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 54%);
}

.movie-year,
.movie-category {
    position: absolute;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.66);
}

.movie-year {
    right: 10px;
    bottom: 10px;
}

.movie-category {
    top: 10px;
    left: 10px;
    background: rgba(6, 182, 212, 0.86);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.movie-card h2 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 46px;
    margin: 0 0 16px;
    color: var(--muted-2);
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.movie-meta span:first-child {
    color: var(--gold);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 32px;
    align-items: start;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 142px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #000000;
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 142px;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.78;
}

.category-tile span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 2;
    font-size: 22px;
    font-weight: 900;
}

.rank-panel,
.poster-card,
.related-card-block,
.copy-card,
.category-overview-card,
.search-panel {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 18px 52px rgba(2, 6, 23, 0.25);
}

.rank-panel {
    padding: 24px;
}

.rank-list,
.ranking-list-page {
    display: grid;
    gap: 12px;
}

.rank-row,
.ranking-card {
    display: grid;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.35);
    transition: border-color 0.2s ease, background 0.2s ease;
}

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

.rank-row:hover,
.ranking-card:hover {
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(8, 145, 178, 0.12);
}

.rank-row strong,
.ranking-card strong {
    color: var(--cyan);
    font-size: 18px;
}

.rank-row img {
    width: 62px;
    height: 74px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
}

.rank-row em,
.ranking-card em {
    color: var(--gold);
    font-style: normal;
    font-weight: 900;
}

.page-shell {
    padding: 38px 0 70px;
}

.page-hero {
    position: relative;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    align-items: center;
    overflow: hidden;
    margin-bottom: 36px;
    padding: 28px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 47, 73, 0.64));
    box-shadow: var(--shadow);
}

.page-hero.small-hero {
    display: block;
    padding: 42px;
}

.page-hero img {
    width: 100%;
    height: 220px;
    border-radius: 20px;
    object-fit: cover;
}

.category-overview-card {
    margin-bottom: 28px;
    padding: 24px;
}

.category-overview-head {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    align-items: center;
    margin-bottom: 22px;
}

.category-overview-head img {
    width: 180px;
    height: 120px;
    border-radius: 18px;
    object-fit: cover;
}

.category-overview-head h2 {
    margin: 6px 0 8px;
    font-size: 30px;
}

.category-overview-head p {
    color: var(--muted-2);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 42px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.62);
}

.pagination a:hover,
.pagination a.is-current {
    color: #ffffff;
    border-color: rgba(34, 211, 238, 0.7);
    background: rgba(34, 211, 238, 0.18);
}

.ranking-card {
    grid-template-columns: 64px 92px 1fr auto;
    padding: 14px;
}

.ranking-card img {
    width: 92px;
    height: 118px;
    border-radius: 14px;
    object-fit: cover;
}

.ranking-card h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.ranking-card p {
    margin: 0 0 8px;
    color: var(--muted-2);
    line-height: 1.6;
}

.ranking-card span {
    color: var(--cyan);
    font-size: 13px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 210px 180px;
    gap: 14px;
    margin-bottom: 34px;
    padding: 20px;
}

.search-panel input,
.search-panel select {
    min-height: 48px;
    padding: 0 14px;
}

.empty-state {
    display: none;
    padding: 44px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 18px;
    color: var(--muted-2);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--muted-2);
    font-size: 14px;
}

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

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

.detail-main {
    min-width: 0;
}

.player-card {
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    cursor: pointer;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.62));
    cursor: pointer;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 5px;
    border-radius: 999px;
    color: #00111c;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.58);
    font-size: 34px;
}

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

.detail-copy {
    padding-top: 26px;
}

.detail-copy h1 {
    margin-bottom: 20px;
}

.copy-card {
    margin-bottom: 18px;
    padding: 24px;
}

.copy-card h2,
.related-card-block h2,
.poster-card h2 {
    margin: 0 0 14px;
    font-size: 21px;
}

.copy-card p,
.poster-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 20px;
}

.poster-card,
.related-card-block {
    padding: 18px;
}

.poster-card img {
    width: 100%;
    height: 260px;
    margin-bottom: 18px;
    border-radius: 18px;
    object-fit: cover;
}

.poster-card p {
    margin-bottom: 18px;
}

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

.related-list .movie-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    min-height: auto;
}

.related-list .movie-cover {
    height: 100%;
    min-height: 132px;
}

.related-list .movie-card h2 {
    font-size: 15px;
}

.related-list .movie-card p {
    font-size: 13px;
}

.site-footer {
    margin-top: 48px;
    border-top: 1px solid rgba(34, 211, 238, 0.14);
    background: rgba(2, 6, 23, 0.62);
}

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

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

.footer-grid h2 {
    margin: 0 0 16px;
    font-size: 17px;
}

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

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

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

.footer-bottom {
    padding: 18px 0 32px;
    color: var(--muted-2);
    text-align: center;
}

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

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a,
    .nav-dropdown > button {
        padding: 12px;
        text-align: left;
    }

    .nav-dropdown-menu {
        position: static;
        display: grid;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
    }

    .header-search {
        display: none;
    }

    .quick-search-panel,
    .page-hero,
    .category-overview-head,
    .search-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-card {
        grid-template-columns: 44px 74px 1fr;
    }

    .ranking-card em {
        grid-column: 3;
    }

    .hero {
        height: 620px;
    }

    .hero h1 {
        font-size: clamp(36px, 12vw, 56px);
    }
}

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

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

    .hero {
        height: 640px;
    }

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

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

    .page-hero.small-hero {
        padding: 28px;
    }

    .related-list .movie-card {
        grid-template-columns: 1fr;
    }
}
