:root {
    --autumn-50: #fff7ed;
    --autumn-100: #ffedd5;
    --autumn-200: #fed7aa;
    --autumn-300: #fdba74;
    --autumn-400: #fb923c;
    --autumn-500: #f97316;
    --autumn-600: #ea580c;
    --autumn-700: #c2410c;
    --autumn-800: #9a3412;
    --leaf-200: #fef08a;
    --leaf-400: #facc15;
    --leaf-500: #eab308;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #f1f1f1;
    --paper: #ffffff;
    --soft: #fffaf5;
    --shadow: 0 18px 50px rgba(154, 52, 18, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(251, 146, 60, 0.14), transparent 30%),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 26%, #fffaf5 100%);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    line-height: 1.7;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(154, 52, 18, 0.08);
}

.topline {
    color: #fff;
    background-image: linear-gradient(135deg, #f97316, #ea580c, #fb923c);
}

.topline-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    font-size: 14px;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 15px 0;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--autumn-800);
}

.brand-mark {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--autumn-500), var(--autumn-700));
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.26);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: rotate(10deg) scale(1.04);
}

.brand-text {
    display: grid;
    line-height: 1.2;
}

.brand-text strong,
.footer-brand {
    font-size: 24px;
    font-weight: 800;
}

.brand-text em {
    color: var(--autumn-500);
    font-size: 12px;
    font-style: normal;
}

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

.nav-link {
    color: #4b5563;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--autumn-600);
}

.header-search,
.big-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.big-search input,
.mobile-search input,
.page-filter,
.page-sort {
    min-width: 0;
    border: 2px solid var(--autumn-200);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 210px;
    padding: 10px 14px;
}

.big-search input,
.mobile-search input {
    flex: 1;
    padding: 15px 20px;
}

.header-search input:focus,
.big-search input:focus,
.mobile-search input:focus,
.page-filter:focus,
.page-sort:focus {
    border-color: var(--autumn-500);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.header-search button,
.big-search button,
.mobile-search button,
.btn,
.text-link {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

.header-search button,
.big-search button,
.mobile-search button,
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--autumn-500), var(--autumn-700));
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.22);
}

.header-search button {
    padding: 10px 16px;
}

.big-search button,
.mobile-search button {
    padding: 15px 24px;
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--autumn-100);
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--autumn-700);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--autumn-100);
}

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

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

.quick-channel-links,
.search-shortcuts,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-channel-links a,
.search-shortcuts a,
.footer-links a {
    color: var(--autumn-700);
    background: var(--autumn-100);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 700;
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
    filter: blur(4px) saturate(1.1);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(124, 45, 18, 0.92) 0%, rgba(154, 52, 18, 0.74) 46%, rgba(17, 24, 39, 0.5) 100%),
        radial-gradient(circle at 75% 25%, rgba(250, 204, 21, 0.28), transparent 34%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: 640px;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 52px;
    padding: 74px 0 84px;
}

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

.hero-eyebrow,
.detail-badge,
.section-heading span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: max-content;
    color: var(--autumn-800);
    background: var(--leaf-200);
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 16px 0 14px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy h2 {
    font-size: clamp(34px, 5vw, 64px);
}

.hero-copy p {
    max-width: 660px;
    color: var(--autumn-100);
    font-size: clamp(18px, 2vw, 23px);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    font-weight: 700;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.18);
    padding: 8px 13px;
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 26px;
}

.btn-ghost {
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.08);
}

.btn:hover,
.header-search button:hover,
.big-search button:hover,
.mobile-search button:hover {
    transform: translateY(-1px);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    height: 500px;
    border: 8px solid rgba(255, 255, 255, 0.22);
    border-radius: 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

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

.hero-poster span,
.play-hover,
.player-overlay span {
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--autumn-600);
    border-radius: 50%;
}

