:root {
    --accent: #f97316;
    --accent-2: #ef4444;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #fff7ed;
    --bg: #f8fafc;
    --dark: #111827;
    --radius: 18px;
    --shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #fffaf5 0%, #ffffff 22%, #f8fafc 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

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: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 22px rgba(249, 115, 22, 0.32);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 650;
    transition: 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    width: min(310px, 30vw);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.header-search input,
.mobile-search input,
.search-entrance input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 0;
    outline: 0;
    background: #fff;
    color: var(--text);
}

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

.header-search button,
.mobile-search button,
.search-entrance button,
.filter-panel button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    cursor: pointer;
    font-weight: 700;
}

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

.menu-button {
    display: none;
    border: 0;
    background: var(--soft);
    color: var(--accent);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: #fff;
}

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

.mobile-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0 18px;
    display: grid;
    gap: 8px;
}

.mobile-link {
    display: block;
}

.mobile-search {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.mobile-search input {
    padding: 12px;
}

.mobile-search button {
    padding: 0 16px;
}

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: blur(8px) saturate(1.08);
    transform: scale(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.72) 45%, rgba(17, 24, 39, 0.25) 100%), linear-gradient(180deg, rgba(17, 24, 39, 0.2), rgba(17, 24, 39, 0.9));
}

.hero-content {
    position: relative;
    z-index: 1;
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 390px;
    align-items: center;
    gap: 56px;
    color: #fff;
}

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

.hero-kicker,
.section-kicker,
.sub-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--accent);
    background: rgba(255, 247, 237, 0.95);
    border: 1px solid rgba(249, 115, 22, 0.18);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 24px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 0;
    max-width: 720px;
    font-size: 19px;
    color: rgba(255, 255, 255, 0.84);
}

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

.hero-tags {
    margin: 26px 0 30px;
}

.hero-tags span,
.tag-row span {
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 30px rgba(239, 68, 68, 0.28);
}

.secondary-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    aspect-ratio: 3 / 4;
    background: rgba(255, 255, 255, 0.1);
}

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

.hero-poster span,
.cover-play,
.player-cover span {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 20px 36px rgba(249, 115, 22, 0.35);
}

.hero-poster span {
    left: 50%;
    top: 50%;
    width: 82px;
    height: 82px;
    transform: translate(-50%, -50%);
    font-size: 28px;
}

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

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

.hero-dots button.active {
    width: 34px;
    background: #fff;
}

.section {
    padding: 56px 0;
}

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

.section-head.compact {
    margin-bottom: 18px;
}

.section-head h2 {
    margin: 10px 0 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head a {
    color: var(--accent);
    font-weight: 800;
}

.search-entrance {
    margin-top: -42px;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: 28px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.search-entrance h2,
.search-entrance p {
    margin: 0;
}

.search-entrance p {
    color: var(--muted);
    margin-top: 8px;
}

.search-entrance form {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.search-entrance input {
    padding: 16px;
}

.search-entrance button {
    padding: 0 22px;
}

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

.category-tile {
    min-height: 150px;
    padding: 24px;
    border: 1px solid rgba(249, 115, 22, 0.12);
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff, #fff7ed);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-tile span {
    display: block;
    font-size: 22px;
    font-weight: 850;
    margin-bottom: 8px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
}

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

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

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

.movie-card,
.compact-card,
.rank-row,
.detail-side,
.content-section,
.filter-panel,
.category-overview-block {
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.88);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.movie-card {
    border-radius: 22px;
    overflow: hidden;
    transition: 0.22s ease;
}

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

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

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

.movie-cover img,
.compact-cover img,
.rank-thumb img,
.detail-side img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-cover img,
.compact-cover img,
.rank-thumb img {
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover img,
.compact-card:hover .compact-cover img,
.rank-row:hover .rank-thumb img {
    transform: scale(1.06);
}

.cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.68));
}

.cover-type {
    position: absolute;
    right: 12px;
    top: 12px;
    color: #fff;
    background: rgba(17, 24, 39, 0.74);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.cover-play {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: 0.24s ease;
}

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

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

.movie-title,
.compact-title,
.rank-copy a {
    display: block;
    color: var(--text);
    font-weight: 850;
    line-height: 1.35;
}

.movie-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.movie-title:hover,
.compact-title:hover,
.rank-copy a:hover {
    color: var(--accent);
}

.movie-card-body p,
.compact-card p,
.rank-copy p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0;
    color: #6b7280;
    font-size: 13px;
}

.tag-row span {
    color: #ea580c;
    background: #ffedd5;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 52px 94px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border-radius: 18px;
    padding: 12px;
}

.rank-num {
    color: var(--accent);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-thumb {
    display: block;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
}

.rank-copy a {
    margin-bottom: 4px;
}

.rank-copy span,
.compact-card span {
    display: block;
    margin-top: 6px;
    color: #9ca3af;
    font-size: 12px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    border-radius: 18px;
    overflow: hidden;
    padding: 10px;
}

.compact-cover {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
}

.sub-hero {
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.46), transparent 32%), linear-gradient(135deg, #111827 0%, #1f2937 45%, #7c2d12 100%);
    padding: 86px 0;
}

.sub-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

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

.stacked-sections {
    display: grid;
    gap: 28px;
}

.category-overview-block {
    border-radius: 26px;
    padding: 26px;
}

.filter-panel {
    position: sticky;
    top: 88px;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 190px auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 24px;
    border-radius: 22px;
    padding: 18px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
}

.filter-panel button {
    min-height: 47px;
    padding: 0 18px;
    border-radius: 14px;
}

.searchable-card.is-hidden {
    display: none;
}

.detail-page {
    padding: 34px 0 64px;
}

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

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

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

.detail-main {
    min-width: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.58));
}

