* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #fafaf9;
    color: #292524;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, #78350f 0%, #9a3412 48%, #78350f 100%);
    box-shadow: 0 14px 34px rgba(41, 37, 36, 0.22);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #78350f;
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.brand-text {
    font-size: 1.22rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.95rem;
}

.desktop-nav a,
.mobile-nav a {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #fde68a;
}

.nav-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-search input {
    width: 220px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    outline: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    padding: 10px 14px;
    transition: width 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.nav-search input:focus {
    width: 280px;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(253, 230, 138, 0.8);
}

.nav-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.filter-button,
.page-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 700;
}

.nav-search button,
.mobile-search button {
    color: #78350f;
    background: #fde68a;
    padding: 10px 16px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    padding: 11px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    border-radius: 999px;
}

.mobile-panel {
    width: 100%;
    background: rgba(120, 53, 15, 0.97);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.mobile-panel[hidden] {
    display: none;
}

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

.mobile-search {
    padding: 16px 0 8px;
}

.mobile-search input {
    width: 100%;
}

.mobile-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px 0 18px;
}

.mobile-nav a {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 12px;
}

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

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

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

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

.hero-bg img {
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 16% 34%, rgba(245, 158, 11, 0.36), transparent 28%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.15) 100%),
        linear-gradient(0deg, #1c1917 0%, rgba(28, 25, 23, 0.12) 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    padding: 78px 0 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.hero-kicker {
    width: fit-content;
    border: 1px solid rgba(253, 230, 138, 0.4);
    border-radius: 999px;
    color: #fbbf24;
    background: rgba(0, 0, 0, 0.28);
    padding: 8px 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
    backdrop-filter: blur(10px);
}

.hero-content h1 {
    max-width: 760px;
    margin: 22px 0 14px;
    font-size: clamp(2.3rem, 6vw, 5rem);
    line-height: 1.06;
    font-weight: 900;
    text-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.12rem;
}

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

.hero-meta span,
.movie-meta span,
.movie-meta a {
    color: inherit;
    opacity: 0.84;
}

.hero-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 12px;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 14px 28px rgba(234, 88, 12, 0.28);
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
}

.hero-dots button.is-active {
    width: 32px;
    background: #fbbf24;
}

.section,
.page-hero,
.detail-wrap,
.category-wrap,
.search-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 56px 0;
}

.section-soft {
    width: 100%;
    margin: 0;
    background: linear-gradient(90deg, #fff7ed, #fef3c7);
}

.section-soft .section {
    padding: 56px 0;
}

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

.section-title h2,
.page-hero h1,
.category-title h1,
.detail-title h1,
.search-title h1 {
    margin: 0;
    color: #292524;
    font-size: clamp(1.65rem, 3vw, 2.5rem);
    line-height: 1.2;
    font-weight: 900;
}

.section-title p,
.page-hero p,
.category-title p,
.search-title p {
    max-width: 760px;
    margin: 8px 0 0;
    color: #78716c;
}

.link-more {
    color: #b45309;
    font-weight: 800;
}

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

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

.movie-card,
.list-card,
.category-card,
.info-panel,
.player-card,
.detail-panel {
    background: #fff;
    border: 1px solid rgba(231, 229, 228, 0.86);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(41, 37, 36, 0.08);
}

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

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 44px rgba(41, 37, 36, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e7e5e4;
}

.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(0deg, rgba(0, 0, 0, 0.55), transparent 56%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #b45309;
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.poster-type,
.rank-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    padding: 7px 10px;
}

.poster-type {
    right: 12px;
    background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

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

.movie-card h3,
.list-card h3 {
    margin: 0 0 8px;
    color: #292524;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 850;
}

.movie-card h3 a:hover,
.list-card h3 a:hover {
    color: #b45309;
}

.movie-card p,
.list-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 12px;
    color: #6b7280;
    font-size: 0.92rem;
}

.movie-meta {
    color: #78716c;
    font-size: 0.82rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    padding: 4px 9px;
    font-size: 0.78rem;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 330px);
    gap: 20px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 22px;
    color: #fff;
    background: linear-gradient(135deg, #78350f, #ea580c);
}

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

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
}

.category-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 136px;
    flex-direction: column;
    justify-content: end;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 26px;
}

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

