:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --line: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --orange: #fb923c;
    --green: #4ade80;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem), var(--bg);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.8));
    z-index: -1;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.logo-text {
    display: grid;
    gap: 2px;
}

.logo-text strong,
.footer-logo strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.logo-text em {
    font-style: normal;
    color: var(--muted);
    font-size: 12px;
}

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

.main-nav > a,
.nav-dropdown > button {
    color: var(--soft);
    background: none;
    border: 0;
    padding: 10px 0;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 42px;
    left: -16px;
    min-width: 180px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.2s ease;
}

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

.dropdown-panel a,
.mobile-panel a {
    display: block;
    padding: 10px 12px;
    color: var(--soft);
    border-radius: 10px;
}

.dropdown-panel a:hover,
.mobile-panel a:hover {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.12);
}

.header-search {
    display: flex;
    gap: 8px;
}

.header-search input,
.mobile-panel input,
.tools-row input,
.search-band input {
    min-width: 220px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--text);
    outline: none;
    background: rgba(15, 23, 42, 0.88);
}

.header-search input:focus,
.mobile-panel input:focus,
.tools-row input:focus,
.search-band input:focus {
    border-color: rgba(34, 211, 238, 0.85);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.header-search button,
.mobile-panel button,
.search-band button {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    color: #ffffff;
    background: var(--cyan-dark);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--text);
    background: transparent;
    font-size: 26px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel.open {
    display: grid;
    gap: 6px;
}

.mobile-panel form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.home-hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #000000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

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

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.1)), linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 45%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 92px;
}

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

.eyebrow,
.section-title span,
.category-card span {
    display: inline-block;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 16px 0 18px;
    font-size: clamp(44px, 6vw, 74px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 690px;
    margin: 0 0 24px;
    color: var(--soft);
    font-size: 20px;
    line-height: 1.7;
}

.hero-meta,
.detail-meta,
.mini-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.mini-meta span {
    padding: 7px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
}

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

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 700;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    box-shadow: 0 18px 40px rgba(8, 145, 178, 0.32);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 56px rgba(8, 145, 178, 0.42);
}

.btn-ghost {
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: var(--soft);
    background: rgba(15, 23, 42, 0.62);
}

.btn-ghost:hover {
    color: #ffffff;
    border-color: rgba(34, 211, 238, 0.55);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
    font-size: 38px;
    line-height: 1;
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: 0.2s ease;
}

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

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

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

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.category-card:hover img {
    opacity: 0.58;
    transform: scale(1.06);
}

.category-card div {
    position: absolute;
    inset: auto 0 0;
    padding: 22px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
}

.category-card h2 {
    margin: 8px 0 8px;
    font-size: 24px;
}

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

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

.section-title h2 {
    margin: 6px 0 0;
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.03em;
}

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

.section-title.small {
    align-items: center;
}

.section-title.small h2 {
    font-size: 28px;
}

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

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

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

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

.movie-card {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.82);
    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.46);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

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

.poster-meta {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.poster-meta span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 8px 0;
    min-height: 2.8em;
    font-size: 16px;
    line-height: 1.4;
}

.card-body p {
    display: -webkit-box;
    min-height: 3.6em;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.22);
    font-size: 12px;
}

.movie-card.horizontal a {
    display: grid;
    grid-template-columns: 150px 1fr;
    min-height: 210px;
}

.movie-card.horizontal .poster-wrap {
    aspect-ratio: auto;
    height: 100%;
}

.movie-card.horizontal .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.section-panel {
    margin-top: 64px;
    padding: 64px 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.58));
    border-block: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

.rank-item a {
    position: relative;
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    min-height: 142px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    transition: 0.25s ease;
}

.rank-item a:hover {
    border-color: rgba(34, 211, 238, 0.5);
    transform: translateY(-3px);
}

.rank-item img {
    width: 92px;
    height: 114px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-item h3 {
    margin: 4px 0 8px;
    font-size: 18px;
}

.rank-item p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.rank-number {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), #ef4444);
    font-weight: 800;
}

.split-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 34px;
}

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

.search-band {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: center;
    margin-top: 72px;
    margin-bottom: 72px;
    padding: 36px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 28px;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.2), transparent 28rem), rgba(15, 23, 42, 0.86);
}

.search-band h2 {
    margin: 8px 0 12px;
    font-size: 34px;
}

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

.search-band form {
    display: flex;
    gap: 10px;
}

.search-band input {
    flex: 1;
}

.page-hero {
    padding: 72px 0 40px;
    background: radial-gradient(circle at 30% 10%, rgba(34, 211, 238, 0.16), transparent 28rem);
}

.page-hero h1 {
    max-width: 820px;
    margin: 12px 0;
    font-size: clamp(38px, 5vw, 58px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.tools-row {
    display: grid;
    gap: 18px;
    padding: 20px 0 0;
}

.tools-row input {
    width: 100%;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-row button {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.76);
}

.filter-row button.active,
.filter-row button:hover {
    color: #ffffff;
    border-color: rgba(34, 211, 238, 0.56);
    background: rgba(8, 145, 178, 0.32);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    padding: 80px 0 70px;
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) saturate(1.1);
    opacity: 0.35;
    transform: scale(1.08);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.75)), linear-gradient(0deg, var(--bg), transparent 45%);
}

.detail-layout {
    position: relative;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 44px;
    align-items: center;
}

.detail-poster img {
    width: 100%;
    border-radius: 26px;
    box-shadow: var(--shadow);
}

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

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

.detail-info h1 {
    margin: 16px 0 18px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.detail-info p {
    max-width: 780px;
    margin: 0 0 24px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.9;
}

.player-section {
    margin-top: -80px;
    position: relative;
    z-index: 3;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-video,
.player-cover,
.player-cover img {
    width: 100%;
    height: 100%;
}

.player-video {
    background: #000000;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    opacity: 0.5;
}

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

.play-pulse {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    box-shadow: 0 0 0 16px rgba(34, 211, 238, 0.16), 0 22px 60px rgba(8, 145, 178, 0.45);
    font-size: 36px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-top: 40px;
}

.detail-content article {
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.76);
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-content p {
    margin: 0;
    color: var(--soft);
    line-height: 2;
}

.site-footer {
    margin-top: 78px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.86);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 32px;
    padding: 44px 0;
}

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

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

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

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

.footer-bottom {
    padding: 18px 0 24px;
    text-align: center;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

[hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

    .movie-grid,
    .movie-grid.compact,
    .movie-grid.all-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content {
        padding-bottom: 78px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .movie-grid.compact,
    .movie-grid.all-list,
    .split-sections .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .movie-grid.wide,
    .split-sections,
    .search-band,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-card.horizontal a {
        grid-template-columns: 120px 1fr;
        min-height: 180px;
    }

    .rank-grid,
    .rank-grid.large {
        grid-template-columns: 1fr;
    }

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

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

    .player-section {
        margin-top: 0;
    }
}

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

    .logo-text em {
        display: none;
    }

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

    .category-strip,
    .category-grid,
    .movie-grid,
    .movie-grid.compact,
    .movie-grid.all-list {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body h3 {
        font-size: 15px;
    }

    .category-card {
        min-height: 190px;
    }

    .search-band {
        padding: 24px;
    }

    .search-band form,
    .mobile-panel form {
        flex-direction: column;
    }

    .play-pulse {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }
}
