:root {
    --primary-900: #333d4f;
    --primary-800: #39475d;
    --primary-700: #42536f;
    --primary-600: #506688;
    --primary-100: #ebeef3;
    --accent-500: #eab308;
    --accent-400: #facc15;
    --accent-600: #ca8a04;
    --neutral-950: #0b0f17;
    --neutral-900: #171717;
    --neutral-800: #262626;
    --neutral-700: #404040;
    --neutral-600: #525252;
    --neutral-500: #737373;
    --neutral-300: #d4d4d4;
    --neutral-200: #e5e5e5;
    --neutral-100: #f5f5f5;
    --neutral-50: #fafafa;
    --white: #ffffff;
    --shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 28px 80px rgba(0, 0, 0, 0.32);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --container: min(1180px, calc(100vw - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--neutral-800);
    background: var(--neutral-50);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

img {
    display: block;
    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, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 229, 229, 0.9);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: var(--container);
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--primary-900);
    background: var(--accent-500);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(234, 179, 8, 0.32);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.site-nav a {
    color: var(--neutral-700);
    font-weight: 700;
    transition: color 0.2s ease;
}

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

.nav-search {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--neutral-200);
    border-radius: 999px;
    background: var(--white);
}

.nav-search input {
    width: 190px;
    border: 0;
    padding: 10px 14px;
    outline: 0;
    background: transparent;
}

.nav-search button,
.large-search button,
.filter-bar button {
    border: 0;
    color: var(--white);
    background: var(--primary-600);
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.large-search button:hover,
.filter-bar button:hover {
    background: var(--primary-800);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--neutral-200);
    color: var(--primary-900);
    background: var(--white);
    border-radius: 12px;
    padding: 9px 12px;
}

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

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 20%, rgba(234, 179, 8, 0.22), transparent 30%),
        linear-gradient(90deg, rgba(11, 15, 23, 0.94) 0%, rgba(11, 15, 23, 0.72) 45%, rgba(11, 15, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(11, 15, 23, 0.82) 0%, transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: var(--container);
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: var(--white);
    max-width: 1180px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-400);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    max-width: 760px;
    margin: 16px 0 18px;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 650px;
    margin: 0 0 30px;
    color: var(--neutral-200);
    font-size: 18px;
}

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

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

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

.btn-primary {
    color: var(--primary-900);
    background: var(--accent-500);
    box-shadow: 0 14px 32px rgba(234, 179, 8, 0.3);
}

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

.btn-ghost.dark {
    color: var(--primary-900);
    background: var(--primary-100);
    border-color: var(--primary-100);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: max(18px, calc((100vw - 1180px) / 2 - 70px));
}

.hero-next {
    right: max(18px, calc((100vw - 1180px) / 2 - 70px));
}

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

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

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

.search-band,
.content-section,
.page-hero,
.breadcrumb,
.detail-hero,
.player-section {
    width: var(--container);
    margin: 0 auto;
}

.search-band {
    margin-top: -54px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
}

.search-band h2,
.section-head h2,
.rank-panel-head h2,
.copy-card h2,
.site-footer h2 {
    margin: 8px 0 8px;
    line-height: 1.2;
}

.search-band p,
.section-head p {
    margin: 0;
    color: inherit;
    opacity: 0.82;
}

.large-search {
    display: flex;
    overflow: hidden;
    background: var(--white);
    border-radius: 999px;
}

.large-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 15px 18px;
    outline: 0;
}

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

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

.section-head h2,
.rank-panel-head h2 {
    color: var(--primary-900);
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-700);
    font-weight: 800;
    border: 1px solid var(--primary-100);
    background: var(--white);
    border-radius: 999px;
    padding: 10px 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.section-link.full {
    width: 100%;
    margin-top: 20px;
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(234, 179, 8, 0.55);
    box-shadow: var(--shadow);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-900), var(--primary-600));
}

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

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

.movie-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    color: var(--primary-900);
    background: var(--accent-500);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 900;
}

.movie-card-body {
    padding: 18px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--neutral-500);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta-line a {
    color: var(--primary-600);
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: var(--neutral-900);
    font-size: 20px;
    line-height: 1.25;
}

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

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

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

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

