:root {
    color-scheme: dark;
    --bg: #030712;
    --bg-soft: #0b1120;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(17, 24, 39, 0.96);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --orange: #f97316;
    --orange-dark: #ea580c;
    --yellow: #fbbf24;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(249, 115, 22, 0.20), transparent 34rem),
        radial-gradient(circle at 86% 2%, rgba(59, 130, 246, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange), var(--yellow));
    color: #111827;
    box-shadow: 0 14px 34px rgba(249, 115, 22, 0.26);
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-menu a {
    padding: 10px 14px;
    border-radius: 12px;
    color: #d1d5db;
    font-size: 15px;
    transition: color 0.22s ease, background 0.22s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ffffff;
    background: rgba(249, 115, 22, 0.14);
}

.nav-search {
    position: relative;
    width: 240px;
}

.nav-search input {
    width: 100%;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 14px;
    padding: 0 14px 0 38px;
    color: #ffffff;
    outline: none;
    background: rgba(15, 23, 42, 0.9);
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

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

.nav-search span {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.92);
}

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

.hero-slider {
    position: relative;
    min-height: calc(100vh - 72px);
    overflow: hidden;
    background: #020617;
}

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

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

.hero-image,
.hero-blur {
    position: absolute;
    inset: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.38) saturate(1.05);
}

.hero-blur {
    background:
        radial-gradient(circle at 72% 28%, rgba(249, 115, 22, 0.18), transparent 32rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.98) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 72px);
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 48px;
    padding: 76px 0 130px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(249, 115, 22, 0.35);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.13);
}

.hero-title {
    max-width: 780px;
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-title span {
    display: block;
    color: #fdba74;
}

.hero-desc {
    max-width: 720px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 0;
}

.hero-meta span,
.tag,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 6px 10px;
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.62);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    box-shadow: 0 16px 40px rgba(249, 115, 22, 0.26);
}

.btn-secondary {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
}

.hero-poster {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 26px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
    transform: rotate(1deg);
}

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

.hero-poster-info {
    padding: 18px;
}

.hero-poster-info strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
}

.hero-poster-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 42px;
    z-index: 5;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.hero-tab {
    min-height: 72px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    padding: 10px;
    color: #ffffff;
    text-align: left;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(16px);
    transition: border-color 0.22s ease, background 0.22s ease;
}

.hero-tab.is-active,
.hero-tab:hover {
    border-color: rgba(249, 115, 22, 0.58);
    background: rgba(249, 115, 22, 0.16);
}

.hero-tab strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-tab span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.section {
    padding: 72px 0;
}

.section.alt {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.70), rgba(2, 6, 23, 0.20));
}

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

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.03em;
}

.section-desc {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.more-link {
    flex: 0 0 auto;
    color: #fdba74;
    font-weight: 700;
}

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

.movie-card {
    display: block;
    min-width: 0;
}

.poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.80);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
}

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

.movie-card:hover .poster img {
    transform: scale(1.055);
    filter: brightness(0.72);
}

.poster-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    background: rgba(0, 0, 0, 0.42);
    transition: opacity 0.26s ease;
}

.movie-card:hover .poster-overlay {
    opacity: 1;
}

.play-dot {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.32);
}

.poster-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    background: rgba(249, 115, 22, 0.92);
}

.poster-type {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 10px;
    color: #ffffff;
    font-size: 12px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

.movie-title {
    margin: 12px 0 0;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.22s ease;
}

.movie-card:hover .movie-title {
    color: #fdba74;
}

.movie-meta {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.channel-card {
    display: block;
    min-height: 190px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(30, 41, 59, 0.70)),
        rgba(15, 23, 42, 0.84);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.channel-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.45);
}

.channel-card strong {
    display: block;
    font-size: 22px;
    margin-bottom: 12px;
}

.channel-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.8;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 76px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(249, 115, 22, 0.45);
}

.rank-num {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #fbbf24);
}

.rank-cover {
    width: 76px;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    object-fit: cover;
}

.rank-title {
    margin: 0 0 7px;
    font-size: 18px;
}

.rank-desc {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-heat {
    color: #fdba74;
    font-weight: 800;
    white-space: nowrap;
}

.page-hero {
    padding: 74px 0 44px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background:
        radial-gradient(circle at 12% 10%, rgba(249, 115, 22, 0.18), transparent 28rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0.24));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #fdba74;
}

.page-title {
    margin: 0;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.page-desc {
    max-width: 820px;
    margin: 18px 0 0;
    color: #cbd5e1;
    line-height: 1.85;
    font-size: 18px;
}

.filters {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.filters input,
.filters select {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 14px;
    padding: 0 14px;
    color: #ffffff;
    outline: none;
    background: rgba(2, 6, 23, 0.76);
}

.filters input:focus,
.filters select:focus {
    border-color: rgba(249, 115, 22, 0.72);
}

.search-result-title {
    margin: 0 0 20px;
    color: #cbd5e1;
    font-size: 16px;
}

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

.player-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
}

.player-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.72);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.42) blur(3px);
    transform: scale(1.03);
}

.player-button {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    box-shadow: 0 20px 52px rgba(249, 115, 22, 0.36);
}

.detail-body {
    padding: 28px;
}

.detail-body h1 {
    margin: 0 0 18px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.content-block {
    margin-top: 24px;
}

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

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

.side-card {
    position: sticky;
    top: 92px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.76);
}

.side-card img {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    margin-bottom: 16px;
}

.side-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

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

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

.footer {
    margin-top: 68px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.78);
}

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

.footer h2,
.footer h3 {
    margin: 0 0 14px;
}

.footer p,
.footer a {
    color: var(--muted);
    line-height: 1.8;
}

.footer a:hover {
    color: #fdba74;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.empty-state {
    padding: 42px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

@media (max-width: 1080px) {
    .movie-grid,
    .related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

@media (max-width: 860px) {
    .navbar {
        height: 64px;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-menu {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

    body.nav-open .nav-menu {
        display: flex;
    }

    .nav-search {
        display: none;
    }

    .hero-slider,
    .hero-inner {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
        min-height: 760px;
    }

    .hero-slide.is-active {
        display: block;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding: 64px 0 150px;
    }

    .hero-poster {
        width: min(290px, 70%);
        margin: 0 auto;
    }

    .hero-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        bottom: 22px;
    }

    .hero-tab {
        min-height: 60px;
    }

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

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

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

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

    .side-card {
        position: static;
    }

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

@media (max-width: 560px) {
    .container,
    .navbar,
    .footer-inner,
    .hero-controls {
        width: min(100% - 24px, 1180px);
    }

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

    .hero-title {
        font-size: 40px;
    }

    .hero-actions {
        display: grid;
    }

    .hero-controls {
        grid-template-columns: 1fr;
    }

    .hero-tab:nth-child(n + 4) {
        display: none;
    }

    .section {
        padding: 52px 0;
    }

    .section-head {
        display: block;
    }

    .more-link {
        display: inline-block;
        margin-top: 14px;
    }

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

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

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

    .rank-heat {
        grid-column: 3;
        justify-self: start;
    }

    .rank-num {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .rank-cover {
        width: 62px;
    }

    .detail-body {
        padding: 20px;
    }
}
