:root {
    --bg: #f6f8fc;
    --paper: #ffffff;
    --paper-soft: rgba(255, 255, 255, 0.88);
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: #dbeafe;
    --accent: #7c3aed;
    --accent-soft: #ede9fe;
    --danger: #ef4444;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
    --radius-lg: 28px;
    --radius: 18px;
    --container: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 30rem),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 42%, #eef2ff 100%);
    font-family: "Inter", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

main {
    min-height: 70vh;
}

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

.header-inner {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #111827;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.24);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    font-size: 15px;
    font-weight: 700;
    color: #334155;
}

.site-nav a {
    position: relative;
    padding: 10px 0;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 5px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    transition: transform 0.2s ease;
}

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

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: var(--brand);
    font-weight: 800;
}

.hero-section,
.page-hero,
.content-section,
.home-search,
.detail-hero,
.player-section,
.detail-layout,
.prev-next-nav {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    padding: 36px 0 22px;
}

.hero-slider {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 42% minmax(0, 1fr);
    gap: 28px;
    padding: 48px;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.7s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.35), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.90), rgba(30, 64, 175, 0.76));
    z-index: 0;
}

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

.hero-cover {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 440px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

.hero-copy {
    position: relative;
    z-index: 1;
    align-self: center;
    color: #ffffff;
}

.eyebrow,
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-kicker {
    color: #bfdbfe;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy p {
    margin: 20px 0;
    max-width: 620px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.20);
}

.tag-row span {
    color: #1d4ed8;
    background: var(--brand-soft);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 20px;
    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: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.25);
}

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

.btn-soft {
    color: #1d4ed8;
    background: #ffffff;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: 48px;
    bottom: 30px;
    display: flex;
    gap: 10px;
}

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

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

.hero-side-panel {
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius-lg);
    padding: 26px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-side-panel h2,
.section-heading h2,
.home-search h2,
.detail-text h2,
.detail-side h2 {
    margin: 0 0 10px;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.04em;
}

.hero-side-panel p,
.section-heading p,
.home-search p,
.page-hero p {
    margin: 0;
    color: var(--muted);
}

.mini-list,
.mini-grid {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.mini-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.mini-card:hover {
    transform: translateX(4px);
    border-color: #bfdbfe;
}

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

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

.mini-card strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.home-search,
.filter-panel,
.page-hero,
.detail-layout,
.player-section,
.prev-next-nav {
    margin-top: 24px;
}

.home-search,
.filter-panel {
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius-lg);
    padding: 28px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.07);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.filter-input-wrap input,
.filter-selects select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 0 16px;
    color: #0f172a;
    background: #ffffff;
    font: inherit;
    font-weight: 700;
    outline: none;
}

.filter-input-wrap input:focus,
.filter-selects select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

.filter-selects select {
    width: 132px;
}

