* {
    box-sizing: border-box;
}

:root {
    --color-stone-50: #fafaf9;
    --color-stone-100: #f5f5f4;
    --color-stone-200: #e7e5e4;
    --color-stone-300: #d6d3d1;
    --color-stone-400: #a8a29e;
    --color-stone-500: #78716c;
    --color-stone-600: #57534e;
    --color-stone-700: #44403c;
    --color-stone-800: #292524;
    --color-stone-900: #1c1917;
    --color-amber-50: #fffbeb;
    --color-amber-100: #fef3c7;
    --color-amber-200: #fde68a;
    --color-amber-300: #fcd34d;
    --color-amber-400: #fbbf24;
    --color-amber-500: #f59e0b;
    --color-amber-600: #d97706;
    --color-amber-700: #b45309;
    --color-amber-800: #92400e;
    --color-amber-900: #78350f;
    --shadow-card: 0 12px 30px rgba(28, 25, 23, 0.12);
    --shadow-strong: 0 28px 60px rgba(28, 25, 23, 0.22);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--color-stone-800);
    background: var(--color-stone-100);
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.bg-gradient-ruins {
    min-height: 100vh;
    background-image: linear-gradient(135deg, var(--color-stone-100), var(--color-amber-50), var(--color-stone-200));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(41, 37, 36, 0.96);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(12px);
}

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

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

.brand-mark {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--color-stone-900);
    background: linear-gradient(135deg, var(--color-amber-300), var(--color-amber-600));
    font-size: 14px;
    box-shadow: 0 8px 18px rgba(217, 119, 6, 0.35);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px;
    font-weight: 600;
}

.site-nav a {
    color: var(--color-stone-200);
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--color-amber-400);
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--color-stone-900);
}

.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-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.28));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    color: #fff;
}

.eyebrow {
    color: var(--color-amber-400);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1;
    font-weight: 900;
}

.hero-copy p {
    margin: 0 0 24px;
    color: var(--color-stone-200);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: var(--color-stone-200);
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--color-amber-800);
    background: var(--color-amber-100);
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: var(--color-amber-200);
    background: rgba(217, 119, 6, 0.35);
}

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

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

.btn-primary {
    color: #fff;
    background: var(--color-amber-600);
    box-shadow: 0 12px 22px rgba(217, 119, 6, 0.32);
}

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

.btn-primary:hover {
    background: var(--color-amber-700);
    box-shadow: 0 18px 28px rgba(217, 119, 6, 0.38);
}

.btn-ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.48);
    font-size: 34px;
    line-height: 1;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.intro-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    align-items: center;
    gap: 28px;
    margin-top: -44px;
    position: relative;
    z-index: 6;
    padding: 28px;
    border-radius: 24px;
    color: var(--color-stone-800);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-strong);
}

.intro-search h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 36px);
}

.intro-search p {
    margin: 0;
    color: var(--color-stone-600);
}

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

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--color-stone-200);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--color-stone-800);
    background: #fff;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.py-section {
    padding-top: 64px;
    padding-bottom: 64px;
}

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

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

.section-title {
    margin: 0;
    color: var(--color-stone-800);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
}

.section-head-light .section-title,
.section-head-light a {
    color: #fff;
}

.white-section {
    background: rgba(255, 255, 255, 0.72);
}

.dark-section {
    color: #fff;
    background: linear-gradient(135deg, var(--color-stone-800), var(--color-stone-900));
}

.card {
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.card-hover {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.movie-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: var(--color-stone-200);
}

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

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

.year-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 4px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.7);
}

.year-badge {
    right: 10px;
}

.rank-badge {
    left: 10px;
    background: var(--color-amber-600);
}

.movie-info {
    padding: 16px;
}

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

.movie-info h3 {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--color-stone-800);
    font-size: 18px;
    line-height: 1.45;
    font-weight: 800;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-info p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--color-stone-600);
    font-size: 14px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.movie-card-small .poster-wrap img {
    aspect-ratio: 3 / 4;
}

.movie-card-small .movie-info h3 {
    min-height: 44px;
    font-size: 16px;
}

.movie-card-small .movie-info p,
.movie-card-small .tag-list {
    display: none;
}

.feature-card {
    position: relative;
    min-height: 500px;
}

.feature-link,
.feature-card img {
    width: 100%;
    height: 100%;
}

.feature-card img {
    position: absolute;
    inset: 0;
    object-fit: cover;
}

.feature-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(28px, 5vw, 56px);
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.38), transparent);
}

.feature-overlay h3 {
    max-width: 760px;
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
}

.feature-overlay p {
    max-width: 720px;
    margin: 0 0 18px;
    color: var(--color-stone-200);
    font-size: 18px;
}

.feature-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
}

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

.latest-row {
    display: grid;
    grid-template-columns: 130px minmax(140px, 0.7fr) minmax(240px, 1.4fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, transform 0.2s ease;
}

.latest-row:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.18);
}

.latest-row img {
    width: 130px;
    height: 82px;
    border-radius: 10px;
    object-fit: cover;
}

.latest-title {
    font-weight: 900;
}

