:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --text: #e5eefb;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #3b82f6;
    --orange: #fb923c;
    --shadow: 0 22px 60px rgba(2, 6, 23, 0.56);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at 78% 12%, rgba(59, 130, 246, 0.15), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

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

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #02101a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 26px rgba(34, 211, 238, 0.35);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
    display: none;
}

.desktop-nav a,
.mobile-panel a {
    padding: 9px 12px;
    color: #cbd5e1;
    border-radius: 999px;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.14);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.76);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #e2e8f0;
    border-radius: 2px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(51, 65, 85, 0.7);
    background: rgba(2, 6, 23, 0.96);
}

.mobile-panel nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-panel.open {
    display: block;
}

.hero {
    position: relative;
    min-height: 82vh;
    overflow: hidden;
    isolation: isolate;
}

.hero-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 28%, rgba(34, 211, 238, 0.23), transparent 34rem),
        radial-gradient(circle at 80% 18%, rgba(59, 130, 246, 0.2), transparent 38rem);
    z-index: -3;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    align-items: center;
    gap: 48px;
    padding: 8rem max(32px, calc((100vw - 1180px) / 2)) 6rem;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.75) 44%, rgba(2, 6, 23, 0.36)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.3), #020617 100%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}

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

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

.eyebrow {
    margin: 0 0 14px;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 13px;
    font-weight: 800;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-copy > span {
    display: block;
    margin-top: 16px;
    color: #c4f1ff;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
}

.hero-copy p:not(.eyebrow) {
    margin: 22px 0 0;
    color: #cbd5e1;
    max-width: 620px;
    font-size: 17px;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags a,
.tag-row span,
.tag-row a,
.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 999px;
    color: #c4f1ff;
    background: rgba(34, 211, 238, 0.1);
    font-size: 12px;
    font-style: normal;
}

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

.btn,
.search-box button,
.section-link,
.rank-action,
.pager a,
.catalog-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid rgba(148, 163, 184, 0.22);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn.primary,
.search-box button {
    color: #04111d;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.22);
    border-color: transparent;
}

.btn.ghost,
.section-link,
.pager a,
.catalog-links a {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.76);
}

.btn:hover,
.search-box button:hover,
.section-link:hover,
.rank-action:hover,
.pager a:hover,
.catalog-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    min-height: 560px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(59, 130, 246, 0.12)),
        #0f172a;
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 560px;
    object-fit: cover;
    opacity: 0.95;
}

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

.hero-poster strong,
.hero-poster em {
    position: absolute;
    left: 24px;
    right: 24px;
    z-index: 1;
}

.hero-poster strong {
    bottom: 62px;
    color: #ffffff;
    font-size: 28px;
    line-height: 1.15;
}

.hero-poster em {
    bottom: 30px;
    color: #93c5fd;
    font-style: normal;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 99px;
    border: 0;
    background: rgba(226, 232, 240, 0.36);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.search-band {
    margin-top: -46px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.search-band p,
.section-heading p,
.rank-title p,
.page-hero p {
    margin: 0 0 6px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.search-band h2,
.section-heading h2,
.rank-title h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.search-box,
.inline-search {
    display: flex;
    gap: 10px;
}

.search-box input,
.inline-search input {
    width: 100%;
    min-height: 46px;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.65);
    padding: 0 16px;
    outline: none;
}

.search-box input:focus,
.inline-search input:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.section,
.page-main {
    padding-top: 64px;
}

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

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

.channel-card {
    min-height: 138px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.08)),
        rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.channel-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 22px 44px rgba(2, 6, 23, 0.32);
}

.channel-card span {
    display: block;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 14px;
}

.channel-card strong {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    font-weight: 500;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 22px 46px rgba(2, 6, 23, 0.36);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.12)),
        #0f172a;
}

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

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

.image-hidden {
    display: none !important;
}

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    color: #04111d;
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    background: var(--cyan);
}

