:root {
    --stone-950: #0c0a09;
    --stone-900: #1c1917;
    --stone-850: #24201d;
    --stone-800: #292524;
    --stone-700: #44403c;
    --stone-600: #57534e;
    --stone-500: #78716c;
    --stone-300: #d6d3d1;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --stone-50: #fafaf9;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --white: #ffffff;
    --shadow-soft: 0 14px 40px rgba(28, 25, 23, 0.12);
    --shadow-strong: 0 24px 70px rgba(12, 10, 9, 0.32);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

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

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

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

img.is-missing {
    opacity: 0;
}

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--stone-100);
    background: rgba(28, 25, 23, 0.96);
    box-shadow: 0 10px 32px rgba(12, 10, 9, 0.22);
    backdrop-filter: blur(14px);
}

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

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

.brand-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.04em;
}

.brand-text em {
    color: var(--stone-300);
    font-size: 12px;
    font-style: normal;
}

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

.main-nav a,
.mobile-nav a {
    color: var(--stone-200);
    font-size: 15px;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--amber-500);
}

.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 270px;
    overflow: hidden;
    background: rgba(68, 64, 60, 0.86);
    border: 1px solid rgba(214, 211, 209, 0.12);
    border-radius: 999px;
}

.nav-search input,
.hero-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-width: 0;
    color: var(--stone-100);
    background: transparent;
    border: 0;
    outline: 0;
}

.nav-search input {
    padding: 10px 84px 10px 18px;
}

.nav-search button {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    color: var(--white);
    background: var(--amber-600);
    border: 0;
    border-radius: 999px;
    padding: 0 16px;
}

.mobile-menu-button {
    display: none;
    color: var(--stone-100);
    background: rgba(68, 64, 60, 0.8);
    border: 1px solid rgba(214, 211, 209, 0.18);
    border-radius: var(--radius-sm);
    padding: 8px 11px;
}

.mobile-nav {
    display: none;
    background: var(--stone-950);
    border-top: 1px solid rgba(214, 211, 209, 0.12);
}

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

.mobile-nav nav {
    display: grid;
    gap: 12px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 18px;
}

.hero-carousel {
    color: var(--white);
    background: var(--stone-900);
}

.hero-stage {
    position: relative;
    height: min(620px, calc(100vh - 68px));
    min-height: 500px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transition: opacity 0.9s ease;
}

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

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber-100);
    background: rgba(28, 25, 23, 0.46);
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 14px;
    letter-spacing: 0.03em;
}

.hero-copy h1,
.page-hero h1 {
    max-width: 840px;
    margin: 20px 0 14px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 2vw, 21px);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-tags span,
.tag-list span {
    color: var(--stone-100);
    background: rgba(12, 10, 9, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
}

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

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

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

.btn.primary {
    color: var(--white);
    background: var(--amber-600);
}

.btn.primary:hover {
    background: var(--amber-700);
}

.btn.ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--white);
    background: rgba(12, 10, 9, 0.48);
    border: 0;
    border-radius: 999px;
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(12, 10, 9, 0.78);
}

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

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

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

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

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

.home-search-panel {
    color: var(--white);
    background: linear-gradient(135deg, var(--stone-900), var(--stone-800));
    border-top: 1px solid rgba(245, 158, 11, 0.18);
}

.search-panel-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
    gap: 24px;
    align-items: center;
    padding: 24px 0;
}

.search-panel-shell strong {
    display: block;
    font-size: 20px;
}

.search-panel-shell p {
    margin: 4px 0 0;
    color: var(--stone-300);
}

