* {
    box-sizing: border-box;
}

:root {
    --amber: #d97706;
    --amber-strong: #f59e0b;
    --green: #16a34a;
    --green-deep: #166534;
    --ink: #172033;
    --muted: #667085;
    --soft: #fff7ed;
    --card: #ffffff;
    --line: rgba(15, 23, 42, 0.08);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7ed 0%, #f0fdf4 48%, #eff6ff 100%);
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(236, 253, 245, 0.94));
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: 1180px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-strong), var(--green));
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.26);
}

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

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

.nav-link {
    padding: 10px 13px;
    border-radius: 999px;
    color: #475467;
    font-weight: 700;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #92400e;
    background: rgba(245, 158, 11, 0.13);
}

.top-search {
    display: flex;
    width: 280px;
    padding: 4px;
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: 999px;
    background: #fff;
}

.top-search input,
.hero-search input,
.filter-bar input,
.search-page-form input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 10px 14px;
    color: var(--ink);
}

.top-search button,
.hero-search button,
.search-page-form button,
.clear-filter {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber), var(--green));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.hero-search button:hover,
.search-page-form button:hover,
.clear-filter:hover,
.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(217, 119, 6, 0.24);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #111827;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 54px;
    align-items: center;
    padding: 82px max(32px, calc((100vw - 1180px) / 2)) 126px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-bg,
.hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-bg {
    object-fit: cover;
    filter: saturate(1.06) contrast(1.04);
}

.hero-shade {
    background:
        radial-gradient(circle at 76% 34%, rgba(245, 158, 11, 0.28), transparent 32%),
        linear-gradient(90deg, rgba(69, 26, 3, 0.94), rgba(20, 83, 45, 0.82) 48%, rgba(15, 23, 42, 0.72));
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    color: #fbbf24;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.eyebrow.dark {
    color: #7c2d12;
}

.hero-content h1 {
    max-width: 820px;
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-text {
    max-width: 760px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 11px;
    color: #92400e;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-actions,
.inline-actions,
.pager-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.inline-actions a,
.pager-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 900;
    transition: all 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--amber-strong), var(--green));
}

.primary-btn.light {
    color: #92400e;
    background: #fff;
}

.ghost-btn,
.inline-actions a,
.pager-links a {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
}

.inline-actions a,
.pager-links a {
    color: #92400e;
    border-color: rgba(217, 119, 6, 0.22);
    background: #fff7ed;
}

.hero-poster {
    align-self: stretch;
    min-height: 410px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
    transform: rotate(2deg);
}

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

.hero-poster span,
.score-pill,
.type-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 900;
}

.hero-poster span {
    right: 18px;
    top: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-strong), var(--green));
}

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

.hero-controls button {
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 30px;
}

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

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

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

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 88px;
    width: min(680px, calc(100% - 36px));
    display: flex;
    gap: 8px;
    padding: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.page-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 70px 22px;
}

.section-heading,
.panel-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.section-heading h2,
.panel-title h2,
.detail-copy h2,
.side-box h2 {
    margin: 0;
    color: #1f2937;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

.section-link,
.panel-title a {
    color: var(--amber);
    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));
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #dcfce7);
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.55));
}

.score-pill {
    top: 12px;
    right: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-strong), var(--green));
}

.type-pill {
    left: 12px;
    bottom: 12px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
}

.rank-badge {
    left: 12px;
    top: 12px;
    color: #92400e;
    background: #fef3c7;
}

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

.movie-card h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
    line-height: 1.3;
}

.movie-card p {
    min-height: 52px;
    margin: 10px 0 14px;
    color: #667085;
    font-size: 14px;
}

.meta-row,
.detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #475467;
    font-size: 13px;
    font-weight: 700;
}

.meta-row span,
.detail-facts span {
    border-radius: 999px;
    padding: 5px 9px;
    background: #f9fafb;
}

.tag-row {
    margin-top: 12px;
}

.feature-band {
    max-width: 1180px;
    margin: 32px auto 0;
    padding: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border-radius: 34px;
    color: #fff;
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.26), transparent 24%),
        linear-gradient(135deg, var(--amber), var(--green));
    box-shadow: var(--shadow);
}

.feature-band h2 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.feature-band p {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.86);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 30px;
}

