:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --surface: #ffffff;
    --surface-strong: #fff7ed;
    --text: #111827;
    --muted: #6b7280;
    --line: #fed7aa;
    --orange: #f97316;
    --orange-deep: #c2410c;
    --amber: #d97706;
    --shadow: 0 24px 70px rgba(194, 65, 12, 0.16);
    --shadow-soft: 0 18px 45px rgba(17, 24, 39, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 36%, #fffbeb 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(254, 215, 170, 0.72);
    background: rgba(255, 251, 235, 0.9);
    backdrop-filter: blur(18px);
}

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

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

.brand-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.34);
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong,
.footer-brand {
    font-size: 24px;
    line-height: 1.05;
    color: transparent;
    background: linear-gradient(90deg, var(--orange-deep), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
}

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

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

.nav-link,
.mobile-link {
    padding: 10px 16px;
    border-radius: 12px;
    color: #374151;
    font-weight: 700;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.24);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #ffedd5;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #9a3412;
}

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

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

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

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.58), rgba(249, 115, 22, 0.2)), linear-gradient(0deg, rgba(17, 24, 39, 0.92), transparent 44%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 145px;
    color: #ffffff;
}

.hero-kicker,
.page-hero p,
.detail-kicker,
.rank-panel p,
.section-heading p {
    margin: 0 0 12px;
    color: #fed7aa;
    font-size: 13px;
    letter-spacing: 0.18em;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-text {
    max-width: 680px;
    margin: 22px 0 0;
    color: #ffedd5;
    font-size: 18px;
    line-height: 1.82;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-tags span,
.detail-tags span {
    padding: 8px 12px;
    border: 1px solid rgba(254, 215, 170, 0.45);
    border-radius: 999px;
    color: #ffedd5;
    background: rgba(255, 237, 213, 0.12);
}

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

.primary-button,
.ghost-button,
.hero-search button,
.filter-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button,
.hero-search button,
.filter-bar a {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.32);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 237, 213, 0.48);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.primary-button:hover,
.ghost-button:hover,
.hero-search button:hover,
.filter-bar a:hover {
    transform: translateY(-2px);
}

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

.hero-controls button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    font-size: 24px;
}

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

.hero-dot {
    width: 32px !important;
    height: 8px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.28) !important;
}

.hero-dot.active {
    background: #fb923c !important;
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 36px;
    z-index: 6;
    width: min(980px, calc(100% - 32px));
    transform: translateX(-50%);
}

.hero-search form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 237, 213, 0.36);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-search input,
.filter-bar input {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 16px;
    outline: none;
    color: var(--text);
    background: #ffffff;
}

.hero-search input {
    min-height: 52px;
    padding: 0 18px;
}

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

.content-section {
    padding: 72px 0 0;
}

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

.section-heading h2,
.rank-panel h2,
.page-hero h1,
.detail-main h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading span,
.page-hero span {
    display: block;
    margin-top: 10px;
    max-width: 720px;
    color: var(--muted);
    line-height: 1.8;
}

.section-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--orange-deep);
    font-weight: 800;
}

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

.category-card,
.category-overview-card {
    position: relative;
    min-height: 188px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.category-card img,
.category-overview-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
}

.category-card::after,
.category-overview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.78), rgba(194, 65, 12, 0.22));
}

.category-card span,
.category-card em {
    position: relative;
    z-index: 1;
    display: block;
    padding: 0 18px;
}

.category-card span {
    margin-top: 84px;
    font-size: 24px;
    font-weight: 900;
}

.category-card em {
    margin-top: 10px;
    color: #ffedd5;
    font-style: normal;
    line-height: 1.6;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(254, 215, 170, 0.7);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: radial-gradient(circle at top left, #fed7aa, #f97316 48%, #111827 100%);
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.movie-card:hover .movie-poster img,
.ranking-card:hover img {
    transform: scale(1.07);
    filter: saturate(1.12);
}

.movie-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.94);
    font-size: 12px;
    font-weight: 800;
}

.movie-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.62);
    transform: translate(-50%, -50%) scale(0.84);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-title {
    display: block;
    min-height: 44px;
    color: var(--text);
    font-weight: 900;
    line-height: 1.35;
}

.movie-title:hover,
.ranking-info a:hover,
.side-related a:hover {
    color: var(--orange-deep);
}

.movie-meta,
.movie-line {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    padding-top: 72px;
    align-items: start;
}

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

.rank-panel {
    position: sticky;
    top: 98px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: #111827;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.rank-panel h2 {
    color: #ffffff;
    font-size: 30px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
}

.rank-row strong {
    color: #fb923c;
    font-size: 20px;
}

.rank-row span {
    font-weight: 800;
}