.filter-count {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.content-section {
    padding: 46px 0 12px;
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    background: var(--paper);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.movie-card.is-hidden,
.ranking-item.is-hidden,
.mini-card.is-hidden {
    display: none;
}

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

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.quality-badge,
.duration-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

.quality-badge {
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
}

.duration-badge {
    right: 10px;
    bottom: 10px;
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    min-height: 2.7em;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card-body h3 a:hover,
.rank-info h3 a:hover,
.text-link:hover {
    color: var(--brand);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.movie-meta-line span {
    position: relative;
}

.movie-meta-line span + span::before {
    content: "·";
    margin-right: 8px;
    color: #94a3b8;
}

.movie-card .tag-row {
    margin-top: 12px;
}

.movie-card .tag-row span:nth-child(n + 5) {
    display: none;
}

.movie-card-compact .movie-card-body h3 {
    font-size: 15px;
}

.category-blocks {
    display: grid;
    gap: 20px;
}

.category-strip {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius-lg);
    padding: 22px;
    background: var(--paper-soft);
}

.category-strip h3 {
    margin: 0 0 6px;
    font-size: 24px;
}

.category-strip p {
    color: var(--muted);
}

.category-strip a,
.text-link {
    color: var(--brand);
    font-weight: 900;
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 54px 76px minmax(0, 1fr) 58px;
    align-items: center;
    gap: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.rank-number {
    color: var(--brand);
    font-size: 24px;
    font-weight: 1000;
}

.rank-poster img {
    width: 76px;
    height: 104px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-info p {
    margin: 0 0 8px;
    color: var(--muted);
}

.rank-score {
    justify-self: end;
    color: #ffffff;
    border-radius: 14px;
    padding: 9px 10px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 46px;
    background:
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.26), transparent 26rem),
        linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: var(--shadow);
}

.compact-hero {
    min-height: 260px;
}

.page-hero h1 {
    max-width: 920px;
}

.page-hero p {
    max-width: 780px;
    margin-top: 16px;
    font-size: 18px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 26px;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-cover-stack img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.category-overview-card h2 {
    margin: 0 0 8px;
}

.category-overview-card p {
    color: var(--muted);
}

.category-overview-card strong,
.category-overview-card a {
    display: block;
    margin-top: 10px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    margin-top: 28px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 26rem),
        linear-gradient(135deg, #ffffff, #eef2ff);
}

.detail-poster img {
    width: 100%;
    border-radius: 26px;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.18);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

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

.detail-one-line {
    margin: 18px 0;
    color: #334155;
    font-size: 19px;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.detail-stats span {
    border-radius: 999px;
    padding: 8px 12px;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(203, 213, 225, 0.86);
    font-size: 13px;
    font-weight: 900;
}

.player-section {
    padding: 26px 0 0;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(37, 99, 235, 0.34), rgba(2, 6, 23, 0.72)),
        rgba(2, 6, 23, 0.46);
    cursor: pointer;
    font: inherit;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 20px 55px rgba(37, 99, 235, 0.42);
}

.player-start strong {
    font-size: 24px;
}

.player-start em {
    color: #cbd5e1;
    font-style: normal;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
}

.detail-text,
.detail-side,
.prev-next-nav {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.detail-text p {
    color: #334155;
    font-size: 17px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    margin: 0;
}

.detail-side dt {
    color: var(--muted);
    font-weight: 900;
}

.detail-side dd {
    margin: 0;
    color: #1e293b;
    font-weight: 700;
}

.prev-next-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
}

.prev-next-nav a {
    color: var(--brand);
    font-weight: 900;
}

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

.footer-grid {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 0.6fr 1fr;
    gap: 40px;
    padding: 46px 0;
}

.footer-logo {
    color: #ffffff;
}

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

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

@media (max-width: 1100px) {
    .hero-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-side-panel {
        order: -1;
    }

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

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border: 1px solid #e2e8f0;
        border-radius: 22px;
        padding: 14px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

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

    .site-nav a {
        padding: 12px 8px;
    }

    .hero-slide,
    .detail-hero,
    .category-strip,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        position: relative;
        display: none;
        padding: 26px;
    }

    .hero-slide.is-active {
        display: grid;
    }

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

    .hero-cover {
        min-height: 320px;
        max-height: 420px;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .filter-selects select {
        flex: 1 1 150px;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .header-inner,
    .hero-section,
    .page-hero,
    .content-section,
    .home-search,
    .detail-hero,
    .player-section,
    .detail-layout,
    .prev-next-nav {
        width: min(100% - 20px, var(--container));
    }

    .hero-section {
        padding-top: 16px;
    }

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

    .home-search,
    .filter-panel,
    .page-hero,
    .detail-hero,
    .detail-text,
    .detail-side {
        padding: 20px;
        border-radius: 22px;
    }

    .movie-grid,
    .dense-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-card-body p,
    .movie-card .tag-row {
        display: none;
    }

    .ranking-item {
        grid-template-columns: 38px 58px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

    .rank-poster img {
        width: 58px;
        height: 80px;
    }

    .mini-grid {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        margin-top: 14px;
    }

    .prev-next-nav {
        flex-direction: column;
    }
}
