:root {
    --primary-50: #f0f7ff;
    --primary-600: #006fc6;
    --primary-700: #0158a0;
    --primary-800: #064b84;
    --primary-900: #0b3f6e;
    --accent-300: #5feacf;
    --accent-500: #14b8a2;
    --accent-600: #0d9485;
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;
    --white: #ffffff;
    --radius: 0.9rem;
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 22px 48px rgba(15, 23, 42, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: var(--primary-900);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.20);
}

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

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

.brand {
    font-size: 1.25rem;
}

.brand-mark {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-500), var(--primary-600));
    color: var(--white);
    font-size: 0.85rem;
    box-shadow: 0 10px 20px rgba(20, 184, 162, 0.25);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.45rem;
    font-weight: 600;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.desktop-nav a:hover,
.site-footer a:hover {
    color: var(--accent-300);
}

.menu-button {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--white);
    border: 0;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.10);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 0 1rem 1rem;
    background: var(--primary-900);
}

.mobile-nav a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
}

.mobile-nav a:hover {
    background: var(--primary-800);
}

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

.main-space {
    padding: 2rem 0 4rem;
}

.hero-slider {
    position: relative;
    height: clamp(420px, 58vw, 620px);
    overflow: hidden;
    border-radius: 1rem;
    background: var(--neutral-900);
    box-shadow: var(--shadow-lg);
}

.hero-track,
.hero-slide {
    height: 100%;
}

.hero-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0, 0, 0.2, 1);
}

.hero-slide {
    position: relative;
    flex: 0 0 100%;
    min-width: 100%;
}

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

.hero-overlay,
.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.10));
}

.hero-copy {
    position: absolute;
    left: clamp(1.5rem, 5vw, 4rem);
    right: clamp(1.5rem, 5vw, 4rem);
    bottom: clamp(2rem, 6vw, 4.5rem);
    max-width: 720px;
    color: var(--white);
}

.eyebrow {
    margin: 0 0 0.8rem;
    color: var(--accent-300);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 1rem;
    font-weight: 850;
    line-height: 1.12;
}

.hero-copy h1 {
    font-size: clamp(2rem, 5vw, 4.5rem);
}

.hero-copy p:not(.eyebrow),
.detail-copy p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
    margin: 0;
    color: rgba(255, 255, 255, 0.90);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.6rem;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.75rem 1.35rem;
    border-radius: 0.75rem;
    font-weight: 800;
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

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

.primary-button:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.ghost-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.ghost-button:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.25);
}

.hero-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--white);
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.hero-slider:hover .hero-nav,
.hero-nav:focus-visible {
    opacity: 1;
}

.hero-nav:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

.hero-dots {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.hero-dot {
    width: 0.7rem;
    height: 0.7rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.hero-dot.is-active {
    width: 2rem;
    background: var(--white);
}

.content-section {
    margin-top: 4rem;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-heading h2,
.text-card h2,
.detail-article h2 {
    margin: 0;
    color: var(--neutral-900);
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    line-height: 1.2;
}

.section-heading p {
    margin: 0.35rem 0 0;
    color: var(--neutral-600);
}

.section-more {
    flex: 0 0 auto;
    color: var(--primary-600);
    font-weight: 800;
}

.section-more:hover {
    color: var(--primary-700);
}

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: var(--shadow-lg);
}

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

.movie-card-large .poster-frame {
    aspect-ratio: 16 / 9;
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.58), transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-gradient {
    opacity: 1;
}

.play-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

.type-badge,
.duration-badge,
.rank-badge {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-height: 1.6rem;
    padding: 0.25rem 0.55rem;
    border-radius: 0.45rem;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 800;
}

.type-badge {
    top: 0.65rem;
    left: 0.65rem;
    background: var(--accent-500);
}

.duration-badge {
    right: 0.65rem;
    bottom: 0.65rem;
    background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
    top: 0.65rem;
    right: 0.65rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
    display: block;
    padding: 1rem;
}

.card-body strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--neutral-900);
    font-size: 1.02rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
    color: var(--primary-600);
}

.card-desc {
    display: -webkit-box;
    min-height: 3.05rem;
    margin-top: 0.5rem;
    overflow: hidden;
    color: var(--neutral-600);
    font-size: 0.9rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
    color: var(--neutral-600);
    font-size: 0.85rem;
}