.player-cover span {
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 88px;
    height: 88px;
    font-size: 30px;
    transform: translate(-50%, -50%);
}

.player-cover[hidden] {
    display: none;
}

.detail-copy {
    padding: 26px 4px 0;
}

.detail-tags {
    margin-bottom: 16px;
}

.detail-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.detail-one-line {
    color: var(--muted);
    font-size: 18px;
    margin: 0 0 22px;
}

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

.detail-meta-grid span {
    display: grid;
    gap: 4px;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
}

.detail-meta-grid b {
    color: var(--text);
}

.detail-meta-grid a {
    color: var(--accent);
}

.detail-side {
    border-radius: 24px;
    overflow: hidden;
}

.detail-side img {
    aspect-ratio: 3 / 4;
    background: #111827;
}

.detail-side div {
    padding: 20px;
}

.detail-side h2 {
    margin: 0 0 10px;
}

.detail-side p {
    color: var(--muted);
    margin: 8px 0 0;
}

.content-section {
    border-radius: 26px;
    padding: 30px;
    margin-top: 32px;
}

.content-section h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

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

.content-section p:last-child {
    margin-bottom: 0;
}

.related-section {
    padding-bottom: 0;
}

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

.site-footer {
    color: #d1d5db;
    background: #111827;
    margin-top: 40px;
}

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

.footer-brand {
    color: #fff;
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 560px;
    color: #9ca3af;
    margin: 0;
}

.site-footer h2 {
    color: #fff;
    font-size: 17px;
    margin: 0 0 14px;
}

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

.site-footer a:hover {
    color: #fb923c;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
    padding: 18px;
    font-size: 14px;
}

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

    .menu-button {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 70px 0 90px;
        gap: 34px;
    }

    .hero-poster {
        width: min(360px, 82vw);
    }

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

    .split-section,
    .detail-layout,
    .footer-grid,
    .search-entrance {
        grid-template-columns: 1fr;
    }

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

    .filter-panel {
        position: static;
        grid-template-columns: 1fr;
    }
}

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

    .header-inner {
        min-height: 64px;
    }

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

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

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

    .hero-copy p,
    .sub-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .search-entrance {
        margin-top: -28px;
        padding: 22px;
        border-radius: 22px;
    }

    .search-entrance form {
        display: grid;
    }

    .search-entrance button {
        padding: 13px;
    }

    .category-grid,
    .movie-grid,
    .mini-grid,
    .featured-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 42px 82px minmax(0, 1fr);
        gap: 10px;
    }

    .compact-card {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .section {
        padding: 42px 0;
    }

    .section-head {
        display: grid;
    }

    .detail-page {
        padding-top: 22px;
    }

    .detail-copy {
        padding-top: 20px;
    }

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

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

    .player-cover span {
        width: 68px;
        height: 68px;
    }

    .content-section {
        padding: 22px;
    }
}