.poster-play {
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.card-body {
    display: block;
    padding: 14px;
}

.card-body strong {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.35;
}

.card-body em,
.rank-main em,
.hero-poster em {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.card-line {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
    margin-top: 10px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.45;
}

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

.compact .poster {
    aspect-ratio: 16 / 11;
}

.compact .card-line {
    min-height: 0;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

.rank-panel,
.rank-page-list,
.catalog-panel,
.detail-content,
.player-section {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

.rank-panel {
    padding: 22px;
    align-self: start;
    position: sticky;
    top: 92px;
}

.rank-title {
    margin-bottom: 18px;
}

.rank-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.13);
}

.rank-no {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #03131e;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
    font-size: 12px;
}

.rank-main strong {
    display: block;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-action {
    min-height: 32px;
    padding: 6px 10px;
    color: #dffbff;
    background: rgba(34, 211, 238, 0.12);
    font-size: 12px;
}

.page-main {
    padding-bottom: 72px;
}

.page-hero {
    padding: 60px;
    margin-top: 32px;
    border-radius: 30px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.62));
    box-shadow: var(--shadow);
}

.compact-hero p:last-of-type {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: 0;
    font-weight: 500;
    text-transform: none;
}

.inline-search {
    margin-top: 24px;
    max-width: 620px;
}

.filter-row {
    margin-top: 18px;
}

.filter-chip {
    color: #e2e8f0;
    cursor: pointer;
}

.filter-chip.active {
    color: #03131e;
    background: var(--cyan);
}

.pager,
.catalog-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.rank-page-list {
    padding: 12px 28px 28px;
}

.catalog-panel {
    padding: 28px;
    margin-bottom: 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 28px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #c4f1ff;
}

.detail-main {
    padding-bottom: 78px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 38px;
    margin-top: 28px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 30px;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 30rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.68));
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.12)), #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

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

.detail-info h1 {
    font-size: clamp(36px, 5vw, 66px);
}

.detail-line {
    margin: 20px 0 0;
    max-width: 780px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags a {
    color: #dffbff;
}

.player-section {
    padding: 28px;
}

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

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.16), transparent 18rem),
        rgba(2, 6, 23, 0.28);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #03131e;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 48px rgba(34, 211, 238, 0.35);
    font-size: 30px;
    padding-left: 4px;
}

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

.player-message {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 10px 12px;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.85);
    border-radius: 12px;
    font-size: 13px;
}

.detail-content {
    padding: 28px;
}

.detail-content h2 {
    color: #ffffff;
    margin: 0 0 12px;
    font-size: 26px;
}

.detail-content h2:not(:first-child) {
    margin-top: 30px;
}

.detail-content p {
    margin: 0;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 2;
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid rgba(51, 65, 85, 0.7);
    background: rgba(2, 6, 23, 0.78);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 1fr 1fr;
    gap: 28px;
    padding: 42px 0;
}

.footer-brand {
    margin-bottom: 16px;
}

.site-footer p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.footer-links a {
    color: #cbd5e1;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 13px;
}

.footer-bottom {
    padding: 18px 0 28px;
    color: #64748b;
    font-size: 13px;
}

.movie-card.hidden-by-search {
    display: none;
}

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

    .menu-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding-top: 7rem;
    }

    .hero-poster {
        display: none;
    }

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

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

    .two-column,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

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

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

    .header-inner {
        height: 64px;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-slide {
        padding: 6.5rem 18px 5rem;
    }

    .hero-copy p:not(.eyebrow) {
        font-size: 15px;
        line-height: 1.7;
    }

    .search-band {
        grid-template-columns: 1fr;
        padding: 20px;
        margin-top: -28px;
    }

    .search-box {
        flex-direction: column;
    }

    .section,
    .page-main {
        padding-top: 42px;
    }

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

    .channel-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .card-body {
        padding: 12px;
    }

    .page-hero,
    .detail-hero,
    .player-section,
    .detail-content,
    .catalog-panel {
        padding: 22px;
        border-radius: 22px;
    }

    .rank-item {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .rank-action {
        display: none;
    }

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