* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --card: rgba(15, 23, 42, 0.72);
    --card-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.20);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #06b6d4;
    --accent-strong: #22d3ee;
    --gold: #fbbf24;
    --danger: #fb7185;
    --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.18), transparent 26%),
                radial-gradient(circle at 82% 0%, rgba(59, 130, 246, 0.16), transparent 28%),
                linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(18px);
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #2563eb);
    box-shadow: 0 12px 32px rgba(6, 182, 212, 0.32);
}

.brand-text {
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--soft);
    font-size: 15px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: white;
    background: rgba(6, 182, 212, 0.15);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 300px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
}

.nav-search input,
.inline-filter input,
.search-controls input,
.search-controls select {
    width: 100%;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
}

.nav-search input {
    padding: 8px 6px 8px 12px;
    min-width: 0;
}

.nav-search button,
.primary-button,
.ghost-button,
.wide-link,
.text-link {
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.nav-search button,
.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--accent), #2563eb);
    box-shadow: 0 14px 36px rgba(6, 182, 212, 0.24);
}

.nav-search button {
    padding: 8px 14px;
    white-space: nowrap;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
}

.ghost-button {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.50);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.nav-search button:hover,
.wide-link:hover {
    transform: translateY(-2px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
}

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: white;
}

.mobile-panel {
    display: none;
}

.hero-slider {
    position: relative;
    min-height: 720px;
    height: 78vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.8s ease, visibility 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-bg,
.detail-bg,
.page-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.88) 42%, rgba(2, 6, 23, 0.10)),
                linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 38%, rgba(2, 6, 23, 0.30));
}

.hero-content {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 42px;
    align-items: center;
    padding-top: 72px;
}

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

.hero-chip,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    padding: 8px 14px;
    border: 1px solid rgba(34, 211, 238, 0.42);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(6, 182, 212, 0.13);
    backdrop-filter: blur(12px);
    font-size: 13px;
    font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(44px, 7vw, 88px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.62);
}

.hero-tags span {
    padding: 8px 12px;
}

.tag-row span {
    padding: 5px 9px;
    font-size: 12px;
}

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

.hero-panel,
.side-card,
.player-card,
.text-card,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-panel {
    padding: 26px;
}

.hero-panel span {
    color: var(--accent-strong);
    font-weight: 800;
}

.hero-panel strong {
    display: block;
    margin: 12px 0;
    font-size: 22px;
}

.hero-panel p {
    margin: 0;
    color: var(--soft);
    line-height: 1.8;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 38px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateX(-50%);
}

.hero-dots,
.hero-arrows {
    display: flex;
    gap: 10px;
}

.hero-dot,
.hero-arrows button {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.hero-dot {
    width: 42px;
    height: 5px;
    border-radius: 999px;
}

.hero-dot.is-active {
    background: var(--accent-strong);
}

.hero-arrows button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    font-size: 28px;
}

.content-section {
    padding: 74px 0 0;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

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

.section-heading h2 {
    margin: 14px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

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

.section-link,
.text-link {
    color: var(--accent-strong);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

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

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

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(34, 211, 238, 0.48);
    box-shadow: 0 24px 60px rgba(6, 182, 212, 0.18);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 0.65s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 55%);
}

.poster-type,
.poster-score,
.rank-badge,
.poster-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 900;
}

.poster-type {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    background: rgba(6, 182, 212, 0.82);
}

.poster-score {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    color: #111827;
    background: var(--gold);
}

.rank-badge {
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(251, 113, 133, 0.88);
}

.poster-play {
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    padding-left: 4px;
    background: rgba(6, 182, 212, 0.85);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

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

.movie-card h3 a:hover {
    color: var(--accent-strong);
}

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

.side-card {
    padding: 24px;
}

.side-card h2 {
    margin: 14px 0 18px;
    font-size: 28px;
}

.rank-stack {
    display: grid;
    gap: 10px;
}

.rank-line,
.rank-table-row {
    display: grid;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.34);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.rank-line {
    grid-template-columns: 42px minmax(0, 1fr) 46px;
    padding: 12px;
}

.rank-line:hover,
.rank-table-row:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.42);
}

.rank-line span,
.rank-num {
    color: var(--accent-strong);
    font-weight: 900;
}

.rank-line strong,
.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-line em,
.rank-score {
    color: var(--gold);
    font-style: normal;
    font-weight: 900;
}

.wide-link {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    padding: 13px;
    color: white;
    background: rgba(6, 182, 212, 0.18);
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s ease;
}

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

.tile-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-tile strong {
    bottom: 66px;
    font-size: 24px;
}

