* {
    box-sizing: border-box;
}

:root {
    --primary-50: #fef6ee;
    --primary-100: #fde9d7;
    --primary-500: #f0641f;
    --primary-600: #e14915;
    --primary-700: #bb3513;
    --secondary-50: #f0fdf9;
    --secondary-100: #ccfbef;
    --secondary-500: #14b895;
    --secondary-700: #0a7763;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-500: #78716c;
    --neutral-700: #44403c;
    --neutral-900: #1c1917;
    --white: #ffffff;
    --soft-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --hard-shadow: 0 10px 40px -3px rgba(0, 0, 0, 0.15), 0 20px 30px -10px rgba(0, 0, 0, 0.1);
    --radius-xl: 1rem;
    --radius-2xl: 1.35rem;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--neutral-900);
    background: var(--neutral-50);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--white);
    background: var(--primary-500);
    border-radius: 12px;
    box-shadow: var(--soft-shadow);
    transition: 0.25s ease;
}

.brand:hover .brand-icon {
    background: var(--primary-600);
    transform: translateY(-1px);
}

.brand strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
}

.brand em {
    display: block;
    margin-top: 2px;
    color: var(--neutral-500);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav,
.header-categories {
    display: flex;
    align-items: center;
    gap: 18px;
}

.desktop-nav a,
.header-categories a,
.mobile-nav a {
    color: var(--neutral-700);
    font-weight: 700;
    transition: 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.header-categories a:hover,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--primary-600);
}

.header-categories {
    flex: 1;
    justify-content: center;
}

.header-categories a {
    font-size: 14px;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    background: var(--neutral-100);
    border-radius: 999px;
}

.header-search input {
    width: 220px;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 8px 10px;
}

.header-search button {
    border: 0;
    color: var(--white);
    background: var(--primary-500);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    background: var(--neutral-100);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    padding: 10px;
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    padding: 0 20px 20px;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-section {
    padding: 52px 0 58px;
    background: linear-gradient(135deg, var(--primary-50), var(--white) 46%, var(--secondary-50));
}

.hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: stretch;
}

.hero-heading {
    grid-column: 1 / -1;
    text-align: center;
    max-width: 780px;
    margin: 0 auto 4px;
}

.hero-heading span,
.section-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--primary-700);
    background: var(--primary-100);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-heading h1 {
    margin: 14px 0 10px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.hero-heading p {
    margin: 0;
    color: var(--neutral-500);
    font-size: 17px;
}

.hero-stage {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    background: var(--neutral-900);
    border-radius: 28px;
    box-shadow: var(--hard-shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 48% 52%;
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-media {
    position: relative;
    overflow: hidden;
}

.hero-media::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.15), rgba(28, 25, 23, 0.88));
}

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

.hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px 54px 70px;
    color: var(--white);
}

.hero-copy .section-kicker {
    align-self: flex-start;
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
}

.hero-copy h2 {
    margin: 18px 0 14px;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p {
    margin: 0;
    max-width: 640px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
}

.tag-row span {
    display: inline-flex;
    color: var(--secondary-700);
    background: var(--secondary-100);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
}

.hero-copy .tag-row span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.22s ease;
}

.btn-primary {
    color: var(--white);
    background: var(--primary-500);
    box-shadow: var(--soft-shadow);
}

.btn-primary:hover {
    background: var(--primary-600);
    transform: translateY(-2px);
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hero-controls {
    position: absolute;
    left: 54px;
    bottom: 32px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

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

.hero-dot.is-active {
    background: var(--primary-500);
}

.hero-side,
.ranking-panel,
.article-card,
.category-overview-card,
.player-card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-2xl);
    box-shadow: var(--soft-shadow);
}

.hero-side,
.ranking-panel {
    padding: 20px;
}

.side-title,
.section-title,
.category-overview-head,
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.side-title {
    margin-bottom: 14px;
}

.side-title strong {
    font-size: 20px;
}

.side-title a,
.section-title a,
.category-overview-head a {
    color: var(--primary-600);
    font-weight: 800;
}

.mini-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: 0.2s ease;
}

.mini-card:hover {
    background: var(--neutral-100);
}

.mini-card img {
    aspect-ratio: 4 / 3;
    height: 76px;
    object-fit: cover;
    border-radius: 14px;
}

.mini-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card p {
    display: -webkit-box;
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--neutral-500);
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mini-card span {
    display: inline-flex;
    margin-bottom: 2px;
    color: var(--primary-600);
    font-size: 12px;
    font-weight: 900;
}

.content-section {
    padding: 54px 0;
}

.bg-white {
    background: var(--white);
}

.section-title {
    margin-bottom: 24px;
}

.section-title h2,
.category-overview-head h2 {
    margin: 8px 0 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-2xl);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
    position: relative;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--neutral-200);
}

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

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

.movie-badge,
.rank-mark {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.movie-badge {
    top: 12px;
    right: 12px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
}

.rank-mark {
    top: 12px;
    left: 12px;
    display: grid;
    min-width: 36px;
    height: 36px;
    place-items: center;
    color: var(--white);
    background: var(--primary-500);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.movie-card-body h3 {
    display: -webkit-box;
    min-height: 1.4em;
    margin: 0 0 8px;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.movie-card-body p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--neutral-500);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    color: var(--neutral-500);
    font-size: 12px;
}

.movie-meta span {
    display: inline-flex;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

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

.category-card {
    position: relative;
    display: grid;
    min-height: 180px;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    box-shadow: var(--soft-shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9);
    transition: transform 0.35s ease;
}

.category-card:hover img {
    transform: scale(1.06);
}

.category-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(28, 25, 23, 0.9), rgba(28, 25, 23, 0.35));
}