.hero-search,
.search-page-form {
    display: flex;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

.hero-search input,
.search-page-form input {
    padding: 13px 18px;
}

.hero-search button,
.search-page-form button {
    color: var(--white);
    background: var(--amber-600);
    border: 0;
    padding: 0 24px;
    font-weight: 700;
}

.page-stack {
    display: grid;
    gap: 54px;
    padding: 54px 0;
}

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

.section-head.compact {
    align-items: center;
    margin-bottom: 14px;
}

.section-head h2,
.section-head h3 {
    margin: 0;
    color: var(--stone-800);
    line-height: 1.2;
}

.section-head h2 {
    font-size: clamp(25px, 3vw, 34px);
}

.section-head h3 {
    font-size: 22px;
}

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

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

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

.small-grid {
    gap: 16px;
}

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

.poster-frame,
.wide-cover,
.rank-cover,
.compact-thumb,
.side-poster {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.26), transparent 34%),
        linear-gradient(135deg, var(--stone-800), var(--stone-950));
}

.poster-frame {
    aspect-ratio: 2 / 3;
    display: block;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.poster-frame img,
.wide-cover img,
.rank-cover img,
.compact-thumb img,
.side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.movie-card:hover img,
.compact-card:hover img,
.rank-item:hover img {
    transform: scale(1.08);
}

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    color: var(--white);
    background: var(--amber-600);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
}

