:root {
    --blue: #2563eb;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --white: #ffffff;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

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

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

.logo-text {
    font-size: 22px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease;
}

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

.mobile-toggle {
    display: none;
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--blue);
    font-size: 22px;
}

.mobile-nav {
    display: none;
    padding: 8px 24px 18px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

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

.mobile-nav-link {
    display: block;
    padding: 12px 14px;
    color: #334155;
    border-radius: 14px;
    font-weight: 700;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    color: var(--blue);
    background: #eff6ff;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #0891b2 50%, #0f766e);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.32), transparent 24%), radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.22), transparent 28%), linear-gradient(45deg, rgba(255, 255, 255, 0.10) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.10) 50%, rgba(255, 255, 255, 0.10) 75%, transparent 75%, transparent);
    background-size: auto, auto, 64px 64px;
}

.hero-slides,
.hero-slide,
.hero-background,
.hero-shade {
    position: absolute;
    inset: 0;
}

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

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

.hero-background {
    background-position: center;
    background-size: cover;
    filter: saturate(1.1) brightness(0.85);
    opacity: 0.32;
}

.hero-shade {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0.66));
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    gap: 54px;
    align-items: center;
    max-width: 1280px;
    min-height: 680px;
    margin: 0 auto;
    padding: 74px 24px 88px;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    margin-bottom: 18px;
    color: #cffafe;
    border: 1px solid rgba(207, 250, 254, 0.48);
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.18);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hero h1,
.page-hero h1,
.detail-side h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 66px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-side p {
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-tags,
.detail-meta,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span,
.detail-meta span {
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

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

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

.btn.primary {
    color: var(--blue);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

.btn.ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
    position: relative;
    display: block;
    min-height: 500px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08));
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
}

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

.hero-poster-play,
.card-play {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.35);
}

.hero-poster-play {
    left: 50%;
    top: 50%;
    width: 70px;
    height: 70px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    font-size: 28px;
}

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

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

.hero-dot.active {
    background: #ffffff;
}

.home-search,
.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
    gap: 28px;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-head h2,
.related-side h2,
.detail-main h2 {
    margin: 0;
    color: var(--ink);
    font-size: 28px;
    line-height: 1.2;
    font-weight: 900;
}

.search-panel p,
.section-head p,
.detail-main p,
.category-overview-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fafc;
}

.search-box input {
    width: 100%;
    height: 48px;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 16px;
}

.page-search {
    max-width: 520px;
    margin: 18px 0 24px;
    background: #ffffff;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.category-chip {
    padding: 10px 16px;
    color: #075985;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    background: #f0f9ff;
    font-weight: 800;
}

.category-chip:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.section-head.tight {
    margin-bottom: 16px;
}

.section-link {
    color: var(--blue);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.13);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8, #0891b2, #14b8a6);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.06);
}

.card-duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 3px 8px;
    color: #ffffff;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.76);
    font-size: 12px;
    font-weight: 800;
}

.card-play {
    left: 12px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translateY(0);
}

.card-body {
    padding: 17px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.card-body h3 {
    margin: 9px 0 8px;
    font-size: 18px;
    line-height: 1.28;
    font-weight: 900;
}

.card-body h3 a:hover {
    color: var(--blue);
}

.card-body p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 14px;
}

.card-tags {
    margin-top: 12px;
}

.card-tags span,
.detail-tags span {
    color: #075985;
    background: #e0f2fe;
}

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

.rank-panel,
.related-side,
.detail-main,
.category-overview-card {
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 38px 82px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: #eff6ff;
    transform: translateX(3px);
}

.rank-number {
    color: var(--blue);
    font-size: 18px;
    font-weight: 900;
}

.rank-cover {
    display: block;
    height: 54px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

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

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

.rank-info strong,
.compact-info strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 15px;
}

.rank-info em,
.compact-info em,
.compact-info small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    font-style: normal;
    font-size: 12px;
}

.rank-hot {
    color: #ef4444;
    font-size: 12px;
    font-weight: 900;
}

.page-hero,
.detail-hero {
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16), transparent 28%), linear-gradient(135deg, #1d4ed8, #0891b2 52%, #0f766e);
}

.page-hero {
    padding: 86px 24px;
}

.page-hero > div {
    max-width: 1280px;
    margin: 0 auto;
}

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

.category-overview-card {
    padding: 24px;
}

.category-overview-link {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 900;
}

.category-overview-link em {
    color: var(--blue);
    font-style: normal;
    font-size: 14px;
}

.category-sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.category-sample-links a {
    padding: 7px 10px;
    color: #075985;
    border-radius: 999px;
    background: #e0f2fe;
    font-size: 13px;
    font-weight: 800;
}

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

.detail-hero {
    padding: 34px 24px 62px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 34px;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
}

.video-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.38);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.25), rgba(15, 23, 42, 0.72));
    cursor: pointer;
}

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

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.42);
    font-size: 30px;
}

.player-overlay strong {
    max-width: 80%;
    font-size: 24px;
    line-height: 1.3;
    text-align: center;
}

.player-overlay em {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-style: normal;
    font-weight: 900;
}

.detail-side .hero-kicker {
    color: #cffafe;
}

.detail-meta {
    margin-top: 24px;
}

.detail-tags {
    margin-top: 16px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.detail-main,
.related-side {
    padding: 26px;
}

.detail-main h2 + p {
    margin-top: 10px;
}

.detail-main h2:not(:first-child) {
    margin-top: 26px;
}

.compact-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.compact-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
}

.compact-card:hover {
    background: #eff6ff;
}

.compact-cover {
    height: 74px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

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

.site-footer {
    margin-top: 36px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 32px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-grid p {
    max-width: 520px;
    margin: 14px 0 0;
}

.footer-grid a:not(.footer-logo) {
    display: block;
    margin-top: 8px;
    color: #cbd5e1;
}

.footer-grid a:hover {
    color: #ffffff;
}

.footer-logo {
    color: #ffffff;
    font-size: 18px;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 14px;
}

.is-filtered-out {
    display: none !important;
}

@media (max-width: 1120px) {
    .desktop-nav {
        gap: 16px;
        font-size: 14px;
    }

    .hero-inner,
    .detail-layout,
    .two-columns,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

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

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

    .hero-poster {
        min-height: 360px;
    }

    .hero-poster img {
        height: 360px;
    }
}

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 46px;
    }

    .search-panel,
    .footer-grid,
    .category-overview-grid,
    .rank-list.large {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 560px) {
    .nav-wrap {
        height: 64px;
        padding: 0 16px;
    }

    .logo-text {
        font-size: 18px;
    }

    .home-search,
    .section-wrap,
    .page-hero,
    .detail-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .hero h1,
    .page-hero h1,
    .detail-side h1 {
        font-size: 34px;
    }

    .hero p,
    .page-hero p,
    .detail-side p {
        font-size: 16px;
    }

    .rank-item {
        grid-template-columns: 32px 72px minmax(0, 1fr);
    }

    .rank-hot {
        grid-column: 3;
    }

    .compact-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .player-overlay strong {
        font-size: 18px;
    }
}
