:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --accent-600: #059669;
    --secondary-600: #d97706;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;
    --white: #ffffff;
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 0.75rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.container-custom {
    width: min(100% - 2rem, 80rem);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

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

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary-600);
    color: var(--white);
    font-size: 0.8rem;
}

.brand-text {
    font-size: 1.25rem;
    color: var(--neutral-900);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    color: var(--neutral-600);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

.mobile-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--neutral-700);
    font-size: 1.5rem;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--neutral-200);
}

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

.mobile-panel-inner {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 0;
}

.mobile-search {
    margin-top: 0.5rem;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.65rem;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

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

.btn-ghost {
    color: var(--primary-700);
    background: var(--primary-50);
}

.btn-ghost:hover {
    background: var(--primary-100);
}

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

.input-field {
    width: 100%;
    min-height: 2.75rem;
    border: 1px solid var(--neutral-300);
    border-radius: 0.65rem;
    padding: 0.7rem 1rem;
    background: var(--white);
    color: var(--neutral-800);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.hero-carousel {
    position: relative;
    min-height: 36rem;
    overflow: hidden;
    background: var(--neutral-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12)), var(--cover-image);
    background-position: center;
    background-size: cover;
    transition: opacity 0.45s ease, transform 0.6s ease;
}

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

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-copy {
    width: min(100%, 42rem);
    color: var(--white);
}

.eyebrow {
    margin: 0 0 0.7rem;
    color: var(--primary-500);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.detail-info h1,
.player-info h1,
.page-hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    line-height: 1.05;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-tags,
.detail-badges,
.card-meta,
.featured-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.hero-tags span,
.detail-badges span,
.featured-meta span {
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    font-size: 0.85rem;
    backdrop-filter: blur(8px);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: var(--white);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 1.25rem;
}

.hero-next {
    right: 1.25rem;
}

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

.hero-dot {
    width: 0.65rem;
    height: 0.65rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 1.8rem;
    border-radius: 999px;
    background: var(--white);
}

.quick-search {
    margin-top: -2.8rem;
    position: relative;
    z-index: 8;
}

.quick-search-inner {
    display: grid;
    grid-template-columns: 1fr minmax(18rem, 30rem);
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.quick-search h2,
.quick-search p {
    margin: 0;
}

.search-box,
.search-page-form {
    display: flex;
    gap: 0.75rem;
}

.content-section {
    padding: 3.5rem 0;
}

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

.section-heading h2 {
    margin: 0;
    color: var(--neutral-900);
    font-size: 1.75rem;
}

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

.section-more {
    color: var(--primary-600);
    font-weight: 700;
}

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

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

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

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

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

.card-cover,
.detail-poster {
    position: relative;
    display: block;
    min-height: 16rem;
    background-image: linear-gradient(135deg, rgba(14, 165, 233, 0.24), rgba(28, 25, 23, 0.24)), var(--cover-image);
    background-position: center;
    background-size: cover;
}

.card-cover-wide {
    min-height: 12rem;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 12rem 1fr;
}

.corner-badge {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.62);
    color: var(--white);
    font-size: 0.8rem;
}

.card-body {
    padding: 1rem;
}

.card-title {
    display: block;
    margin-bottom: 0.65rem;
    color: var(--neutral-900);
    font-weight: 800;
}

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

.card-body p {
    margin: 0 0 0.75rem;
    color: var(--neutral-600);
    font-size: 0.92rem;
}

.card-meta {
    margin: 0;
    gap: 0.35rem;
}

.card-meta span {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: var(--neutral-100);
    color: var(--neutral-600);
    font-size: 0.78rem;
}

.featured-card {
    position: relative;
    min-height: 28rem;
    background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18)), var(--cover-image);
    background-position: center;
    background-size: cover;
}

.featured-link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.featured-overlay {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    padding: 1.5rem;
    color: var(--white);
}

.featured-overlay h3 {
    margin: 0 0 0.5rem;
    font-size: 1.45rem;
}

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

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