.category-card div {
    position: relative;
    z-index: 2;
    align-self: end;
    padding: 22px;
    color: var(--white);
}

.category-card span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 800;
}

.category-card strong {
    display: block;
    margin: 6px 0;
    font-size: 24px;
}

.category-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.82);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.page-hero {
    padding: 64px 0;
    background: linear-gradient(135deg, var(--primary-50), var(--white), var(--secondary-50));
}

.page-hero h1 {
    max-width: 820px;
    margin: 14px 0 12px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--neutral-500);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 800;
}

.page-hero .breadcrumb {
    color: var(--neutral-500);
}

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

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

.category-overview-card {
    padding: 24px;
}

.category-overview-head {
    display: block;
    margin-bottom: 18px;
}

.category-overview-head p {
    margin: 10px 0 0;
    color: var(--neutral-500);
}

.category-preview-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

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

.ranking-grid {
    margin-bottom: 30px;
}

.rank-list {
    display: grid;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-2xl);
    box-shadow: var(--soft-shadow);
}

.rank-row {
    display: grid;
    grid-template-columns: 60px minmax(180px, 1fr) minmax(220px, 1.4fr);
    gap: 18px;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--neutral-200);
    transition: 0.18s ease;
}

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

.rank-row:hover {
    background: var(--neutral-100);
}

.rank-row span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--primary-700);
    background: var(--primary-100);
    border-radius: 999px;
    font-weight: 900;
}

.rank-row em {
    overflow: hidden;
    color: var(--neutral-500);
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-panel {
    display: flex;
    max-width: 720px;
    gap: 12px;
    margin-top: 24px;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: 999px;
    box-shadow: var(--soft-shadow);
}

.search-panel input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 10px 16px;
    background: transparent;
}

.search-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.search-filter-row button {
    border: 1px solid var(--neutral-200);
    color: var(--neutral-700);
    background: var(--white);
    border-radius: 999px;
    padding: 9px 16px;
    cursor: pointer;
    font-weight: 800;
}

.search-filter-row button:hover {
    color: var(--primary-600);
    border-color: var(--primary-500);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 44px;
    text-align: center;
    color: var(--neutral-500);
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-2xl);
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.3;
}

.detail-backdrop img {
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.1);
    transform: scale(1.05);
}

.detail-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(28, 25, 23, 0.95), rgba(28, 25, 23, 0.72), rgba(28, 25, 23, 0.4));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 48px 0 58px;
}

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

.detail-poster {
    margin: 0;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: var(--hard-shadow);
}

.detail-poster img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.detail-info h1 {
    margin: 16px 0 12px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.lead-text {
    max-width: 840px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.detail-meta span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

.detail-info .btn {
    margin-top: 26px;
}

.player-section {
    padding: 42px 0 0;
    background: var(--neutral-50);
}

.player-card {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-color: var(--neutral-900);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    color: var(--white);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.72));
    border: 0;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    padding-left: 4px;
    background: var(--primary-500);
    border-radius: 999px;
    box-shadow: var(--hard-shadow);
    font-size: 32px;
}

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

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

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

.article-card {
    padding: 28px;
}

.article-card h2 {
    margin: 12px 0 16px;
    font-size: 28px;
    line-height: 1.2;
}

.article-card p {
    margin: 0 0 14px;
    color: var(--neutral-700);
}

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

.movie-card-compact .movie-cover {
    aspect-ratio: 4 / 3;
}

.site-footer {
    padding: 42px 0;
    color: rgba(255, 255, 255, 0.78);
    background: var(--neutral-900);
}

.footer-inner {
    align-items: flex-start;
}

.site-footer strong {
    display: block;
    color: var(--white);
    font-size: 22px;
}

.site-footer p {
    max-width: 620px;
    margin: 8px 0 0;
}

.site-footer nav {
    display: flex;
    max-width: 520px;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
}

.site-footer a:hover {
    color: var(--primary-500);
}

@media (max-width: 1180px) {
    .header-categories,
    .header-search {
        display: none;
    }

    .desktop-nav {
        margin-left: auto;
    }

    .hero-shell,
    .split-layout {
        grid-template-columns: 1fr;
    }

    .hero-side,
    .ranking-panel {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .hero-side .side-title,
    .ranking-panel .side-title {
        grid-column: 1 / -1;
    }

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

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .hero-section {
        padding-top: 32px;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        grid-template-rows: 42% 58%;
    }

    .hero-media::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(28, 25, 23, 0.92));
    }

    .hero-copy {
        padding: 28px 24px 78px;
    }

    .hero-controls {
        left: 24px;
    }

    .movie-grid,
    .category-movie-grid,
    .related-grid,
    .category-overview-grid,
    .detail-content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .detail-poster {
        max-width: 280px;
    }

    .rank-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .rank-row em {
        grid-column: 2;
    }

    .footer-inner {
        display: block;
    }

    .site-footer nav {
        justify-content: flex-start;
        margin-top: 20px;
    }
}

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

    .brand {
        min-width: 0;
    }

    .brand em {
        display: none;
    }

    .hero-heading h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .hero-stage {
        min-height: 640px;
        border-radius: 22px;
    }

    .hero-copy h2 {
        font-size: 32px;
    }

    .hero-side,
    .ranking-panel,
    .movie-grid,
    .category-movie-grid,
    .related-grid,
    .category-overview-grid,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

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

    .search-panel {
        display: grid;
        border-radius: 22px;
    }
}
