* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f8f9fa;
    color: #0d0f12;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.container-custom {
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: 0 1rem;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(13, 15, 18, 0.08);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(13, 15, 18, 0.08);
}

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

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

.brand-icon,
.footer-brand span {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.7rem;
    background: linear-gradient(135deg, #0073e6, #e67300);
    color: #ffffff;
    font-size: 0.85rem;
    box-shadow: 0 10px 25px rgba(0, 115, 230, 0.25);
}

.brand-name {
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    background: linear-gradient(90deg, #0073e6, #e67300);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    font-weight: 600;
    color: #343a40;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #0073e6;
}

.menu-button {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 0.65rem;
    background: #f1f3f5;
    color: #0d0f12;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(13, 15, 18, 0.08);
    background: #ffffff;
}

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

.mobile-link {
    padding: 0.9rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid #f1f3f5;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #0d0f12;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 35%, rgba(230, 115, 0, 0.32), transparent 34%),
        linear-gradient(90deg, rgba(0, 19, 26, 0.92), rgba(0, 19, 26, 0.62) 52%, rgba(0, 0, 0, 0.18)),
        linear-gradient(0deg, rgba(13, 15, 18, 0.85), rgba(13, 15, 18, 0.15));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
    padding-top: 110px;
    padding-bottom: 70px;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 0.85rem;
    color: #ffd7aa;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: #e67300;
}

.hero-copy h1,
.hero-copy > h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.hero-movie-title {
    margin: 1.2rem 0 0.8rem;
    color: #ffffff;
    font-size: clamp(1.5rem, 3vw, 2.7rem);
    font-weight: 800;
}

.hero-copy p:not(.eyebrow) {
    max-width: 660px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 2vw, 1.16rem);
}

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

.btn-primary,
.btn-ghost,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    border-radius: 0.65rem;
    padding: 0.75rem 1.25rem;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.home-search button {
    border: 0;
    background: #0073e6;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(0, 115, 230, 0.28);
}

.btn-primary:hover,
.home-search button:hover {
    background: #005bb3;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(0, 91, 179, 0.28);
}

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

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

.btn-ghost.dark {
    border-color: rgba(255, 255, 255, 0.2);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, #0073e6, #e67300);
    font-weight: 800;
    font-size: 0.85rem;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    backdrop-filter: blur(6px);
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 1rem;
}

.hero-control.next {
    right: 1rem;
}

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

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

.hero-dot.is-active {
    width: 2rem;
    background: #ffffff;
}

.search-strip {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    align-items: center;
    gap: 1.5rem;
    margin-top: -44px;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(13, 15, 18, 0.12);
}

.search-strip h2 {
    margin: 0 0 0.25rem;
    font-size: 1.45rem;
}

.search-strip p {
    margin: 0;
    color: #6c757d;
}

.home-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
}

