:root {
    color-scheme: light;
    --bg: #f8fbff;
    --panel: #ffffff;
    --ink: #101827;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.10);
    --blue: #2563eb;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --rose: #fb7185;
    --amber: #f59e0b;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.14);
    --soft-shadow: 0 14px 35px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 46%, #e9fbff 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.26);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.nav-links a {
    position: relative;
    padding: 8px 0;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 180ms ease;
}

.nav-links a:hover {
    color: var(--blue);
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a8a;
    width: 42px;
    height: 42px;
    font-size: 22px;
    cursor: pointer;
}

.hero-slider {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4, #14b8a6);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 88px 22px;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 580ms ease, transform 580ms ease;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.42), rgba(6, 182, 212, 0.18)), var(--hero-image), linear-gradient(135deg, #2563eb, #06b6d4);
    background-size: cover;
    background-position: center;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 26%), radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.14), transparent 24%);
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1220px, 100%);
    margin: 0 auto;
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-hero h1 {
    margin: 0 0 20px;
    font-size: clamp(42px, 8vw, 78px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-hero p {
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.90);
    font-size: clamp(17px, 2.2vw, 24px);
    line-height: 1.65;
}

.hero-tags,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.hero-tags span,
.meta-row span,
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.20);
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

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

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

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

.btn-primary {
    color: var(--blue);
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(255, 255, 255, 0.24);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 2px solid rgba(255, 255, 255, 0.44);
    backdrop-filter: blur(12px);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 200ms ease, background 200ms ease;
}

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

.section {
    padding: 78px 22px;
}

.section > .section-head,
.section > .feature-grid,
.section > .poster-grid,
.section > .rank-grid,
.section > .category-grid,
.section > .library-tools,
.section > .content-grid {
    width: min(1220px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.section-white {
    background: #ffffff;
}

.section-blue {
    background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
}

.section-rose {
    background: linear-gradient(135deg, #faf5ff 0%, #fff1f2 100%);
}

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

.section-head.centered {
    display: block;
    text-align: center;
    max-width: 760px;
}

.section-head h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

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

.feature-grid {
    display: grid;
    gap: 26px;
}

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

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

.feature-card,
.category-card,
.rank-item,
.poster-card,
.story-card,
.player-shell {
    box-shadow: var(--soft-shadow);
}

.feature-card a,
.category-card {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 320px;
    border-radius: 28px;
    background: linear-gradient(135deg, #0f172a, #0e7490);
}

.wide-card a {
    min-height: 260px;
}

.feature-image,
.feature-layer,
.feature-copy {
    position: absolute;
    inset: 0;
}

.feature-image img,
.rank-poster img,
.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms ease, opacity 200ms ease;
}

.feature-image img.is-missing,
.rank-poster img.is-missing,
.poster-frame img.is-missing {
    opacity: 0;
}

.feature-layer {
    background: linear-gradient(to top, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.06));
}

.feature-copy {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 26px;
    color: #ffffff;
}

.feature-copy strong {
    margin: 12px 0 8px;
    font-size: 23px;
    line-height: 1.15;
}

.feature-copy span:last-child {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
}

.feature-card:hover img,
.poster-card:hover img,
.rank-item:hover img {
    transform: scale(1.08);
}

.poster-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    min-width: 0;
}

.poster-card {
    display: block;
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a, #0891b2, #14b8a6);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(10px);
}

.poster-info {
    display: block;
    padding: 16px;
}

.poster-title {
    display: block;
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poster-meta,
.poster-line {
    display: block;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.poster-line {
    display: -webkit-box;
    min-height: 40px;
    margin-top: 6px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.rank-item a {
    display: grid;
    grid-template-columns: 56px 76px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 16px;
    min-height: 130px;
    border-radius: 22px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.rank-item a:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
    box-shadow: var(--shadow);
}

.rank-number {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.rank-poster {
    width: 76px;
    height: 106px;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #1e3a8a, #0891b2);
}

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

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

.rank-copy strong {
    color: #0f172a;
    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-copy em {
    margin: 6px 0;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.rank-copy span {
    display: -webkit-box;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-card {
    min-height: 250px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
    background-image: linear-gradient(to top, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18)), var(--category-image), linear-gradient(135deg, #6d28d9, #db2777);
    background-size: cover;
    background-position: center;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.category-card span {
    width: max-content;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 900;
}

.category-card strong {
    font-size: 24px;
    line-height: 1.15;
}

.category-card em {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
    line-height: 1.55;
    font-style: normal;
}

.library-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(14px);
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.search-box span {
    color: #0f172a;
    font-weight: 900;
}

.search-box input {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    padding: 0 16px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
}

.search-box input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chips button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: #e2e8f0;
    color: #334155;
    font-weight: 800;
    cursor: pointer;
}

.filter-chips button.is-active,
.filter-chips button:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.page-hero,
.detail-hero {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    padding: 88px 22px;
    color: #ffffff;
    overflow: hidden;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.84), rgba(15, 23, 42, 0.52), rgba(14, 116, 144, 0.24)), var(--page-image), linear-gradient(135deg, #1e3a8a, #06b6d4);
    background-size: cover;
    background-position: center;
}

.page-hero > div,
.detail-hero-copy {
    position: relative;
    width: min(1220px, 100%);
    margin: 0 auto;
    max-width: 840px;
}

.detail-hero {
    min-height: 560px;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.52), rgba(14, 116, 144, 0.16)), var(--detail-image), linear-gradient(135deg, #1e3a8a, #06b6d4);
}

.player-section {
    padding-top: 56px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at 50% 45%, rgba(37, 99, 235, 0.30), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 180ms ease, visibility 180ms ease;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--blue);
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    font-size: 28px;
    text-indent: 4px;
}

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

.content-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
}

.story-card {
    padding: 30px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.story-card.accent {
    background: linear-gradient(135deg, #ffffff, #f0f9ff);
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    color: #0f172a;
}

.story-card p {
    margin: 0;
    color: #334155;
    font-size: 16px;
    line-height: 1.9;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #020617, #0f172a 54%, #082f49);
    padding: 56px 22px 28px;
}

.footer-grid {
    width: min(1220px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
}

.site-footer p {
    max-width: 420px;
    color: #94a3b8;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer a,
.site-footer span {
    display: block;
    margin: 9px 0;
    color: #94a3b8;
}

.site-footer a:hover {
    color: #67e8f9;
}

.footer-bottom {
    width: min(1220px, 100%);
    margin: 34px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.20);
    color: #94a3b8;
    font-size: 14px;
}

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

@media (max-width: 980px) {
    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        left: 18px;
        right: 18px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 18px;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--shadow);
    }

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

    .feature-grid.three,
    .feature-grid.two,
    .rank-grid,
    .rank-grid.large,
    .category-grid,
    .content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .library-tools {
        align-items: stretch;
        flex-direction: column;
    }
}

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

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

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

    .hero-slide,
    .page-hero,
    .detail-hero {
        padding: 64px 16px;
    }

    .section {
        padding: 58px 16px;
    }

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

    .poster-grid.compact,
    .poster-grid.full {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .poster-info {
        padding: 13px;
    }

    .rank-item a {
        grid-template-columns: 44px 68px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

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

    .rank-poster {
        width: 68px;
        height: 96px;
    }

    .search-box {
        min-width: 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .story-card {
        padding: 22px;
    }
}
