:root {
    --primary: 41 128 185;
    --primary-dark: 30 97 140;
    --primary-light: 93 173 226;
    --accent: 46 204 113;
    --warning: 241 196 15;
    --bg: #f7fafc;
    --text: #17212f;
    --muted: #627086;
    --line: #e4ebf3;
    --card: #ffffff;
    --dark: #08111f;
    --shadow: 0 20px 40px rgba(10, 35, 55, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.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.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

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

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--accent)));
    box-shadow: 0 12px 28px rgba(41, 128, 185, 0.28);
}

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: rgb(var(--primary-dark));
    background: rgba(41, 128, 185, 0.1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(41, 128, 185, 0.1);
    color: rgb(var(--primary-dark));
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: currentColor;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--dark);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-bg::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 30%, rgba(93, 173, 226, 0.42), transparent 28%),
        linear-gradient(90deg, rgba(5, 13, 25, 0.96), rgba(5, 13, 25, 0.72) 42%, rgba(5, 13, 25, 0.28)),
        linear-gradient(0deg, rgba(5, 13, 25, 0.94), transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 48px;
    color: #ffffff;
    padding-top: 52px;
    padding-bottom: 72px;
}

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

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: rgb(var(--primary-light));
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(2.4rem, 7vw, 5.2rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-info p {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08rem;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-weight: 650;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button.primary,
.button.full {
    color: #ffffff;
    background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--accent)));
    box-shadow: 0 18px 36px rgba(41, 128, 185, 0.28);
}

.button.ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
}

.button.full {
    width: 100%;
    margin-top: 18px;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 86px;
    width: min(600px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    transform: translateX(-50%);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    background: #ffffff;
    color: var(--text);
}

.hero-search input {
    border: 0;
    padding: 0 18px;
}

.hero-search button {
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    min-height: 44px;
    color: #ffffff;
    background: rgb(var(--primary));
    font-weight: 800;
}

.section {
    padding: 78px 0;
}

.section.no-top {
    padding-top: 0;
}

.soft-section {
    background: linear-gradient(180deg, #eef7ff, #f7fafc);
}

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

.section-heading h2,
.panel-heading h2,
.story-card h2,
.meta-panel h2 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.1;
}

.section-heading p,
.panel-heading p {
    margin: 0;
    color: var(--muted);
}

.section-link {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    color: rgb(var(--primary-dark));
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 12px 28px rgba(10, 35, 55, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #dce8f4;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.04);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), transparent 45%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.play-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 800;
}

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

.card-meta {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 650;
}

.movie-card h3,
.ranking-content h2 {
    margin: 0 0 8px;
    font-size: 1.08rem;
    line-height: 1.32;
}

.movie-card h3 a:hover,
.ranking-content h2 a:hover,
.meta-panel a:hover {
    color: rgb(var(--primary));
}

.movie-card p,
.ranking-content p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.94rem;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.88rem;
}

.card-bottom a,
.card-bottom span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-bottom a {
    color: rgb(var(--primary-dark));
    font-weight: 800;
}

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

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

.category-card,
.category-overview {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    border-radius: var(--radius);
    color: #ffffff;
    box-shadow: 0 14px 32px rgba(10, 35, 55, 0.12);
}

.category-card img,
.category-overview img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-card:hover img,
.category-overview:hover img {
    transform: scale(1.05);
}

.category-layer,
.category-overview::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(0deg, rgba(6, 14, 28, 0.86), rgba(6, 14, 28, 0.18));
}

.category-card strong,
.category-card em,
.category-overview div {
    position: relative;
    z-index: 2;
}

.category-card strong {
    font-size: 1.35rem;
}

.category-card em {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.78);
    font-style: normal;
}

.ranking-panel,
.story-card,
.meta-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 32px rgba(10, 35, 55, 0.08);
}

.ranking-panel {
    padding: 22px;
    position: sticky;
    top: 92px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 42px 54px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.ranking-row:last-child {
    border-bottom: 0;
}

.rank-number {
    color: rgb(var(--primary));
    font-weight: 900;
}

.ranking-row img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    background: #dce8f4;
}

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

.rank-text strong,
.rank-text em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-text em {
    color: var(--muted);
    font-size: 0.86rem;
    font-style: normal;
}

.ranking-row b {
    color: rgb(var(--primary-dark));
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 20%, rgba(93, 173, 226, 0.35), transparent 28%),
        linear-gradient(135deg, #07111e, #14324a 58%, #0c1628);
}

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

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

.page-hero p {
    color: rgba(255, 255, 255, 0.76);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 650;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 28px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(10, 35, 55, 0.07);
}

.filter-bar.wide {
    grid-template-columns: minmax(0, 1fr) 160px 160px;
}

.filter-bar input,
.filter-bar select {
    padding: 12px 16px;
}

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

.category-overview {
    min-height: 240px;
}

.category-overview span {
    color: rgb(var(--primary-light));
    font-weight: 850;
    letter-spacing: 0.08em;
}

.category-overview h2 {
    margin: 8px 0;
    font-size: 2rem;
}

.category-overview p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.ranking-grid {
    display: grid;
    gap: 18px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(10, 35, 55, 0.08);
}

.ranking-cover {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #dce8f4;
}

.ranking-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.ranking-cover span {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.62);
    font-weight: 900;
}

.detail-hero {
    min-height: 560px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-head {
    position: relative;
    z-index: 2;
    padding: 72px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.detail-tags span {
    color: #ffffff;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.15));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-card.is-playing .player-overlay {
    opacity: 0;
    visibility: hidden;
}

.play-circle {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--accent)));
    box-shadow: 0 22px 44px rgba(41, 128, 185, 0.35);
    font-size: 2rem;
}

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

.story-card,
.meta-panel {
    padding: 28px;
}

.story-card p {
    margin: 0 0 22px;
    color: #344154;
    font-size: 1.02rem;
}

.story-card .tag-list span {
    color: rgb(var(--primary-dark));
    background: rgba(41, 128, 185, 0.1);
    border-color: rgba(41, 128, 185, 0.16);
}

.meta-panel {
    position: sticky;
    top: 92px;
}

.meta-panel dl {
    margin: 0;
}

.meta-panel dt {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.meta-panel dd {
    margin: 4px 0 0;
    font-weight: 750;
}

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

.site-footer {
    padding: 40px 0;
    background: #07111e;
    color: rgba(255, 255, 255, 0.74);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-logo {
    color: #ffffff;
    font-size: 1.15rem;
}

.footer-inner p {
    margin: 8px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

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

.is-hidden {
    display: none !important;
}

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

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

    .ranking-panel,
    .meta-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        align-items: end;
        padding-top: 48px;
        padding-bottom: 150px;
    }

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

    .hero-search {
        bottom: 72px;
    }

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

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

    .detail-poster {
        width: min(280px, 78vw);
    }

    .filter-bar,
    .filter-bar.wide {
        grid-template-columns: 1fr;
        border-radius: 20px;
    }

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

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

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.4rem;
    }

    .hero-search {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .hero-search input {
        min-height: 44px;
    }

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

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