:root {
    color-scheme: dark;
    --bg: #030712;
    --bg-soft: #0b1120;
    --panel: rgba(17, 24, 39, 0.78);
    --panel-strong: #111827;
    --line: rgba(255, 255, 255, 0.1);
    --text: #f9fafb;
    --muted: #9ca3af;
    --soft: #d1d5db;
    --brand: #f97316;
    --brand-light: #fb923c;
    --brand-dark: #c2410c;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 24px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.22), transparent 32rem),
        radial-gradient(circle at 84% 12%, rgba(251, 146, 60, 0.14), transparent 28rem),
        linear-gradient(180deg, #030712 0%, #0b1120 46%, #030712 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner {
    width: min(100% - 32px, var(--max));
    min-height: 72px;
    margin: 0 auto;
    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: 900;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: #fff;
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.36);
}

.logo-text {
    font-size: 20px;
}

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

.nav-link,
.mobile-nav-link {
    color: var(--soft);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
    padding: 10px 14px;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: #fff;
    background: rgba(249, 115, 22, 0.18);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, var(--max));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.94);
}

.mobile-nav.is-open {
    display: grid;
    gap: 6px;
}

.mobile-nav-link {
    padding: 12px 14px;
}

.hero-carousel {
    width: min(100% - 32px, var(--max));
    margin: 28px auto 0;
}

.hero-stage {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.45fr);
    gap: 34px;
    align-items: center;
    padding: clamp(32px, 5vw, 76px);
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.025);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

.hero-kicker,
.page-hero span,
.section-heading span,
.detail-kicker,
.channel-body span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--brand-light);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1 {
    margin: 14px 0 0;
    font-size: clamp(36px, 6vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-copy h3 {
    margin: 22px 0 12px;
    font-size: clamp(24px, 3vw, 42px);
}

.hero-copy p,
.page-hero p,
.detail-side p,
.detail-article p,
.site-footer p,
.channel-body p,
.card-content p {
    color: var(--soft);
    line-height: 1.75;
}

.hero-copy p {
    max-width: 680px;
    font-size: 17px;
}

.hero-tags,
.card-tags,
.detail-tags,
.detail-meta,
.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.card-tags span,
.detail-tags span,
.detail-meta span,
.card-type,
.card-region,
.card-year,
.rank-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
}

.hero-tags span,
.detail-tags span,
.detail-meta span {
    padding: 8px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.primary-button,
.ghost-button,
.text-button,
.search-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.search-box button {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.28);
}

.ghost-button,
.text-button {
    color: #fff;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.hero-poster span {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 12px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    font-size: 34px;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 36px;
    background: var(--brand);
}

.hero-search-panel {
    position: relative;
    z-index: 6;
    display: grid;
    grid-template-columns: minmax(280px, 430px) 1fr;
    gap: 18px;
    align-items: center;
    margin: -34px auto 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(17, 24, 39, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-box {
    display: flex;
    gap: 10px;
    width: 100%;
}

.search-box input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    padding: 0 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.search-box input:focus {
    border-color: rgba(249, 115, 22, 0.65);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

.hero-category-links a {
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    transition: color 0.2s ease, background 0.2s ease;
}

.hero-category-links a:hover {
    color: #fff;
    background: rgba(249, 115, 22, 0.18);
}

.section-wrap {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 78px 0;
}

.section-band {
    margin: 16px 0;
    background: linear-gradient(90deg, rgba(124, 45, 18, 0.18), rgba(17, 24, 39, 0.68));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-band .section-wrap {
    padding: 68px 0;
}

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

.section-heading h2 {
    margin: 7px 0 0;
    font-size: clamp(26px, 3vw, 38px);
}

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

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

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

.library-grid,
.ranking-grid {
    align-items: start;
}

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.78);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.48);
    background: rgba(31, 41, 55, 0.92);
}

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

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 48%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.card-region,
.card-year,
.rank-badge {
    position: absolute;
    z-index: 3;
    padding: 7px 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
}

.card-region {
    top: 12px;
    right: 12px;
}

.card-year {
    right: 12px;
    bottom: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.card-content {
    padding: 18px;
}

.card-type {
    padding: 6px 10px;
    color: var(--soft);
    background: rgba(255, 255, 255, 0.08);
}

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

.card-title a {
    transition: color 0.2s ease;
}

.card-title a:hover {
    color: var(--brand-light);
}

.card-content p {
    display: -webkit-box;
    min-height: 3.45em;
    margin: 0 0 14px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.card-tags span {
    padding: 5px 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
}

.ranking-panel {
    position: sticky;
    top: 90px;
    align-self: start;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    background: rgba(3, 7, 18, 0.56);
}

.ranking-panel h2 {
    margin: 0 0 18px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 34px 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: rgba(249, 115, 22, 0.14);
    transform: translateX(4px);
}

.rank-number {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    background: rgba(249, 115, 22, 0.88);
}

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

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

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

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

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

.category-card,
.channel-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(17, 24, 39, 0.74);
    overflow: hidden;
}

.category-card > a {
    display: block;
    padding: 24px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(255, 255, 255, 0.04));
}

.category-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--brand-light);
    font-weight: 900;
}