.category-tile em {
    bottom: 20px;
    color: var(--soft);
    font-style: normal;
    line-height: 1.55;
}

.page-main {
    padding-top: 72px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    align-items: center;
    background: #020617;
}

.compact-hero {
    min-height: 340px;
    background: radial-gradient(circle at 18% 30%, rgba(6, 182, 212, 0.22), transparent 28%),
                linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.page-hero-mask,
.detail-bg-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72)),
                linear-gradient(0deg, #020617, transparent 46%);
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.inline-filter {
    width: min(560px, 100%);
    margin-top: 26px;
    padding: 16px 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
}

.category-overview-grid {
    display: grid;
    gap: 20px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 24px;
    padding: 18px;
}

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

.category-covers img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 14px 0 10px;
    font-size: 30px;
}

.category-overview-card p {
    color: var(--muted);
    line-height: 1.8;
}

.rank-table {
    display: grid;
    gap: 10px;
}

.rank-table-row {
    grid-template-columns: 60px minmax(0, 1fr) 220px 60px;
    padding: 16px 18px;
}

.rank-meta {
    color: var(--muted);
}

.detail-hero {
    min-height: 620px;
}

.detail-hero-grid {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 70px 0;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

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

.detail-copy h1 {
    max-width: 900px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
}

.detail-content {
    display: grid;
    gap: 24px;
}

.stream-player {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 16 / 9;
    background: black;
}

.stream-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: black;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.72));
}

.stream-player.is-playing .player-start {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    padding-left: 5px;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--accent), #2563eb);
    box-shadow: 0 16px 48px rgba(6, 182, 212, 0.32);
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 5;
    max-width: calc(100% - 36px);
    padding: 8px 12px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(2, 6, 23, 0.72);
    font-size: 13px;
    pointer-events: none;
}

.stream-player.is-playing .player-status {
    opacity: 0;
}

.player-card {
    padding: 14px;
}

.text-card {
    padding: 28px;
}

.text-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.text-card p {
    margin: 0;
    color: var(--soft);
    font-size: 16px;
    line-height: 2;
}

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

.sticky-card {
    position: sticky;
    top: 96px;
}

.movie-meta-list {
    display: grid;
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.movie-meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.movie-meta-list strong {
    color: var(--muted);
}

.movie-meta-list span {
    text-align: right;
}

.search-panel {
    min-height: 520px;
}

.search-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px 160px;
    gap: 12px;
    margin-bottom: 24px;
}

.search-controls input,
.search-controls select {
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
}

.search-controls select {
    color: white;
}

.search-controls option {
    color: #0f172a;
}

.search-status {
    margin-bottom: 18px;
    color: var(--muted);
}

.site-footer {
    margin-top: 90px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    padding: 34px 0;
}

.footer-brand {
    margin-bottom: 10px;
    font-size: 22px;
}

.site-footer p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--soft);
}

@media (max-width: 1180px) {
    .cards-6,
    .cards-5 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .nav-search {
        width: 240px;
    }
}

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

    .mobile-toggle {
        display: block;
        margin-left: auto;
    }

    .mobile-panel {
        position: fixed;
        top: 72px;
        left: 16px;
        right: 16px;
        z-index: 49;
        display: grid;
        gap: 10px;
        padding: 18px;
        border: 1px solid rgba(148, 163, 184, 0.20);
        border-radius: 24px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .mobile-panel.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .mobile-panel a,
    .mobile-brand {
        padding: 12px 14px;
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.72);
    }

    .mobile-brand {
        color: var(--accent-strong);
        font-weight: 900;
    }

    .mobile-category-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .mobile-category-row a {
        padding: 8px 10px;
        font-size: 13px;
    }

    .hero-slider {
        min-height: 680px;
    }

    .hero-content,
    .split-section,
    .detail-layout,
    .detail-hero-grid,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        display: none;
    }

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

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

    .rank-table-row {
        grid-template-columns: 46px minmax(0, 1fr) 54px;
    }

    .rank-meta {
        display: none;
    }

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

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

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

    .hero-slider {
        height: auto;
        min-height: 640px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 42px;
    }

    .hero-controls {
        bottom: 22px;
    }

    .hero-arrows {
        display: none;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .cards-6,
    .cards-5,
    .cards-4,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-poster {
        aspect-ratio: 16 / 9;
    }

    .page-hero,
    .detail-hero {
        min-height: 420px;
    }

    .detail-hero-grid {
        padding: 42px 0;
    }

    .detail-poster {
        display: none;
    }

    .text-card,
    .side-card {
        padding: 20px;
    }
}
