*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #292524;
    background: linear-gradient(180deg, #fffbeb 0%, #fafaf9 42%, #fffbeb 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, #292524, #1c1917, #292524);
    border-bottom: 2px solid #d97706;
    box-shadow: 0 18px 40px rgba(28, 25, 23, 0.35);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 800;
    background: #d97706;
    box-shadow: 0 12px 22px rgba(217, 119, 6, 0.35);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    color: #fef3c7;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-subtitle {
    margin-top: 4px;
    color: #a8a29e;
    font-size: 12px;
}

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

.nav-link {
    position: relative;
    color: #d6d3d1;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link::after {
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    content: "";
    background: #fbbf24;
    transition: width 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fbbf24;
}

.nav-link:hover::after,
.nav-link.is-active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: #fef3c7;
}

.mobile-nav {
    display: none;
    border-top: 1px solid #44403c;
    background: #1c1917;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-link {
    display: block;
    padding: 14px 24px;
    color: #d6d3d1;
    font-weight: 600;
}

.mobile-link:hover,
.mobile-link.is-active {
    color: #fbbf24;
    background: #292524;
}

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 30%, rgba(251, 191, 36, 0.25), transparent 32%),
        linear-gradient(90deg, rgba(28, 25, 23, 0.95) 0%, rgba(28, 25, 23, 0.82) 42%, rgba(28, 25, 23, 0.38) 100%),
        linear-gradient(0deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.15));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 380px;
    align-items: center;
    gap: 48px;
    padding: 64px 0;
}

.eyebrow {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-radius: 999px;
    color: #fbbf24;
    background: rgba(120, 53, 15, 0.32);
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
    max-width: 780px;
    margin: 22px 0 18px;
    color: #fffbeb;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.06em;
    text-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.hero-copy p {
    max-width: 680px;
    color: #e7e5e4;
    font-size: 18px;
    line-height: 1.8;
}

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

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

.hero-tags a,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.detail-actions,
.center-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: #d97706;
    box-shadow: 0 16px 30px rgba(217, 119, 6, 0.35);
}

.btn-primary:hover {
    background: #b45309;
}

.btn-ghost {
    color: #fef3c7;
    border: 1px solid rgba(254, 243, 199, 0.35);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.btn-ghost.light {
    color: #92400e;
    border-color: #fcd34d;
    background: #fffbeb;
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 4px solid rgba(254, 243, 199, 0.65);
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 999px;
    color: #fef3c7;
    background: rgba(28, 25, 23, 0.62);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 28px;
    left: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 9px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(254, 243, 199, 0.42);
    cursor: pointer;
}

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

.page-section {
    padding: 64px 0;
}

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

.section-heading h2 {
    margin: 0;
    color: #292524;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 520px;
    margin: 0;
    color: #78716c;
    line-height: 1.7;
}

.search-panel {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 24px;
    margin-top: -42px;
    padding: 28px;
    border: 1px solid #fde68a;
    border-radius: 24px;
    background: rgba(255, 251, 235, 0.95);
    box-shadow: 0 18px 45px rgba(120, 53, 15, 0.16);
    backdrop-filter: blur(16px);
}

.search-panel h2 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 900;
}

.search-panel p {
    margin: 0;
    color: #78716c;
}

.global-search {
    display: flex;
    gap: 10px;
}

.global-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #fcd34d;
    border-radius: 14px;
    color: #292524;
    background: #ffffff;
    outline: none;
}

.global-search input,
.filter-panel input {
    padding: 0 16px;
}

.filter-panel select {
    padding: 0 14px;
}

.global-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.25);
}

.global-search button {
    min-width: 96px;
    border-radius: 14px;
    color: #ffffff;
    background: #d97706;
    font-weight: 800;
    cursor: pointer;
}

