:root {
    --bg: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --panel: #ffffff;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --sky: #38bdf8;
    --slate: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 34%, #f1f5f9 100%);
    color: var(--ink);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
}

.nav-shell {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

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

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

.logo-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--sky));
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.34);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 14px;
}

.desktop-nav a,
.mobile-panel a,
.site-logo {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-logo:hover {
    color: #60a5fa;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: #ffffff;
}

.mobile-panel {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.mobile-panel.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hero-slider {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

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

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 45%, rgba(15, 23, 42, 0.16) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.08) 50%);
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 86px 20px 104px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 56px;
}

.hero-kicker,
.section-title span,
.page-hero span {
    display: inline-block;
    color: #93c5fd;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
}

.hero-text h1,
.hero-text h2 {
    max-width: 790px;
    margin: 16px 0 14px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-text h2 + h2 {
    margin-top: 0;
    font-size: clamp(26px, 4vw, 42px);
    color: #bfdbfe;
}

.hero-text p {
    max-width: 720px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.detail-meta,
.detail-tags,
.card-meta,
.card-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.detail-meta span,
.detail-tags a {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.14);
    color: #e0f2fe;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    font-size: 13px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), #06b6d4);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.35);
}

.btn.ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-poster {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(12px);
}

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

.hero-poster strong,
.hero-poster span {
    position: absolute;
    left: 20px;
    right: 20px;
    z-index: 2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero-poster strong {
    bottom: 50px;
    font-size: 24px;
}

.hero-poster span {
    bottom: 22px;
    color: #dbeafe;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

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

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    color: #ffffff;
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #60a5fa;
}

.hero-channel-bar {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 6;
    width: min(960px, calc(100% - 40px));
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    transform: translateX(-50%);
}

.hero-channel-bar a {
    padding: 9px 14px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    font-size: 13px;
}

.stats-band {
    max-width: 1180px;
    margin: -38px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stats-band a {
    padding: 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.stats-band strong {
    display: block;
    margin-bottom: 6px;
    font-size: 20px;
}

.stats-band span {
    color: var(--muted);
}

.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 20px;
}

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

.section-title h2 {
    margin: 5px 0 0;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.section-title a {
    color: var(--blue);
    font-weight: 800;
}

.section-title.compact h2 {
    font-size: 26px;
}

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

.feature-grid .movie-card.large:nth-child(-n + 2) {
    grid-column: span 2;
}

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

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

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

.movie-card.large .poster-link img {
    aspect-ratio: 16 / 9;
}

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

.play-badge {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.rank-mark {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.32);
}

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

.card-meta,
.card-foot {
    color: var(--muted);
    font-size: 12px;
}

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

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

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

.movie-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: #475569;
    line-height: 1.65;
    font-size: 14px;
}

.card-foot {
    justify-content: space-between;
}

.soft-panel {
    max-width: 1240px;
    border-radius: 28px;
    background: linear-gradient(135deg, #eff6ff, #ffffff 48%, #ecfeff);
}

.split-section {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    gap: 28px;
}

.rank-panel,
.channel-panel,
.filter-box,
.text-panel,
.detail-side,
.detail-main {
    border-radius: 22px;
    background: var(--panel);
    box-shadow: var(--soft-shadow);
}

.rank-panel,
.channel-panel {
    padding: 26px;
}

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 40px 76px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: #eff6ff;
    transform: translateX(3px);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    background: #0f172a;
    font-weight: 800;
}

.rank-row img {
    width: 76px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-content {
    min-width: 0;
}

.rank-content strong,
.rank-content em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-content em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.rank-score {
    color: #f59e0b;
    font-weight: 800;
    white-space: nowrap;
}

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

.category-card,
.category-tile {
    position: relative;
    min-height: 156px;
    overflow: hidden;
    border-radius: 20px;
    padding: 18px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: var(--soft-shadow);
}

.category-card img,
.category-tile img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.45s ease;
}

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

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

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

.category-card span,
.category-tile span {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 900;
}

.category-card p,
.category-tile p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.6;
    font-size: 13px;
}

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

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.48), transparent 26%), linear-gradient(90deg, #0f172a, #1e293b 56%, #0f172a);
}

