:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #0f172a;
    --muted: #94a3b8;
    --text: #e2e8f0;
    --soft: #cbd5e1;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --blue: #60a5fa;
    --violet: #8b5cf6;
    --radius: 22px;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.20), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(96, 165, 250, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

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(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1240px, calc(100% - 28px));
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #031525;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.38);
}

.brand-copy strong,
.footer-logo {
    display: block;
    font-size: 22px;
    line-height: 1.05;
    background: linear-gradient(90deg, #67e8f9, #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-copy small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #67e8f9;
    background: rgba(30, 41, 59, 0.9);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.filter-panel input,
.filter-panel select,
.quick-search-panel input {
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
    outline: none;
    transition: 0.2s ease;
}

.nav-search input {
    width: 230px;
    padding: 10px 12px;
}

.nav-search button,
.quick-search-panel button {
    border: 0;
    border-radius: 14px;
    padding: 10px 16px;
    color: #031525;
    cursor: pointer;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 700;
}

.menu-button {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.8);
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 420px);
    align-items: center;
    gap: 48px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 108px 0 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}

.hero-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hero-bg {
    position: absolute;
    inset: 0 calc(50% - 50vw);
    z-index: -2;
    opacity: 0.34;
    filter: blur(12px) saturate(1.15);
}

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

.hero-bg::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.96)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.24), #020617 100%);
}

.hero-content {
    max-width: 720px;
}

.hero-kicker,
.page-hero span,
.section-head span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(34, 211, 238, 0.34);
    border-radius: 999px;
    padding: 7px 12px;
    color: #67e8f9;
    background: rgba(8, 47, 73, 0.38);
    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    margin: 0;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 999px;
    padding: 6px 10px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 16px;
    padding: 0 20px;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn.primary {
    color: #031525;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 40px rgba(34, 211, 238, 0.25);
}

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

.btn:hover,
.category-tile:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    min-height: 540px;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: inherit;
    pointer-events: none;
}

.hero-poster img {
    width: 100%;
    height: 540px;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
}

.hero-controls button {
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 26px;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    transition: 0.2s ease;
}

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

.quick-search-panel {
    width: min(1060px, calc(100% - 32px));
    margin: -48px auto 0;
    position: relative;
    z-index: 7;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-panel form {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.quick-search-panel label {
    color: #67e8f9;
    font-weight: 800;
}

.quick-search-panel input {
    min-height: 48px;
    padding: 0 16px;
}

.quick-links {
    margin-top: 14px;
}

.quick-links a,
.feature-links a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 13px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.66);
}

.section {
    padding: 70px 0;
}

.section-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 26px;
}

.section-head h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.site-footer p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
}

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

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: var(--panel-solid);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    transition: 0.2s ease;
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    opacity: 0.72;
    transition: 0.2s ease;
}

.category-tile:hover img {
    transform: scale(1.05);
    opacity: 0.88;
}

.tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.94));
}

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

.category-tile strong {
    bottom: 48px;
    font-size: 23px;
}

.category-tile em {
    bottom: 18px;
    color: #cbd5e1;
    font-size: 13px;
    font-style: normal;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.20);
    transition: 0.2s ease;
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.78));
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #031525;
    background: linear-gradient(135deg, #facc15, #fb923c);
    box-shadow: 0 10px 24px rgba(250, 204, 21, 0.24);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #f8fafc;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: #67e8f9;
}

.card-meta,
.card-desc {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 12px;
}

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

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

.movie-card.compact {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: stretch;
}

.movie-card.compact .poster {
    aspect-ratio: auto;
    min-height: 148px;
}

.movie-card.compact .card-title {
    min-height: auto;
}

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

.compact-hero > div {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 30px;
    padding: 54px;
    background:
        radial-gradient(circle at right top, rgba(34, 211, 238, 0.18), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.62));
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    margin-top: 18px;
    margin-bottom: 12px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(130px, 180px));
    gap: 12px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
}

.feature-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 54px 0 46px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.38;
    filter: blur(10px) saturate(1.12);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: #111827;
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: #67e8f9;
}

.detail-info h1 {
    max-width: 900px;
    font-size: clamp(36px, 6vw, 68px);
}

.detail-one-line {
    max-width: 840px;
    color: #dbeafe;
    font-size: 20px;
}

.detail-meta {
    margin: 18px 0;
}

.detail-tags {
    margin-bottom: 26px;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #f8fafc;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #031525;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 34px;
    box-shadow: 0 0 45px rgba(34, 211, 238, 0.34);
}

.player-overlay strong {
    font-size: 18px;
}

.player-shell.playing .player-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.detail-text article {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    padding: 26px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-text h2 {
    margin: 0 0 14px;
    color: #f8fafc;
}

.detail-text p {
    margin: 0;
    color: #cbd5e1;
}

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

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

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
    padding: 42px 0;
}

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

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

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

.footer-links a:hover {
    color: #67e8f9;
}

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

[data-card].hidden {
    display: none;
}

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

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

    .hero-poster {
        display: none;
    }

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

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

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

@media (max-width: 760px) {
    .nav-wrap {
        min-height: 66px;
    }

    .menu-button {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 14px;
        right: 14px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .brand-copy small {
        display: none;
    }

    .hero {
        min-height: 590px;
    }

    .hero-slide {
        padding: 78px 0 104px;
    }

    .hero h1 {
        font-size: 44px;
    }

    .quick-search-panel form,
    .filter-panel,
    .detail-layout,
    .detail-text,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-grid,
    .category-grid.large,
    .movie-grid,
    .ranking-list,
    .ranking-list.full,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .movie-card.compact {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .movie-card.compact .poster {
        min-height: 132px;
    }

    .compact-hero > div {
        padding: 32px 22px;
    }
}

@media (max-width: 480px) {
    .category-grid,
    .category-grid.large,
    .movie-grid,
    .ranking-list,
    .ranking-list.full,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .hero-controls {
        bottom: 18px;
    }
}
