* {
    box-sizing: border-box;
}

:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --orange-600: #ea580c;
    --orange-500: #f97316;
    --orange-400: #fb923c;
    --white: #ffffff;
    --shadow-soft: 0 12px 36px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.25);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--slate-800);
    background: linear-gradient(135deg, var(--slate-50), var(--slate-100));
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(16px);
}

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

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

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.36);
}

.brand-text {
    font-size: 1.25rem;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--orange-400);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    color: var(--white);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--white);
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    padding: 12px 24px 18px;
    background: var(--slate-900);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.hero-carousel {
    position: relative;
    height: 620px;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.28), transparent 28%), linear-gradient(120deg, var(--slate-950), var(--slate-800));
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
}

.hero-bg {
    opacity: 0.24;
}

.hero-overlay,
.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.2));
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 56px;
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

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

.hero-kicker,
.section-heading p,
.page-hero p:first-child,
.category-overview-text p:first-child {
    margin: 0 0 10px;
    color: var(--orange-400);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0 0 22px;
    font-size: clamp(2.7rem, 7vw, 5.4rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 700px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.05rem, 2vw, 1.38rem);
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    font-size: 0.82rem;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

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

.primary-button,
.ghost-button,
.inline-link,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.home-search button {
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
    box-shadow: 0 14px 28px rgba(234, 88, 12, 0.3);
}

.primary-button:hover,
.home-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(234, 88, 12, 0.42);
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    height: 480px;
    background: var(--slate-800);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    box-shadow: var(--shadow-strong);
}

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

.hero-dots {
    position: absolute;
    right: calc((100% - min(1200px, calc(100% - 48px))) / 2);
    bottom: 34px;
    display: flex;
    gap: 9px;
}

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

.hero-dot.active {
    background: var(--orange-400);
}

.quick-search-section,
.section-wrap {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

.quick-search-section {
    position: relative;
    z-index: 5;
    margin-top: -54px;
}

.quick-search-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 28px;
    align-items: center;
    padding: 28px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.quick-search-card h2 {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.quick-search-card p {
    margin: 0;
    color: var(--slate-600);
}

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

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    padding: 0 15px;
    color: var(--slate-800);
    background: var(--white);
    border: 1px solid rgba(100, 116, 139, 0.22);
    border-radius: 999px;
    outline: none;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--orange-500);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.section-wrap {
    padding: 72px 0;
}

.section-band {
    background: rgba(255, 255, 255, 0.56);
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

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

.section-heading.slim {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    line-height: 1.2;
}

.section-heading a,
.inline-link {
    color: var(--orange-600);
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: 20px;
    color: var(--white);
    background: var(--slate-800);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    isolation: isolate;
}

.category-card::after,
.category-cover {
    position: absolute;
    inset: 0;
}

.category-card::after {
    z-index: -1;
    content: "";
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.9));
}

.category-cover {
    z-index: -2;
    background-position: center;
    background-size: cover;
    opacity: 0.48;
    transition: transform 0.3s ease;
}

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

.category-text {
    position: relative;
    display: grid;
    align-content: end;
    height: 100%;
    min-height: 118px;
}

.category-text strong {
    font-size: 1.2rem;
}

.category-text em {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
    font-style: normal;
}

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

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

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

.movie-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    height: 220px;
    background: linear-gradient(135deg, var(--slate-800), var(--slate-700));
}

.movie-card.compact .poster-link {
    height: 170px;
}

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

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

.card-badge,
.duration {
    position: absolute;
    right: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    color: var(--white);
    font-size: 0.76rem;
    font-weight: 800;
    border-radius: 999px;
}

.card-badge {
    top: 10px;
    background: rgba(239, 68, 68, 0.92);
}

.duration {
    bottom: 10px;
    background: rgba(2, 6, 23, 0.75);
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 10px;
    font-size: 1.06rem;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--orange-600);
}

.card-line {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--slate-600);
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--slate-500);
    font-size: 0.84rem;
}

.tag-row span {
    color: var(--orange-600);
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.16);
}

.two-column-zone {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 34px;
    align-items: start;
}