.latest-desc {
    display: -webkit-box;
    overflow: hidden;
    color: var(--color-stone-300);
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.latest-year {
    color: var(--color-amber-400);
    font-weight: 800;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-pills a {
    padding: 12px 18px;
    border-radius: 999px;
    color: var(--color-stone-800);
    background: #fff;
    box-shadow: var(--shadow-card);
    font-weight: 800;
    transition: transform 0.2s ease, color 0.2s ease;
}

.category-pills a:hover {
    color: var(--color-amber-700);
    transform: translateY(-2px);
}

.page-main {
    padding-bottom: 32px;
}

.page-hero {
    padding-top: 72px;
    padding-bottom: 24px;
}

.small-hero h1 {
    max-width: 900px;
    margin: 0 0 16px;
    color: var(--color-stone-800);
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
}

.small-hero p {
    max-width: 860px;
    margin: 0;
    color: var(--color-stone-600);
    font-size: 18px;
}

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

.category-card a {
    display: block;
    padding: 28px;
}

.category-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    color: var(--color-stone-900);
    font-size: 28px;
    font-weight: 900;
}

.category-card p {
    min-height: 60px;
    margin: 0 0 18px;
    color: var(--color-stone-600);
}

.category-sample {
    display: grid;
    gap: 8px;
}

.category-sample a {
    padding: 0;
    color: var(--color-amber-700);
    font-weight: 700;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-card);
}

.filter-panel label span {
    display: block;
    margin-bottom: 6px;
    color: var(--color-stone-600);
    font-size: 13px;
    font-weight: 800;
}

.search-box {
    display: block;
    margin-bottom: 14px;
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.empty-state {
    margin: 16px 0 0;
    color: var(--color-stone-500);
    font-weight: 700;
}

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

.ranking-side {
    position: sticky;
    top: 88px;
    padding: 22px;
}

.ranking-side h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.ranking-side ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.ranking-side a {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 4px 10px;
    align-items: center;
}

.ranking-side span {
    grid-row: span 2;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--color-amber-600);
    font-size: 13px;
    font-weight: 900;
}

.ranking-side strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-side em {
    overflow: hidden;
    color: var(--color-stone-500);
    font-size: 12px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-main {
    padding-bottom: 24px;
}

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

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

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

.detail-bg-shade {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.32));
}

.detail-head {
    position: relative;
    z-index: 2;
    padding-top: 34px;
    padding-bottom: 56px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
    color: var(--color-stone-200);
    font-weight: 700;
}

.breadcrumbs a {
    color: var(--color-amber-300);
}

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

.detail-cover {
    width: 300px;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: var(--shadow-strong);
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.05;
    font-weight: 900;
}

.detail-copy p {
    max-width: 820px;
    margin: 0 0 22px;
    color: var(--color-stone-200);
    font-size: 19px;
}

.player-section {
    margin-top: -74px;
    position: relative;
    z-index: 3;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    box-shadow: var(--shadow-strong);
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
}

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

.play-cover strong {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    overflow: hidden;
    font-size: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.play-button {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--color-stone-900);
    background: var(--color-amber-400);
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.42);
    font-size: 34px;
    line-height: 1;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding-top: 34px;
}

.detail-article,
.detail-side {
    padding: 28px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    color: var(--color-stone-800);
    font-size: 26px;
    font-weight: 900;
}

.detail-article p {
    margin: 0 0 26px;
    color: var(--color-stone-700);
    font-size: 17px;
    line-height: 1.95;
}

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

.detail-side dt {
    color: var(--color-stone-500);
    font-size: 13px;
    font-weight: 800;
}

.detail-side dd {
    margin: -8px 0 0;
    color: var(--color-stone-800);
    font-weight: 800;
}

.site-footer {
    color: var(--color-stone-300);
    background: var(--color-stone-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 36px;
    padding-top: 46px;
    padding-bottom: 38px;
}

.footer-brand {
    margin-bottom: 14px;
    color: #fff;
}

.site-footer p {
    margin: 0;
    color: var(--color-stone-400);
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.footer-links a {
    color: var(--color-stone-400);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--color-amber-400);
}

.footer-bottom {
    padding: 18px 16px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-stone-500);
    text-align: center;
}

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

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

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

    .ranking-side {
        position: static;
    }
}

@media (max-width: 900px) {
    .menu-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 64px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 12px 16px 18px;
        background: rgba(28, 25, 23, 0.98);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        width: 100%;
        padding: 12px 0;
    }

    .intro-search,
    .detail-head-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .home-search {
        flex-direction: column;
    }

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

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

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

    .detail-cover {
        width: 220px;
    }
}

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

    .hero-carousel {
        height: 560px;
    }

    .hero-copy h1 {
        font-size: 40px;
    }

    .hero-arrow {
        display: none;
    }

    .intro-search {
        margin-top: -28px;
        padding: 22px;
    }

    .section-head,
    .latest-row {
        display: block;
    }

    .latest-row img {
        width: 100%;
        height: 160px;
        margin-bottom: 12px;
    }

    .movie-grid,
    .movie-grid-three,
    .all-grid,
    .poster-strip {
        grid-template-columns: 1fr;
    }

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

    .small-hero h1 {
        font-size: 38px;
    }

    .detail-hero {
        min-height: 680px;
    }

    .detail-cover {
        width: 180px;
    }

    .play-button {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
