:root {
    --primary-900: #0c4a6e;
    --primary-800: #075985;
    --primary-700: #0369a1;
    --primary-600: #0284c7;
    --primary-100: #e0f2fe;
    --accent-600: #d97706;
    --accent-500: #f59e0b;
    --accent-400: #fbbf24;
    --neutral-950: #0c0a09;
    --neutral-900: #1c1917;
    --neutral-800: #292524;
    --neutral-700: #44403c;
    --neutral-600: #57534e;
    --neutral-300: #d6d3d1;
    --neutral-200: #e7e5e4;
    --neutral-100: #f5f5f4;
    --neutral-50: #fafaf9;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(12, 74, 110, 0.16);
    --soft-shadow: 0 12px 32px rgba(28, 25, 23, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    color: var(--white);
    background: linear-gradient(90deg, var(--primary-900), var(--primary-800));
    box-shadow: 0 12px 32px rgba(12, 74, 110, 0.22);
}

.top-nav {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--primary-900);
    background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.32);
}

.brand-mark.small {
    width: 28px;
    height: 28px;
    border-radius: 10px;
}

.brand-text {
    font-size: 21px;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 650;
}

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

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

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
    border-radius: 999px;
}

.mobile-menu {
    display: none;
    padding: 8px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--primary-800);
}

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

.mobile-link {
    padding: 12px;
    border-radius: 12px;
    font-weight: 650;
}

.mobile-link:hover {
    background: rgba(255, 255, 255, 0.10);
}

.hero {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    background: var(--neutral-950);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(12, 10, 9, 0.92), rgba(12, 10, 9, 0.45), rgba(12, 74, 110, 0.28));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 590px;
    margin: 0 auto;
    display: grid;
    align-items: end;
    padding: 80px 0 72px;
}

.hero-copy {
    max-width: 760px;
    color: var(--white);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-400);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 16px 0;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button.primary {
    color: var(--white);
    background: var(--accent-500);
}

.button.primary:hover {
    background: var(--accent-600);
}

.button.ghost {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.button.light {
    color: var(--primary-800);
    background: var(--white);
    border-color: var(--neutral-200);
}

.hero-panel {
    position: absolute;
    right: max(16px, calc((100% - 1180px) / 2));
    bottom: 72px;
    z-index: 3;
    width: 360px;
    padding: 18px;
    border-radius: 22px;
    color: var(--white);
    background: rgba(12, 74, 110, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-mini-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.hero-mini {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 12px;
    align-items: center;
}

.hero-mini img {
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
}

.hero-mini strong {
    display: block;
    margin-bottom: 4px;
}

.hero-mini span {
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
}

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

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

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

.main-wrap,
.page-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.main-wrap {
    padding: 54px 0 10px;
}

.page-wrap {
    padding: 44px 0 10px;
}

.section {
    margin-bottom: 56px;
}

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

.section-title {
    margin: 8px 0 0;
    color: var(--neutral-900);
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.15;
}

.section-desc {
    max-width: 720px;
    color: var(--neutral-600);
    line-height: 1.75;
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 560px;
    margin-top: 24px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
}

.search-box.light {
    margin: 0 0 24px;
    background: var(--white);
    border-color: var(--neutral-200);
    box-shadow: var(--soft-shadow);
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    border-radius: 12px;
    padding: 0 14px;
    color: var(--neutral-900);
    background: var(--white);
    font-size: 15px;
}

.search-box .button {
    min-width: 92px;
}

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

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

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

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--neutral-200), var(--primary-100));
}

.movie-card.wide .poster-wrap {
    aspect-ratio: 16 / 9;
}

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

.movie-card:hover img,
.list-poster:hover img,
.related-card:hover img {
    transform: scale(1.045);
}

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(12, 74, 110, 0.82);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 14px;
}

.card-title,
.list-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--neutral-900);
    font-weight: 850;
    line-height: 1.36;
}

.card-title:hover,
.list-title:hover {
    color: var(--primary-600);
}

.card-meta {
    margin-top: 6px;
    color: var(--neutral-600);
    font-size: 13px;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 7px;
    border-radius: 999px;
    color: var(--primary-800);
    background: var(--primary-100);
    font-size: 12px;
    font-weight: 700;
}

.feature-band {
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(135deg, #f0f9ff, #fffbeb);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.scroller {
    overflow-x: auto;
    padding: 4px 0 12px;
}

.scroller-inner {
    display: flex;
    gap: 18px;
}

.scroller-inner .movie-card {
    flex: 0 0 204px;
}

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

.category-card {
    min-height: 148px;
    padding: 22px;
    border-radius: 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
}

.category-card h3 {
    margin: 0 0 12px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
}

.page-hero {
    color: var(--white);
    background: linear-gradient(90deg, var(--primary-700), var(--primary-900));
}

.page-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0;
}

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

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

.page-hero h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 46px);
}

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

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

.movie-list-card {
    display: grid;
    grid-template-columns: 168px 1fr;
    gap: 18px;
    padding: 16px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.list-poster {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--neutral-200), var(--primary-100));
}

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

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 48px 100px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.rank-num {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--white);
    background: var(--primary-700);
    font-weight: 900;
}

.rank-item:nth-child(-n+3) .rank-num {
    background: var(--accent-500);
}

.rank-poster {
    height: 72px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--neutral-200);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding-top: 32px;
}

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

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.28);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: var(--accent-500);
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.34);
    font-size: 30px;
    cursor: pointer;
}

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

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(26px, 4vw, 36px);
}

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

.detail-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--neutral-700);
    background: var(--neutral-100);
    font-weight: 700;
    font-size: 13px;
}

.prose h2 {
    margin-top: 26px;
    color: var(--neutral-900);
}

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

.related-grid {
    display: grid;
    gap: 14px;
}

.related-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
}

.related-card img {
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--neutral-200);
}

.related-card strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-card span {
    display: block;
    margin-top: 5px;
    color: var(--neutral-600);
    font-size: 13px;
}

.empty-result {
    display: none;
    padding: 28px;
    border-radius: 18px;
    color: var(--neutral-600);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.empty-result.show {
    display: block;
}

.site-footer {
    margin-top: 64px;
    padding: 46px 0 30px;
    color: var(--neutral-300);
    background: var(--neutral-900);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 28px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.site-footer p,
.site-footer li {
    color: var(--neutral-300);
    line-height: 1.75;
}

.site-footer ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer a:hover {
    color: var(--accent-400);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--neutral-800);
    color: var(--neutral-300);
    font-size: 14px;
}

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

    .menu-button {
        display: block;
    }

    .hero-panel {
        display: none;
    }

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

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

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

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

@media (max-width: 720px) {
    .hero,
    .hero-content {
        min-height: 520px;
    }

    .hero-content {
        padding: 56px 0 58px;
    }

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

    .section-head {
        display: block;
    }

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

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

    .movie-list-card,
    .rank-item {
        grid-template-columns: 92px 1fr;
    }

    .rank-item .button,
    .rank-poster {
        display: none;
    }

    .card-body {
        padding: 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .search-box {
        display: grid;
    }

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