* {
    box-sizing: border-box;
}

:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --orange-50: #fff7ed;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --yellow-50: #fefce8;
    --yellow-500: #eab308;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --black: #000000;
    --shadow-lg: 0 10px 25px rgba(17, 24, 39, 0.12);
    --shadow-xl: 0 18px 45px rgba(17, 24, 39, 0.18);
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    color: var(--gray-800);
    background: linear-gradient(135deg, var(--amber-50), var(--orange-50), var(--yellow-50));
}

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

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

button,
input {
    font: inherit;
}

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

.page-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(245, 158, 11, 0.16);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 25px rgba(146, 64, 14, 0.08);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}

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

.brand-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 24px;
    background: linear-gradient(135deg, var(--yellow-500), var(--amber-500), var(--orange-500));
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08) rotate(-4deg);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-name {
    font-weight: 800;
    font-size: 20px;
    background: linear-gradient(90deg, var(--amber-600), var(--orange-600), var(--yellow-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--gray-600);
}

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

.nav-link {
    color: var(--gray-700);
    font-weight: 700;
    transition: color 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--amber-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--amber-700);
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

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

.mobile-link {
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(254, 243, 199, 0.72);
    font-weight: 700;
}

.mobile-link.active {
    color: var(--amber-700);
    background: var(--amber-100);
}

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

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

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

.hero-copy {
    max-width: 720px;
    color: var(--white);
}

.hero-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    background: var(--amber-500);
    color: var(--white);
    font-weight: 800;
    font-size: 14px;
    padding: 8px 16px;
    margin-bottom: 18px;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-movie-title {
    font-size: clamp(26px, 3vw, 42px) !important;
    color: var(--amber-200);
}

.hero-copy p {
    margin: 0;
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.7;
    color: #f3f4f6;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
}

.hero-meta span,
.detail-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    padding: 7px 12px;
    font-size: 14px;
    backdrop-filter: blur(8px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    font-weight: 800;
    padding: 0 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: var(--amber-500);
    box-shadow: var(--shadow-lg);
}

.primary-button:hover {
    transform: scale(1.04);
    background: var(--amber-600);
    box-shadow: var(--shadow-xl);
}

.ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.ghost-button:hover {
    transform: scale(1.04);
    background: rgba(255, 255, 255, 0.28);
}

.ghost-button.amber {
    color: var(--amber-700);
    background: var(--amber-100);
    border-color: var(--amber-200);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--amber-500);
}

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

.intro-search {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 32px;
    align-items: center;
}

.intro-search h2,
.section-heading h2,
.content-card h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    color: var(--gray-800);
}

.intro-search p {
    margin: 16px 0 0;
    color: var(--gray-600);
    font-size: 18px;
    line-height: 1.8;
}

.home-search,
.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-lg);
}

.home-search input,
.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--gray-800);
}

.home-search button {
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: var(--amber-500);
    font-weight: 800;
    padding: 12px 20px;
    cursor: pointer;
}

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

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

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

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

.movie-card {
    min-width: 0;
}

.card-link {
    display: grid;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--amber-100), var(--orange-50));
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.52));
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    border-radius: 999px;
    background: #ef4444;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    padding: 5px 9px;
}

.play-chip {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(245, 158, 11, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.card-body strong {
    color: var(--gray-900);
    line-height: 1.35;
}

.card-line {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.55;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row em,
.detail-tags span {
    display: inline-flex;
    border-radius: 999px;
    background: var(--amber-100);
    color: var(--amber-700);
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 9px;
}

.warm-panel {
    border-radius: var(--radius-3xl);
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.92), rgba(255, 247, 237, 0.92));
}

.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 320px);
    gap: 22px;
    overflow-x: auto;
    padding: 6px 0 18px;
}

.compact-card .poster-wrap {
    aspect-ratio: 16 / 10;
}

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