.category-tile {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    color: var(--white);
    background:
        radial-gradient(circle at 100% 0%, rgba(234, 179, 8, 0.32), transparent 32%),
        linear-gradient(145deg, var(--primary-900), var(--primary-600));
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
}

.category-tile span {
    color: var(--accent-400);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.category-tile h3 {
    margin: 18px 0 8px;
    font-size: 24px;
    line-height: 1.15;
}

.category-tile p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.category-tile strong {
    color: var(--accent-400);
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.rank-list,
.ranking-grid {
    display: grid;
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 38px 70px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(234, 179, 8, 0.65);
}

.rank-number {
    color: var(--accent-600);
    font-size: 20px;
    font-weight: 900;
}

.rank-item img {
    height: 52px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--primary-100);
}

.rank-text {
    min-width: 0;
}

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

.rank-text em {
    color: var(--neutral-500);
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    margin-top: 34px;
    padding: 56px;
    color: var(--white);
    background:
        radial-gradient(circle at 90% 15%, rgba(234, 179, 8, 0.25), transparent 28%),
        linear-gradient(135deg, var(--primary-900), var(--primary-600));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
}

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

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 190px)) 120px;
    gap: 12px;
    margin-bottom: 26px;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    outline: 0;
    padding: 12px 14px;
    background: var(--neutral-50);
}

.filter-bar button {
    border-radius: 12px;
}

.empty-state {
    padding: 20px;
    text-align: center;
    color: var(--neutral-500);
    background: var(--white);
    border-radius: var(--radius-md);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 28px;
    color: var(--neutral-500);
    font-size: 14px;
    font-weight: 700;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    margin-top: 26px;
    padding: 34px;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-900), var(--primary-600));
    box-shadow: var(--shadow-strong);
}

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

.detail-info h1 {
    margin: 12px 0 14px;
    color: var(--primary-900);
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 18px;
    color: var(--neutral-600);
    font-size: 18px;
}

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

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

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

.player-section {
    padding-top: 34px;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--neutral-950);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
}

.video-player {
    width: 100%;
    height: 100%;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: var(--white);
    background:
        radial-gradient(circle, rgba(234, 179, 8, 0.22), transparent 28%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.36));
    cursor: pointer;
}

.player-card.is-playing .play-cover {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    color: var(--primary-900);
    background: var(--accent-500);
    border-radius: 50%;
    font-size: 34px;
    box-shadow: 0 20px 46px rgba(234, 179, 8, 0.35);
}

.play-cover strong {
    font-size: 20px;
}

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

.copy-card {
    padding: 28px;
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.copy-card h2 {
    color: var(--primary-900);
    font-size: 28px;
}

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

.site-footer {
    margin-top: 84px;
    color: var(--neutral-300);
    background: var(--primary-900);
}

.footer-grid {
    width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-brand {
    color: var(--white);
}

.site-footer p {
    max-width: 560px;
    margin: 16px 0 0;
}

.site-footer h2 {
    color: var(--white);
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

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

.footer-bottom {
    width: var(--container);
    margin: 0 auto;
    padding: 18px 0 28px;
    color: rgba(255, 255, 255, 0.62);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

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

    .split-section,
    .detail-hero,
    .detail-copy,
    .search-band {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        min-height: 66px;
        flex-wrap: wrap;
        gap: 12px;
        padding: 10px 0;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav,
    .nav-search {
        display: none;
        width: 100%;
    }

    .site-header.is-open .site-nav,
    .site-header.is-open .nav-search {
        display: flex;
    }

    .site-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
    }

    .nav-search input {
        width: 100%;
    }

    .hero {
        height: 560px;
    }

    .hero-control {
        display: none;
    }

    .search-band,
    .page-hero,
    .detail-hero {
        padding: 24px;
    }

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

    .movie-grid,
    .compact-grid,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    :root {
        --container: min(100vw - 20px, 1180px);
    }

    .brand,
    .footer-brand {
        font-size: 20px;
    }

    .hero h1,
    .hero h2 {
        font-size: 42px;
    }

    .hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .footer-grid,
    .detail-copy {
        grid-template-columns: 1fr;
    }

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

    .detail-hero {
        padding: 18px;
    }

    .detail-poster {
        width: 100%;
    }
}
