:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --orange: #f97316;
    --gold: #facc15;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #fff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #111827 100%);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.22);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.35);
}

.brand-text {
    font-size: 1.2rem;
    background: linear-gradient(90deg, #f87171, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 9px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 0.95rem;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: var(--red);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
}

.category-strip {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
}

.category-strip-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
}

.category-strip-inner::-webkit-scrollbar {
    display: none;
}

.category-strip a {
    flex: 0 0 auto;
    color: #cbd5e1;
    font-size: 0.92rem;
}

.category-strip a:hover {
    color: #fb923c;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    color: #fff;
    background: radial-gradient(circle at 18% 20%, rgba(248, 113, 113, 0.35), transparent 30%),
                radial-gradient(circle at 80% 10%, rgba(251, 146, 60, 0.24), transparent 24%),
                linear-gradient(135deg, #020617 0%, #111827 55%, #7f1d1d 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.78), rgba(127, 29, 29, 0.55));
    z-index: 1;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

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

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 56px;
    padding: 56px 0 88px;
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fecaca;
    font-weight: 700;
    font-size: 0.92rem;
}

.hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(2.5rem, 6vw, 5.7rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero h1 span {
    display: block;
    background: linear-gradient(90deg, #ffffff, #fed7aa 55%, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    max-width: 720px;
    margin: 0 0 26px;
    color: #e2e8f0;
    font-size: 1.08rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.hero-meta span,
.pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 16px 34px rgba(220, 38, 38, 0.32);
}

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

.btn-light {
    color: var(--red);
    background: #fff;
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(18px);
}

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

.hero-poster-card .poster-info {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.70);
    backdrop-filter: blur(18px);
}

.hero-poster-card h2 {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    width: min(1180px, calc(100% - 32px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

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

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

.hero-arrow {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    cursor: pointer;
}

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

.main-wrap {
    padding: 46px 0 70px;
}

.content-section {
    margin: 0 0 56px;
}

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

.section-heading h2,
.page-heading h1,
.channel-cloud h2 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1.1;
}

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

.section-more {
    flex: 0 0 auto;
    color: var(--red);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: var(--panel);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent);
}

.score {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #111827;
    background: var(--gold);
    font-weight: 900;
    font-size: 0.82rem;
}

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

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 0.82rem;
}

.card-body h3 {
    margin: 0 0 7px;
    font-size: 1rem;
    line-height: 1.35;
}

.card-body h3 a:hover,
.rank-title:hover,
.text-link:hover {
    color: var(--red);
}

.card-body p {
    min-height: 45px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.88rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span {
    padding: 3px 8px;
    border-radius: 999px;
    color: #991b1b;
    background: #fee2e2;
    font-size: 0.75rem;
}

.channel-cloud {
    margin: 0 0 56px;
    padding: 30px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #7f1d1d);
    box-shadow: var(--shadow);
}

.channel-cloud h2,
.channel-cloud p {
    color: #fff;
}

.channel-cloud div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.channel-cloud a {
    padding: 10px 16px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.channel-cloud a:hover {
    background: var(--red);
}

.page-hero {
    color: #fff;
    background: radial-gradient(circle at 15% 20%, rgba(248, 113, 113, 0.35), transparent 28%),
                linear-gradient(135deg, #0f172a, #7f1d1d);
}

.page-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
}

.page-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(2.1rem, 5vw, 4.4rem);
    line-height: 1;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #e2e8f0;
    font-size: 1.05rem;
}

.tool-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    margin: 0 0 28px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: 0 22px;
    color: var(--ink);
    font-size: 1rem;
    outline: none;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: flex-end;
}

.filter-pills button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: 10px 14px;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
}

.filter-pills button.is-active,
.filter-pills button:hover {
    color: #fff;
    background: var(--red);
    border-color: var(--red);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 74px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.rank-num {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 2 / 3;
    background: #fee2e2;
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-title {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 1.05rem;
    font-weight: 900;
}

.rank-desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.rank-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    color: var(--muted);
    font-size: 0.9rem;
}

.detail-hero {
    position: relative;
    color: #fff;
    background: linear-gradient(135deg, #020617, #7f1d1d);
    overflow: hidden;
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.26;
    filter: blur(1px) saturate(1.1);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.78));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 56px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 24px 58px rgba(2, 6, 23, 0.42);
    background: #fee2e2;
}

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

.detail-title h1 {
    margin: 16px 0 14px;
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: 1.05;
}

.detail-title p {
    max-width: 760px;
    color: #e2e8f0;
    font-size: 1.05rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px;
}

.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: 42px auto;
}

.player-card {
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 24px 65px rgba(2, 6, 23, 0.24);
}

.player-frame {
    position: relative;
    background: #000;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
    pointer-events: auto;
}

.player-card.is-playing .play-layer {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.36);
    font-size: 2rem;
    cursor: pointer;
}

.player-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    color: #cbd5e1;
}

.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 26px;
}

.panel {
    border-radius: 24px;
    background: #fff;
    padding: 26px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.panel + .panel {
    margin-top: 18px;
}

.panel h2,
.panel h3 {
    margin: 0 0 14px;
}

.panel p {
    color: #475569;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

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

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

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

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

.footer-grid p {
    color: #94a3b8;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-grid li + li {
    margin-top: 8px;
}

.footer-grid a:hover {
    color: #fb923c;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 18px;
    text-align: center;
    color: #94a3b8;
}

.back-top {
    position: fixed;
    right: 20px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 16px 32px rgba(220, 38, 38, 0.28);
    opacity: 0;
    visibility: hidden;
    cursor: pointer;
    transition: 0.2s ease;
}

.back-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.empty-state {
    display: none;
    padding: 36px;
    border-radius: 22px;
    background: #fff;
    color: var(--muted);
    text-align: center;
}

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

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

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

    .hero-poster-card {
        max-width: 420px;
    }

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

@media (max-width: 760px) {
    .nav-links {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
    }

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

    .menu-toggle {
        display: block;
    }

    .category-strip-inner {
        gap: 14px;
    }

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

    .hero-inner {
        padding: 42px 0 92px;
        gap: 28px;
    }

    .hero h1 {
        font-size: clamp(2.25rem, 14vw, 3.8rem);
    }

    .hero-controls {
        bottom: 22px;
    }

    .section-heading,
    .page-heading,
    .player-caption {
        align-items: flex-start;
        flex-direction: column;
    }

    .tool-bar {
        grid-template-columns: 1fr;
    }

    .filter-pills {
        justify-content: flex-start;
    }

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

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

    .rank-stats {
        grid-column: 3;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        padding: 42px 0;
    }

    .detail-poster {
        max-width: 230px;
    }

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

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

@media (max-width: 420px) {
    .movie-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }
}