.rank-panel,
.content-card,
.player-card,
.category-overview-block {
    background: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.rank-panel {
    padding: 22px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 42px 74px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

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

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
    border-radius: 50%;
}

.ranking-item img {
    width: 74px;
    height: 50px;
    object-fit: cover;
    background: var(--slate-800);
    border-radius: 9px;
}

.ranking-info {
    min-width: 0;
}

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

.ranking-info em {
    color: var(--slate-500);
    font-size: 0.84rem;
    font-style: normal;
}

.ranking-score {
    color: var(--orange-600);
    font-weight: 900;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(circle at 85% 15%, rgba(249, 115, 22, 0.35), transparent 28%), linear-gradient(120deg, var(--slate-900), var(--slate-800));
}

.compact-hero {
    padding: 70px 24px;
    text-align: center;
}

.compact-hero > div {
    width: min(900px, 100%);
    margin: 0 auto;
}

.compact-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.compact-hero p:last-child {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08rem;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--slate-600);
    font-size: 0.88rem;
    font-weight: 700;
}

.stacked {
    display: grid;
    gap: 26px;
}

.category-overview-block {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
    padding: 24px;
}

.category-overview-text h2 {
    margin: 0 0 10px;
    font-size: 2rem;
}

.category-overview-text p:not(:first-child) {
    color: var(--slate-600);
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-900);
}

.detail-backdrop {
    opacity: 0.22;
    filter: blur(1px);
}

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
    width: min(1200px, calc(100% - 48px));
    min-height: 520px;
    margin: 0 auto;
    padding: 70px 0;
}

.detail-poster {
    overflow: hidden;
    height: 390px;
    background: var(--slate-800);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    box-shadow: var(--shadow-strong);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: var(--orange-400);
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(2.3rem, 5vw, 4.8rem);
    line-height: 1.08;
}

.detail-copy p {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.12rem;
}

.detail-copy .primary-button {
    margin-top: 28px;
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
}

.player-card {
    overflow: hidden;
    padding: 12px;
    background: var(--slate-950);
}

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

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.76));
    border: 0;
    cursor: pointer;
    text-align: center;
}

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

.play-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    padding-left: 5px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
    border-radius: 50%;
    box-shadow: 0 18px 42px rgba(234, 88, 12, 0.38);
}

.play-cover strong {
    font-size: 1.25rem;
}

.content-card {
    padding: 24px;
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 1.55rem;
}

.content-card p {
    margin: 0;
    color: var(--slate-600);
}

.info-card dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-card div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
}

.info-card dt {
    color: var(--slate-500);
}

.info-card dd {
    margin: 0;
    font-weight: 700;
}

.info-card a {
    color: var(--orange-600);
}

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

.side-rank .ranking-item img {
    display: none;
}

.sticky-panel {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 120px);
    overflow: auto;
}

[data-filter-list] .movie-card.is-hidden,
[data-filter-list] .ranking-item.is-hidden {
    display: none;
}

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

    .hero-content,
    .two-column-zone,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content,
    .detail-hero-inner {
        width: min(100% - 32px, 1200px);
    }

    .quick-search-card,
    .category-overview-block,
    .filter-panel,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

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

    .category-grid,
    .movie-grid,
    .movie-grid.four,
    .movie-grid.two,
    .category-preview-grid,
    .detail-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-poster {
        width: 220px;
        height: 300px;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .quick-search-section,
    .section-wrap {
        width: calc(100% - 28px);
        padding-left: 0;
        padding-right: 0;
    }

    .header-inner {
        width: 100%;
        padding: 0 16px;
    }

    .hero-carousel {
        height: 600px;
    }

    .hero-content {
        width: calc(100% - 32px);
    }

    .hero-dots {
        right: 16px;
        bottom: 20px;
    }

    .category-grid,
    .movie-grid,
    .movie-grid.four,
    .movie-grid.two,
    .category-preview-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .poster-link,
    .movie-card.compact .poster-link {
        height: 230px;
    }

    .ranking-item {
        grid-template-columns: 36px 64px minmax(0, 1fr);
    }

    .ranking-score {
        grid-column: 3;
    }

    .detail-poster {
        width: 100%;
        height: 360px;
    }

    .compact-hero {
        padding: 54px 16px;
    }
}
