:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #111827;
    --line: rgba(148, 163, 184, 0.2);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --amber: #f59e0b;
    --radius: 22px;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: -20% -10% auto;
    height: 460px;
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.2), transparent 35%), radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.2), transparent 35%);
    pointer-events: none;
    z-index: -1;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.nav-wrap {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 14px;
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #cbd5e1;
    font-weight: 700;
}

.main-nav a {
    position: relative;
    transition: color 0.25s ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

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

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: var(--text);
}

.hero-carousel {
    position: relative;
    height: min(720px, 76vh);
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 1.1s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-overlay,
.page-hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 46%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    z-index: 2;
}

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

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.hero-kicker span,
.hero-kicker strong,
.hero-kicker em {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #dbeafe;
    font-size: 14px;
    font-style: normal;
}

.hero-kicker span {
    color: #001018;
    border: 0;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

.hero-content h1,
.detail-info h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    max-width: 680px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.09);
    color: #a5f3fc;
    font-size: 12px;
}

.hero-tags,
.detail-tags {
    margin-top: 24px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 34px;
}

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.primary-button {
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.28);
}

.ghost-button {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.68);
    color: #e0f2fe;
}

.text-button {
    color: var(--cyan);
    padding-inline: 6px;
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover {
    transform: translateY(-2px);
}

.hero-poster,
.detail-poster,
.category-cover {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #111827;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow);
}

.hero-poster img,
.detail-poster img,
.category-cover img {
    aspect-ratio: 2 / 3;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.hero-poster:hover img,
.detail-poster:hover img,
.category-cover:hover img,
.poster-link:hover img,
.category-card:hover::before {
    transform: scale(1.05);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    z-index: 4;
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
    padding: 76px 0;
    background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

.section-dark {
    background: #0f172a;
}

.section-search {
    padding: 34px 0;
    border-block: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.9);
}

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

.section-heading.center {
    display: block;
    text-align: center;
}

.section-heading span,
.page-hero span {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

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

.section-heading a {
    color: var(--cyan);
    font-weight: 800;
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    max-width: 940px;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.62);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.search-field {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
    min-width: 220px;
    padding: 0 16px;
}

.search-field span {
    color: var(--cyan);
    font-size: 22px;
}

.search-field input,
.filter-row select {
    width: 100%;
    border: 0;
    outline: 0;
    color: #e2e8f0;
    background: transparent;
}

.search-field input::placeholder {
    color: #64748b;
}

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

.filter-row select {
    min-width: 126px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: #111827;
}

.horizontal-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 250px;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x proximity;
}

.horizontal-row .movie-card {
    scroll-snap-align: start;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
    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.4);
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.38);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #020617;
}

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.card-badge,
.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    left: auto;
    right: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, var(--amber));
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    min-height: 52px;
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.card-body h3 a:hover {
    color: var(--cyan);
}

.card-meta {
    margin: 0 0 12px;
    color: #93c5fd;
    font-size: 13px;
}

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

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

.category-card {
    position: relative;
    isolation: isolate;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    padding: 24px;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: inherit;
    background-position: center;
    background-size: cover;
    transition: transform 0.45s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.92));
}

.category-card span {
    display: block;
    margin-bottom: 60px;
    font-size: 24px;
    font-weight: 900;
}

.category-card strong {
    display: block;
    color: #cbd5e1;
    font-size: 14px;
}

.page-hero,
.detail-hero {
    position: relative;
    min-height: 390px;
    display: grid;
    align-items: center;
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.slim-hero {
    min-height: 300px;
    background: radial-gradient(circle at 25% 10%, rgba(34, 211, 238, 0.18), transparent 35%), #020617;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 20px;
    align-items: center;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.8);
}

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

.category-overview-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

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

.category-samples a {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
    color: #a5f3fc;
    font-size: 13px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    color: #cbd5e1;
    font-size: 14px;
}

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

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

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

.detail-info h1 {
    margin-bottom: 18px;
}

.player-section {
    padding-top: 54px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #000;
    box-shadow: var(--shadow);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    object-fit: contain;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.54));
    cursor: pointer;
}

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

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

.detail-copy {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-copy article {
    padding: 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: rgba(2, 6, 23, 0.42);
}

.detail-copy article:first-child {
    grid-column: 1 / -1;
}

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

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

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    color: #e2e8f0;
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    color: #cbd5e1;
    text-align: center;
    background: rgba(15, 23, 42, 0.74);
}

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

.site-footer {
    padding: 58px 0 28px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
}

.site-footer p,
.site-footer a {
    color: var(--muted);
}

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

.site-footer ul {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

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

.footer-bottom {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
}

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

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

@media (max-width: 860px) {
    .menu-button {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 20px;
        background: rgba(2, 6, 23, 0.96);
    }

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

    .main-nav a {
        padding: 13px 14px;
    }

    .hero-carousel {
        min-height: 720px;
        height: auto;
    }

    .hero-slide {
        position: absolute;
        min-height: 720px;
    }

    .hero-inner,
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 70px 0 90px;
    }

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

    .hero-arrow {
        display: none;
    }

    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-row {
        flex-direction: column;
    }

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

    .category-grid,
    .category-overview-grid,
    .detail-copy,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .site-logo,
    .footer-logo {
        font-size: 21px;
    }

    .hero-content h1,
    .detail-info h1,
    .page-hero h1 {
        font-size: 40px;
    }

    .section {
        padding: 54px 0;
    }

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

    .movie-grid,
    .hot-grid,
    .rank-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .horizontal-row {
        grid-auto-columns: 210px;
    }

    .card-body {
        padding: 13px;
    }

    .card-body h3 {
        min-height: 46px;
        font-size: 16px;
    }

    .card-line {
        font-size: 13px;
    }

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

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

    .player-layer span {
        width: 66px;
        height: 66px;
        font-size: 28px;
    }
}