.ranking-panel,
.side-box,
.player-card,
.detail-copy,
.side-poster,
.category-large,
.filter-bar {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.ranking-panel {
    padding: 24px;
    align-self: start;
    position: sticky;
    top: 96px;
}

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

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

.rank-row:hover {
    transform: translateX(5px);
    background: #fff7ed;
}

.rank-row strong {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #92400e;
    background: #fef3c7;
}

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

.rank-title {
    overflow: hidden;
    color: #111827;
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-meta {
    color: #667085;
    font-size: 12px;
}

.rank-score {
    color: var(--amber);
    font-weight: 900;
}

.full-rank-list .rank-row {
    grid-template-columns: 44px 80px minmax(0, 1fr) minmax(180px, auto) 52px;
}

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

.category-card {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    background: #111827;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
    transition: transform 0.3s ease;
}

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

.category-card div {
    position: absolute;
    inset: auto 0 0;
    padding: 22px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

.category-card h3,
.category-large h2 {
    margin: 0 0 8px;
}

.category-card p,
.category-large p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
}

.sub-hero {
    padding: 84px 22px;
    color: #fff;
    text-align: center;
    background:
        radial-gradient(circle at 74% 20%, rgba(251, 191, 36, 0.28), transparent 26%),
        linear-gradient(135deg, #92400e, #166534);
}

.sub-hero h1 {
    max-width: 900px;
    margin: 0 auto;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

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

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

.category-large {
    overflow: hidden;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-large img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    object-fit: cover;
}

.category-large div {
    padding: 28px;
}

.category-large h2 {
    color: #111827;
    font-size: 28px;
}

.category-large p {
    color: #667085;
}

.mini-title-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.mini-title-list span {
    border-radius: 999px;
    padding: 5px 9px;
    color: #92400e;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 800;
}

.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 26px;
    padding: 8px;
}

.filter-bar input {
    min-height: 46px;
}

.detail-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 22px 80px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
    color: #667085;
    font-weight: 800;
}

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

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-card {
    padding: 12px;
    overflow: hidden;
    background: #111827;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.player-frame video {
    background: #020617;
}

.player-cover {
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #020617;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.48));
}

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

.play-orb {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--amber-strong), var(--green));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.detail-copy {
    padding: 30px;
}

.detail-copy h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.detail-copy .lead {
    color: #334155;
    font-size: 18px;
    font-weight: 700;
}

.detail-tags,
.detail-facts {
    margin: 18px 0;
}

.detail-copy p {
    color: #475467;
}

.side-poster {
    position: relative;
    overflow: hidden;
    padding: 10px;
}

.side-poster img {
    width: 100%;
    border-radius: 20px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.side-poster strong {
    position: absolute;
    top: 22px;
    right: 22px;
    border-radius: 999px;
    padding: 7px 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-strong), var(--green));
}

.detail-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 22px;
}

.side-box {
    padding: 22px;
}

.related-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.related-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    background: #fff;
    transition: background 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
    transform: translateX(5px);
    background: #fff7ed;
}

.related-card img {
    width: 92px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.related-card span {
    overflow: hidden;
    color: #111827;
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.related-card em {
    color: var(--amber);
    font-style: normal;
    font-weight: 900;
}

.search-page-form {
    width: min(720px, 100%);
    display: flex;
    gap: 8px;
    margin: 28px auto 0;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #1f2937, #111827);
}

.footer-grid {
    max-width: 1180px;
    margin: 0 auto;
    padding: 52px 22px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 32px;
}

.footer-brand {
    color: #fff;
    font-size: 22px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

.site-footer p,
.site-footer a {
    color: #aab4c3;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    transition: color 0.2s ease;
}

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

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

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

@media (max-width: 1024px) {
    .nav-shell {
        flex-wrap: wrap;
    }

    .top-search {
        order: 3;
        width: 100%;
        margin-bottom: 12px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding-top: 70px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

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

@media (max-width: 720px) {
    .nav-shell {
        min-height: 66px;
        gap: 12px;
    }

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

    .nav-links {
        display: none;
        order: 2;
        width: 100%;
        padding: 10px 0 14px;
        margin: 0;
    }

    .nav-links.open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .hero-slider {
        min-height: 720px;
    }

    .hero-slide {
        padding: 48px 20px 150px;
    }

    .hero-search,
    .search-page-form,
    .filter-bar {
        border-radius: 24px;
        flex-direction: column;
    }

    .hero-controls {
        bottom: 24px;
    }

    .page-section {
        padding: 46px 18px;
    }

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

    .feature-band {
        margin: 20px 18px 0;
        padding: 30px;
        flex-direction: column;
        align-items: start;
    }

    .category-large {
        grid-template-columns: 1fr;
    }

    .full-rank-list .rank-row,
    .rank-row {
        grid-template-columns: 34px 58px minmax(0, 1fr) 48px;
    }

    .rank-meta {
        display: none;
    }

    .detail-shell {
        padding: 24px 16px 58px;
    }

    .detail-copy {
        padding: 22px;
    }
}
