:root {
    color-scheme: light;
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(180, 83, 9, 0.16);
    --brand: #f59e0b;
    --brand-deep: #b45309;
    --brand-dark: #78350f;
    --accent: #fb923c;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(120, 53, 15, 0.16);
    --shadow-soft: 0 10px 25px rgba(120, 53, 15, 0.12);
    --radius: 22px;
    --radius-small: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

.nav-shell {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--brand-dark);
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: var(--shadow-soft);
}

.logo-text {
    white-space: nowrap;
    font-size: 20px;
}

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #7c2d12;
    font-weight: 700;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--white);
    background: linear-gradient(135deg, var(--brand), var(--accent));
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(120, 53, 15, 0.08);
}

.nav-search input,
.mobile-search input,
.hero-search-card input,
.filter-panel input,
.filter-panel select {
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.nav-search input {
    width: 210px;
    padding: 10px 12px;
}

.nav-search button,
.mobile-search button,
.hero-search-card button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--white);
    background: linear-gradient(135deg, var(--brand), var(--accent));
    font-weight: 800;
}

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--white);
    background: var(--brand-dark);
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid var(--line);
    background: rgba(255, 251, 235, 0.98);
}

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

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 6px;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--line);
}

.mobile-search input {
    flex: 1;
    padding: 10px;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #431407;
}

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

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: overlay;
    transform: scale(1.04);
}

.hero-overlay {
    background:
        radial-gradient(circle at 72% 20%, rgba(245, 158, 11, 0.32), transparent 36%),
        linear-gradient(90deg, rgba(67, 20, 7, 0.95), rgba(146, 64, 14, 0.78) 45%, rgba(251, 146, 60, 0.2));
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(650px, 100%);
    color: var(--white);
    animation: fadeIn 0.8s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: #fde68a;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.detail-copy .eyebrow,
.sub-hero .eyebrow {
    color: #fde68a;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(253, 230, 138, 0.36);
}

.hero h1,
.detail-copy h1,
.sub-hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.hero p,
.detail-copy p,
.sub-hero p {
    margin: 0;
    color: #ffedd5;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

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

.hero-tags,
.detail-badges {
    margin-top: 24px;
}

.hero-tags span,
.detail-badges span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.hero-tags span,
.detail-badges span {
    color: #fff7ed;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.primary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    color: var(--white);
    padding: 14px 22px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.32);
}

.ghost-button {
    color: var(--white);
    padding: 13px 22px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.1);
}

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

.hero-controls {
    position: absolute;
    z-index: 5;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 160px;
    display: flex;
    gap: 10px;
}

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

.hero-dot.is-active {
    width: 34px;
    background: #fde68a;
}

.hero-search-card {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 34px;
    width: min(960px, calc(100% - 32px));
    transform: translateX(-50%);
    padding: 16px;
    border-radius: 26px;
    background: rgba(255, 251, 235, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-search-card form {
    display: flex;
    gap: 12px;
}

.hero-search-card input {
    flex: 1;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--line);
}

.hero-search-card button {
    padding-inline: 24px;
}

.hero-shortcuts {
    margin-top: 12px;
}

.hero-shortcuts a {
    padding: 8px 13px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-weight: 800;
}

.section {
    padding: 72px 0;
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 14px 0 10px;
    color: #111827;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.section-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.section-heading.centered {
    text-align: center;
}

.section-heading.centered p {
    margin-left: auto;
    margin-right: auto;
}

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

.section-link {
    color: var(--brand-dark);
    padding: 12px 18px;
    background: #fef3c7;
    border: 1px solid var(--line);
}

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

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

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

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

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

.movie-card:hover {
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #fffbeb;
}

.poster-link img,
.rank-poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(120, 53, 15, 0.82);
    font-size: 12px;
    font-weight: 900;
}

.movie-body {
    padding: 16px;
}

.movie-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--brand-deep);
    font-size: 12px;
    font-weight: 800;
}

.movie-meta-row span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-body h3,
.rank-info h3 {
    margin: 10px 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
}

.movie-body h3 a:hover,
.rank-info h3 a:hover,
.category-samples a:hover,
.detail-side a:hover {
    color: var(--brand-deep);
}

.movie-body p,
.rank-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
    color: #92400e;
    padding: 6px 9px;
    background: #fef3c7;
    font-size: 12px;
}

.category-band {
    background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 52%, #ffffff 100%);
}

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

