:root {
    color-scheme: dark;
    --bg: #111827;
    --bg-deep: #0b1120;
    --panel: rgba(17, 24, 39, 0.82);
    --panel-strong: #1f2937;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f9fafb;
    --muted: #9ca3af;
    --soft: #d1d5db;
    --sunset: #fb923c;
    --sunset-deep: #f97316;
    --twilight: #8b5cf6;
    --twilight-deep: #6d28d9;
    --green: #10b981;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(139, 92, 246, 0.18), transparent 30rem),
        radial-gradient(circle at top right, rgba(251, 146, 60, 0.16), transparent 26rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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: 100;
    background: rgba(17, 24, 39, 0.94);
    border-bottom: 1px solid rgba(139, 92, 246, 0.24);
    backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--sunset), var(--twilight));
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(249, 115, 22, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-name,
.footer-brand {
    font-size: 23px;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fb923c, #c084fc, #facc15);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-subtitle {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

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

.nav-link,
.mobile-link {
    color: var(--soft);
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--sunset);
}

.header-search,
.mobile-search,
.search-panel,
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search input,
.mobile-search input,
.search-panel input,
.search-panel select,
.filter-bar input,
.filter-bar select {
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.9);
    color: var(--text);
    outline: none;
    padding: 0 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 220px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.search-panel select:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--sunset);
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.12);
}

.header-search button,
.mobile-search button {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    background: linear-gradient(135deg, var(--sunset-deep), var(--twilight));
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(31, 41, 55, 0.88);
    color: var(--text);
    cursor: pointer;
}

.mobile-panel {
    border-top: 1px solid var(--line);
    background: rgba(17, 24, 39, 0.98);
}

.mobile-panel-inner {
    display: grid;
    gap: 16px;
    padding: 18px 0;
}

.mobile-nav {
    display: grid;
    gap: 12px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--bg-deep);
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.5), rgba(17, 24, 39, 0.18)),
        linear-gradient(0deg, var(--bg) 0%, rgba(17, 24, 39, 0.4) 44%, rgba(17, 24, 39, 0.15) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 78px;
}

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

.eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #fed7aa;
    font-weight: 700;
    margin-bottom: 16px;
}

.eyebrow span,
.eyebrow b {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid rgba(251, 146, 60, 0.32);
    border-radius: 999px;
    padding: 0 12px;
    background: rgba(17, 24, 39, 0.58);
    backdrop-filter: blur(12px);
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.hero-copy p {
    max-width: 650px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.detail-tags,
.movie-tags,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

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

.button-primary {
    background: linear-gradient(135deg, var(--sunset-deep), var(--twilight));
    color: #ffffff;
    box-shadow: 0 16px 36px rgba(109, 40, 217, 0.28);
}

.button-ghost {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(17, 24, 39, 0.54);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.button.full {
    width: 100%;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.44);
    color: #ffffff;
    cursor: pointer;
    font-size: 42px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.section-block {
    margin-top: 70px;
}

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

.section-title span,
.page-heading span {
    color: var(--sunset);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-title h2,
.section-title h3,
.page-heading h1,
.detail-hero h1,
.detail-content h2 {
    margin: 4px 0 0;
    line-height: 1.15;
}

.section-title h2,
.page-heading h1 {
    font-size: clamp(30px, 4vw, 44px);
}

.section-title h3 {
    font-size: 24px;
}

.section-title p,
.page-heading p,
.channel-card p,
.site-footer p {
    color: var(--muted);
}

.section-title > a,
.channel-enter {
    color: var(--sunset);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.92), rgba(17, 24, 39, 0.96));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    border-color: rgba(251, 146, 60, 0.42);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

.movie-card-large .movie-cover {
    aspect-ratio: 16 / 9;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.movie-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
}

.movie-play-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 999px;
    background: rgba(251, 146, 60, 0.9);
    color: #ffffff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .movie-play-dot {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-year {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(17, 24, 39, 0.7);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.movie-info {
    padding: 16px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 0 9px;
    background: rgba(148, 163, 184, 0.1);
}

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

.movie-info h3 a:hover,
.rank-main h3 a:hover,
.channel-links a:hover {
    color: var(--sunset);
}

.movie-info p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-tags span,
.detail-tags span {
    border: 1px solid rgba(139, 92, 246, 0.24);
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(139, 92, 246, 0.12);
    color: #ddd6fe;
    font-size: 12px;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 320px);
    gap: 18px;
    overflow-x: auto;
    padding: 0 0 16px;
    scrollbar-width: thin;
}

.category-stack {
    display: grid;
    gap: 38px;
}

.category-strip {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    background: rgba(17, 24, 39, 0.58);
}

.slim {
    align-items: flex-start;
    margin-bottom: 20px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 70px 110px 1fr auto;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px 18px 12px 12px;
    background: rgba(31, 41, 55, 0.68);
}

.rank-num {
    display: grid;
    place-items: center;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.18), rgba(139, 92, 246, 0.2));
    color: #fed7aa;
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    width: 110px;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    background: #0f172a;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-main h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-main p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.rank-watch {
    border-radius: 999px;
    padding: 10px 18px;
    background: rgba(251, 146, 60, 0.14);
    color: #fdba74;
    font-weight: 800;
}

