:root {
    color-scheme: dark;
    --bg: #070b16;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #ef4444;
    --accent-2: #fb923c;
    --accent-3: #facc15;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(239, 68, 68, 0.2), transparent 32rem),
        radial-gradient(circle at top right, rgba(251, 146, 60, 0.16), transparent 28rem),
        linear-gradient(180deg, #111827 0%, #070b16 48%, #050816 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.25);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
}

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #b91c1c);
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.28);
}

.brand-text {
    background: linear-gradient(90deg, #fca5a5, #fdba74, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #cbd5e1;
    font-weight: 700;
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(239, 68, 68, 0.18);
    transform: translateY(-1px);
}

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

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

.hero-shell {
    position: relative;
    min-height: 660px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    min-height: 660px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 42px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-bg {
    position: fixed;
    inset: 68px 0 auto 0;
    height: 660px;
    background-size: cover;
    background-position: center;
    filter: saturate(1.15);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.hero-slide.active .hero-bg {
    opacity: 0.9;
}

.hero-content {
    padding: 56px 0;
}

.eyebrow,
.section-kicker {
    color: #fdba74;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.hero-content h1,
.inner-hero h1,
.detail-article h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.96;
    letter-spacing: -0.06em;
    max-width: 880px;
}

.hero-desc,
.inner-hero p,
.lead-text {
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
    max-width: 760px;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(248, 250, 252, 0.12);
    font-size: 13px;
}

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

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

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

.btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    box-shadow: 0 18px 38px rgba(239, 68, 68, 0.3);
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn.subtle {
    color: #fde68a;
    background: rgba(250, 204, 21, 0.12);
}

.hero-poster {
    position: relative;
    isolation: isolate;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: inherit;
    pointer-events: none;
}

.hero-poster img,
.movie-card img,
.ranking-card img,
.detail-cover,
.category-covers img,
.channel-card img,
.rank-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: rgba(15, 23, 42, 0.72);
}

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

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dots button.active {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.section,
.search-panel,
.inner-hero,
.detail-hero,
.detail-main {
    margin-top: 56px;
}

.search-panel,
.inner-hero,
.detail-article,
.rank-panel,
.player-card,
.detail-side {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 480px);
    align-items: center;
    gap: 24px;
    padding: 28px;
}

.search-panel h2,
.section-head h2,
.rank-panel h2,
.detail-article h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.search-box,
.filterbar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box input,
.filterbar input,
.filterbar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.62);
    color: white;
    padding: 0 16px;
    outline: none;
}

.search-box input:focus,
.filterbar input:focus,
.filterbar select:focus {
    border-color: rgba(251, 146, 60, 0.72);
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.12);
}

.search-box span {
    font-size: 26px;
    color: #fdba74;
}

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

.more-link {
    color: #fdba74;
    font-weight: 900;
}

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

.channel-card,
.category-tile a {
    display: block;
    height: 100%;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.channel-card:hover,
.category-tile a:hover,
.movie-card:hover,
.ranking-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 146, 60, 0.45);
    background: rgba(30, 41, 59, 0.86);
}

.channel-card img {
    height: 136px;
    border-radius: 16px;
    margin-bottom: 12px;
}

.channel-card span,
.category-tile h2 {
    display: block;
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 900;
}

.channel-card p,
.category-tile p,
.movie-info p {
    color: var(--muted);
    line-height: 1.65;
    margin: 0;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card.is-hidden,
.ranking-card.is-hidden {
    display: none;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.92);
    color: white;
    font-size: 12px;
    font-weight: 900;
}

.movie-info {
    padding: 16px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-size: 12px;
}

.movie-info h3 {
    margin: 10px 0 8px;
    font-size: 20px;
    line-height: 1.3;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 38px 54px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
    border-bottom: 0;
}

.rank-num,
.ranking-index {
    font-weight: 950;
    color: #fdba74;
}

.rank-row img {
    width: 54px;
    height: 76px;
    border-radius: 12px;
}

.rank-main strong,
.rank-main em {
    display: block;
}

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

.rank-score {
    color: #facc15;
    font-weight: 900;
}

.inner-hero {
    padding: 42px;
}

.channel-hero {
    display: grid;
    gap: 18px;
}

.filterbar {
    max-width: 760px;
}

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

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.category-covers img {
    aspect-ratio: 2 / 3;
    border-radius: 16px;
}

.category-tile span {
    display: inline-flex;
    margin-top: 16px;
    color: #fdba74;
    font-weight: 900;
}

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

.ranking-card a {
    display: grid;
    grid-template-columns: 64px 86px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.ranking-card img {
    width: 86px;
    height: 120px;
    border-radius: 16px;
}

.ranking-content strong,
.ranking-content em,
.ranking-content small {
    display: block;
}

.ranking-content strong {
    font-size: 22px;
}

.ranking-content em,
.ranking-content small {
    color: var(--muted);
    font-style: normal;
    margin-top: 7px;
}

.detail-hero {
    padding: 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #cbd5e1;
}

.breadcrumb a {
    color: #fdba74;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

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

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

.play-layer span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    color: white;
    font-size: 34px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 24px 55px rgba(239, 68, 68, 0.42);
}

.detail-side {
    padding: 18px;
}

.detail-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 20px;
}

.detail-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(250, 204, 21, 0.12);
}

.detail-score strong {
    color: #facc15;
    font-size: 34px;
}

.detail-score span {
    color: #fde68a;
    font-weight: 800;
}

.detail-article {
    padding: 42px;
}

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

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 26px 0 34px;
}

.detail-meta-grid div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.42);
}

.detail-meta-grid span,
.detail-meta-grid strong {
    display: block;
}

.detail-meta-grid span {
    color: var(--muted);
    margin-bottom: 8px;
}

.detail-article p {
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.95;
}

.detail-article h2 {
    margin: 34px 0 12px;
}

.site-footer {
    margin-top: 72px;
    padding: 38px 0;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.48);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.footer-brand {
    font-size: 22px;
    font-weight: 900;
    color: #fdba74;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #cbd5e1;
}

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

@media (max-width: 1080px) {
    .hero-slide,
    .split-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-side {
        display: none;
    }

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

    .rank-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .nav-links {
        position: fixed;
        top: 68px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.98);
    }

    .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: inline-block;
    }

    .hero-shell,
    .hero-slider {
        min-height: 620px;
    }

    .hero-content h1,
    .inner-hero h1,
    .detail-article h1 {
        font-size: 42px;
    }

    .search-panel,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

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

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

    .ranking-card img {
        width: 72px;
        height: 102px;
    }

    .inner-hero,
    .detail-article,
    .search-panel {
        padding: 24px;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .movie-grid.compact,
    .channel-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .filterbar {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}
