:root {
    --ink-950: #061423;
    --mist-950: #102a43;
    --mist-900: #18324d;
    --mist-850: #1f3a56;
    --mist-800: #243b53;
    --mist-700: #334e68;
    --mist-500: #627d98;
    --mist-300: #9fb3c8;
    --mist-200: #bcccdc;
    --swamp-700: #164b51;
    --swamp-600: #20656a;
    --swamp-500: #2d8285;
    --swamp-400: #52a0a3;
    --swamp-300: #7bb8ba;
    --amber: #facc15;
    --white: #ffffff;
    --glass: rgba(16, 42, 67, 0.72);
    --line: rgba(188, 204, 220, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--mist-200);
    background:
        radial-gradient(circle at 12% 0%, rgba(82, 160, 163, 0.22), transparent 26rem),
        radial-gradient(circle at 88% 8%, rgba(250, 204, 21, 0.1), transparent 22rem),
        linear-gradient(180deg, var(--ink-950), var(--mist-950) 40%, #081928 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(6, 20, 35, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--ink-950);
    background: linear-gradient(135deg, var(--swamp-300), var(--amber));
    box-shadow: 0 16px 42px rgba(82, 160, 163, 0.34);
}

.brand-name {
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.nav-link {
    padding: 10px 14px;
    color: var(--mist-300);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--white);
    background: rgba(82, 160, 163, 0.18);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(36, 59, 83, 0.82);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--mist-200);
    border-radius: 999px;
}

.hero-slider {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    filter: saturate(1.05) contrast(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 20, 35, 0.97) 0%, rgba(6, 20, 35, 0.82) 38%, rgba(6, 20, 35, 0.24) 74%),
        linear-gradient(180deg, rgba(6, 20, 35, 0.28) 0%, rgba(6, 20, 35, 0.92) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 600px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 48px;
    padding-top: 54px;
    padding-bottom: 118px;
}

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

.eyebrow {
    margin: 0 0 12px;
    color: var(--swamp-300);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(2rem, 5vw, 4.8rem);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero-copy h2 {
    margin: 18px 0 0;
    color: var(--amber);
    font-size: clamp(1.5rem, 3vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 640px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.08rem;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(188, 204, 220, 0.18);
    border-radius: 999px;
    color: var(--mist-200);
    background: rgba(16, 42, 67, 0.52);
    font-size: 0.8rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

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

.primary-button {
    border: 0;
    color: var(--ink-950);
    background: linear-gradient(135deg, var(--swamp-300), var(--amber));
    box-shadow: 0 18px 44px rgba(82, 160, 163, 0.34);
}

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

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

.hero-poster {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: inherit;
    z-index: 2;
    pointer-events: none;
}

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

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 58px;
    background: var(--swamp-300);
}

.hero-mini-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: min(620px, 54vw);
}

.hero-mini-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(16, 42, 67, 0.72);
    backdrop-filter: blur(10px);
}

.hero-mini-card img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.hero-mini-card strong,
.hero-mini-card em {
    display: block;
}

.hero-mini-card strong {
    color: var(--white);
    font-size: 0.92rem;
    line-height: 1.25;
}

.hero-mini-card em {
    margin-top: 4px;
    color: var(--mist-300);
    font-size: 0.76rem;
    font-style: normal;
}

.section-panel,
.content-section,
.page-hero,
.detail-hero,
.player-section,
.detail-content {
    margin-top: 42px;
}

.intro-search,
.page-hero {
    display: grid;
    gap: 24px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(36, 59, 83, 0.82), rgba(16, 42, 67, 0.72));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.intro-search {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: center;
}

.intro-search h2,
.section-heading h2,
.story-panel h2,
.category-hero h1,
.slim-hero h1,
.ranking-hero h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(1.55rem, 3vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.intro-search p,
.page-hero p {
    margin: 10px 0 0;
    color: var(--mist-300);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 0.8fr 0.8fr auto;
    align-items: end;
    gap: 12px;
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--mist-300);
    font-size: 0.82rem;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(188, 204, 220, 0.14);
    border-radius: 16px;
    color: var(--white);
    background: rgba(6, 20, 35, 0.72);
    outline: 0;
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--swamp-400);
    box-shadow: 0 0 0 3px rgba(82, 160, 163, 0.16);
}

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

.text-link {
    color: var(--swamp-300);
    font-weight: 800;
}

.text-link:hover {
    color: var(--white);
}

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

.movie-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(16, 42, 67, 0.78);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(123, 184, 186, 0.42);
    background: rgba(24, 50, 77, 0.94);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--mist-900);
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(180deg, transparent, rgba(6, 20, 35, 0.86));
}

.poster-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--ink-950);
    background: var(--amber);
    font-size: 0.78rem;
    font-weight: 900;
}

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

.movie-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--swamp-300);
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-card h3 {
    margin: 8px 0 0;
    color: var(--white);
    font-size: 1.08rem;
    line-height: 1.3;
}

.movie-card h3 a:hover {
    color: var(--swamp-300);
}

.movie-card p {
    min-height: 70px;
    margin: 10px 0 0;
    color: var(--mist-300);
    font-size: 0.92rem;
}

.movie-card-compact p {
    min-height: 48px;
}

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