.category-tile {
    display: block;
    padding: 1.4rem;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.category-tile span {
    display: inline-flex;
    margin-bottom: 1.2rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 800;
}

.category-tile h3 {
    margin: 0 0 0.4rem;
}

.category-tile p {
    margin: 0;
    color: var(--neutral-600);
}

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

.compact-hero {
    padding: 4.5rem 0;
    background-image: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.32), transparent 34%), linear-gradient(135deg, #1c1917, #0f172a);
}

.compact-hero p {
    max-width: 48rem;
}

.filter-links {
    border-bottom: 1px solid var(--neutral-200);
    background: var(--white);
}

.filter-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    padding: 1rem 0;
}

.filter-inner a,
.side-links a {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 700;
}

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

.pagination a,
.pagination span {
    min-width: 2.4rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

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

.detail-hero {
    min-height: 34rem;
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.24)), var(--cover-image);
    background-position: center;
    background-size: cover;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 18rem 1fr;
    gap: 2rem;
    align-items: end;
    min-height: 34rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.detail-poster {
    min-height: 25rem;
    border: 6px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.detail-info {
    max-width: 50rem;
}

.detail-main {
    padding: 3rem 0 0;
}

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

.detail-article {
    padding: 2rem;
}

.detail-article h2,
.side-card h2,
.ranking-card h2 {
    margin: 0 0 1rem;
    color: var(--neutral-900);
}

.detail-article p {
    margin: 0 0 1.6rem;
    color: var(--neutral-700);
    font-size: 1.02rem;
}

.tag-cloud,
.side-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.tag-cloud span {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--neutral-100);
    color: var(--neutral-700);
}

.detail-side {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.side-card {
    padding: 1.25rem;
}

.side-card dl {
    display: grid;
    grid-template-columns: 4rem 1fr;
    gap: 0.7rem 0.8rem;
    margin: 0;
}

.side-card dt {
    color: var(--neutral-500);
}

.side-card dd {
    margin: 0;
    color: var(--neutral-800);
    font-weight: 700;
}

.player-section {
    padding: 3rem 0;
    background: var(--neutral-900);
}

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 23rem;
    gap: 1.25rem;
    align-items: start;
}

.player-box,
.player-info {
    background: #0f0f0f;
    color: var(--white);
}

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

.player-status {
    padding: 0.8rem 1rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
}

.player-info {
    padding: 1.4rem;
}

.player-info p {
    color: rgba(255, 255, 255, 0.8);
}

.detail-badges.compact span {
    background: rgba(255, 255, 255, 0.12);
}

.ranking-section {
    padding: 3rem 0;
}

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

.ranking-card {
    padding: 1.25rem;
}

.rank-list {
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-list li {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 0 0.8rem;
    align-items: center;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--neutral-200);
}

.rank-num {
    grid-row: span 2;
    color: var(--primary-600);
    font-weight: 900;
}

.rank-list a {
    font-weight: 800;
}

.rank-list small {
    color: var(--neutral-500);
}

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

.sitemap-column {
    display: grid;
    gap: 0.55rem;
    align-content: start;
}

.sitemap-column a {
    display: grid;
    gap: 0.1rem;
    padding: 0.75rem;
    border-radius: 0.65rem;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    font-weight: 700;
}

.sitemap-column small {
    color: var(--neutral-500);
    font-weight: 400;
}

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

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

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

.site-footer p {
    color: var(--neutral-400);
}

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

.site-footer a {
    display: block;
    margin: 0.45rem 0;
    color: var(--neutral-300);
}

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

.footer-bottom {
    padding: 1.2rem 1rem;
    border-top: 1px solid var(--neutral-800);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
}

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

    .wide-list,
    .ranking-grid,
    .player-layout,
    .detail-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .hero-carousel {
        min-height: 31rem;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search {
        margin-top: 0;
    }

    .quick-search-inner,
    .category-grid,
    .featured-grid,
    .footer-grid,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

    .search-box,
    .search-page-form {
        flex-direction: column;
    }

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

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

    .detail-poster {
        min-height: 20rem;
    }
}

@media (max-width: 520px) {
    .container-custom {
        width: min(100% - 1rem, 80rem);
    }

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

    .content-section {
        padding: 2.25rem 0;
    }

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