.play-float {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    background: rgba(12, 10, 9, 0.0);
    font-size: 42px;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.movie-card:hover .play-float,
.wide-cover:hover .play-float {
    background: rgba(12, 10, 9, 0.35);
    opacity: 1;
}

.movie-card h3 {
    margin: 11px 0 4px;
    color: var(--stone-800);
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.movie-title:hover,
.compact-card:hover strong,
.rank-item h3 a:hover {
    color: var(--amber-700);
}

.card-meta {
    margin: 0;
    color: var(--stone-500);
    font-size: 13px;
}

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

.movie-card-wide {
    overflow: hidden;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.wide-cover {
    display: block;
    aspect-ratio: 16 / 10;
}

.wide-body {
    padding: 16px;
}

.movie-title {
    display: block;
    color: var(--stone-800);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.wide-body p {
    margin: 8px 0 12px;
    color: var(--stone-600);
    font-size: 14px;
}

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

.category-showcase {
    margin-left: calc((100vw - min(1180px, calc(100vw - 32px))) / -2);
    margin-right: calc((100vw - min(1180px, calc(100vw - 32px))) / -2);
    padding: 44px max(16px, calc((100vw - 1180px) / 2));
    background: var(--stone-100);
}

.category-strip + .category-strip {
    margin-top: 34px;
}

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

.compact-card {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding: 12px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.compact-thumb {
    flex: 0 0 82px;
    width: 82px;
    height: 82px;
    border-radius: var(--radius-sm);
}

.compact-info {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.compact-info strong {
    overflow: hidden;
    color: var(--stone-800);
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-info em {
    color: var(--stone-500);
    font-size: 13px;
    font-style: normal;
}

.rank-list {
    display: grid;
    gap: 16px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 112px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.rank-number {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
    border-radius: 50%;
    font-weight: 900;
}

.rank-cover {
    width: 112px;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-sm);
}

.rank-body h3 {
    margin: 0 0 5px;
    font-size: 18px;
    line-height: 1.35;
}

.rank-body p {
    margin: 0 0 8px;
    color: var(--stone-600);
    font-size: 14px;
}

.page-hero {
    color: var(--white);
    background-color: var(--stone-900);
    background-position: center;
    background-size: cover;
}

.small-hero,
.category-hero {
    padding: 70px 0 76px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--amber-100);
}

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

.category-card {
    overflow: hidden;
    min-height: 250px;
    color: var(--white);
    background-position: center;
    background-size: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card a {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 250px;
    padding: 28px;
}

.category-card span {
    width: max-content;
    color: var(--amber-100);
    background: rgba(12, 10, 9, 0.42);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 13px;
}

.category-card h2 {
    margin: 16px 0 8px;
    font-size: 30px;
    line-height: 1.15;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

.filter-panel {
    position: sticky;
    top: 84px;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: rgba(28, 25, 23, 0.94);
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.filter-panel input,
.filter-panel select {
    color: var(--stone-100);
    background: rgba(68, 64, 60, 0.8);
    border: 1px solid rgba(214, 211, 209, 0.16);
    border-radius: 999px;
    padding: 11px 14px;
}

.filter-panel option {
    color: var(--stone-900);
}

.filter-count {
    color: var(--amber-100);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.detail-top {
    color: var(--white);
    background: radial-gradient(circle at 30% 10%, rgba(245, 158, 11, 0.18), transparent 36%), var(--stone-900);
    padding: 30px 0 42px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--stone-950);
    border-radius: 24px;
    box-shadow: var(--shadow-strong);
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: var(--stone-950);
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    gap: 8px;
    place-content: center;
    place-items: center;
    color: var(--white);
    background:
        radial-gradient(circle, rgba(245, 158, 11, 0.28), transparent 24%),
        linear-gradient(180deg, rgba(12, 10, 9, 0.22), rgba(12, 10, 9, 0.78));
    border: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
    visibility: hidden;
    opacity: 0;
}

.player-overlay span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    background: var(--amber-600);
    border-radius: 999px;
    box-shadow: 0 0 0 12px rgba(245, 158, 11, 0.18);
    font-size: 34px;
}

.player-overlay strong {
    font-size: 24px;
}

.player-overlay em {
    color: var(--stone-300);
    font-style: normal;
}

.player-message {
    position: absolute;
    right: 18px;
    bottom: 16px;
    left: 18px;
    color: var(--amber-100);
    font-size: 14px;
    text-align: center;
    pointer-events: none;
}

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

.detail-title-block h1 {
    margin: 16px 0 10px;
    color: var(--stone-800);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
}

.detail-title-block p {
    margin: 0;
    color: var(--stone-600);
    font-size: 18px;
}

.detail-title-block .hero-kicker {
    color: var(--amber-700);
    background: var(--amber-100);
    border-color: rgba(217, 119, 6, 0.2);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 24px 0;
}

.tag-list span {
    color: var(--stone-700);
    background: var(--stone-100);
    border-color: var(--stone-200);
}

.content-card,
.side-card {
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.content-card + .content-card {
    margin-top: 18px;
}

.content-card h2,
.side-card h2 {
    margin: 0 0 12px;
    color: var(--stone-800);
    font-size: 24px;
}

.content-card p {
    margin: 0;
    color: var(--stone-700);
    font-size: 17px;
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 18px;
}

.side-poster {
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
    font-size: 14px;
}

.side-card dt {
    color: var(--stone-500);
}

.side-card dd {
    margin: 0;
    color: var(--stone-800);
    font-weight: 700;
}

.side-card a {
    color: var(--amber-700);
}

.prev-next {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 22px;
}

.prev-next a {
    color: var(--amber-700);
    font-weight: 700;
}

.related-section {
    padding-top: 42px;
}

.search-page-form {
    background: var(--stone-900);
    border-radius: var(--radius-lg);
}

.search-page-form input {
    color: var(--white);
}

.search-status {
    color: var(--stone-600);
    font-weight: 700;
}

.site-footer {
    color: var(--stone-300);
    background: var(--stone-950);
    margin-top: 54px;
    padding: 42px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 34px;
}

.footer-brand {
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.site-footer p {
    margin: 10px 0 0;
}

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

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

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

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

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

    .wide-grid,
    .home-rank,
    .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .detail-side {
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

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

    .hero-stage {
        min-height: 540px;
    }

    .hero-copy {
        width: min(100% - 24px, 1180px);
        padding-bottom: 74px;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel-shell,
    .category-grid,
    .wide-grid,
    .home-rank,
    .compact-grid,
    .footer-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

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

    .filter-panel {
        position: static;
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 44px 90px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-cover {
        width: 90px;
    }

    .rank-body p {
        display: none;
    }

    .content-card,
    .side-card {
        padding: 18px;
    }

    .player-overlay span {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}

@media (max-width: 430px) {
    .poster-grid,
    .poster-grid.full-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

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

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