.category-card,
.category-overview-card,
.spotlight-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(36, 59, 83, 0.88), rgba(16, 42, 67, 0.76));
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover,
.spotlight-card:hover {
    transform: translateY(-4px);
    border-color: rgba(123, 184, 186, 0.42);
}

.category-card {
    min-height: 144px;
    padding: 18px;
}

.category-card span,
.category-overview-head span {
    color: var(--white);
    font-size: 1.08rem;
    font-weight: 900;
}

.category-card strong,
.category-overview-head strong {
    display: block;
    margin-top: 12px;
    color: var(--mist-300);
    font-size: 0.9rem;
    font-weight: 500;
}

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

.category-overview-head {
    display: block;
    padding: 20px;
}

.category-sample-links {
    display: grid;
    gap: 8px;
    padding: 0 20px 20px;
}

.category-sample-links a {
    color: var(--mist-200);
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.category-sample-links a:hover {
    color: var(--white);
    background: rgba(82, 160, 163, 0.16);
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
}

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

.rank-link {
    display: grid;
    grid-template-columns: 54px 58px 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(16, 42, 67, 0.72);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-link:hover {
    background: rgba(36, 59, 83, 0.92);
    transform: translateX(4px);
}

.rank-number {
    color: var(--amber);
    font-size: 1.1rem;
    font-weight: 900;
    text-align: center;
}

.rank-link img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

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

.rank-copy strong {
    color: var(--white);
    line-height: 1.25;
}

.rank-copy em {
    margin-top: 6px;
    color: var(--mist-300);
    font-size: 0.8rem;
    font-style: normal;
}

.page-hero {
    margin-top: 32px;
    padding: 40px;
}

.slim-hero,
.category-hero,
.ranking-hero {
    min-height: 250px;
    justify-content: center;
}

.ranking-hero .spotlight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
}

.spotlight-card {
    position: relative;
    min-height: 260px;
}

.spotlight-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    opacity: 0.86;
}

.spotlight-card span {
    position: absolute;
    inset: auto 0 0;
    display: block;
    padding: 18px;
    background: linear-gradient(180deg, transparent, rgba(6, 20, 35, 0.92));
}

.spotlight-card strong,
.spotlight-card em {
    display: block;
}

.spotlight-card strong {
    color: var(--white);
    font-size: 1.1rem;
}

.spotlight-card em {
    margin-top: 6px;
    color: var(--mist-200);
    font-style: normal;
    font-size: 0.9rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 18px 0;
    color: var(--mist-300);
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: var(--swamp-300);
}

.detail-layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    align-items: center;
    gap: 34px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(36, 59, 83, 0.9), rgba(16, 42, 67, 0.72));
    box-shadow: var(--shadow);
}

.detail-poster {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.detail-one-line {
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.08rem;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.detail-meta span {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--mist-200);
    background: rgba(6, 20, 35, 0.38);
}

.detail-copy .primary-button {
    margin-top: 28px;
}

.player-frame {
    position: relative;
    border: 1px solid rgba(123, 184, 186, 0.36);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(6, 20, 35, 0.16), rgba(6, 20, 35, 0.76));
    text-align: center;
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    color: var(--ink-950);
    background: linear-gradient(135deg, var(--swamp-300), var(--amber));
    font-size: 2rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.play-overlay strong {
    padding: 0 18px;
    font-size: clamp(1.1rem, 3vw, 2rem);
}

.story-panel {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(16, 42, 67, 0.72);
}

.story-panel h2 + p {
    margin-top: 12px;
}

.story-panel p + h2 {
    margin-top: 28px;
}

.story-panel p {
    margin-bottom: 0;
    color: var(--mist-200);
    font-size: 1.02rem;
}

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

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(6, 20, 35, 0.82);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    padding: 34px 0;
}

.footer-grid strong {
    color: var(--white);
}

.footer-grid p {
    max-width: 620px;
    margin: 10px 0 0;
    color: var(--mist-300);
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--mist-200);
    background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
    color: var(--white);
    background: rgba(82, 160, 163, 0.18);
}

.footer-bottom {
    padding: 0 0 28px;
    color: var(--mist-500);
    font-size: 0.9rem;
}

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

@media (max-width: 1080px) {
    .hero-content {
        grid-template-columns: 1fr 280px;
    }

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

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

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

@media (max-width: 840px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(6, 20, 35, 0.96);
    }

    .site-nav.is-open {
        display: flex;
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-bottom: 190px;
    }

    .hero-poster {
        width: min(260px, 70vw);
        justify-self: center;
    }

    .hero-controls {
        display: grid;
        gap: 14px;
        align-items: center;
    }

    .hero-mini-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(620px, calc(100vw - 32px));
    }

    .intro-search,
    .filter-panel,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .related-grid,
    .category-grid,
    .category-overview-grid,
    .rank-list,
    .large-rank-list,
    .ranking-hero .spotlight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .brand-name {
        max-width: 210px;
    }

    .hero-slider {
        min-height: 800px;
    }

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

    .hero-mini-list,
    .movie-grid,
    .related-grid,
    .category-grid,
    .category-overview-grid,
    .rank-list,
    .large-rank-list,
    .ranking-hero .spotlight-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: grid;
        gap: 10px;
    }

    .intro-search,
    .page-hero,
    .detail-layout,
    .story-panel {
        padding: 22px;
        border-radius: 22px;
    }

    .rank-link {
        grid-template-columns: 44px 54px 1fr;
    }
}
