:root {
    --primary-50: #fff7ed;
    --primary-100: #ffedd5;
    --primary-600: #ea580c;
    --primary-700: #c2410c;
    --warm-50: #fffce8;
    --warm-100: #fef9c3;
    --dark-50: #f8f9fa;
    --dark-100: #e9ecef;
    --dark-200: #dee2e6;
    --dark-300: #ced4da;
    --dark-400: #adb5bd;
    --dark-500: #6c757d;
    --dark-600: #495057;
    --dark-700: #343a40;
    --dark-800: #212529;
    --dark-900: #1a1d20;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 10px 40px -3px rgba(0, 0, 0, 0.12), 0 20px 25px -5px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--warm-50);
    color: var(--dark-800);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 252, 232, 0.94);
    border-bottom: 1px solid rgba(52, 58, 64, 0.08);
    backdrop-filter: blur(14px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--dark-900);
    letter-spacing: 0.02em;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-600);
    color: #fff;
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.26);
}

.brand-text {
    font-size: 22px;
}

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

.nav-link,
.mobile-link {
    color: var(--dark-600);
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.top-search,
.mobile-search,
.hero-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--primary-100);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.top-search input,
.mobile-search input,
.hero-search input,
.local-search,
.filter-bar select {
    min-width: 0;
    border: 0;
    outline: 0;
    background: #fff;
    color: var(--dark-800);
}

.top-search input,
.mobile-search input,
.hero-search input {
    width: 220px;
    padding: 11px 14px;
}

.top-search button,
.mobile-search button,
.hero-search button {
    border: 0;
    background: var(--primary-600);
    color: #fff;
    padding: 11px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.hero-search button:hover {
    background: var(--primary-700);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--primary-50);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

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

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    color: #fff;
}

.hero-content h1 {
    max-width: 720px;
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: -0.03em;
    text-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 32px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.92);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

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

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

.btn-primary {
    background: var(--primary-600);
    color: #fff;
    box-shadow: 0 18px 35px rgba(234, 88, 12, 0.32);
}

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

.btn-primary:hover {
    background: var(--primary-700);
    box-shadow: 0 22px 42px rgba(234, 88, 12, 0.38);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.26);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.active {
    width: 34px;
    background: #fff;
}

.home-search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    max-width: 1180px;
    margin: -46px auto 0;
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-hover);
    position: relative;
    z-index: 8;
}

.search-copy h2 {
    margin: 0 0 8px;
    font-size: 28px;
    color: var(--dark-900);
}

.search-copy p {
    margin: 0;
    color: var(--dark-500);
}

.hero-search {
    min-width: min(520px, 100%);
}

.hero-search input {
    flex: 1;
    width: auto;
    padding: 14px 16px;
}

.hero-search button {
    padding: 14px 22px;
}

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

.home-sections {
    display: flex;
    flex-direction: column;
    gap: 70px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--primary-100);
    color: var(--primary-600);
    font-weight: 900;
}

.section-heading h2 {
    margin: 0;
    color: var(--dark-800);
    font-size: 28px;
    font-weight: 850;
}

.section-heading p {
    margin: 3px 0 0;
    color: var(--dark-500);
}

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card[hidden],
.ranking-row[hidden] {
    display: none;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--dark-100);
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0));
    transition: opacity 0.3s ease;
}

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

.badge {
    position: absolute;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(6px);
}

.badge-year {
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.62);
}

.badge-type {
    left: 10px;
    bottom: 10px;
    background: rgba(234, 88, 12, 0.92);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-600);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-content {
    display: block;
    padding: 15px;
}

.card-content strong {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: var(--dark-800);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-content em {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 8px;
    color: var(--dark-500);
    font-size: 13px;
    font-style: normal;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.ranking-box {
    border-radius: 24px;
    background: #fff;
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.ranking-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ranking-title h2 {
    margin: 0;
    font-size: 22px;
}

.ranking-title a {
    color: var(--primary-600);
    font-weight: 800;
}

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

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

.rank-num {
    color: var(--primary-600);
    font-size: 18px;
    font-weight: 900;
}

.rank-item img {
    width: 56px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--dark-100);
}

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

.rank-item strong {
    color: var(--dark-800);
    font-weight: 800;
}

.rank-item em {
    margin-top: 5px;
    color: var(--dark-500);
    font-size: 13px;
    font-style: normal;
}

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

.category-card,
.category-large {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 22px;
    background: var(--dark-800);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.category-card {
    height: 190px;
}

.category-large {
    height: 260px;
}

.category-card img,
.category-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-card:hover img,
.category-large:hover img {
    opacity: 0.76;
    transform: scale(1.08);
}

.category-card span,
.category-large-content {
    position: absolute;
    inset: auto 18px 18px 18px;
    z-index: 2;
}

.category-card strong,
.category-large strong {
    display: block;
    font-size: 22px;
    font-weight: 900;
}

.category-card em,
.category-large em {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-style: normal;
    line-height: 1.6;
}

.category-large-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.08));
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: var(--dark-900);
    color: #fff;
}