.rank-row em {
    grid-column: 2;
    color: #d1d5db;
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    min-height: 360px;
    display: grid;
    place-items: center;
    padding: 76px 16px;
    text-align: center;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(251, 146, 60, 0.5), transparent 36%), linear-gradient(135deg, #111827, #7c2d12 68%, #f97316);
}

.page-hero h1,
.page-hero span {
    color: #ffffff;
}

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

.category-overview-card {
    min-height: 230px;
    display: grid;
    align-items: end;
}

.category-overview-card div {
    position: relative;
    z-index: 1;
    padding: 28px;
}

.category-overview-card strong,
.category-overview-card span,
.category-overview-card em {
    display: block;
}

.category-overview-card strong {
    font-size: 30px;
    font-weight: 900;
}

.category-overview-card span {
    max-width: 520px;
    margin-top: 8px;
    color: #ffedd5;
    line-height: 1.7;
}

.category-overview-card em {
    margin-top: 16px;
    color: #ffffff;
    font-style: normal;
    font-weight: 800;
}

.filter-bar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(17, 24, 39, 0.06);
}

.filter-bar label {
    flex: 1;
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

.filter-bar input {
    min-height: 48px;
    padding: 0 14px;
    border-color: var(--line);
}

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

.ranking-section {
    padding-bottom: 40px;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ranking-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    background: linear-gradient(135deg, #fed7aa, #f97316);
}

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

.ranking-cover strong {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: #111827;
}

.ranking-info {
    align-self: center;
}

.ranking-info a {
    font-size: 24px;
    font-weight: 900;
}

.ranking-info p,
.ranking-info span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.75;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: #111827;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.38;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.1);
    transform: scale(1.08);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #111827, rgba(17, 24, 39, 0.52));
}

.detail-wrap {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 52px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    color: #ffedd5;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #fb923c;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000000;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.28), rgba(0, 0, 0, 0.58));
    cursor: pointer;
}

.player-overlay.is-hidden {
    display: none;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 18px 48px rgba(249, 115, 22, 0.4);
    font-size: 32px;
}

.player-overlay strong {
    font-size: 20px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    padding-top: 48px;
    align-items: start;
}

.detail-main,
.detail-side {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.07);
}

.detail-main {
    padding: 34px;
}

.detail-main h1 {
    margin-top: 0;
}

.detail-one-line {
    margin: 16px 0 0;
    color: #7c2d12;
    font-size: 20px;
    line-height: 1.8;
    font-weight: 800;
}

.detail-tags span {
    color: #9a3412;
    border-color: var(--line);
    background: #fff7ed;
}

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

.detail-meta-grid div {
    padding: 16px;
    border-radius: 16px;
    background: #fff7ed;
}

.detail-meta-grid span,
.detail-meta-grid strong {
    display: block;
}

.detail-meta-grid span {
    color: var(--muted);
    font-size: 13px;
}

.detail-meta-grid strong {
    margin-top: 6px;
    color: var(--orange-deep);
}

.detail-main h2,
.detail-side h2 {
    margin: 28px 0 14px;
    font-size: 24px;
    font-weight: 900;
}

.detail-main p {
    color: #374151;
    line-height: 2;
}

.detail-side {
    position: sticky;
    top: 98px;
    padding: 24px;
}

.side-related {
    display: grid;
    gap: 10px;
}

.side-related a {
    display: grid;
    gap: 5px;
    padding: 12px;
    border-radius: 14px;
    background: #fff7ed;
}

.side-related span {
    font-weight: 900;
}

.side-related em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.related-section {
    padding-bottom: 72px;
}

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

.site-footer {
    margin-top: 76px;
    padding: 56px 0 24px;
    color: #d1d5db;
    background: #111827;
}

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

.footer-grid p {
    max-width: 520px;
    color: #d1d5db;
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #fb923c;
    font-size: 18px;
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9ca3af;
    text-align: center;
}

.is-hidden-card {
    display: none !important;
}

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

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }
}

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

    .menu-button {
        display: inline-flex;
    }

    .hero {
        min-height: 650px;
    }

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

    .hero-search form,
    .filter-bar,
    .footer-grid,
    .category-overview-grid,
    .ranking-card,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        display: grid;
    }

    .movie-grid,
    .small-grid,
    .category-movie-grid,
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .section-heading {
        display: grid;
        align-items: start;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .content-section,
    .split-section,
    .detail-content,
    .detail-wrap,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

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

    .brand-icon {
        width: 38px;
        height: 38px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-text {
        font-size: 15px;
    }

    .hero-controls {
        bottom: 126px;
    }

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

    .movie-grid,
    .small-grid,
    .category-movie-grid,
    .related-grid,
    .category-grid {
        gap: 12px;
    }

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

    .movie-title {
        min-height: 40px;
        font-size: 14px;
    }

    .detail-main {
        padding: 22px;
    }

    .player-overlay span {
        width: 66px;
        height: 66px;
    }
}