.category-card strong {
    color: var(--soft);
    line-height: 1.65;
}

.category-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
}

.category-card div a,
.channel-links a {
    color: var(--muted);
    font-size: 14px;
}

.category-card div a:hover,
.channel-links a:hover {
    color: var(--brand-light);
}

.page-hero {
    width: min(100% - 32px, var(--max));
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
    gap: 28px;
    align-items: end;
    padding: clamp(30px, 5vw, 62px);
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(17, 24, 39, 0.7)),
        radial-gradient(circle at 78% 20%, rgba(249, 115, 22, 0.24), transparent 28rem),
        #101827;
    box-shadow: var(--shadow);
}

.small-hero h1,
.category-hero h1 {
    max-width: 760px;
}

.inline-links {
    margin-top: 20px;
}

.channel-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
}

.channel-cover {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 10px;
}

.channel-cover img {
    width: 100%;
    height: 150px;
    border-radius: 14px;
    object-fit: cover;
}

.channel-body {
    padding: 24px;
}

.channel-body h2 {
    margin: 8px 0 10px;
}

.channel-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 16px 0 20px;
}

.breadcrumb {
    width: min(100% - 32px, var(--max));
    margin: 28px auto 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--brand-light);
}

.watch-layout {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.6fr);
    gap: 26px;
}

.player-panel {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: contain;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-ring {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    box-shadow: 0 20px 50px rgba(249, 115, 22, 0.36);
    font-size: 34px;
}

.player-cover strong {
    padding: 0 24px;
    font-size: clamp(24px, 4vw, 44px);
    text-align: center;
}

.player-cover em {
    font-style: normal;
    font-weight: 900;
    color: var(--brand-light);
}

.detail-side {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 28px;
    background: rgba(17, 24, 39, 0.78);
    align-self: stretch;
}

.detail-side h1 {
    margin: 12px 0 16px;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.08;
}

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

.detail-content {
    padding-top: 48px;
    padding-bottom: 20px;
}

.detail-article {
    max-width: 900px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(24px, 4vw, 44px);
    background: rgba(17, 24, 39, 0.72);
}

.detail-article h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.detail-article h2 + p {
    margin-top: 0;
}

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

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: rgba(3, 7, 18, 0.72);
}

.footer-inner {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 26px;
    padding: 38px 0;
}

.footer-logo {
    margin-bottom: 12px;
    font-size: 20px;
}

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

.footer-links a {
    padding: 8px 12px;
    color: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
}

.footer-links a:hover {
    color: #fff;
    background: rgba(249, 115, 22, 0.16);
}

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

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

    .split-layout,
    .watch-layout,
    .page-hero,
    .hero-search-panel {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

    .hero-stage {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 34px 22px 70px;
    }

    .hero-poster {
        max-width: 220px;
    }

    .hero-arrow {
        top: auto;
        bottom: 22px;
        transform: none;
    }

    .hero-prev {
        left: 22px;
    }

    .hero-next {
        right: 22px;
    }

    .hero-dots {
        bottom: 36px;
    }

    .hero-search-panel {
        margin-top: 16px;
    }

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

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

    .player-panel,
    .movie-video {
        min-height: 360px;
    }

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

@media (max-width: 560px) {
    .header-inner,
    .hero-carousel,
    .section-wrap,
    .page-hero,
    .watch-layout,
    .breadcrumb,
    .footer-inner {
        width: min(100% - 22px, var(--max));
    }

    .hero-stage {
        min-height: 760px;
        border-radius: 26px;
    }

    .hero-copy h1,
    .hero-copy h2,
    .page-hero h1 {
        font-size: 36px;
    }

    .hero-copy h3 {
        font-size: 28px;
    }

    .hero-search-panel,
    .page-hero,
    .detail-side,
    .detail-article {
        border-radius: 24px;
    }

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

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

    .movie-grid,
    .compact-grid,
    .category-grid,
    .channel-grid,
    .wide-list {
        grid-template-columns: 1fr;
    }

    .player-panel,
    .movie-video {
        min-height: 270px;
    }

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