.horizontal-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.scroll-card {
    flex: 0 0 18rem;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    padding: clamp(2rem, 5vw, 4rem);
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--primary-900), var(--primary-600) 55%, var(--accent-600));
    box-shadow: var(--shadow-md);
}

.page-hero h1 {
    color: var(--white);
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.page-hero p:not(.eyebrow) {
    max-width: 780px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 1rem;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-900), var(--primary-600) 60%, var(--accent-600));
    box-shadow: var(--shadow-md);
}

.filter-panel h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.filter-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
}

.filter-controls {
    display: grid;
    gap: 0.75rem;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 2.8rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 0.7rem;
    color: var(--neutral-900);
    background: rgba(255, 255, 255, 0.94);
    outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--accent-300);
    box-shadow: 0 0 0 4px rgba(95, 234, 207, 0.22);
}

.filter-result {
    grid-column: 1 / -1;
    font-weight: 700;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 2.5rem;
}

.pagination a,
.pagination span {
    display: inline-grid;
    min-width: 2.5rem;
    min-height: 2.5rem;
    place-items: center;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--neutral-300);
    border-radius: 0.65rem;
    background: var(--white);
    color: var(--neutral-700);
    font-weight: 700;
}

.pagination a:hover,
.pagination a.is-current {
    border-color: var(--primary-600);
    color: var(--white);
    background: var(--primary-600);
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px) saturate(1.05);
    transform: scale(1.02);
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: clamp(1.5rem, 5vw, 3rem);
    align-items: end;
    min-height: 520px;
    padding: 4rem 0;
}

.detail-poster {
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.20);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

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

.detail-copy h1 {
    color: var(--white);
    font-size: clamp(2.2rem, 6vw, 4.7rem);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.2rem;
}

.detail-tags span {
    display: inline-flex;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.84rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.player-section,
.detail-article,
.related-section {
    margin-top: 3.5rem;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: #000000;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 0.75rem;
    color: var(--white);
    border: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.30));
    cursor: pointer;
}

.player-cover span {
    display: grid;
    width: 4.5rem;
    height: 4.5rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 2rem;
    backdrop-filter: blur(10px);
}

.player-cover strong {
    font-size: clamp(1rem, 2vw, 1.35rem);
}

.player-cover.is-hidden {
    display: none;
}

.article-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 2rem;
    align-items: start;
}

.detail-article section,
.detail-article aside,
.review-block,
.text-card {
    padding: 1.75rem;
    border-radius: 1rem;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.detail-article p,
.text-card p {
    color: var(--neutral-700);
}

.detail-article dl {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 0.7rem 1rem;
    margin: 1rem 0 0;
}

.detail-article dt {
    color: var(--neutral-600);
    font-weight: 800;
}

.detail-article dd {
    margin: 0;
    color: var(--neutral-900);
}

.detail-article dd a {
    color: var(--primary-600);
    font-weight: 800;
}

.review-block {
    margin-top: 2rem;
}

.prose-page {
    display: grid;
    gap: 1.5rem;
}

.site-footer {
    margin-top: 4rem;
    color: var(--neutral-300);
    background: var(--neutral-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 2rem;
    padding: 3rem 0;
}

.footer-brand {
    margin-bottom: 1rem;
    color: var(--white);
    font-size: 1.1rem;
}

.site-footer h2 {
    margin: 0 0 1rem;
    color: var(--white);
    font-size: 1rem;
}

.site-footer p,
.site-footer ul {
    margin: 0;
}

.site-footer ul {
    display: grid;
    gap: 0.5rem;
    padding: 0;
    list-style: none;
}

.footer-bottom {
    padding: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: var(--neutral-400);
}

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

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

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

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

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .hero-slider {
        height: 460px;
        border-radius: 0.8rem;
    }

    .hero-nav {
        opacity: 1;
    }

    .hero-dots {
        right: 1.25rem;
        bottom: 1.25rem;
    }

    .section-heading,
    .filter-panel,
    .article-grid,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

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

    .filter-panel {
        align-items: stretch;
    }

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

    .detail-hero-inner {
        align-items: center;
        padding: 2rem 0;
    }

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

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

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

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

    .card-desc {
        min-height: auto;
    }

    .hero-actions,
    .detail-actions {
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }
}
