:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --shadow-soft: 0 14px 40px rgba(41, 37, 36, 0.10);
    --shadow-strong: 0 20px 60px rgba(28, 25, 23, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(120, 53, 15, 0.96);
    color: var(--amber-50);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(28, 25, 23, 0.18);
}

.header-inner {
    max-width: 1180px;
    height: 64px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--amber-900);
    background: linear-gradient(135deg, var(--amber-100), var(--amber-500));
    border-radius: 12px;
    font-size: 13px;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}

.desktop-nav {
    display: flex;
    gap: 6px;
}

.desktop-nav a,
.mobile-nav a {
    padding: 9px 14px;
    border-radius: 10px;
    color: var(--amber-100);
    font-size: 14px;
    font-weight: 650;
    transition: background 0.22s ease, color 0.22s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: white;
    background: rgba(146, 64, 14, 0.8);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: rgba(146, 64, 14, 0.75);
}

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

.mobile-nav {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 14px;
}

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

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 10%, rgba(245, 158, 11, 0.35), transparent 42%), var(--stone-900);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.2));
}

.hero-content {
    position: absolute;
    inset: 0;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-pill {
    display: inline-flex;
    width: fit-content;
    padding: 8px 16px;
    border-radius: 999px;
    color: white;
    background: rgba(217, 119, 6, 0.92);
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(146, 64, 14, 0.35);
}

.hero-content h1,
.page-hero h1 {
    margin: 16px 0 12px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.hero-content p,
.page-hero p {
    max-width: 760px;
    margin: 0 auto 26px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 2.3vw, 21px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid transparent;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
    color: white;
    background: var(--amber-600);
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.35);
}

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

.btn-ghost {
    color: white;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
}

.btn-small {
    min-height: 38px;
    padding: 0 16px;
    color: var(--amber-800);
    background: var(--amber-100);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    transform: translateY(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.45);
    font-size: 34px;
    line-height: 1;
    transition: background 0.22s ease;
}

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

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 32px;
    background: white;
}

.section,
.search-band {
    padding: 58px 0;
}

.section-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-band {
    background: linear-gradient(135deg, var(--amber-50), white);
    border-bottom: 1px solid var(--stone-200);
}

.search-band-inner,
.section-title-row,
.category-overview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.search-band h2,
.section-title-row h2,
.section-heading-center h2,
.category-overview-head h2,
.sidebar-card h2,
.compact-title h2 {
    margin: 0 0 8px;
    color: var(--stone-800);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.search-band p,
.section-title-row p,
.section-heading-center p,
.category-overview-head p,
.compact-title p {
    margin: 0;
    color: var(--stone-600);
}

.site-search {
    display: flex;
    min-width: min(460px, 100%);
    padding: 8px;
    background: white;
    border: 1px solid var(--stone-200);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.site-search input,
.filter-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--stone-800);
    background: transparent;
}

.site-search input {
    padding: 0 12px;
}

.site-search button {
    border: 0;
    border-radius: 13px;
    padding: 0 22px;
    color: white;
    background: var(--amber-700);
    font-weight: 800;
}

.block-soft {
    background: linear-gradient(to bottom, var(--stone-50), white);
}

.block-featured {
    background: linear-gradient(to bottom, var(--amber-50), white);
}

.block-category {
    background: var(--stone-100);
}

.scroll-buttons {
    display: flex;
    gap: 8px;
}

.scroll-buttons button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--stone-200);
    border-radius: 50%;
    color: var(--stone-700);
    background: white;
    font-size: 28px;
    line-height: 1;
}

.horizontal-list {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 6px 0 14px;
    scrollbar-width: none;
}

.horizontal-list::-webkit-scrollbar {
    display: none;
}

.horizontal-list .movie-card {
    flex: 0 0 284px;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 26px rgba(41, 37, 36, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-card-large .poster-link {
    aspect-ratio: 16 / 9;
}

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

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

.poster-shade,
.category-tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 62%);
}

.duration,
.rank-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    color: white;
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 800;
}

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

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 48px;
    color: var(--stone-800);
    font-size: 17px;
    line-height: 1.4;
    font-weight: 850;
    transition: color 0.22s ease;
}

.movie-title:hover {
    color: var(--amber-700);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    color: var(--stone-500);
    font-size: 13px;
}

.movie-meta a,
.detail-meta a {
    color: var(--amber-700);
    font-weight: 750;
}

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

.mini-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mini-tags span,
.detail-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--amber-800);
    background: var(--amber-100);
    font-size: 12px;
    font-weight: 700;
}

.featured-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 22px;
}

.featured-side {
    display: grid;
    gap: 14px;
}

.compact-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(41, 37, 36, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.compact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.compact-cover {
    position: relative;
    flex: 0 0 102px;
    height: 70px;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--amber-100), var(--stone-200));
}

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