.list-card {
    display: grid;
    grid-template-columns: auto 132px 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(41, 37, 36, 0.12);
}

.list-rank {
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    font-weight: 900;
}

.list-poster {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: #e7e5e4;
}

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

.page-hero {
    padding: 54px 0 32px;
}

.page-hero.full-bleed {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 56px 0;
    color: #fff;
    background: linear-gradient(90deg, #78350f, #9a3412, #78350f);
}

.page-hero.full-bleed .page-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.page-hero.full-bleed h1,
.page-hero.full-bleed p {
    color: #fff;
}

.category-wrap,
.search-wrap {
    padding: 32px 0 58px;
}

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(41, 37, 36, 0.08);
    padding: 16px;
}

.filter-panel input,
.filter-panel select,
.search-box input {
    min-height: 44px;
    border: 1px solid #e7e5e4;
    border-radius: 999px;
    outline: none;
    background: #fff;
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-box input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-panel input {
    flex: 1 1 260px;
}

.filter-button,
.page-button {
    min-height: 44px;
    color: #fff;
    background: #b45309;
    padding: 0 18px;
}

.empty-state {
    display: none;
    text-align: center;
    color: #78716c;
    background: #fff;
    border-radius: 18px;
    padding: 48px 20px;
    box-shadow: 0 12px 28px rgba(41, 37, 36, 0.08);
}

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

.detail-wrap {
    padding: 34px 0 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #a16207;
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.breadcrumb a:hover {
    color: #78350f;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.86fr);
    gap: 28px;
    align-items: start;
}

.player-card {
    overflow: hidden;
    background: #0c0a09;
}

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

.player-shell video {
    width: 100%;
    height: 100%;
    background: #0c0a09;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
}

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

.big-play {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #b45309;
    background: rgba(255, 255, 255, 0.94);
    font-size: 2rem;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 16px;
    z-index: 4;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
}

.detail-panel {
    margin-top: 22px;
    padding: 24px;
}

.detail-title h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.detail-tags span {
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    padding: 7px 12px;
    font-size: 0.86rem;
    font-weight: 700;
}

.detail-copy h2,
.side-block h2 {
    margin: 24px 0 10px;
    font-size: 1.18rem;
    font-weight: 900;
}

.detail-copy p {
    margin: 0 0 14px;
    color: #57534e;
    text-align: justify;
}

.review-box {
    border-left: 4px solid #f59e0b;
    border-radius: 14px;
    background: #fffbeb;
    padding: 16px;
}

.side-block {
    padding: 20px;
}

.side-block + .side-block {
    margin-top: 20px;
}

.side-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f4;
}

.side-card:last-child {
    border-bottom: 0;
}

.side-card img {
    width: 110px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
}

.side-card h3 {
    margin: 0 0 4px;
    color: #292524;
    font-size: 0.95rem;
    line-height: 1.35;
}

.side-card p {
    margin: 0;
    color: #78716c;
    font-size: 0.82rem;
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 760px;
    margin-top: 22px;
}

.search-box input {
    flex: 1;
    border-radius: 18px;
    min-height: 54px;
    padding: 0 18px;
}

.search-box button {
    min-height: 54px;
    border: 0;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    padding: 0 26px;
    font-weight: 900;
}

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

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.pagination span {
    color: #78716c;
}

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

    .menu-toggle {
        display: block;
    }

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

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

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

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

    .hero-content {
        padding: 64px 0 86px;
    }

    .hero-control {
        display: none;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

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

    .list-card {
        grid-template-columns: auto 104px 1fr;
        gap: 12px;
    }

    .detail-panel,
    .side-block {
        padding: 18px;
    }

    .search-box,
    .filter-panel {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 520px) {
    .nav-shell,
    .section,
    .page-hero,
    .detail-wrap,
    .category-wrap,
    .search-wrap,
    .page-hero.full-bleed .page-hero-inner,
    .mobile-search,
    .mobile-nav {
        width: min(100% - 24px, 1180px);
    }

    .brand-text {
        font-size: 1.05rem;
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .hero-actions a {
        width: 100%;
    }

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

    .scroll-row {
        grid-auto-columns: minmax(240px, 86vw);
    }

    .list-card,
    .side-card {
        grid-template-columns: 1fr;
    }

    .list-poster,
    .side-card img {
        width: 100%;
        height: auto;
    }
}
