:root {
    --primary: #f58b1f;
    --primary-dark: #c05e17;
    --secondary: #3a9d6c;
    --accent: #ea5e21;
    --neutral-50: #fafafa;
    --neutral-100: #f4f4f5;
    --neutral-200: #e4e4e7;
    --neutral-500: #71717a;
    --neutral-600: #52525b;
    --neutral-700: #3f3f46;
    --neutral-800: #27272a;
    --white: #ffffff;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 4px 20px -2px rgba(0, 0, 0, 0.1), 0 15px 30px -5px rgba(0, 0, 0, 0.08);
    --shadow-hard: 0 10px 40px -5px rgba(0, 0, 0, 0.2), 0 20px 50px -10px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.container {
    width: min(100% - 32px, 1200px);
    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);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: var(--neutral-800);
    white-space: nowrap;
}

.brand:hover,
.nav-link:hover,
.mobile-link:hover,
.card-title:hover,
.small-title:hover,
.text-link:hover,
.rank-row h2 a:hover {
    color: var(--primary-dark);
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: var(--shadow-soft);
    font-size: 14px;
}

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

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

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

.header-search,
.mobile-search,
.big-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.big-search input {
    width: 220px;
    border: 1px solid var(--neutral-200);
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(245, 139, 31, 0.18);
}

.header-search button,
.mobile-search button,
.big-search button,
.btn.primary {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    background: var(--primary);
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.btn.primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

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

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--neutral-700);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--neutral-200);
    background: #ffffff;
    padding: 16px;
}

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

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #000000;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42) 52%, rgba(0, 0, 0, 0.18)), linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.04) 44%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-panel {
    max-width: 660px;
    color: #ffffff;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 14px;
    margin-bottom: 18px;
    background: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0;
    max-width: 620px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.detail-meta,
.detail-tags,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-top: 20px;
}

.hero-tags span,
.detail-tags span,
.chip-link {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
}

.btn.ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

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

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

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

.hero-dots button.active {
    width: 36px;
    background: #ffffff;
}

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

.content-section.tinted {
    background: linear-gradient(135deg, #f0f9f4, #fff7ed);
}

.section-head,
.side-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-head h2,
.side-title h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--neutral-600);
}

.section-head a,
.side-title a,
.text-link,
.back-link {
    color: var(--primary-dark);
    font-weight: 800;
}

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

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

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--neutral-200);
}

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

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

