:root {
    --bg: #fafaf9;
    --panel: #ffffff;
    --text: #292524;
    --muted: #78716c;
    --line: #e7e5e4;
    --dark: #1c1917;
    --dark-2: #292524;
    --amber: #d97706;
    --amber-2: #f59e0b;
    --amber-soft: #fff7ed;
    --shadow: 0 18px 45px rgba(41, 37, 36, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    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%;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(231, 229, 228, 0.86);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    height: 72px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 14px;
    background: linear-gradient(135deg, #d97706, #7c2d12);
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.25);
}

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

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

.nav-link,
.mobile-nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: #92400e;
    background: #fffbeb;
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.header-search input {
    width: 230px;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    background: transparent;
}

.header-search button,
.search-panel button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), #92400e);
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 13px;
    background: #fffbeb;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #92400e;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 22px 18px;
    border-top: 1px solid var(--line);
}

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

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.22), transparent 30%), linear-gradient(135deg, #1c1917, #451a03 46%, #1c1917);
}

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

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

.hero-bg {
    position: absolute;
    inset: -42px;
    background-size: cover;
    background-position: center;
    filter: blur(22px) brightness(0.42);
    transform: scale(1.12);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.48) 52%, rgba(0, 0, 0, 0.22) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    height: 100%;
    margin: 0 auto;
    padding: 66px 22px 78px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.75fr);
    align-items: center;
    gap: 46px;
}

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

.hero-labels,
.detail-tags,
.tag-row,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-labels span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.16);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.28);
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 800;
}

.hero-copy h1 {
    margin: 18px 0 8px;
    font-size: clamp(34px, 5vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(24px, 3vw, 40px);
    color: #fde68a;
}

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

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 28px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 14px;
    padding: 12px 20px;
    font-weight: 900;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--amber-2), #b45309);
    box-shadow: 0 18px 36px rgba(217, 119, 6, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-3px);
}

.ghost-button {
    color: #fff7ed;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.primary-button.full {
    width: 100%;
}

.compact-actions {
    margin-top: 18px;
}

.hero-poster {
    justify-self: end;
    width: min(360px, 88vw);
    border-radius: 32px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transform: rotate(2deg);
}

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

.hero-poster span {
    display: block;
    color: #fff;
    padding: 16px 18px;
    font-size: 18px;
    font-weight: 900;
}

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

.hero-controls button {
    border: 0;
    cursor: pointer;
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

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

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

.hero-dot.is-active {
    width: 28px;
    background: #f59e0b;
}

.page-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 52px 22px;
}

.page-shell.with-top {
    padding-top: 34px;
}

.search-band {
    position: relative;
    z-index: 10;
    max-width: 980px;
    margin: -36px auto 0;
    padding: 0 22px;
}

.search-band.inner {
    margin: 26px auto 0;
    padding: 0;
}

.search-panel {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.search-panel label {
    font-weight: 900;
    color: #92400e;
}

.search-panel div {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.search-panel input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 13px 15px;
}

.content-section,
.category-panel,
.category-overview,
.detail-article,
.ranking-card {
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid rgba(231, 229, 228, 0.86);
    box-shadow: 0 14px 34px rgba(41, 37, 36, 0.06);
}

.content-section,
.category-panel {
    padding: 28px;
    margin-bottom: 34px;
}

.category-panel {
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.section-heading,
.section-row-head,
.ranking-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-heading {
    justify-content: flex-start;
}

.section-kicker {
    width: 7px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--amber), #92400e);
}

.section-heading h2,
.section-row-head h2,
.ranking-head h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.section-heading p,
.section-row-head p {
    margin: 4px 0 0;
    color: var(--muted);
}

.section-row-head a,
.ranking-head a {
    color: #b45309;
    font-weight: 900;
}

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

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(41, 37, 36, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: 0 20px 44px rgba(41, 37, 36, 0.15);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #1c1917;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.62);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    min-height: 204px;
}

.movie-card.is-compact .movie-card-body {
    min-height: 178px;
}

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

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #d6d3d1;
}

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

.movie-card h3 a:hover {
    color: #b45309;
}

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

.tag-row {
    margin-top: auto;
}