.category-tile,
.category-overview-card a {
    display: grid;
    gap: 14px;
    min-height: 168px;
    padding: 26px;
    border-radius: var(--radius-2xl);
    background: linear-gradient(135deg, var(--white), var(--amber-50));
    box-shadow: var(--shadow-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.category-tile span,
.category-overview-body strong {
    color: var(--gray-900);
    font-size: 22px;
    font-weight: 900;
}

.category-tile small,
.category-overview-body small {
    color: var(--gray-600);
    line-height: 1.7;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.category-cover-stack img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    object-fit: cover;
}

.category-overview-body {
    display: grid;
    gap: 10px;
}

.wide-grid,
.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.rank-list {
    grid-template-columns: 1fr;
}

.wide-card a {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-2xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.wide-poster {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 3 / 4;
}

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

.rank-number {
    position: absolute;
    left: 8px;
    top: 8px;
    border-radius: 10px;
    background: var(--amber-500);
    color: var(--white);
    font-weight: 900;
    padding: 6px 8px;
}

.wide-body {
    display: grid;
    gap: 8px;
}

.wide-body strong {
    color: var(--gray-900);
    font-size: 20px;
}

.wide-body span {
    color: var(--gray-600);
    line-height: 1.65;
}

.wide-body small {
    color: var(--gray-500);
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.96), rgba(217, 119, 6, 0.94), rgba(234, 88, 12, 0.92));
}

.compact-hero {
    padding: 86px 0;
}

.compact-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
}

.compact-hero p {
    max-width: 780px;
    margin: 0;
    color: #fff7ed;
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    position: sticky;
    top: 76px;
    z-index: 20;
    background: rgba(255, 251, 235, 0.92);
    border-bottom: 1px solid rgba(245, 158, 11, 0.14);
    backdrop-filter: blur(12px);
}

.filter-inner {
    display: grid;
    gap: 14px;
    padding: 18px 0;
}

.search-box {
    box-shadow: none;
    border: 1px solid rgba(245, 158, 11, 0.18);
}

.search-box span {
    color: var(--amber-700);
    font-weight: 900;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-pill {
    border: 0;
    border-radius: 999px;
    background: var(--white);
    color: var(--gray-700);
    font-weight: 800;
    padding: 9px 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(146, 64, 14, 0.08);
}

.filter-pill.active,
.filter-pill:hover {
    color: var(--white);
    background: var(--amber-500);
}

.filter-status {
    margin: 0;
    color: var(--gray-600);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: var(--white);
    background: var(--gray-900);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) brightness(0.7);
    transform: scale(1.04);
}

.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.28));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 48px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
    color: #fde68a;
    font-weight: 700;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.12;
}

.detail-one-line {
    max-width: 820px;
    margin: 0;
    color: #f3f4f6;
    font-size: 20px;
    line-height: 1.8;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 26px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-3xl);
    background: var(--black);
    box-shadow: var(--shadow-xl);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    gap: 16px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

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

.player-button {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: var(--amber-500);
    font-size: 36px;
    box-shadow: var(--shadow-xl);
}

.player-overlay strong {
    font-size: clamp(20px, 3vw, 34px);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card {
    border-radius: var(--radius-2xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-lg);
    padding: 30px;
}

.content-card p {
    color: var(--gray-700);
    font-size: 17px;
    line-height: 2;
}

.site-footer {
    margin-top: 54px;
    color: var(--white);
    background: linear-gradient(90deg, #78350f, #7c2d12, #713f12);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 20px;
}

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

.site-footer p,
.site-footer a {
    color: #fde68a;
    line-height: 1.8;
}

.site-footer ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-bottom {
    border-top: 1px solid rgba(253, 230, 138, 0.18);
    padding: 18px;
    text-align: center;
    color: #fde68a;
}

[data-search-card].hidden {
    display: none;
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero {
        height: auto;
        min-height: 620px;
    }

    .hero-content {
        padding: 84px 0 92px;
    }

    .intro-search,
    .detail-grid,
    .detail-content,
    .wide-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .filter-panel {
        top: 76px;
    }

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

    .detail-hero {
        min-height: auto;
    }
}

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

    .brand-subtitle {
        display: none;
    }

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

    .home-search {
        display: grid;
    }

    .wide-card a {
        grid-template-columns: 88px minmax(0, 1fr);
    }

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