:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #07111f;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(14, 165, 233, 0.22);
    --line-strong: rgba(56, 189, 248, 0.36);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --sky: #38bdf8;
    --cyan: #22d3ee;
    --amber: #fbbf24;
    --orange: #f97316;
    --radius: 22px;
    --shadow: 0 24px 60px rgba(8, 47, 73, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 0%, rgba(14, 165, 233, 0.24), transparent 32rem),
        radial-gradient(circle at 85% 20%, rgba(251, 191, 36, 0.13), transparent 36rem),
        linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 80;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.9));
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 40px rgba(8, 47, 73, 0.28);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    width: min(1220px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
}

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

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sky), var(--cyan));
    color: #082f49;
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.42);
}

.brand-text,
.footer-brand {
    background: linear-gradient(90deg, var(--sky), var(--cyan), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 21px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--soft);
    font-size: 15px;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a {
    transition: color 0.22s ease, transform 0.22s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
    color: var(--sky);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(360px, 32vw);
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.52);
}

.nav-search input,
.mobile-panel input,
.filter-bar input,
.search-panel input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.nav-search input::placeholder,
.mobile-panel input::placeholder,
.filter-bar input::placeholder,
.search-panel input::placeholder {
    color: #64748b;
}

.nav-search button,
.mobile-panel button,
.search-panel button,
.btn-primary,
.btn-secondary,
.section-more,
.filter-bar a,
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    white-space: nowrap;
    cursor: pointer;
}

.nav-search button,
.mobile-panel button,
.search-panel button,
.btn-primary {
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--sky), var(--cyan));
    color: #082f49;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.26);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.76);
    color: var(--text);
}

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

.mobile-panel {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
}

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

.mobile-panel form {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.hero {
    position: relative;
    min-height: 760px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.12) brightness(0.68);
}

.hero-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.74) 43%, rgba(2, 6, 23, 0.28));
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 30%, rgba(56, 189, 248, 0.24), transparent 22rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), #020617 96%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    width: min(1220px, calc(100% - 32px));
    min-height: 760px;
    margin: 0 auto;
    padding-top: 76px;
}

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

.section-kicker,
.hero-kicker {
    margin: 0 0 12px;
    color: var(--sky);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

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

.hero-summary,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 24px 0 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.detail-meta,
.tag-row,
.ranking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.ranking-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.11);
    color: #bae6fd;
    font-size: 13px;
}

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

.btn-primary,
.btn-secondary {
    min-height: 48px;
    padding: 0 22px;
    font-weight: 900;
}

.btn-secondary,
.section-more,
.filter-bar a,
.pagination a,
.pagination span {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    color: var(--soft);
}

.btn-primary:hover,
.nav-search button:hover,
.search-panel button:hover,
.mobile-panel button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.36);
}

.btn-secondary:hover,
.section-more:hover,
.filter-bar a:hover,
.pagination a:hover {
    border-color: var(--line-strong);
    color: var(--sky);
}

.hero-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.26);
    border-radius: 30px;
    box-shadow: var(--shadow), 0 0 0 12px rgba(14, 165, 233, 0.04);
}

.hero-poster::before,
.movie-poster-link::before,
.detail-cover::before,
.category-tile::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.82));
    pointer-events: none;
}

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

.hero-dot {
    width: 38px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.4);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--sky), var(--amber));
}

.page-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 72px;
}

.narrow-shell {
    width: min(980px, calc(100% - 32px));
}

.quick-channels {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 54px;
}

.quick-channels a,
.category-tile,
.movie-card,
.ranking-row,
.detail-text,
.search-panel,
.filter-bar {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.54));
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.32);
    backdrop-filter: blur(14px);
}

.quick-channels a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    border-radius: 20px;
    color: var(--soft);
    font-weight: 900;
}

.quick-channels a:hover,
.movie-card:hover,
.category-tile:hover,
.ranking-row:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
}

.content-section {
    margin-top: 58px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 42px);
    letter-spacing: -0.04em;
}

.section-more {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(251, 191, 36, 0.14));
}

.movie-card img,
.ranking-thumb img,
.category-tile img,
.detail-cover img,
.hero-poster img {
    transition: transform 0.42s ease, filter 0.42s ease;
}

.movie-card:hover img,
.ranking-row:hover img,
.category-tile:hover img,
.hero-poster:hover img {
    transform: scale(1.06);
    filter: saturate(1.12);
}

.movie-year,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #e0f2fe;
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: #1f1300;
}

.movie-card-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.92);
    color: #082f49;
    font-size: 14px;
    font-weight: 900;
}

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