.page-main {
    padding: 58px 0 0;
}

.page-heading {
    display: grid;
    gap: 12px;
    margin-bottom: 28px;
}

.page-heading h1 {
    max-width: 860px;
}

.page-heading p {
    max-width: 820px;
    margin: 0;
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: #d1d5db;
    font-size: 14px;
}

.breadcrumb a {
    color: #fdba74;
}

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

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

.channel-card {
    display: grid;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(251, 146, 60, 0.14), rgba(139, 92, 246, 0.14)),
        rgba(31, 41, 55, 0.68);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

.channel-card-main span {
    color: var(--sunset);
    font-weight: 800;
}

.channel-card-main h2 {
    margin: 8px 0;
    font-size: 28px;
}

.channel-card-main p {
    margin: 0;
}

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

.channel-links a {
    color: #e5e7eb;
}

.filter-bar,
.search-panel {
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px;
    background: rgba(31, 41, 55, 0.6);
}

.filter-bar input,
.search-panel input {
    flex: 1 1 280px;
}

.search-panel select,
.filter-bar select {
    flex: 0 1 160px;
}

.empty-state {
    border: 1px dashed rgba(251, 146, 60, 0.35);
    border-radius: var(--radius-md);
    padding: 26px;
    color: #fdba74;
    text-align: center;
}

.detail-main {
    padding-top: 0;
}

.detail-hero {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    padding: 80px 0 58px;
    background: var(--bg-deep);
}

.detail-backdrop,
.detail-backdrop-shade {
    position: absolute;
    inset: 0;
}

.detail-backdrop {
    background-position: center;
    background-size: cover;
    filter: blur(7px);
    transform: scale(1.06);
    opacity: 0.5;
}

.detail-backdrop-shade {
    background:
        radial-gradient(circle at 20% 30%, rgba(251, 146, 60, 0.2), transparent 28rem),
        linear-gradient(0deg, var(--bg) 0%, rgba(17, 24, 39, 0.86) 50%, rgba(17, 24, 39, 0.7) 100%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 16px;
}

.detail-hero h1 {
    max-width: 900px;
    font-size: clamp(36px, 6vw, 68px);
    letter-spacing: -0.05em;
}

.detail-hero p {
    max-width: 820px;
    margin: 0;
    color: #e5e7eb;
    font-size: 18px;
}

.detail-meta span {
    border: 1px solid rgba(251, 146, 60, 0.24);
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(17, 24, 39, 0.58);
    color: #fed7aa;
    font-weight: 700;
}

.player-section {
    margin-top: -78px;
    position: relative;
    z-index: 3;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(251, 146, 60, 0.28);
    border-radius: 30px;
    background: #000000;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

.video-player {
    width: 100%;
    height: 100%;
    background: #000000;
}

.video-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    background-position: center;
    background-size: cover;
    cursor: pointer;
}

.video-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.18));
}

.video-cover.is-hidden {
    display: none;
}

.main-play-button {
    position: relative;
    z-index: 5;
    display: grid;
    width: 96px;
    height: 96px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sunset), var(--twilight));
    color: #ffffff;
    cursor: pointer;
    font-size: 38px;
    box-shadow: 0 20px 58px rgba(0, 0, 0, 0.4);
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 44px;
}

.detail-poster-card,
.detail-content {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(31, 41, 55, 0.62);
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.18);
}

.detail-poster-card {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 16px;
}

.detail-poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    object-fit: cover;
    background: #0f172a;
}

.detail-content {
    padding: 28px;
}

.detail-content h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 26px;
}

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

.detail-content p {
    margin: 0;
    color: #d1d5db;
    font-size: 16px;
}

.site-footer {
    margin-top: 90px;
    border-top: 1px solid var(--line);
    background: rgba(17, 24, 39, 0.88);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
    padding: 42px 0;
}

.site-footer h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--sunset);
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 16px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1024px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-menu-button {
        display: grid;
        place-items: center;
    }

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

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

    .detail-poster-card {
        max-width: 360px;
    }
}

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

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

    .brand-subtitle {
        display: none;
    }

    .hero-carousel {
        min-height: 520px;
        height: 76vh;
    }

    .hero-content {
        padding-bottom: 86px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

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

    .button {
        width: 100%;
    }

    .hero-control {
        top: auto;
        bottom: 24px;
        width: 44px;
        height: 44px;
        font-size: 34px;
        transform: none;
    }

    .hero-prev {
        left: 16px;
    }

    .hero-next {
        right: 16px;
    }

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

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .archive-grid,
    .channel-grid {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 52px 86px 1fr;
        gap: 12px;
        padding: 10px;
    }

    .rank-watch {
        grid-column: 1 / -1;
        text-align: center;
    }

    .rank-thumb {
        width: 86px;
    }

    .player-shell {
        border-radius: 20px;
    }

    .main-play-button {
        width: 76px;
        height: 76px;
    }
}