.compact-cover b {
    position: absolute;
    top: 6px;
    left: 6px;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: var(--amber-600);
    border-radius: 50%;
    font-size: 12px;
}

.compact-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.compact-info strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--stone-800);
    font-size: 15px;
    line-height: 1.35;
}

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

.section-heading-center {
    max-width: 720px;
    margin: 0 auto 34px;
    text-align: center;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    color: white;
    background: linear-gradient(135deg, var(--amber-700), var(--stone-900));
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-tile strong,
.category-tile em {
    position: relative;
    z-index: 1;
}

.category-tile strong {
    font-size: 24px;
    font-weight: 900;
}

.category-tile em {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-style: normal;
}

.more-link {
    color: var(--amber-700);
    font-weight: 850;
}

.page-hero {
    padding: 110px 0 70px;
    color: white;
    background: radial-gradient(circle at 20% 15%, rgba(245, 158, 11, 0.42), transparent 30%), linear-gradient(135deg, var(--amber-900), var(--stone-900));
}

.small-hero {
    text-align: center;
}

.category-hero .section-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.category-hero p,
.category-hero h1 {
    margin-left: 0;
    text-align: left;
}

.category-overview-list {
    display: grid;
    gap: 24px;
}

.category-overview-card {
    padding: 24px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.overview-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.filter-panel {
    margin-bottom: 26px;
    padding: 16px;
    background: white;
    border: 1px solid var(--stone-200);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(41, 37, 36, 0.08);
}

.filter-panel input {
    min-height: 46px;
    padding: 0 12px;
    border-radius: 12px;
    background: var(--stone-50);
}

.year-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.year-filters button {
    border: 0;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--amber-800);
    background: var(--amber-100);
    font-weight: 750;
}

.year-filters button.is-active {
    color: white;
    background: var(--amber-700);
}

.movie-card.is-hidden {
    display: none;
}

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

.movie-card-ranking {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.movie-card-ranking .poster-link {
    height: 100%;
    min-height: 148px;
    aspect-ratio: auto;
}

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

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--stone-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--amber-700);
    font-weight: 750;
}

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

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

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.35));
    text-align: center;
}

.player-shell.is-playing .play-cover {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 50%;
    color: white;
    background: var(--amber-600);
    box-shadow: 0 18px 38px rgba(217, 119, 6, 0.35);
    font-size: 30px;
}

.play-cover strong {
    max-width: 82%;
    font-size: clamp(20px, 3vw, 34px);
    line-height: 1.25;
}

.detail-card,
.sidebar-card {
    margin-top: 22px;
    padding: 24px;
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.detail-card h1 {
    margin: 0 0 12px;
    color: var(--stone-800);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 900;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--stone-500);
    font-size: 14px;
}

.lead-text {
    margin: 0 0 18px;
    color: var(--stone-700);
    font-size: 18px;
    font-weight: 650;
}

.detail-card h2 {
    margin: 24px 0 10px;
    color: var(--stone-800);
    font-size: 24px;
    font-weight: 900;
}

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

.related-section {
    padding: 30px 0 0;
}

.detail-sidebar {
    position: sticky;
    top: 88px;
}

.sidebar-card:first-child {
    margin-top: 37px;
}

.sidebar-list,
.side-category-links {
    display: grid;
    gap: 12px;
}

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

.side-category-links a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--amber-800);
    background: var(--amber-100);
    font-weight: 800;
    text-align: center;
}

.site-footer {
    color: var(--stone-300);
    background: var(--stone-900);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 44px 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.footer-logo {
    margin-bottom: 10px;
    color: var(--amber-100);
    font-size: 20px;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--stone-300);
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1024px) {
    .four-col,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .three-col,
    .overview-strip,
    .ranking-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-grid,
    .featured-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }

    .sidebar-card:first-child {
        margin-top: 0;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        height: 540px;
    }

    .hero-arrow {
        display: none;
    }

    .search-band-inner,
    .section-title-row,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-search {
        width: 100%;
        min-width: 0;
    }

    .four-col,
    .three-col,
    .category-grid,
    .overview-strip,
    .ranking-list {
        grid-template-columns: 1fr;
    }

    .movie-card-ranking {
        grid-template-columns: 130px 1fr;
    }

    .category-hero .section-inner {
        align-items: center;
        text-align: center;
    }

    .category-hero p,
    .category-hero h1 {
        text-align: center;
    }

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

@media (max-width: 520px) {
    .header-inner {
        padding: 0 14px;
    }

    .section-inner {
        padding: 0 14px;
    }

    .section,
    .search-band {
        padding: 42px 0;
    }

    .hero-content {
        padding: 0 18px;
    }

    .hero-actions {
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .movie-card-ranking {
        grid-template-columns: 1fr;
    }

    .movie-card-ranking .poster-link {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }
}
