:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --red: #ef4444;
    --orange: #f97316;
    --rose: #e11d48;
    --violet: #7c3aed;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(16px);
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 22px;
    width: min(1240px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-weight: 800;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.28);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-3deg);
}

.brand-text {
    font-size: 1.18rem;
    background: linear-gradient(90deg, #fb7185, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fb7185;
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #334155;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.header-search input,
.mobile-search input {
    width: 210px;
    padding: 10px 14px;
    color: #fff;
    background: transparent;
    border: 0;
    outline: 0;
}

.header-search button,
.mobile-search button {
    padding: 10px 16px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border: 0;
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    border-radius: 12px;
    font-size: 1.25rem;
}

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel .nav-link {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
}

.mobile-panel .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: #fff;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 48px;
    align-items: center;
    width: 100%;
    padding: 88px max(32px, calc((100vw - 1240px) / 2)) 110px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease, transform 0.75s ease;
    transform: scale(1.02);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.28) 100%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.08);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 190px;
    background: linear-gradient(0deg, #f8fafc, rgba(248, 250, 252, 0));
}

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

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    margin-bottom: 18px;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 999px;
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 12px;
    max-width: 780px;
    font-size: clamp(2.25rem, 6vw, 5.2rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero h2 {
    margin: 0 0 14px;
    max-width: 760px;
    font-size: clamp(1.35rem, 3vw, 2.5rem);
    color: #fed7aa;
}

.hero p {
    max-width: 720px;
    margin: 0 0 22px;
    color: #d1d5db;
    font-size: 1.08rem;
}

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

.hero-tags span,
.tag-row span {
    padding: 5px 10px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 0.82rem;
}

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

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

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 16px 35px rgba(239, 68, 68, 0.28);
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

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

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    transform: translate(-50%, -50%);
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: max(32px, calc((100vw - 1240px) / 2));
    bottom: 58px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.38);
    border: 0;
    border-radius: 999px;
}

.hero-dot.is-active {
    width: 36px;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.section.compact-section {
    padding-top: 38px;
}

.section.dark-band {
    width: 100%;
    max-width: none;
    padding: 78px max(16px, calc((100vw - 1240px) / 2));
    color: #fff;
    background: linear-gradient(135deg, #4c1d95, #701a75, #0f172a);
}

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

.section-kicker {
    color: var(--red);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
    max-width: 760px;
    margin: 9px 0 0;
    color: var(--muted);
}

.dark-band .section-head p,
.dark-band .section-kicker {
    color: #ddd6fe;
}

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

.movie-card {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.04));
    opacity: 0.8;
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    backdrop-filter: blur(8px);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--rose));
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(225, 29, 72, 0.32);
}

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    line-height: 1.35;
}

.movie-info h3 a:hover,
.wide-body h3 a:hover {
    color: var(--red);
}

.movie-info p {
    display: -webkit-box;
    min-height: 43px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.wide-stats,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.movie-meta span,
.detail-meta span {
    padding: 4px 8px;
    background: #f1f5f9;
    border-radius: 999px;
}

.movie-info .tag-row {
    margin-top: 10px;
}

.movie-info .tag-row span {
    color: #475569;
    background: #f8fafc;
    border-color: #e2e8f0;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    overflow: hidden;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: box-shadow 0.24s ease, transform 0.24s ease;
}

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

.wide-cover {
    position: relative;
    overflow: hidden;
    background: #111827;
}

.wide-cover img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wide-cover span {
    position: absolute;
    left: 12px;
    top: 12px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--rose));
    border-radius: 999px;
    font-weight: 900;
}

.wide-body {
    padding: 20px;
}

.wide-body h3 {
    margin: 0 0 8px;
    font-size: 1.22rem;
}

.wide-body p {
    margin: 0 0 18px;
    color: var(--muted);
}

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

.category-card {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    color: #fff;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.category-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.9));
}

.category-label,
.category-card strong,
.category-card p,
.category-card em {
    position: relative;
    z-index: 1;
}

.category-label {
    display: inline-flex;
    margin: 20px 20px 72px;
    padding: 6px 12px;
    color: #111827;
    background: rgba(255, 255, 255, 0.86);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 800;
}

.category-card strong {
    display: block;
    padding: 0 20px;
    font-size: 1.35rem;
}

.category-card p {
    min-height: 48px;
    margin: 8px 20px;
    color: #e2e8f0;
}

.category-card em {
    display: inline-flex;
    margin: 0 20px 20px;
    color: #fed7aa;
    font-style: normal;
    font-weight: 800;
}

.page-hero {
    color: #fff;
    background: radial-gradient(circle at top right, rgba(248, 113, 113, 0.32), transparent 32%), linear-gradient(135deg, #0f172a, #1e1b4b 50%, #111827);
}

.page-title {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0 60px;
}

.page-title p {
    color: #cbd5e1;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #cbd5e1;
    font-size: 0.92rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    padding: 0 14px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
}

.filter-btn {
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border: 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 80px;
}

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.player-box {
    position: relative;
    overflow: hidden;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
}

.player-cover button {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border: 0;
    border-radius: 999px;
    box-shadow: 0 18px 48px rgba(239, 68, 68, 0.36);
    font-size: 2rem;
}

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

.player-caption,
.detail-card,
.side-card {
    padding: 24px;
}

.player-caption h1 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

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

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.detail-card p {
    color: #334155;
}

.side-card {
    position: sticky;
    top: 92px;
}

.side-poster {
    overflow: hidden;
    margin: -24px -24px 18px;
    background: #111827;
}

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

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

.related-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 70px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.related-item strong {
    display: block;
    line-height: 1.35;
}

.related-item span {
    color: var(--muted);
    font-size: 0.84rem;
}

.search-empty {
    display: none;
    padding: 32px;
    color: var(--muted);
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
}

.search-empty.is-visible {
    display: block;
}


.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 34px;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0 36px;
}

.site-footer .brand {
    margin-bottom: 16px;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 1rem;
}

.site-footer ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a {
    color: #cbd5e1;
    transition: color 0.2s ease;
}

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

.copyright {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    display: none;
    width: 44px;
    height: 44px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border: 0;
    border-radius: 999px;
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.26);
}

.to-top.is-visible {
    display: block;
}

@media (max-width: 1120px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .mobile-panel.is-open {
        display: block;
    }

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

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

    .hero-slide {
        grid-template-columns: 1fr 260px;
    }
}

@media (max-width: 820px) {
    .hero {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding-top: 72px;
    }

    .hero-poster {
        max-width: 220px;
        transform: rotate(0);
    }

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

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

    .wide-card {
        grid-template-columns: 130px 1fr;
    }

    .wide-cover img {
        min-height: 180px;
    }

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

    .section-head {
        display: block;
    }

    .side-card {
        position: static;
    }

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


@media (max-width: 520px) {
    .nav-shell {
        width: min(100% - 20px, 1240px);
    }

    .brand-text {
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 2.45rem;
    }

    .section,
    .page-title,
    .detail-layout {
        width: min(100% - 22px, 1240px);
    }

    .movie-info {
        padding: 12px;
    }

    .movie-meta {
        gap: 5px;
    }

    .wide-card {
        grid-template-columns: 110px 1fr;
    }

    .wide-body {
        padding: 14px;
    }

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