.movie-card-meta {
    display: flex;
    gap: 8px;
    color: var(--sky);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-card h3 a:hover,
.ranking-info h3 a:hover {
    color: var(--sky);
}

.movie-card p,
.ranking-info p,
.category-tile p,
.detail-text p,
.site-footer p {
    color: var(--muted);
    line-height: 1.7;
}

.movie-card p {
    min-height: 78px;
    margin: 0;
    font-size: 13px;
}

.tag-row {
    gap: 7px;
    margin-top: 14px;
}

.tag-row span {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 12px;
}

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

.page-hero {
    display: flex;
    align-items: center;
    min-height: 360px;
    padding: 68px max(16px, calc((100% - 1220px) / 2)) 48px;
    background:
        radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.24), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.88));
    border-bottom: 1px solid var(--line);
}

.small-hero,
.category-hero,
.library-hero,
.search-hero,
.ranking-hero {
    min-height: 320px;
}

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

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

.category-tile {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    border-radius: 24px;
    padding: 24px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.38;
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
}

.category-tile span {
    display: inline-block;
    margin-top: 110px;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.category-tile p {
    max-width: 92%;
    margin: 12px 0 0;
}

.filter-bar,
.search-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    padding: 12px;
    border-radius: 22px;
}

.filter-bar input,
.search-panel input {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.5);
}

.filter-bar a {
    min-height: 46px;
    padding: 0 18px;
}

.search-panel {
    padding: 16px;
}

.search-panel button {
    min-height: 48px;
    padding: 0 26px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 70px 94px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ranking-index {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.26), rgba(251, 191, 36, 0.2));
    color: var(--amber);
    font-size: 18px;
    font-weight: 900;
}

.ranking-thumb {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(14, 165, 233, 0.12);
}

.ranking-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.ranking-info p {
    margin: 0;
}

.ranking-meta {
    margin-top: 12px;
}

.compact-ranking .ranking-row:nth-child(n+7) {
    display: none;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 34px;
}

.jump-list {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 0 0 42px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    min-height: 42px;
    padding: 0 14px;
}

.pagination span {
    cursor: default;
    opacity: 0.44;
}

.page-number-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.page-number-group .is-current {
    border-color: var(--line-strong);
    background: rgba(14, 165, 233, 0.22);
    color: var(--sky);
}

.detail-main {
    background:
        radial-gradient(circle at 12% 10%, rgba(14, 165, 233, 0.2), transparent 28rem),
        radial-gradient(circle at 86% 6%, rgba(251, 191, 36, 0.12), transparent 28rem);
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    align-items: center;
    gap: 54px;
    width: min(1220px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    padding: 76px 0 48px;
}

.detail-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 30px;
    background: rgba(14, 165, 233, 0.12);
    box-shadow: var(--shadow);
}

.detail-info h1 {
    font-size: clamp(38px, 6vw, 72px);
}

.detail-tags {
    margin-top: 20px;
}

.player-section {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.3), transparent 14rem),
        rgba(2, 6, 23, 0.46);
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-cover span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sky), var(--cyan));
    color: #082f49;
    font-size: 34px;
    box-shadow: 0 22px 54px rgba(14, 165, 233, 0.42);
}

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

.detail-shell {
    padding-top: 38px;
}

.detail-text {
    margin-bottom: 22px;
    padding: 28px;
    border-radius: 24px;
}

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

.detail-text p {
    margin: 0;
    font-size: 16px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.88);
}

.site-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 40px;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 28px;
}

.site-footer p {
    max-width: 660px;
    margin: 14px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
    max-width: 430px;
    color: var(--soft);
}

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

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

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

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

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 26px;
        align-content: center;
    }

    .hero-poster {
        width: min(260px, 70vw);
        justify-self: start;
    }

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

    .detail-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 46px;
    }

    .detail-cover {
        width: min(300px, 80vw);
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .site-header-inner {
        height: 62px;
    }

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

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

    .hero,
    .hero-content {
        min-height: 690px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: clamp(34px, 12vw, 52px);
    }

    .hero-summary,
    .page-hero p,
    .detail-one-line {
        font-size: 15px;
    }

    .hero-actions,
    .filter-bar,
    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .quick-channels,
    .movie-grid,
    .large-grid,
    .category-grid,
    .category-grid.wide {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 48px 74px minmax(0, 1fr);
        gap: 12px;
    }

    .ranking-index {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        font-size: 15px;
    }

    .ranking-info p,
    .ranking-meta {
        display: none;
    }

    .category-tile {
        min-height: 220px;
    }
}
