:root {
    color-scheme: light;
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: #fff7ed;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --brand: #ea580c;
    --brand-dark: #c2410c;
    --brand-soft: #fed7aa;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

.container {
    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);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    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-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(234, 88, 12, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #374151;
    font-weight: 600;
}

.nav-link {
    position: relative;
    padding: 8px 0;
    transition: color 0.2s ease;
}

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

.nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 99px;
    background: var(--brand);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fff7ed;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: #9a3412;
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: #374151;
    font-weight: 700;
}

.mobile-link:hover,
.mobile-link.is-active {
    background: #fff7ed;
    color: var(--brand);
}

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

.hero-track,
.hero-slide {
    min-height: 650px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.hero-slide.is-current {
    position: relative;
    opacity: 1;
    transform: scale(1);
}

.hero-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 92px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #fed7aa;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--brand);
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.hero-content p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

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

.primary-button {
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(239, 68, 68, 0.28);
}

.primary-button:hover,
.secondary-button:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.primary-button.full {
    width: 100%;
    margin-top: 18px;
}

.secondary-button {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.secondary-button.small {
    min-height: 40px;
    padding: 0 16px;
    border-color: var(--line);
    background: #fff7ed;
    color: var(--brand);
}

.text-link {
    min-height: 38px;
    padding: 0 14px;
    color: var(--brand);
    background: #fff7ed;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    width: min(1180px, calc(100% - 32px));
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
}

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

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 28px;
    backdrop-filter: blur(12px);
}

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

.hero-dot {
    width: 30px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-current {
    width: 48px;
    background: #f97316;
}

.search-panel {
    margin-top: -54px;
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.search-panel.slim,
.search-panel.vertical {
    margin-top: 28px;
}

.search-panel.vertical {
    display: grid;
}

.search-panel h2 {
    margin: 0 0 6px;
    font-size: 26px;
}

.search-panel p {
    margin: 0;
    color: var(--muted);
}

.search-box {
    width: min(440px, 100%);
    display: grid;
    gap: 8px;
    color: #374151;
    font-weight: 800;
}

.search-box.wide {
    width: 100%;
}

.search-box input {
    width: 100%;
    height: 50px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 16px;
    background: #f9fafb;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.section-block {
    padding: 64px 0 0;
}

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

.section-heading.compact {
    align-items: center;
}

.section-heading h2,
.ranking-card h2,
.content-card h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: #fdba74;
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #431407);
}

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

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

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

.movie-card-body {
    padding: 16px;
}

.movie-meta {
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
}

.movie-title {
    margin: 8px 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

.movie-title a:hover,
.ranking-info a:hover,
.content-card a:hover {
    color: var(--brand);
}

.movie-card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

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

.tag-row span,
.detail-tags span,
.filter-chip {
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

.tag-row span,
.detail-tags span {
    padding: 4px 9px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
    background: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
}

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

.channel-card {
    min-height: 172px;
    display: grid;
    align-content: end;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    border: 1px solid #fed7aa;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.channel-card:nth-child(2n) {
    background: linear-gradient(135deg, #fff1f2, #ffffff);
}

.channel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.channel-card span {
    color: #9a3412;
    font-size: 22px;
    font-weight: 900;
}

.channel-card p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

.ranking-card {
    position: sticky;
    top: 96px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.ranking-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 58px 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.rank-row:hover {
    background: #fff7ed;
}

.rank-num {
    color: #f97316;
    font-weight: 900;
}

.rank-cover {
    height: 74px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    background-color: #111827;
}

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

.rank-text strong {
    font-size: 15px;
    line-height: 1.3;
}

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

.page-hero {
    padding: 86px 0 72px;
    background: radial-gradient(circle at 20% 10%, rgba(249, 115, 22, 0.22), transparent 32%), linear-gradient(135deg, #111827, #431407);
    color: #ffffff;
}

.page-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

.channel-hero {
    background-size: cover;
    background-position: center;
}

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 56px 0 0;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 14px 42px rgba(15, 23, 42, 0.06);
}

.category-cover {
    min-height: 180px;
    display: flex;
    align-items: end;
    padding: 18px;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.category-overview-card h2 {
    margin: 4px 0 10px;
}

.category-overview-card p {
    margin: 0 0 16px;
    color: var(--muted);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-links a {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    font-weight: 800;
}

.ranking-page-list {
    display: grid;
    gap: 16px;
    padding: 42px 0 0;
}

.ranking-page-row {
    display: grid;
    grid-template-columns: 72px 96px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.ranking-index {
    color: #f97316;
    font-size: 24px;
    font-weight: 900;
}

.ranking-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
}

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

.ranking-info h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.ranking-info p {
    margin: 0 0 10px;
    color: var(--muted);
}

.detail-hero {
    padding: 64px 0;
    background: linear-gradient(135deg, #fff7ed, #ffffff 46%, #f8fafc);
}

.detail-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    align-items: center;
    gap: 42px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    background: #111827;
    box-shadow: var(--shadow);
}

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

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

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

.detail-info h1 {
    color: var(--text);
}

.lead {
    max-width: 780px;
    margin: 0 0 22px;
    color: #374151;
    font-size: 20px;
}

.detail-actions .secondary-button {
    border-color: #fed7aa;
    background: #ffffff;
    color: var(--brand);
}

.player-section {
    padding-top: 48px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.movie-player {
    width: 100%;
    min-height: 62vw;
    max-height: 720px;
    display: block;
    background: #020617;
    object-fit: contain;
}

@media (min-width: 900px) {
    .movie-player {
        min-height: 664px;
    }
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.22), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
    width: 150px;
    height: 150px;
    border: 0;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.92);
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 28px 70px rgba(249, 115, 22, 0.38);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding-top: 32px;
}

.content-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.content-card:first-child {
    grid-column: 1 / -1;
}

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

.info-table dl {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
}

.info-table dl div {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-table dt {
    color: var(--muted);
    font-weight: 800;
}

.info-table dd {
    margin: 0;
}

.site-footer {
    margin-top: 72px;
    padding: 42px 0;
    background: #111827;
    color: rgba(255, 255, 255, 0.78);
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.footer-brand {
    color: #ffffff;
}

.site-footer p {
    max-width: 620px;
    margin: 14px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

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

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

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

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

    .ranking-card {
        position: static;
    }

    .category-overview-grid {
        grid-template-columns: 1fr;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content {
        padding-top: 96px;
    }

    .search-panel {
        display: grid;
        margin-top: -34px;
        padding: 22px;
    }

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

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

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

    .detail-poster {
        max-width: 340px;
    }

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

    .ranking-page-row {
        grid-template-columns: 54px 76px 1fr;
    }

    .ranking-page-row .secondary-button {
        grid-column: 2 / -1;
        justify-self: start;
    }

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

    .footer-grid {
        display: grid;
    }
}

@media (max-width: 540px) {
    .container,
    .site-header-inner,
    .mobile-menu,
    .hero-content,
    .hero-controls {
        width: min(100% - 22px, 1180px);
    }

    .brand {
        font-size: 19px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 38px;
    }

    .hero-actions,
    .detail-actions {
        display: grid;
    }

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

    .section-heading {
        display: grid;
    }

    .play-button {
        width: 118px;
        height: 118px;
        font-size: 18px;
    }

    .ranking-page-row {
        grid-template-columns: 44px 1fr;
    }

    .ranking-poster {
        display: none;
    }

    .ranking-info {
        grid-column: 2 / -1;
    }
}