.home-search input,
.search-box input {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 0.65rem;
    background: #ffffff;
    padding: 0.8rem 0.95rem;
    color: #0d0f12;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-search input:focus,
.search-box input:focus {
    border-color: #0073e6;
    box-shadow: 0 0 0 4px rgba(0, 115, 230, 0.12);
}

.section-block {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.white-section {
    background: #ffffff;
}

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

.section-heading a {
    color: #0073e6;
    font-weight: 800;
}

.section-heading.inverse,
.section-heading.inverse .section-title {
    color: #ffffff;
}

.section-title {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    line-height: 1.2;
    font-weight: 900;
    color: #0d0f12;
}

.movie-grid,
.featured-grid,
.rank-grid,
.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.35rem;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 0.8rem;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(13, 15, 18, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(13, 15, 18, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e9ecef;
}

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

.movie-card-wide .poster-link {
    aspect-ratio: 3 / 4;
    min-height: 100%;
}

.poster-link img,
.category-covers img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
}

.poster-badge,
.rank-mark {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    background: rgba(255, 255, 255, 0.92);
    color: #004380;
    font-size: 0.78rem;
    font-weight: 900;
}

.rank-mark {
    left: auto;
    right: 0.75rem;
    color: #ffffff;
    background: linear-gradient(135deg, #0073e6, #e67300);
    font-style: normal;
}

.movie-info {
    padding: 1rem;
}

.movie-info h2 {
    margin: 0 0 0.35rem;
    color: #0d0f12;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 900;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-card-wide .movie-info h2 {
    font-size: 1.25rem;
}

.movie-meta,
.movie-line {
    margin: 0;
    color: #6c757d;
    font-size: 0.88rem;
}

.movie-line {
    margin-top: 0.55rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.tag-row span,
.detail-tags span {
    border-radius: 999px;
    background: #e6f2ff;
    color: #005bb3;
    padding: 0.28rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 800;
}

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

.category-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 96px;
    border-radius: 0.85rem;
    padding: 1.1rem;
    color: #ffffff;
    background: linear-gradient(135deg, #0073e6, #e67300);
    box-shadow: 0 14px 32px rgba(0, 115, 230, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(0, 115, 230, 0.26);
}

.category-pill span {
    font-size: 1.15rem;
    font-weight: 900;
}

.category-pill strong {
    font-size: 0.82rem;
    opacity: 0.86;
}

.ranking-band {
    background:
        radial-gradient(circle at 10% 0, rgba(230, 115, 0, 0.35), transparent 30%),
        linear-gradient(135deg, #00131a, #003d66 58%, #0d0f12);
}

.page-main {
    padding-top: 72px;
}

.page-hero {
    margin-top: 2rem;
    border-radius: 1.1rem;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

.small-hero {
    background: linear-gradient(135deg, #e6f2ff, #fff3e6);
}

.ranking-hero {
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(0, 19, 26, 0.92), rgba(0, 67, 128, 0.92)),
        radial-gradient(circle at 90% 25%, rgba(230, 115, 0, 0.8), transparent 35%);
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 1rem 0 0;
    color: #495057;
    font-size: 1.05rem;
}

.ranking-hero p:not(.eyebrow) {
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1.2rem;
    color: #6c757d;
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #0073e6;
    font-weight: 800;
}

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

.category-card {
    overflow: hidden;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(13, 15, 18, 0.09);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 48px rgba(13, 15, 18, 0.14);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 160px;
    overflow: hidden;
}

.category-card-body {
    padding: 1.2rem;
}

.category-card-body h2 {
    margin: 0;
    font-size: 1.35rem;
}

.category-card-body p:not(.eyebrow) {
    margin: 0.5rem 0 0;
    color: #6c757d;
}

.filter-panel {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    padding: 1rem;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(13, 15, 18, 0.07);
}

.search-box {
    display: grid;
    gap: 0.45rem;
    color: #343a40;
    font-weight: 800;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.filter-chip {
    border: 0;
    border-radius: 999px;
    background: #f1f3f5;
    color: #343a40;
    padding: 0.55rem 0.9rem;
    font-weight: 800;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
    background: #0073e6;
    color: #ffffff;
}

.rank-list {
    display: grid;
    gap: 1rem;
}

.detail-main {
    background: #f8f9fa;
}

.detail-top {
    padding: 2rem 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(230, 115, 0, 0.25), transparent 34%),
        linear-gradient(135deg, #00131a, #003d66 65%, #0d0f12);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
    gap: 1.5rem;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 16 / 9;
    background: #000000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 0;
    border: 0;
    background: #000000;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.12));
}

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

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #0073e6;
    font-size: 2rem;
    transform: translate(-50%, -50%);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35);
}

.detail-panel {
    border-radius: 1rem;
    padding: 1.2rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.detail-panel .breadcrumb,
.detail-panel .breadcrumb a {
    color: rgba(255, 255, 255, 0.78);
}

.detail-panel h1 {
    margin: 1rem 0 0.7rem;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1.15;
    font-weight: 900;
}

.detail-one-line {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
}

.detail-tags span {
    color: #ffffff;
    background: rgba(0, 115, 230, 0.75);
}

.detail-meta {
    display: grid;
    gap: 0.75rem;
    margin: 1.2rem 0 0;
}

.detail-meta div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 0.7rem;
}

.detail-meta dt {
    color: rgba(255, 255, 255, 0.66);
}

.detail-meta dd {
    margin: 0;
    text-align: right;
    font-weight: 800;
}

.detail-content {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.content-card {
    margin-bottom: 1rem;
    border-radius: 1rem;
    padding: 1.35rem;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(13, 15, 18, 0.07);
}

.content-card h2 {
    margin: 0 0 0.8rem;
    color: #0d0f12;
    font-size: 1.35rem;
}

.content-card p {
    margin: 0;
    color: #343a40;
}

.next-prev {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0 3rem;
}

.next-prev a {
    border-radius: 0.8rem;
    padding: 1rem;
    background: #ffffff;
    color: #0073e6;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(13, 15, 18, 0.07);
}

.site-footer {
    background: #0d0f12;
    color: #adb5bd;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
    padding-top: 3rem;
    padding-bottom: 2rem;
}

.footer-brand {
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 1.2rem;
}

.site-footer h2 {
    margin: 0 0 1rem;
    color: #ffffff;
    font-size: 1rem;
}

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

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid #212529;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
    font-size: 0.9rem;
}

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

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

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

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

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

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

    .hero-carousel,
    .hero-content {
        min-height: 760px;
    }

    .hero-content,
    .search-strip,
    .featured-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 240px;
        transform: none;
    }

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

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

@media (max-width: 580px) {
    .header-inner {
        height: 64px;
    }

    .page-main {
        padding-top: 64px;
    }

    .hero-carousel,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        padding-top: 95px;
    }

    .hero-control {
        display: none;
    }

    .home-search,
    .next-prev {
        grid-template-columns: 1fr;
    }

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

    .movie-card-wide {
        display: block;
    }

    .movie-card-wide .poster-link {
        min-height: 0;
    }

    .movie-info {
        padding: 0.85rem;
    }

    .tag-row {
        display: none;
    }

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

    .footer-bottom {
        flex-direction: column;
    }
}