.global-results {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.global-results.is-open {
    display: grid;
}

.global-results a,
.quick-links a {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #44403c;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(120, 53, 15, 0.08);
}

.global-results span,
.quick-links span {
    color: #a8a29e;
    font-size: 13px;
}

.quick-links {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid #e7e5e4;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(41, 37, 36, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: #fbbf24;
    box-shadow: 0 22px 45px rgba(120, 53, 15, 0.16);
    transform: translateY(-6px);
}

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

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(28, 25, 23, 0.82) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.poster-text {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: -webkit-box;
    overflow: hidden;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.movie-card:hover .poster-text {
    opacity: 1;
    transform: translateY(0);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.35;
}

.movie-card h3 a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    margin: 0 0 10px;
    color: #78716c;
    font-size: 13px;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 42px;
    margin: 0 0 12px;
    color: #57534e;
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row span {
    min-height: 24px;
    padding: 4px 9px;
    font-size: 12px;
}

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

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

.category-card {
    overflow: hidden;
    border: 1px solid #fde68a;
    border-radius: 22px;
    background: linear-gradient(135deg, #fffbeb, #ffffff);
    box-shadow: 0 16px 36px rgba(120, 53, 15, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 45px rgba(120, 53, 15, 0.18);
}

.category-thumbs {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: 92px 92px;
    gap: 4px;
    padding: 8px;
    background: #292524;
}

.category-thumbs img,
.category-thumbs span {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    background: #44403c;
}

.category-thumbs img:first-child {
    grid-row: span 2;
}

.category-body {
    padding: 18px;
}

.category-body h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 900;
}

.category-body p {
    margin: 0 0 14px;
    color: #78716c;
    line-height: 1.65;
}

.category-body span {
    color: #b45309;
    font-weight: 850;
}

.ranking-band {
    padding: 72px 0;
    color: #f5f5f4;
    background: linear-gradient(135deg, #292524, #1c1917 55%, #451a03);
}

.ranking-band .section-heading h2 {
    color: #fffbeb;
}

.ranking-band .section-heading p {
    color: #d6d3d1;
}

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

.movie-card-compact {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: stretch;
}

.movie-card-compact .poster-link {
    aspect-ratio: auto;
    min-height: 132px;
}

.movie-card-compact .movie-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.movie-card-compact .movie-desc,
.movie-card-compact .tag-row {
    display: none;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    background: #d97706;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.center-actions {
    justify-content: center;
}

.page-hero {
    color: #fffbeb;
    background:
        radial-gradient(circle at 25% 20%, rgba(251, 191, 36, 0.28), transparent 30%),
        linear-gradient(135deg, #292524, #1c1917 60%, #78350f);
}

.small-hero {
    padding: 72px 0;
}

.page-hero h1 {
    max-width: 820px;
    margin: 18px 0;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.page-hero p:not(.eyebrow) {
    max-width: 720px;
    margin: 0;
    color: #e7e5e4;
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 220px 220px;
    gap: 14px;
    margin-top: 32px;
    padding: 20px;
    border: 1px solid #fde68a;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(120, 53, 15, 0.08);
}

.detail-top {
    padding: 54px 0;
    color: #fffbeb;
    background:
        radial-gradient(circle at 80% 30%, rgba(251, 191, 36, 0.22), transparent 28%),
        linear-gradient(135deg, #292524, #1c1917 70%, #78350f);
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 4px solid rgba(254, 243, 199, 0.55);
    border-radius: 26px;
    background: #1c1917;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #d6d3d1;
    font-size: 14px;
}

.breadcrumb a {
    color: #fbbf24;
}

.detail-info h1 {
    margin: 18px 0 16px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 850px;
    margin: 0 0 24px;
    color: #e7e5e4;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.detail-meta-grid span {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1px solid rgba(254, 243, 199, 0.16);
    border-radius: 16px;
    color: #fef3c7;
    background: rgba(255, 255, 255, 0.08);
}

.detail-meta-grid strong {
    color: #a8a29e;
    font-size: 12px;
}

.detail-tags span {
    color: #78350f;
}

.player-section {
    padding-top: 54px;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid #44403c;
    border-radius: 26px;
    background: #0c0a09;
    box-shadow: 0 28px 70px rgba(41, 37, 36, 0.24);
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.play-button {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(12, 10, 9, 0.16), rgba(12, 10, 9, 0.72));
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-box.is-playing .play-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    background: #d97706;
    box-shadow: 0 18px 36px rgba(217, 119, 6, 0.45);
}

.play-icon::before {
    width: 0;
    height: 0;
    margin-left: 6px;
    content: "";
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #ffffff;
}

.detail-content {
    display: grid;
    gap: 28px;
    padding: 46px 0 72px;
}

.detail-section {
    padding: 28px;
    border: 1px solid #e7e5e4;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(41, 37, 36, 0.06);
}

.detail-section h2 {
    margin: 0 0 18px;
    font-size: 28px;
    font-weight: 900;
    color: #292524;
}

.detail-section p {
    margin: 0 0 14px;
    color: #44403c;
    line-height: 1.9;
}

.detail-section p:last-child {
    margin-bottom: 0;
}

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

.site-footer {
    color: #d6d3d1;
    border-top: 2px solid #d97706;
    background: linear-gradient(180deg, #292524, #1c1917);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 42px;
    padding: 48px 0;
}

.footer-brand p,
.footer-bottom p {
    color: #a8a29e;
    line-height: 1.7;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fef3c7;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a {
    color: #a8a29e;
}

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

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid #44403c;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
}

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

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

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

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

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

    .menu-toggle {
        display: flex;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 26px;
        padding-right: 46px;
        padding-left: 46px;
    }

    .hero-poster {
        width: min(250px, 70vw);
        transform: none;
    }

    .search-panel,
    .filter-panel,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, 1280px);
    }

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

    .brand-subtitle {
        font-size: 11px;
    }

    .hero-slider,
    .hero-content {
        min-height: 660px;
    }

    .hero-content {
        padding: 48px 26px;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 42px;
    }

    .hero-copy p,
    .detail-one-line,
    .page-hero p:not(.eyebrow) {
        font-size: 16px;
    }

    .hero-control {
        display: none;
    }

    .section-heading {
        display: block;
    }

    .section-heading p {
        margin-top: 10px;
    }

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

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

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-desc {
        display: none;
    }

    .category-grid,
    .category-grid-large,
    .ranking-grid,
    .related-grid,
    .quick-links,
    .global-results {
        grid-template-columns: 1fr;
    }

    .movie-card-compact {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .detail-top {
        padding: 34px 0;
    }

    .detail-poster {
        width: min(250px, 82vw);
    }

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

    .player-box {
        border-radius: 18px;
    }

    .detail-section {
        padding: 22px;
        border-radius: 18px;
    }
}
