:root {
    --site-orange: #f97316;
    --site-amber: #f59e0b;
    --site-dark: #111827;
    --site-soft: #fff7ed;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #fff7ed 0%, #f8fafc 28%, #f3f4f6 100%);
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
}

.site-header {
    backdrop-filter: blur(16px);
}

.logo-mark {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    color: var(--site-orange);
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(124, 45, 18, 0.22);
}

.logo-mark-small {
    width: 1.65rem;
    height: 1.65rem;
}

.mobile-menu-button {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
    justify-content: center;
}

.mobile-menu-button span {
    width: 1.45rem;
    height: 0.125rem;
    border-radius: 999px;
    background: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg {
    opacity: 0.72;
}

.hero-mask,
.detail-bg-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.95) 0%, rgba(124, 45, 18, 0.72) 48%, rgba(245, 158, 11, 0.36) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.58fr);
    align-items: center;
    gap: 3rem;
    padding-top: 4rem;
    padding-bottom: 8rem;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffedd5;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-title-area h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.6rem, 8vw, 5.8rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.hero-copy p,
.page-hero p,
.detail-title-area p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.18rem;
    line-height: 1.8;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1.3rem 0 2rem;
}

.hero-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.42rem 0.9rem;
    background: rgba(255, 255, 255, 0.16);
    color: #fff7ed;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-button-primary,
.hero-button-secondary,
.page-actions a,
.side-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    border-radius: 999px;
    padding: 0 1.35rem;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-button-primary,
.side-button {
    background: #fff;
    color: var(--site-orange);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
}

.hero-button-secondary,
.page-actions a {
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.hero-button-primary:hover,
.hero-button-secondary:hover,
.page-actions a:hover,
.side-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 2rem;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.4);
    transform: rotate(2deg);
}

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

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    z-index: 5;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}

.hero-dot {
    min-width: 0;
    display: grid;
    grid-template-columns: 3.6rem 1fr;
    align-items: center;
    gap: 0.75rem;
    border: 0;
    border-radius: 1rem;
    padding: 0.55rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(14px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.hero-dot.active {
    background: rgba(255, 255, 255, 0.92);
    color: #9a3412;
}

.hero-dot img {
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 0.75rem;
    object-fit: cover;
}

.hero-dot span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    text-align: left;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 900;
    color: #1f2937;
}

.section-subtitle {
    margin: 0.45rem 0 0;
    color: #6b7280;
}

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

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

.movie-card,
.content-card,
.side-card,
.rank-panel,
.category-overview-card,
.ranking-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.09);
    overflow: hidden;
}

.movie-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-0.45rem);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
}

.movie-cover-link,
.movie-cover-wrap {
    display: block;
}

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

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

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

.movie-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.78) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.movie-meta-line {
    color: #fff;
    font-weight: 800;
}

.movie-card-body {
    padding: 1rem;
}

.movie-title {
    min-width: 0;
    color: #1f2937;
    font-size: 1.05rem;
    line-height: 1.3;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-title:hover,
.ranking-body a:hover,
.category-overview-body a:hover {
    color: var(--site-orange);
}

.movie-year {
    flex-shrink: 0;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    color: #fff;
    background: linear-gradient(90deg, var(--site-orange), var(--site-amber));
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-desc {
    height: 3.35rem;
    margin: 0 0 0.85rem;
    color: #4b5563;
    line-height: 1.65;
    overflow: hidden;
}

.movie-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: #6b7280;
    font-size: 0.84rem;
}

.movie-info-row span {
    max-width: 100%;
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    background: #f3f4f6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-tags,
.hero-tags {
    display: flex;
    flex-wrap: wrap;
}

.card-tags {
    gap: 0.4rem;
    margin-top: 0.85rem;
}

.card-tag {
    border-radius: 999px;
    padding: 0.18rem 0.5rem;
    color: #9a3412;
    background: #ffedd5;
    font-size: 0.78rem;
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    display: block;
    min-height: 210px;
    border-radius: 1.25rem;
    overflow: hidden;
    background: #111827;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

.category-tile img,
.category-overview-cover img,
.ranking-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-tile:hover img,
.category-overview-cover:hover img,
.ranking-cover:hover img {
    transform: scale(1.08);
}

.category-tile-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.86));
}

.category-tile-body {
    position: absolute;
    left: 1.1rem;
    right: 1.1rem;
    bottom: 1.1rem;
    color: #fff;
}

.category-tile-body strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 900;
}

.category-tile-body small {
    display: block;
    margin-top: 0.45rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
}

.home-rank-layout,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.5rem;
    align-items: start;
}

.rank-panel {
    padding: 1.25rem;
    position: sticky;
    top: 5.25rem;
}

.rank-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.rank-panel-head h2,
.side-card h2,
.content-card h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.35rem;
    font-weight: 900;
}

.rank-panel-head a {
    color: var(--site-orange);
    font-weight: 800;
}

.rank-list,
.mini-list,
.side-mini-list {
    display: grid;
    gap: 0.85rem;
}

.rank-row,
.rank-mini {
    display: grid;
    align-items: center;
    gap: 0.75rem;
    color: #1f2937;
}

.rank-row {
    grid-template-columns: 2rem 4.5rem 1fr;
}

.rank-row img {
    width: 4.5rem;
    height: 3rem;
    border-radius: 0.6rem;
    object-fit: cover;
}