.movie-card:hover .poster-link img,
.small-card:hover img,
.category-thumbs:hover img,
.rank-row:hover img {
    transform: scale(1.06);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 10px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 10px;
    color: var(--neutral-800);
    font-weight: 800;
    font-size: 18px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.card-meta {
    color: var(--neutral-500);
    font-size: 13px;
    line-height: 1.6;
}

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

.category-card {
    display: grid;
    gap: 8px;
    min-height: 132px;
    border-radius: 22px;
    padding: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card strong {
    font-size: 20px;
}

.category-card span {
    color: var(--neutral-600);
    line-height: 1.7;
}

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

.layout-two {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 36px;
}

.side-panel {
    border-radius: 24px;
    padding: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

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

.small-card {
    display: grid;
    grid-template-columns: auto 104px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-radius: 14px;
    padding: 8px;
    transition: background 0.2s ease;
}

.small-card:hover {
    background: var(--neutral-50);
}

.small-card:not(:has(.rank-number)) {
    grid-template-columns: 104px minmax(0, 1fr);
}

.rank-number {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 900;
    font-size: 12px;
}

.small-thumb {
    display: block;
    width: 104px;
    height: 66px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--neutral-200);
}

.small-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.small-title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--neutral-800);
    font-weight: 800;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.small-card p {
    margin: 5px 0 0;
    color: var(--neutral-500);
    font-size: 13px;
}

.page-hero {
    padding: 64px 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

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

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

.page-hero .back-link,
.breadcrumb a,
.detail-kicker a {
    color: rgba(255, 255, 255, 0.88);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.detail-breadcrumb {
    margin-bottom: 22px;
    color: var(--neutral-600);
}

.detail-breadcrumb a,
.detail-breadcrumb strong {
    color: var(--neutral-700);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 22px;
    border-radius: 24px;
    padding: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

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

.category-thumbs img {
    width: 100%;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--neutral-200);
    transition: transform 0.25s ease;
}

.category-overview-card h2 {
    margin: 5px 0 10px;
}

.category-overview-card p {
    margin: 0 0 14px;
    color: var(--neutral-600);
    line-height: 1.7;
}

.rank-list {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.rank-row {
    display: grid;
    grid-template-columns: 54px 150px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    border-radius: 22px;
    padding: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.rank-badge {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 900;
}

.rank-poster {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: var(--neutral-200);
}

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

.rank-row h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-row p {
    margin: 0 0 8px;
    color: var(--neutral-600);
    line-height: 1.65;
}

.search-hero .big-search {
    max-width: 680px;
    margin-top: 24px;
}

.big-search input {
    width: min(100%, 520px);
    border: 0;
    padding: 14px 18px;
}

.big-search button {
    padding: 14px 22px;
    background: var(--neutral-800);
}

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

.filter-bar button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: #ffffff;
    color: var(--neutral-700);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    font-weight: 750;
}

.filter-bar button.active,
.filter-bar button:hover {
    color: #ffffff;
    background: var(--primary);
}

.detail-shell {
    padding: 34px 0 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
    gap: 32px;
}

.player-card,
.detail-info,
.sticky-panel {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-medium);
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.player-start:hover {
    background: rgba(0, 0, 0, 0.38);
}

.player-start span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    padding-left: 6px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: var(--shadow-hard);
    font-size: 32px;
}

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

.detail-info {
    margin-top: 24px;
    padding: 28px;
}

.detail-kicker {
    margin-bottom: 14px;
}

.detail-kicker .chip-link {
    color: #ffffff;
    background: var(--primary);
}

.detail-info h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.14;
}

.detail-info .lead {
    margin: 0 0 20px;
    color: var(--neutral-700);
    font-size: 18px;
    line-height: 1.8;
    font-weight: 650;
}

.detail-meta {
    gap: 8px;
    margin-bottom: 20px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--neutral-100);
    color: var(--neutral-600);
    font-size: 14px;
    font-weight: 700;
}

.detail-tags {
    margin-bottom: 24px;
}

.detail-tags span {
    color: var(--primary-dark);
    background: #fff3e2;
}

.detail-info h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.detail-info p {
    color: var(--neutral-700);
    line-height: 1.9;
}

.sticky-panel {
    position: sticky;
    top: 90px;
}

.more-related {
    margin-top: 42px;
}

.site-footer {
    color: var(--neutral-300);
    background: var(--neutral-800);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    padding: 48px 0;
}

.footer-brand {
    color: #ffffff;
}

.site-footer p,
.site-footer a {
    color: #d4d4d8;
}

.site-footer p {
    max-width: 430px;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px;
    text-align: center;
    color: #a1a1aa;
    font-size: 14px;
}

[data-card].hidden {
    display: none;
}

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

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

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

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

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

    .menu-button {
        display: block;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        align-items: end;
        padding-bottom: 88px;
    }

    .movie-grid.two,
    .movie-grid.three,
    .movie-grid.four,
    .rank-featured,
    .layout-two,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .sticky-panel {
        position: static;
    }
}

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

    .brand span {
        font-size: 18px;
    }

    .hero {
        height: 520px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-actions {
        gap: 8px;
    }

    .btn {
        width: 100%;
    }

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

    .section-head,
    .side-title {
        align-items: start;
        flex-direction: column;
    }

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

    .category-overview-card,
    .rank-row {
        grid-template-columns: 1fr;
    }

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

    .category-thumbs img {
        height: 68px;
    }

    .rank-badge {
        width: 36px;
        height: 36px;
    }

    .big-search,
    .mobile-search {
        flex-direction: column;
        align-items: stretch;
    }

    .big-search input,
    .big-search button,
    .mobile-search input,
    .mobile-search button {
        width: 100%;
    }

    .detail-info {
        padding: 22px;
    }

    .player-start span {
        width: 70px;
        height: 70px;
        font-size: 26px;
    }
}