.category-tile,
.category-overview-card {
    display: block;
    min-height: 190px;
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(180, 83, 9, 0.14);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile span,
.category-overview-main span {
    display: block;
    margin-bottom: 12px;
    color: #111827;
    font-size: 24px;
    font-weight: 900;
}

.category-tile p,
.category-overview-main p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.category-tile div,
.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tile div a,
.category-samples a {
    padding: 7px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-weight: 800;
    font-size: 13px;
}

.sub-hero {
    color: var(--white);
    padding: 92px 0 72px;
    background:
        radial-gradient(circle at 78% 20%, rgba(245, 158, 11, 0.35), transparent 30%),
        linear-gradient(135deg, #431407, #92400e 64%, #fb923c);
}

.sub-hero h1 {
    margin-bottom: 18px;
}

.crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    color: #92400e;
    font-weight: 800;
}

.crumbs.light,
.sub-hero .crumbs {
    color: #ffedd5;
}

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

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.75fr 0.75fr;
    gap: 14px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--brand-dark);
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    background: #fffbeb;
    border: 1px solid var(--line);
}

.empty-state {
    display: none;
    margin-top: 16px;
    padding: 18px;
    text-align: center;
    color: var(--muted);
    border-radius: 16px;
    background: #fffbeb;
}

.empty-state.is-visible {
    display: block;
}

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

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

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

.rank-card {
    position: relative;
    display: grid;
    grid-template-columns: 92px 56px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-poster {
    display: block;
    width: 92px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #fffbeb;
}

.rank-index {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--brand), var(--accent));
    font-weight: 900;
    box-shadow: var(--shadow-soft);
}

.detail-hero {
    position: relative;
    min-height: 580px;
    overflow: hidden;
    color: var(--white);
    background: #431407;
}

.detail-bg,
.detail-bg-mask {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(16px);
    transform: scale(1.12);
    opacity: 0.42;
}

.detail-bg-mask {
    background: linear-gradient(90deg, rgba(67, 20, 7, 0.96), rgba(146, 64, 14, 0.72), rgba(67, 20, 7, 0.92));
}

.detail-hero-grid {
    position: relative;
    z-index: 2;
    min-height: 580px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: center;
    padding: 56px 0;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    background: #fffbeb;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

.detail-copy h1 {
    max-width: 780px;
}

.detail-copy p {
    max-width: 760px;
}

.player-section {
    padding-bottom: 26px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #0f172a;
    box-shadow: 0 30px 80px rgba(67, 20, 7, 0.24);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: linear-gradient(135deg, rgba(67, 20, 7, 0.74), rgba(245, 158, 11, 0.18));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--brand-dark);
    background: #fde68a;
    font-size: 32px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

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

.detail-main,
.detail-side {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.detail-main h2,
.detail-side h2 {
    margin: 0 0 16px;
    color: #111827;
    font-size: 26px;
}

.detail-main p {
    margin: 0 0 24px;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.9;
}

.detail-tags {
    margin-top: 8px;
}

.detail-side dl {
    margin: 0;
    display: grid;
    gap: 14px;
}

.detail-side dl div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.detail-side dt {
    color: var(--muted);
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
    color: #111827;
    font-weight: 900;
}

.site-footer {
    margin-top: 40px;
    color: #ffedd5;
    background: #431407;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    padding: 42px 0;
}

.footer-logo {
    color: #fde68a;
    font-size: 22px;
}

.site-footer p {
    max-width: 620px;
    margin: 14px 0 0;
    color: #fed7aa;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    padding: 10px 13px;
    border-radius: 999px;
    color: #ffedd5;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    color: #431407;
    background: #fde68a;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

    .featured-grid,
    .preview-rank,
    .full-rank,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .desktop-nav {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .logo-text {
        font-size: 17px;
    }

    .hero {
        height: 720px;
    }

    .hero-content {
        align-items: flex-start;
        padding-top: 70px;
    }

    .hero h1,
    .detail-copy h1,
    .sub-hero h1 {
        font-size: clamp(34px, 12vw, 48px);
    }

    .hero-controls {
        left: 16px;
        right: auto;
        bottom: 210px;
    }

    .hero-search-card form,
    .filter-grid,
    .footer-grid,
    .section-heading.split {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search-card form {
        display: grid;
    }

    .section {
        padding: 52px 0;
    }

    .movie-grid,
    .catalog-grid,
    .search-grid,
    .related-grid,
    .featured-grid,
    .preview-rank,
    .full-rank,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .movie-body {
        padding: 13px;
    }

    .movie-body h3 {
        font-size: 16px;
    }

    .rank-card {
        grid-template-columns: 72px 42px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .rank-poster {
        width: 72px;
    }

    .rank-index {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .detail-hero-grid {
        min-height: auto;
        padding: 34px 0 48px;
    }

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

    .detail-main,
    .detail-side {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .catalog-grid,
    .search-grid,
    .related-grid,
    .featured-grid,
    .preview-rank,
    .full-rank,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        height: 780px;
    }

    .hero-controls {
        bottom: 230px;
    }
}