.page-hero > div {
    max-width: 1280px;
    margin: 0 auto;
    padding: 74px 20px;
}

.page-hero h1 {
    margin: 12px 0 14px;
    font-size: clamp(34px, 5vw, 54px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.filter-box {
    margin-bottom: 28px;
    padding: 22px;
}

.filter-main {
    display: grid;
    grid-template-columns: 2fr repeat(4, minmax(140px, 1fr));
    gap: 14px;
}

.filter-main label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-weight: 800;
    font-size: 13px;
}

.filter-main input,
.filter-main select {
    min-height: 46px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--ink);
    background: #ffffff;
    outline: none;
}

.filter-main input:focus,
.filter-main select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.22);
}

.filter-count {
    margin: 16px 0 0;
    color: var(--muted);
}

.catalog-grid {
    align-items: stretch;
}

.full-rank {
    gap: 10px;
}

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

.ranking-highlight .movie-card:nth-child(-n + 3) {
    grid-column: span 2;
}

.detail-hero {
    padding: 30px 20px 0;
    background: linear-gradient(180deg, #0f172a, #111827 72%, transparent 72%);
}

.breadcrumbs {
    max-width: 1280px;
    margin: 0 auto 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #bfdbfe;
    font-size: 14px;
}

.breadcrumbs strong {
    color: #ffffff;
}

.player-card {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.4);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.34));
}

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

.play-action {
    position: relative;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), #06b6d4);
    box-shadow: 0 20px 46px rgba(37, 99, 235, 0.38);
    cursor: pointer;
    font-size: 34px;
    padding-left: 6px;
}

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

.detail-main {
    padding: 28px;
}

.detail-top {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.detail-poster {
    width: 100%;
    border-radius: 20px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: var(--soft-shadow);
}

.detail-main h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -0.04em;
}

.detail-meta span {
    color: #475569;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.lead-text {
    margin: 22px 0;
    color: #334155;
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-tags a {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.text-panel {
    margin-top: 24px;
    padding: 24px;
    background: #f8fafc;
    box-shadow: none;
}

.text-panel h2,
.detail-side h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
}

.detail-side {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.side-rank .rank-row {
    grid-template-columns: 60px minmax(0, 1fr);
}

.side-rank .rank-num,
.side-rank .rank-score {
    display: none;
}

.side-rank .rank-row img {
    width: 60px;
    height: 80px;
}

.side-rank .rank-content strong,
.side-rank .rank-content em {
    white-space: normal;
}

.channel-preview {
    padding-top: 22px;
    padding-bottom: 42px;
}

.is-filtered-out {
    display: none !important;
}

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

    .nav-toggle {
        display: block;
    }

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

    .hero-poster {
        display: none;
    }

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

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

    .detail-side {
        position: static;
    }

    .filter-main {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 760px) {
    .nav-shell {
        height: 60px;
        padding: 0 14px;
    }

    .site-logo {
        font-size: 18px;
    }

    .hero-slider {
        min-height: 76vh;
    }

    .hero-content {
        padding: 70px 18px 118px;
    }

    .hero-text p {
        font-size: 15px;
    }

    .hero-controls {
        bottom: 72px;
    }

    .stats-band {
        grid-template-columns: 1fr 1fr;
        margin-top: 18px;
    }

    .section-wrap {
        padding: 40px 16px;
    }

    .movie-grid,
    .feature-grid .movie-card.large:nth-child(-n + 2),
    .ranking-highlight,
    .ranking-highlight .movie-card:nth-child(-n + 3),
    .category-grid,
    .category-tile-grid {
        grid-template-columns: 1fr 1fr;
        grid-column: auto;
    }

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

    .rank-row {
        grid-template-columns: 34px 62px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

    .rank-row img {
        width: 62px;
        height: 48px;
    }

    .filter-main {
        grid-template-columns: 1fr;
    }

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

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

    .player-card {
        border-radius: 18px;
    }

    .play-action {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .category-grid,
    .category-tile-grid,
    .stats-band,
    .mobile-panel.open {
        grid-template-columns: 1fr;
    }

    .movie-card p {
        min-height: 0;
    }

    .hero-channel-bar {
        display: none;
    }
}
