html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: #111827;
    background: #f8fafc;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.menu-open {
    overflow: hidden;
}

img {
    background: linear-gradient(135deg, #dbeafe, #f1f5f9);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(16px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.26);
}

.brand-text {
    font-size: 1.35rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-nav-link {
    padding: 10px 15px;
    color: #475569;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
    color: #1d4ed8;
    background: #dbeafe;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eff6ff;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #1e40af;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    padding: 10px 16px 18px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

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

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

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

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

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

.hero-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-overlay {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.2) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.78) 0%, rgba(2, 6, 23, 0.08) 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 48px;
    align-items: center;
    height: 100%;
    padding-top: 32px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    margin-bottom: 12px;
    color: #93c5fd;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.detail-intro h1,
.compact-hero h1 {
    margin: 0;
    font-size: clamp(2.35rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-desc,
.detail-intro p,
.compact-hero p {
    max-width: 780px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.08rem;
    line-height: 1.8;
}

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

.hero-tags {
    margin: 24px 0;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #1e3a8a;
    background: rgba(219, 234, 254, 0.95);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-tags span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.35);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover {
    transform: translateY(-2px);
}

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

.text-btn {
    min-height: 38px;
    padding: 0 16px;
    color: #1d4ed8;
    background: #dbeafe;
}

.hero-poster {
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.48);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    right: calc((100% - min(1180px, calc(100% - 32px))) / 2);
    bottom: 108px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-controls button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.hero-dots {
    display: flex;
    gap: 6px;
}

.hero-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 99px !important;
    opacity: 0.55;
}

.hero-dot.is-active {
    width: 28px !important;
    opacity: 1;
    background: #60a5fa;
}

.hero-quick-links {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 3;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px 0;
    transform: translateX(-50%);
}

.hero-quick-links a,
.category-strip a {
    flex: 0 0 auto;
    padding: 10px 16px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.page-section {
    padding: 56px 0;
}

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

.section-heading h2,
.panel-head h2,
.content-card h2,
.side-card h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 520px;
    color: #64748b;
    line-height: 1.7;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 2fr;
    gap: 16px;
    margin-bottom: 26px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.filter-bar label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
}

.search-field input,
.filter-bar select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    outline: none;
}

.search-field input:focus,
.filter-bar select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 22px 50px rgba(37, 99, 235, 0.13);
    transform: translateY(-6px);
}

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

.poster-image,
.rank-thumb img,
.detail-poster img,
.related-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-image {
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 9px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.poster-play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    border-radius: 999px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

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

.movie-meta {
    margin: 0 0 7px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-card h3,
.rank-info h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
    color: #2563eb;
}

.movie-one-line,
.rank-info p {
    display: -webkit-box;
    margin: 0 0 12px;
    overflow: hidden;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.movie-card.compact .movie-card-body {
    padding: 14px;
}

.movie-card.compact h3 {
    font-size: 0.94rem;
}

.movie-card.is-hidden,
.rank-card.is-hidden {
    display: none;
}

.two-column-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    align-items: start;
}

.rank-panel,
.content-card,
.side-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.panel-head {
    margin-bottom: 18px;
}

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

.rank-list li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.rank-number,
.rank-large {
    display: grid;
    place-items: center;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 12px;
    font-weight: 900;
}

.rank-number {
    width: 42px;
    height: 42px;
}

.rank-list strong,
.rank-list em {
    display: block;
}

.rank-list strong {
    color: #0f172a;
    font-size: 0.94rem;
}

.rank-list em {
    margin-top: 3px;
    color: #64748b;
    font-size: 0.78rem;
    font-style: normal;
}

.category-strip,
.category-grid {
    display: grid;
    gap: 14px;
}

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

.category-strip a {
    color: #1e3a8a;
    background: #dbeafe;
    border-color: #bfdbfe;
    text-align: center;
}

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

.category-card {
    min-height: 150px;
    padding: 24px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    border: 1px solid #dbeafe;
    border-radius: 26px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 46px rgba(37, 99, 235, 0.14);
}

.category-card span {
    color: #1d4ed8;
    font-size: 1.35rem;
    font-weight: 900;
}

.category-card p {
    margin: 12px 0 0;
    color: #64748b;
    line-height: 1.7;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 20% 0%, rgba(96, 165, 250, 0.55), transparent 34%), linear-gradient(135deg, #020617, #1e3a8a 52%, #312e81);
}

.compact-hero {
    padding: 86px 0 78px;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.detail-bg,
.detail-mask {
    position: absolute;
    inset: 0;
}

.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(5px) saturate(1.08);
    transform: scale(1.06);
}

.detail-mask {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62)), linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.detail-head {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    min-height: 560px;
    padding: 48px 0;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.52);
}

.detail-intro h1 {
    max-width: 860px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    padding: 54px 0 0;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.18));
    transition: opacity 0.2s ease;
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.player-icon {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    padding-left: 5px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 999px;
    box-shadow: 0 24px 50px rgba(37, 99, 235, 0.38);
    font-size: 2rem;
}

.player-overlay strong {
    font-size: 1.1rem;
}

.content-card,
.side-card {
    padding: 26px;
}

.content-card p {
    margin: 16px 0 0;
    color: #334155;
    font-size: 1rem;
    line-height: 1.92;
}

.detail-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 22px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-list dt {
    color: #64748b;
    font-weight: 800;
}

.info-list dd {
    margin: 0;
    color: #0f172a;
    font-weight: 700;
}

.related-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.related-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-item img {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
}

.related-item strong,
.related-item em {
    display: block;
}

.related-item strong {
    color: #0f172a;
    font-weight: 900;
}

.related-item em {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.78rem;
    font-style: normal;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 62px 104px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.rank-large {
    width: 62px;
    height: 62px;
    font-size: 1.35rem;
}

.rank-thumb {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
}

.pagination a,
.pagination strong,
.pagination span {
    display: grid;
    min-width: 42px;
    height: 42px;
    place-items: center;
    padding: 0 12px;
    color: #1e3a8a;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-weight: 900;
}

.pagination strong {
    color: #ffffff;
    background: #2563eb;
    border-color: #2563eb;
}

.site-footer {
    margin-top: 64px;
    padding: 44px 0;
    color: #cbd5e1;
    background: #020617;
}

.footer-shell {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

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

.site-footer p {
    max-width: 680px;
    margin: 12px 0 0;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: flex-start;
    justify-content: flex-end;
}

.footer-links a {
    color: #dbeafe;
    font-weight: 800;
}

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }

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

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

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

    .hero-slider {
        height: auto;
        min-height: 680px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 92px 0 170px;
    }

    .hero-poster {
        width: min(240px, 70vw);
        transform: none;
    }

    .hero-controls {
        right: 16px;
        bottom: 100px;
    }

    .filter-bar,
    .filter-selects,
    .detail-head,
    .rank-card {
        grid-template-columns: 1fr;
    }

    .detail-head {
        min-height: auto;
        padding: 80px 0 48px;
    }

    .detail-poster {
        width: min(250px, 70vw);
    }

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

    .section-heading,
    .footer-shell {
        display: grid;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

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

    .brand-text {
        font-size: 1.1rem;
    }

    .hero-copy h1,
    .detail-intro h1,
    .compact-hero h1 {
        font-size: 2.2rem;
    }

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

    .compact-hero {
        padding: 64px 0 58px;
    }

    .rank-card {
        align-items: start;
    }
}
