:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --orange-500: #f97316;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --black: #000000;
    --shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
    --soft-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
    --radius: 18px;
}

* {
    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(--gray-900);
    background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
}

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

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

button,
input,
select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--white);
    background: linear-gradient(90deg, var(--amber-600), var(--orange-500));
    box-shadow: 0 4px 20px rgba(120, 53, 15, 0.28);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--amber-700);
    background: var(--white);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

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

.nav-link,
.mobile-link {
    font-weight: 650;
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-100);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-link {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: var(--gray-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.46) 48%, rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    padding: 0 0 58px;
    color: var(--white);
}

.hero-text {
    max-width: 730px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #78350f;
    background: var(--amber-100);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-weight: 850;
    line-height: 1.08;
}

.hero h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.hero h2 {
    margin-top: 8px;
    font-size: clamp(26px, 4vw, 46px);
}

.hero p {
    max-width: 680px;
    margin: 16px 0 0;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    margin-top: 16px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
}

.tag-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag-list span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #78350f;
    background: var(--amber-100);
    font-size: 12px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    border: 0;
    font-weight: 800;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn.primary {
    color: var(--white);
    background: linear-gradient(90deg, var(--amber-600), var(--orange-500));
}

.btn.ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.48);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 32px;
    background: var(--white);
}

.quick-search {
    margin-top: 28px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.quick-copy h2,
.section-heading h2,
.content-panel h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.2;
}

.quick-copy p,
.section-heading p,
.page-hero p,
.content-panel p {
    margin: 8px 0 0;
    color: var(--gray-500);
    line-height: 1.75;
}

.section-block {
    margin-top: 58px;
}

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

.section-more {
    font-weight: 800;
    color: var(--amber-700);
}

.rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 22px;
    scroll-snap-type: x mandatory;
}

.rail .movie-card {
    width: 270px;
    flex: 0 0 270px;
    scroll-snap-align: start;
}

.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: var(--gray-200);
}

.movie-card.small .poster-wrap {
    height: 180px;
}

.movie-card.medium .poster-wrap {
    height: 250px;
}

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

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

.poster-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 34px;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: opacity 0.22s ease, background 0.22s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    background: rgba(0, 0, 0, 0.32);
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 16px;
}

.card-body p {
    min-height: 44px;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--gray-500);
    font-size: 13px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin-top: 12px;
    gap: 6px;
}

.card-meta span {
    color: var(--gray-700);
    background: var(--amber-50);
}

.soft-panel,
.white-panel,
.content-panel,
.filter-panel {
    padding: 26px;
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
}

.soft-panel {
    background: linear-gradient(90deg, var(--amber-50), #fff7ed);
}

.white-panel,
.content-panel,
.filter-panel {
    background: var(--white);
}

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

.category-card {
    min-height: 134px;
    padding: 22px;
    border-radius: 16px;
    color: var(--gray-900);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
    display: block;
    margin-bottom: 10px;
    color: var(--amber-700);
    font-size: 20px;
}

.category-card span {
    color: var(--gray-500);
    line-height: 1.65;
}

.stacked-features {
    display: grid;
    gap: 34px;
}

.category-feature h3 {
    margin: 0 0 16px;
    padding-left: 14px;
    border-left: 4px solid var(--amber-600);
    font-size: 22px;
}

.page-main {
    padding-top: 34px;
}

.page-hero {
    margin-bottom: 28px;
    padding: 34px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--white), var(--amber-50));
    box-shadow: var(--soft-shadow);
}

.small-hero h1 {
    font-size: clamp(30px, 4vw, 46px);
}

.ranking-hero {
    background: linear-gradient(135deg, #111827, #92400e);
    color: var(--white);
}

.ranking-hero p {
    color: rgba(255, 255, 255, 0.78);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--amber-700);
    font-weight: 700;
}

.filter-panel {
    margin-bottom: 28px;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 160px 160px;
    gap: 12px;
}

.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 0 14px;
    background: var(--white);
    outline: none;
}

.filter-row input:focus,
.filter-row select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

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

.category-overview-card {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card h2 {
    margin: 0;
    color: var(--amber-700);
}

.category-overview-card p {
    margin: 10px 0 16px;
    color: var(--gray-500);
    line-height: 1.7;
}

.category-overview-card ul,
.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-overview-card li + li,
.site-footer li + li {
    margin-top: 8px;
}

.category-overview-card li a,
.site-footer a {
    color: var(--gray-700);
}

.category-overview-card li a:hover,
.site-footer a:hover {
    color: var(--amber-600);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 96px 1fr 72px;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
    font-weight: 900;
}

.rank-cover img {
    width: 96px;
    height: 124px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--gray-500);
    line-height: 1.65;
}

.rank-score {
    color: var(--amber-700);
    font-size: 22px;
}

.detail-main {
    max-width: 1120px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 32px;
    margin-bottom: 34px;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.detail-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-copy h1 {
    font-size: clamp(30px, 4vw, 54px);
}

.detail-one-line {
    margin: 16px 0 0;
    color: var(--gray-700);
    font-size: 18px;
    line-height: 1.75;
}

.detail-meta {
    margin-top: 18px;
}

.detail-meta span {
    color: var(--gray-700);
    background: var(--amber-50);
}

.detail-copy .btn {
    width: max-content;
    margin-top: 24px;
}

.player-section {
    margin-bottom: 34px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: var(--black);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--black);
}

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

.play-cover.is-hidden {
    display: none;
}

.play-icon {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
    font-size: 34px;
    box-shadow: var(--shadow);
}

.play-cover span:last-child {
    max-width: 80%;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
}

.content-panel {
    margin-bottom: 56px;
}

.content-panel h2 + p {
    margin-bottom: 26px;
}

.site-footer {
    margin-top: 70px;
    color: #d1d5db;
    background: var(--gray-900);
}

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

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.site-footer p {
    margin: 0;
    line-height: 1.75;
}

.site-footer a {
    color: #d1d5db;
}

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

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: var(--amber-600);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.back-top.show {
    display: flex;
}

@media (max-width: 1100px) {
    .movie-grid.six,
    .movie-grid.compact,
    .catalog-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        padding-bottom: 54px;
    }

    .quick-search,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid.six,
    .movie-grid.four,
    .movie-grid.three,
    .movie-grid.compact,
    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-overview-grid,
    .detail-hero,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .filter-row {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 46px 78px 1fr;
    }

    .rank-score {
        grid-column: 3;
    }

    .rank-cover img {
        width: 78px;
        height: 106px;
    }
}

@media (max-width: 540px) {
    .shell,
    .header-inner,
    .mobile-nav,
    .hero-content,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

    .hero {
        height: 540px;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid.six,
    .movie-grid.four,
    .movie-grid.three,
    .movie-grid.compact,
    .catalog-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .poster-wrap,
    .movie-card.small .poster-wrap,
    .movie-card.medium .poster-wrap {
        height: 260px;
    }

    .soft-panel,
    .white-panel,
    .content-panel,
    .filter-panel,
    .page-hero,
    .detail-hero {
        padding: 20px;
    }

    .rank-row {
        grid-template-columns: 42px 1fr;
    }

    .rank-cover {
        display: none;
    }

    .rank-info {
        min-width: 0;
    }
}