.rank-index {
    color: var(--site-orange);
    font-weight: 900;
}

.rank-row-body strong,
.rank-mini-body strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-row-body small,
.rank-mini-body small {
    color: #6b7280;
}

.page-shell {
    min-height: 60vh;
}

.page-hero {
    position: relative;
    padding: 5.5rem 0 4.25rem;
    color: #fff;
    background: linear-gradient(120deg, #9a3412 0%, #f97316 54%, #f59e0b 100%);
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -45% auto;
    width: 34rem;
    height: 34rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.small-hero h1,
.category-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.5rem);
}

.page-actions a {
    margin-top: 1rem;
}

.category-overview-grid {
    display: grid;
    gap: 1.25rem;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
    padding: 1rem;
}

.category-overview-cover {
    display: block;
    min-height: 190px;
    border-radius: 1rem;
    overflow: hidden;
    background: #111827;
}

.category-overview-body h2 {
    margin: 0 0 0.5rem;
    font-size: 1.6rem;
    font-weight: 900;
}

.category-overview-body p {
    color: #6b7280;
    line-height: 1.75;
}

.rank-mini {
    grid-template-columns: 5rem 1fr;
}

.rank-mini img {
    width: 5rem;
    height: 3.1rem;
    border-radius: 0.65rem;
    object-fit: cover;
}

.filter-bar {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.1);
}

.filter-bar input {
    width: 100%;
    min-height: 3rem;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    padding: 0 1.2rem;
    outline: none;
    background: #fff;
    color: #1f2937;
}

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

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-buttons button {
    border: 0;
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    color: #9a3412;
    background: #ffedd5;
    font-weight: 800;
    cursor: pointer;
}

.filter-buttons button.active,
.filter-buttons button:hover {
    color: #fff;
    background: linear-gradient(90deg, var(--site-orange), var(--site-amber));
}

.ranking-list-page {
    display: grid;
    gap: 1rem;
}

.ranking-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 1.25rem;
    padding: 1rem;
}

.ranking-cover {
    position: relative;
    display: block;
    height: 128px;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #111827;
}

.ranking-cover span {
    position: absolute;
    z-index: 2;
    left: 0.65rem;
    top: 0.65rem;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    background: #fff;
    color: var(--site-orange);
    font-weight: 900;
}

.ranking-body h2 {
    margin: 0 0 0.55rem;
    font-size: 1.35rem;
    font-weight: 900;
}

.ranking-body p {
    color: #4b5563;
    line-height: 1.7;
}

.detail-shell {
    background: linear-gradient(180deg, #111827 0, #f3f4f6 35rem);
}

.detail-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    color: #fff;
}

.detail-bg {
    opacity: 0.45;
}

.detail-bg-mask {
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.98) 0%, rgba(17, 24, 39, 0.83) 48%, rgba(249, 115, 22, 0.44) 100%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 2.5rem;
    color: #ffedd5;
}

.breadcrumb a {
    color: #fff;
    font-weight: 700;
}

.detail-title-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: end;
    gap: 2rem;
}

.detail-title-area h1 {
    max-width: 880px;
}

.detail-poster {
    width: 240px;
    aspect-ratio: 3 / 4;
    border-radius: 1.4rem;
    object-fit: cover;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.detail-main,
.detail-side {
    display: grid;
    gap: 1.25rem;
}

.player-card {
    overflow: hidden;
    border-radius: 1.15rem;
    background: #000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-shell video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 5rem;
    height: 5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--site-orange), var(--site-amber));
    box-shadow: 0 20px 55px rgba(249, 115, 22, 0.45);
    transition: transform 0.2s ease;
}

.play-overlay span::before {
    content: "";
    margin-left: 0.38rem;
    width: 0;
    height: 0;
    border-top: 1rem solid transparent;
    border-bottom: 1rem solid transparent;
    border-left: 1.45rem solid #fff;
}

.play-overlay:hover span {
    transform: scale(1.08);
}

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

.content-card,
.side-card {
    padding: 1.4rem;
}

.content-card p,
.side-card p {
    color: #4b5563;
    line-height: 1.9;
    margin: 0.85rem 0 1.2rem;
}

.detail-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 1.25rem 0;
}

.detail-facts div {
    border-radius: 0.9rem;
    padding: 0.85rem;
    background: #fff7ed;
}

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

.detail-facts span {
    color: #9a3412;
    font-size: 0.82rem;
    font-weight: 800;
}

.detail-facts strong {
    margin-top: 0.25rem;
    color: #1f2937;
}

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

.side-card {
    position: sticky;
    top: 5.25rem;
}

.side-card + .side-card {
    position: static;
}

.search-large input {
    min-height: 3.5rem;
    font-size: 1.05rem;
}

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

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

    .home-rank-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 860px) {
    .hero-carousel,
    .hero-inner {
        min-height: 720px;
    }

    .hero-inner,
    .detail-title-area,
    .category-overview-card,
    .ranking-card {
        grid-template-columns: 1fr;
    }

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

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

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

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

@media (max-width: 560px) {
    .hero-carousel,
    .hero-inner {
        min-height: 760px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-title-area h1 {
        font-size: 2.45rem;
    }

    .hero-dots {
        display: none;
    }

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

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

    .rank-row {
        grid-template-columns: 1.6rem 4rem 1fr;
    }
}
