:root {
    --amber-50: #fff7ed;
    --amber-100: #ffedd5;
    --amber-200: #fed7aa;
    --amber-300: #fdba74;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-900: #78350f;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-600: #57534e;
    --stone-800: #292524;
    --red-900: #7f1d1d;
    --shadow-soft: 0 18px 48px rgba(120, 53, 15, 0.12);
    --shadow-card: 0 14px 34px rgba(120, 53, 15, 0.16);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--stone-800);
    background: linear-gradient(180deg, var(--amber-50) 0%, var(--stone-100) 44%, #ffffff 100%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 251, 235, 0.88);
    border-bottom: 1px solid rgba(217, 119, 6, 0.16);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 74px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--amber-900);
    font-size: 24px;
    font-weight: 900;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-500), #ef4444);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.26);
    font-size: 16px;
}

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

.nav-link {
    color: var(--amber-900);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.header-search input,
.mobile-search input,
.local-search,
.filter-select {
    width: 100%;
    border: 2px solid var(--amber-200);
    border-radius: 999px;
    background: #ffffff;
    color: var(--stone-800);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-search input {
    padding: 10px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.local-search:focus,
.filter-select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    background: var(--amber-600);
    cursor: pointer;
    font-weight: 800;
}

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

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

.mobile-panel {
    display: none;
    padding: 0 20px 18px;
    border-top: 1px solid rgba(217, 119, 6, 0.16);
}

.mobile-panel.open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.mobile-link {
    border-radius: 14px;
    padding: 10px 12px;
    color: var(--amber-900);
    background: #ffffff;
    font-weight: 800;
}

.mobile-link.active {
    color: #ffffff;
    background: var(--amber-600);
}

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

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 22%, rgba(245, 158, 11, 0.28), transparent 34%),
        linear-gradient(90deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.68) 44%, rgba(28, 25, 23, 0.22)),
        linear-gradient(0deg, rgba(28, 25, 23, 0.9), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    gap: 48px;
    align-items: center;
    height: 100%;
    color: #ffffff;
}

.hero-copy {
    max-width: 700px;
}

.hero-kicker,
.eyebrow {
    margin: 0 0 10px;
    color: var(--amber-300);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(44px, 7vw, 86px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

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

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

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

.hero-tags span,
.tag-row span,
.genre-pills span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--amber-900);
    background: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 800;
}

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

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

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-500), #ef4444);
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.34);
}

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

.btn.ghost.amber {
    color: var(--amber-900);
    border-color: rgba(217, 119, 6, 0.26);
    background: rgba(255, 255, 255, 0.7);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.44);
    transform: rotate(2deg);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--amber-300);
}

.section {
    padding: 72px 0;
}

.quick-cats {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-top: 24px;
    padding-bottom: 10px;
}

.quick-cats a {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--amber-900);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    font-weight: 900;
}

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

.section-head h2,
.page-hero h1,
.category-hero h1,
.detail-info h1 {
    margin: 0;
    color: var(--stone-800);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.category-hero p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--stone-600);
}

.section-more {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 10px 18px;
    color: var(--amber-900);
    background: var(--amber-100);
    font-weight: 900;
}

.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,
.latest-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(217, 119, 6, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--amber-100), var(--stone-200));
}

.poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 54%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.year-badge,
.type-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.56);
    backdrop-filter: blur(10px);
}

.year-badge {
    left: 12px;
}

.type-badge {
    right: 12px;
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0;
    font-size: 19px;
    line-height: 1.3;
}

.card-body h3 a:hover {
    color: var(--amber-700);
}

.card-body p {
    min-height: 52px;
    margin: 10px 0 12px;
    color: var(--stone-600);
    font-size: 14px;
}

.meta-line {
    display: flex;
    gap: 8px;
    color: var(--amber-700);
    font-size: 13px;
    font-weight: 800;
}

.meta-line span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.tag-row span {
    color: var(--amber-800);
    background: var(--amber-100);
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    border-radius: var(--radius-xl);
    padding: 20px;
    background: linear-gradient(180deg, #ffffff, var(--amber-50));
    box-shadow: var(--shadow-soft);
}

.rank-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.rank-panel-head h2 {
    margin: 0;
    font-size: 24px;
}

.rank-panel-head a {
    color: var(--amber-700);
    font-weight: 900;
}

.rank-item {
    display: grid;
    grid-template-columns: auto 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--amber-100);
    padding: 12px 0;
}

.rank-item:last-child {
    border-bottom: 0;
}

.rank-number {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    background: var(--amber-600);
    font-weight: 900;
}

.rank-item img {
    width: 64px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--amber-100);
}