.tag-row span {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

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

.category-tile,
.category-card-large {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(245, 158, 11, 0.18);
    padding: 20px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-card-large:hover {
    box-shadow: 0 18px 38px rgba(217, 119, 6, 0.14);
}

.category-tile span,
.category-card-large span {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 900;
    color: #92400e;
}

.category-tile p,
.category-card-large p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.category-overview {
    padding: 26px;
    margin: 28px 0 34px;
}

.category-card-large {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
}

.category-card-large strong {
    color: #d97706;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
    margin-bottom: 34px;
}

.ranking-card {
    padding: 24px;
}

.ranking-card.wide {
    position: sticky;
    top: 96px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 34px 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 9px;
    border-radius: 16px;
    background: #fafaf9;
    border: 1px solid transparent;
    transition: background 0.2s ease, border 0.2s ease;
}

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

.rank-number {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, #d97706, #92400e);
    font-weight: 900;
}

.rank-row img {
    width: 48px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.rank-score {
    color: #b45309;
    font-weight: 900;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    padding: 54px;
    color: #fff;
    background: radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.45), transparent 32%), linear-gradient(135deg, #1c1917, #78350f);
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto -20% -40% 40%;
    height: 260px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.18);
    filter: blur(30px);
}

.page-hero > div {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.page-hero span {
    color: #fde68a;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 10px 0 14px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

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

.detail-top {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #1c1917;
}

.detail-top::before {
    content: "";
    position: absolute;
    inset: -50px;
    background-image: var(--detail-bg);
    background-size: cover;
    background-position: center;
    filter: blur(26px) brightness(0.33);
    transform: scale(1.08);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.64), rgba(28, 25, 23, 0.98));
}

.detail-layout {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 44px 22px 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    align-items: start;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 16px;
}

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

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

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

.detail-lead {
    max-width: 820px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

.player-shell video,
.player-cover,
.player-cover img,
.player-gradient {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-shell video {
    object-fit: contain;
}

.player-cover {
    padding: 0;
    border: 0;
    cursor: pointer;
    background: transparent;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    object-fit: cover;
    filter: brightness(0.62);
}

.player-gradient {
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 36%), linear-gradient(0deg, rgba(0, 0, 0, 0.64), transparent);
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    color: #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 18px 44px rgba(245, 158, 11, 0.35);
    font-size: 30px;
    line-height: 1;
}

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

.detail-side {
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
}

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

.side-info {
    padding: 20px;
}

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

.side-info p {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.76);
}

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

.detail-article {
    padding: 32px;
}

.detail-article h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

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

.detail-article p {
    margin: 0;
    color: #57534e;
    font-size: 17px;
}

.related-shell {
    padding-top: 0;
}

.side-ranking {
    position: sticky;
    top: 96px;
}

.ranking-page-layout {
    grid-template-columns: 380px minmax(0, 1fr);
}

.ranking-movies {
    margin-bottom: 0;
}

.site-footer {
    background: #1c1917;
    color: rgba(255, 255, 255, 0.78);
    margin-top: 40px;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner strong {
    display: block;
    color: #fff;
    font-size: 20px;
    margin-bottom: 4px;
}

.footer-inner p {
    margin: 0;
}

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1100px) {
    .movie-grid,
    .movie-grid.four-col,
    .category-grid,
    .category-overview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .ranking-card.wide,
    .side-ranking {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .hero-poster,
    .detail-side {
        display: none;
    }

    .hero-carousel {
        min-height: 620px;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .movie-grid.two-col,
    .movie-grid.four-col,
    .category-grid,
    .category-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-hero {
        padding: 38px 28px;
    }
}

@media (max-width: 560px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

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

    .hero-content {
        padding: 54px 18px 86px;
    }

    .hero-copy p,
    .page-hero p,
    .detail-lead {
        font-size: 16px;
    }

    .page-shell {
        padding: 34px 16px;
    }

    .content-section,
    .category-panel,
    .category-overview,
    .detail-article,
    .ranking-card {
        padding: 20px;
        border-radius: 20px;
    }

    .movie-grid,
    .movie-grid.two-col,
    .movie-grid.four-col,
    .category-grid,
    .category-overview {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .section-row-head,
    .ranking-head,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-band {
        padding: 0 16px;
    }

    .play-circle {
        width: 68px;
        height: 68px;
        font-size: 24px;
    }
}