.compact-hero {
    background: radial-gradient(circle at 20% 30%, rgba(234, 88, 12, 0.45), transparent 32%), linear-gradient(135deg, var(--dark-900), var(--dark-700));
}

.page-hero-inner,
.detail-hero-inner {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 72px 0;
}

.page-hero h1,
.detail-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.1;
    font-weight: 900;
}

.page-hero p,
.detail-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    line-height: 1.8;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.crumbs a:hover {
    color: #fff;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.filter-bar.search-wide {
    grid-template-columns: minmax(260px, 1fr) 180px 180px 180px;
}

.local-search,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--dark-100);
    border-radius: 12px;
}

.empty-tip {
    margin: 32px 0 0;
    padding: 28px;
    border-radius: 18px;
    background: #fff;
    color: var(--dark-500);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 72px 84px minmax(0, 1fr) 88px;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.ranking-number {
    color: var(--primary-600);
    font-size: 24px;
    font-weight: 950;
}

.ranking-row img {
    width: 84px;
    height: 112px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--dark-100);
}

.ranking-info strong,
.ranking-info em,
.ranking-info small {
    display: block;
}

.ranking-info strong {
    color: var(--dark-900);
    font-size: 20px;
    font-weight: 900;
}

.ranking-info em {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px;
    color: var(--dark-600);
    font-style: normal;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-info small {
    margin-top: 8px;
    color: var(--dark-500);
}

.ranking-play {
    justify-self: end;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary-600);
    font-weight: 900;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.34;
    filter: blur(2px);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.38));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 90px;
    padding-bottom: 90px;
}

.detail-layout {
    display: flex;
    flex-direction: column;
    gap: 42px;
}

.watch-panel,
.detail-card {
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.watch-panel {
    padding: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background: #050505;
}

.media-video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    background: radial-gradient(circle at center, rgba(234, 88, 12, 0.28), rgba(0, 0, 0, 0.65));
    color: #fff;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: #fff;
    color: var(--primary-600);
    font-size: 34px;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
    font-size: 20px;
    letter-spacing: 0.04em;
}

.detail-card {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 30px;
    padding: 28px;
}

.detail-poster img {
    width: 100%;
    border-radius: 20px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: var(--dark-100);
}

.detail-copy h2 {
    margin: 0 0 12px;
    color: var(--dark-900);
    font-size: 24px;
    font-weight: 900;
}

.detail-copy h2:not(:first-child) {
    margin-top: 28px;
}

.detail-copy p {
    margin: 0;
    color: var(--dark-600);
    font-size: 16px;
    line-height: 1.9;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.tag-cloud a {
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary-700);
    font-size: 14px;
    font-weight: 800;
}

.site-footer {
    background: var(--dark-800);
    color: var(--dark-200);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0;
}

.footer-brand {
    color: #fff;
    font-size: 22px;
}

.site-footer p {
    max-width: 560px;
    margin: 12px 0 0;
    color: var(--dark-300);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-content: flex-start;
}

.footer-links a {
    color: var(--dark-300);
    font-weight: 700;
}

.footer-links a:hover {
    color: var(--primary-600);
}

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

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

@media (max-width: 980px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

    .mobile-search input {
        flex: 1;
        width: auto;
    }

    .hero-carousel {
        height: 540px;
    }

    .home-search-panel {
        flex-direction: column;
        align-items: stretch;
        margin-left: 20px;
        margin-right: 20px;
    }

    .split-section,
    .two-columns,
    .detail-card {
        grid-template-columns: 1fr;
    }

    .filter-bar,
    .filter-bar.search-wide {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .nav-shell,
    .page-container,
    .page-hero-inner,
    .detail-hero-inner,
    .footer-inner {
        width: min(100% - 28px, 1280px);
        padding-left: 0;
        padding-right: 0;
    }

    .nav-shell {
        gap: 12px;
    }

    .brand-text {
        font-size: 19px;
    }

    .hero-carousel {
        height: 520px;
    }

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

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

    .hero-content p {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .home-search-panel {
        padding: 22px;
    }

    .hero-search {
        min-width: 0;
    }

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

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

    .filter-bar,
    .filter-bar.search-wide {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 54px 70px minmax(0, 1fr);
    }

    .ranking-play {
        display: none;
    }

    .ranking-info strong {
        font-size: 17px;
    }

    .footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .card-content strong {
        min-height: auto;
    }
}