.rank-item strong,
.rank-item em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-item em {
    color: var(--stone-600);
    font-size: 13px;
    font-style: normal;
}

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

.category-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.category-cover {
    position: relative;
    display: block;
    overflow: hidden;
}

.category-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.category-cover span {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(120, 53, 15, 0.54), transparent);
}

.category-card > div {
    padding: 18px;
}

.category-card h3 {
    margin: 0 0 8px;
    color: var(--amber-900);
    font-size: 22px;
}

.category-card p {
    margin: 0 0 14px;
    color: var(--stone-600);
    font-size: 14px;
}

.mini-links {
    display: grid;
    gap: 6px;
}

.mini-links a {
    overflow: hidden;
    color: var(--amber-700);
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-main {
    min-height: 70vh;
}

.compact-hero {
    border-radius: var(--radius-xl);
    margin-top: 32px;
    padding: 54px;
    background:
        radial-gradient(circle at 82% 12%, rgba(245, 158, 11, 0.24), transparent 34%),
        linear-gradient(135deg, #ffffff, var(--amber-50));
    box-shadow: var(--shadow-soft);
}

.category-hero {
    padding: 42px 0 12px;
}

.category-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 42px;
    align-items: center;
    border-radius: var(--radius-xl);
    padding: 42px;
    background: linear-gradient(135deg, #ffffff, var(--amber-50));
    box-shadow: var(--shadow-soft);
}

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

.category-stack a {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: var(--amber-100);
}

.category-stack img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.category-stack span {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    overflow: hidden;
    padding: 26px 10px 10px;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
}

.local-search,
.filter-select {
    padding: 12px 16px;
}

.empty-state {
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    padding: 28px;
    color: var(--stone-600);
    background: #ffffff;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.rank-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
    border-radius: var(--radius-xl);
    padding: 20px 26px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.detail-main {
    background: linear-gradient(180deg, #1c1917 0, #1c1917 520px, var(--stone-100) 520px);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    filter: blur(18px);
    transform: scale(1.12);
}

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

.detail-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.76), #1c1917 88%);
}

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

.crumb,
.crumb-sep {
    color: rgba(255, 255, 255, 0.74);
    font-weight: 800;
}

.crumb:hover {
    color: #ffffff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    margin-top: 28px;
}

.detail-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    object-fit: cover;
    background: var(--amber-100);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

.detail-info h1 {
    color: #ffffff;
}

.detail-info .lead {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 20px;
}

.detail-meta {
    margin-top: 18px;
}

.detail-tags span,
.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 420px;
    gap: 28px;
    align-items: start;
    margin-top: -42px;
    padding-top: 0;
}

.player-card,
.content-panel {
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

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

.video-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
}

.video-wrap video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.36);
    cursor: pointer;
}

.play-cover.is-hidden {
    display: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    padding-left: 6px;
    color: var(--amber-900);
    background: #ffffff;
    font-size: 32px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.play-cover strong {
    font-size: 20px;
}

.content-panel {
    padding: 28px;
}

.content-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.content-panel p {
    margin: 0 0 22px;
    color: var(--stone-600);
}

.genre-pills span {
    color: var(--amber-800);
    background: var(--amber-100);
}

.site-footer {
    margin-top: 50px;
    color: #fee2e2;
    background: linear-gradient(135deg, var(--red-900), #991b1b 56%, #7c2d12);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    padding: 54px 0;
}

.footer-logo {
    color: #ffffff;
}

.site-footer p {
    max-width: 520px;
}

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

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .header-search {
        margin-left: auto;
    }

    .hero-content,
    .category-hero-inner,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .split-section {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

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

@media (max-width: 820px) {
    .container {
        width: min(100% - 28px, 1200px);
    }

    .header-inner {
        min-height: 66px;
    }

    .header-search {
        display: none;
    }

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

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

    .hero h1 {
        font-size: clamp(38px, 12vw, 64px);
    }

    .hero-arrow {
        display: none;
    }

    .section {
        padding: 48px 0;
    }

    .section-head {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 14px;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .latest-grid,
    .category-grid,
    .rank-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-toolbar {
        grid-template-columns: 1fr;
    }

    .compact-hero,
    .category-hero-inner {
        padding: 30px;
    }

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

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

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

@media (max-width: 540px) {
    .logo,
    .footer-logo {
        font-size: 20px;
    }

    .hero {
        min-height: 560px;
    }

    .hero-copy {
        padding-right: 12px;
    }

    .hero-text {
        font-size: 16px;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .latest-grid,
    .category-grid,
    .rank-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: auto 56px minmax(0, 1fr);
    }

    .detail-info .lead {
        font-size: 17px;
    }
}