.hero-poster span {
    position: absolute;
    inset: auto 24px 24px auto;
    width: 72px;
    height: 72px;
    font-size: 30px;
    box-shadow: 0 16px 36px rgba(234, 88, 12, 0.36);
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-prev,
.hero-next {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    font-size: 28px;
    backdrop-filter: blur(8px);
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
    width: 30px;
    background: #fff;
}

.search-band,
.section-block {
    margin-top: 56px;
}

.search-band {
    position: relative;
    z-index: 6;
    margin-top: -34px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(253, 186, 116, 0.42);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.big-search {
    width: 100%;
}

.search-shortcuts {
    margin-top: 16px;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading.with-link {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-card h2,
.content-side h2,
.side-card h2 {
    margin: 10px 0 8px;
    color: var(--ink);
    line-height: 1.2;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-heading.compact h2 {
    font-size: 28px;
}

.section-heading p,
.page-hero p,
.category-overview-card p,
.content-card p,
.site-footer p {
    margin: 0;
    color: var(--muted);
}

.section-heading.with-link a,
.text-link {
    color: var(--autumn-700);
    background: var(--autumn-100);
    padding: 10px 16px;
}

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

.channel-card {
    position: relative;
    display: grid;
    align-content: end;
    min-height: 190px;
    overflow: hidden;
    padding: 18px;
    color: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.channel-card img,
.channel-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.channel-card img {
    object-fit: cover;
    transition: transform 0.35s ease;
}

.channel-card:hover img {
    transform: scale(1.08);
}

.channel-shade {
    background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.76) 68%, rgba(124, 45, 18, 0.86) 100%);
}

.channel-card strong,
.channel-card em {
    position: relative;
    z-index: 2;
}

.channel-card strong {
    font-size: 22px;
    font-weight: 900;
}

.channel-card em {
    display: block;
    color: var(--autumn-100);
    font-size: 13px;
    font-style: normal;
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--paper);
    border: 1px solid rgba(253, 186, 116, 0.24);
    border-radius: 22px;
    box-shadow: 0 14px 36px rgba(154, 52, 18, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 46px rgba(154, 52, 18, 0.16);
}

.card-media {
    position: relative;
    display: block;
    height: 210px;
    overflow: hidden;
    background: #f3f4f6;
}

.movie-card.featured .card-media {
    height: 320px;
}

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

.movie-card:hover .card-media img {
    transform: scale(1.08);
}

.duration-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    color: #fff;
    border-radius: 999px;
    font-weight: 900;
}

.duration-badge {
    right: 10px;
    bottom: 10px;
    background: rgba(17, 24, 39, 0.78);
    padding: 4px 9px;
    font-size: 12px;
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--leaf-400), var(--autumn-600));
}

.play-hover {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 58px;
    height: 58px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 16px;
}

.card-meta,
.card-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta span {
    color: var(--autumn-700);
    background: var(--autumn-50);
    border-radius: 999px;
    padding: 3px 8px;
    font-weight: 800;
}

.card-body h2 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.card-body h2 a:hover {
    color: var(--autumn-600);
}

.card-body p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0 0 12px;
    overflow: hidden;
    color: #4b5563;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row span,
.detail-tags span {
    color: var(--autumn-700);
    background: var(--autumn-100);
    padding: 4px 9px;
    font-size: 12px;
}

.card-stats {
    justify-content: space-between;
    margin-top: 14px;
    color: var(--muted);
}

.two-column,
.ranking-layout,
.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.ranking-panel,
.side-card,
.content-side,
.content-card,
.player-card,
.detail-info,
.category-overview-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(253, 186, 116, 0.28);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.ranking-panel,
.side-card,
.content-side,
.content-card,
.detail-info,
.category-overview-card {
    padding: 22px;
}

.ranking-panel,
.ranking-sidebar,
.content-side {
    position: sticky;
    top: 110px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 12px;
    align-items: center;
}

.mini-cover {
    position: relative;
    display: block;
    overflow: hidden;
    height: 66px;
    border-radius: 14px;
    background: #f3f4f6;
}

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

.mini-rank {
    position: absolute;
    top: 6px;
    left: 6px;
    display: grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    color: #fff;
    background: var(--autumn-600);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.mini-info {
    display: grid;
    min-width: 0;
}

.mini-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-info em,
.mini-info small {
    overflow: hidden;
    color: var(--muted);
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    color: #fff;
    background:
        radial-gradient(circle at 80% 20%, rgba(250, 204, 21, 0.28), transparent 28%),
        linear-gradient(135deg, #9a3412, #ea580c, #fb923c);
}

.page-hero .wrap {
    padding: 72px 0;
}

.page-hero span {
    color: var(--autumn-800);
}

.page-hero h1 {
    margin: 16px 0 12px;
    color: #fff;
    font-size: clamp(36px, 6vw, 62px);
}

.page-hero p {
    max-width: 760px;
    color: var(--autumn-100);
    font-size: 19px;
}

.back-link {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--autumn-100);
    font-weight: 800;
}

.category-overview-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 52px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    align-items: center;
}

.category-poster-stack {
    display: grid;
    height: 150px;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 18px;
}

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

.filter-bar {
    display: flex;
    gap: 14px;
    margin-top: 34px;
    margin-bottom: 26px;
}

.page-filter {
    flex: 1;
    padding: 14px 18px;
}

.page-sort {
    padding: 14px 18px;
}

.movie-list {
    display: grid;
    gap: 18px;
}

.movie-card.list {
    display: grid;
    grid-template-columns: 280px 1fr;
}

.movie-card.list .card-media {
    height: 100%;
    min-height: 190px;
}

.ranking-sidebar {
    display: grid;
    gap: 22px;
}

.detail-top {
    padding: 24px 0 44px;
    background:
        radial-gradient(circle at 10% 15%, rgba(251, 146, 60, 0.2), transparent 30%),
        linear-gradient(180deg, #fff7ed 0%, #fff 100%);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--autumn-700);
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: stretch;
}

.player-card {
    padding: 14px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111827;
    border-radius: 18px;
}

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #111827;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.58));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    font-size: 38px;
    box-shadow: 0 18px 44px rgba(234, 88, 12, 0.34);
}

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

.detail-info h1 {
    color: var(--autumn-800);
    font-size: clamp(30px, 4vw, 46px);
}

.one-line {
    color: #374151;
    font-size: 18px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 22px 0;
}

.detail-meta div {
    padding: 12px;
    background: var(--autumn-50);
    border-radius: 16px;
}

.detail-meta dt {
    color: var(--muted);
    font-size: 12px;
}

.detail-meta dd {
    margin: 4px 0 0;
    color: var(--autumn-800);
    font-weight: 900;
}

.detail-content-grid {
    margin-top: 34px;
}

.content-card h2,
.content-side h2,
.side-card h2 {
    color: var(--autumn-800);
}

.content-card p {
    color: #374151;
    font-size: 17px;
}

.site-footer {
    margin-top: 70px;
    color: #fff;
    background: #7c2d12;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.8fr;
    gap: 36px;
    padding: 46px 0 30px;
}

.footer-brand,
.site-footer h2 {
    color: #fff;
}

.site-footer p {
    color: var(--autumn-100);
}

.site-footer .footer-links a {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.footer-bottom {
    padding: 18px 0 24px;
    color: var(--autumn-100);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.is-filtered-out {
    display: none !important;
}

@media (max-width: 1080px) {
    .header-search {
        display: none;
    }

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

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

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

    .hero-poster {
        display: none;
    }

    .ranking-panel,
    .ranking-sidebar,
    .content-side {
        position: static;
    }
}

@media (max-width: 760px) {
    .topline-inner,
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .brand-text strong {
        font-size: 19px;
    }

    .hero-carousel,
    .hero-inner {
        min-height: 590px;
    }

    .hero-inner {
        padding: 56px 0 88px;
    }

    .hero-copy h1,
    .hero-copy h2 {
        letter-spacing: -0.03em;
    }

    .search-band {
        margin-top: -24px;
        padding: 18px;
    }

    .big-search,
    .filter-bar {
        flex-direction: column;
    }

    .channel-grid,
    .movie-grid,
    .featured-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .category-overview-card,
    .movie-card.list {
        grid-template-columns: 1fr;
    }

    .movie-card.list .card-media {
        height: 220px;
    }

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

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