:root {
    color-scheme: light;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-850: #111827;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --emerald-400: #34d399;
    --emerald-100: #d1fae5;
    --emerald-50: #ecfdf5;
    --teal-500: #14b8a6;
    --white: #ffffff;
    --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.12), 0 4px 6px -4px rgb(15 23 42 / 0.10);
    --shadow-xl: 0 20px 25px -5px rgb(15 23 42 / 0.16), 0 8px 10px -6px rgb(15 23 42 / 0.12);
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-800), var(--slate-900), var(--slate-800));
    box-shadow: var(--shadow-lg);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    gap: 1rem;
}

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

.brand-mark {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 999px;
    color: var(--slate-900);
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
    box-shadow: 0 0 0 4px rgb(16 185 129 / 0.12);
}

.brand-name,
.footer-brand {
    font-size: 1.25rem;
    background: linear-gradient(90deg, var(--emerald-400), var(--teal-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.desktop-nav a,
.mobile-nav a {
    border-radius: 0.7rem;
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    background: var(--slate-700);
}

.header-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--slate-700);
}

.header-search input {
    width: min(16rem, 25vw);
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
    padding: 0.58rem 0.75rem;
}

.header-search input::placeholder {
    color: var(--slate-300);
}

.header-search button,
.mobile-nav button {
    border: 0;
    color: var(--white);
    background: var(--emerald-600);
    padding: 0.58rem 0.85rem;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 0.75rem;
    color: var(--white);
    background: transparent;
    padding: 0.5rem 0.75rem;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgb(255 255 255 / 0.08);
    padding: 0.75rem 1rem 1rem;
    background: var(--slate-900);
}

.mobile-nav.is-open {
    display: grid;
    gap: 0.5rem;
}

.mobile-nav form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.mobile-nav input {
    min-width: 0;
    flex: 1;
    border: 1px solid var(--slate-700);
    border-radius: 0.65rem;
    color: var(--white);
    background: var(--slate-800);
    padding: 0.6rem 0.75rem;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: var(--slate-900);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.poster-missing {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100%;
    background:
        radial-gradient(circle at 20% 25%, rgb(16 185 129 / 0.38), transparent 32%),
        linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.poster-missing::after {
    content: "图片待添加";
    color: rgb(255 255 255 / 0.72);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

.hero-slide .poster-missing::after {
    content: "1.jpg - 150.jpg";
    font-size: 1.15rem;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(0 0 0 / 0.92), rgb(0 0 0 / 0.55), rgb(0 0 0 / 0.05));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 48rem;
    color: var(--white);
}

.eyebrow {
    display: inline-block;
    border-radius: 999px;
    color: var(--white);
    background: var(--emerald-500);
    padding: 0.22rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-copy h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 0 0 1.4rem;
    max-width: 42rem;
    color: var(--slate-200);
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-tags,
.detail-tags,
.filter-row,
.mini-tags,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-tags span,
.detail-tags span {
    border-radius: 999px;
    color: var(--white);
    background: rgb(255 255 255 / 0.18);
    backdrop-filter: blur(10px);
    padding: 0.28rem 0.75rem;
    font-size: 0.9rem;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.6rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    min-height: 2.9rem;
    padding: 0.65rem 1.35rem;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    color: var(--white);
    background: var(--emerald-500);
    box-shadow: 0 12px 25px rgb(16 185 129 / 0.26);
}

.btn-primary:hover {
    background: var(--emerald-600);
}

.btn-ghost {
    color: var(--white);
    border: 1px solid rgb(255 255 255 / 0.35);
    background: rgb(255 255 255 / 0.12);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 10;
    transform: translateY(-50%);
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgb(0 0 0 / 0.5);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgb(0 0 0 / 0.7);
}

.hero-arrow.prev {
    left: 1rem;
}

.hero-arrow.next {
    right: 1rem;
}

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

.hero-dots button {
    width: 0.6rem;
    height: 0.6rem;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 2rem;
    background: var(--emerald-500);
}

.section {
    padding: 4rem 0;
}

.section-soft {
    background: linear-gradient(180deg, var(--slate-50), var(--white));
}

.section-gray {
    background: var(--slate-100);
}

.section-dark {
    color: var(--white);
    background: var(--slate-900);
}

.section-emerald {
    background: linear-gradient(135deg, var(--emerald-50), #f0fdfa);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.65rem;
}

.section-title {
    margin: 0;
    color: var(--slate-900);
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.035em;
}

.section-dark .section-title {
    color: var(--white);
}

.section-link {
    color: var(--emerald-700);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: var(--shadow-xl);
}

.movie-card .card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--slate-900);
}

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

.movie-card:hover img,
.rank-item:hover img,
.latest-card:hover img {
    transform: scale(1.1);
}

.duration,
.play-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
}

.duration {
    right: 0.65rem;
    bottom: 0.65rem;
    background: rgb(0 0 0 / 0.75);
}

.play-badge {
    left: 0.65rem;
    bottom: 0.65rem;
    background: var(--emerald-500);
    opacity: 0;
    transform: translateY(0.4rem);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
    transform: translateY(0);
}

.card-body {
    padding: 1rem;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--slate-500);
    font-size: 0.78rem;
}

.category-pill {
    color: var(--emerald-700);
    border-radius: 0.55rem;
    background: var(--emerald-50);
    padding: 0.14rem 0.5rem;
    font-weight: 800;
}

.movie-card h3,
.latest-card h3,
.rank-info h3 {
    margin: 0 0 0.45rem;
    color: var(--slate-900);
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p,
.rank-info p {
    margin: 0 0 0.8rem;
    color: var(--slate-600);
    font-size: 0.88rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-tags span {
    border-radius: 0.4rem;
    color: var(--slate-600);
    background: var(--slate-100);
    padding: 0.1rem 0.45rem;
    font-size: 0.75rem;
}

.horizontal-scroll {
    overflow-x: auto;
    margin-inline: -1rem;
    padding-inline: 1rem;
}

.horizontal-row {
    display: flex;
    gap: 1rem;
    width: max-content;
    padding-bottom: 0.5rem;
}

.horizontal-row .movie-card {
    width: 18rem;
    flex: 0 0 auto;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 4rem 8rem 1fr;
    align-items: center;
    gap: 1rem;
    border-radius: var(--radius-xl);
    background: var(--white);
    padding: 1rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.rank-num {
    display: grid;
    width: 3.5rem;
    height: 3.5rem;
    place-items: center;
    border-radius: 0.8rem;
    color: var(--white);
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
}

.rank-poster {
    border-radius: 0.7rem;
}

.rank-info div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    color: var(--slate-500);
    font-size: 0.78rem;
}

.rank-info div span {
    border-radius: 0.35rem;
    background: var(--slate-100);
    padding: 0.1rem 0.45rem;
}

.page-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 15% 15%, rgb(16 185 129 / 0.22), transparent 32%),
        linear-gradient(135deg, var(--slate-900), var(--slate-800));
    padding: 4rem 0;
}

.page-hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.page-hero p {
    margin: 0;
    max-width: 52rem;
    color: var(--slate-200);
    font-size: 1.06rem;
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    border-radius: var(--radius-2xl);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.toolbar input,
.toolbar select,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 1px solid var(--slate-200);
    border-radius: 0.85rem;
    outline: 0;
    background: var(--white);
    padding: 0.75rem 0.9rem;
}

.toolbar input:focus,
.toolbar select:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--emerald-400);
    box-shadow: 0 0 0 3px rgb(52 211 153 / 0.18);
}

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

.category-card {
    display: block;
    border-radius: var(--radius-xl);
    color: var(--slate-900);
    background: linear-gradient(135deg, var(--slate-100), var(--slate-200));
    padding: 1.25rem;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.category-card:hover {
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
    transform: translateY(-3px);
}

.category-card strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
}

.category-card span {
    color: inherit;
    opacity: 0.78;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 12rem 12rem;
    gap: 0.75rem;
    margin: 1.5rem 0 2rem;
}

.search-results-count {
    margin: 0 0 1rem;
    color: var(--slate-600);
}

.detail-player-shell {
    padding: 2rem 0;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-800));
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: var(--shadow-xl);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    background: radial-gradient(circle, rgb(0 0 0 / 0.10), rgb(0 0 0 / 0.25));
    transition: opacity 0.25s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
}

.big-play {
    display: grid;
    width: 5rem;
    height: 5rem;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: rgb(16 185 129 / 0.88);
    box-shadow: 0 15px 35px rgb(0 0 0 / 0.35);
    font-size: 2rem;
}

.player-status {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    border-radius: 999px;
    color: var(--white);
    background: rgb(0 0 0 / 0.62);
    padding: 0.35rem 0.8rem;
    font-size: 0.86rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
    gap: 1.5rem;
    padding: 3rem 0;
}

.detail-card,
.side-card {
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
}

.detail-card h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--slate-600);
    margin: 0 0 1rem;
}

.detail-meta span {
    border-radius: 999px;
    background: var(--slate-100);
    padding: 0.25rem 0.65rem;
}

.detail-card h2,
.side-card h2 {
    margin: 1.5rem 0 0.6rem;
    color: var(--slate-900);
    font-size: 1.25rem;
    font-weight: 900;
}

.detail-card p {
    margin: 0 0 1rem;
    color: var(--slate-700);
    white-space: pre-line;
}

.side-list {
    display: grid;
    gap: 0.8rem;
}

.side-link {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.75rem;
    align-items: center;
}

.side-link .poster-wrap {
    border-radius: 0.65rem;
}

.side-link h3 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    line-height: 1.3;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-link span {
    color: var(--slate-500);
    font-size: 0.82rem;
}

.breadcrumb {
    margin-bottom: 1rem;
    color: var(--slate-500);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--emerald-700);
    font-weight: 750;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    min-width: 2.35rem;
    height: 2.35rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    color: var(--slate-700);
    background: var(--white);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.07);
    padding: 0 0.75rem;
}

.pagination .is-current {
    color: var(--white);
    background: var(--emerald-500);
}

.site-footer {
    color: var(--slate-300);
    background: var(--slate-950);
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
}

.site-footer h2 {
    margin: 0 0 0.75rem;
    color: var(--white);
    font-size: 1rem;
}

.site-footer p {
    max-width: 34rem;
    margin: 0.8rem 0 0;
}

.footer-links a {
    border-radius: 0.5rem;
    background: rgb(255 255 255 / 0.06);
    padding: 0.3rem 0.55rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.footer-links a:hover {
    color: var(--white);
    background: var(--emerald-600);
}

.sitemap-list {
    columns: 4 14rem;
    column-gap: 2rem;
}

.sitemap-list a {
    display: block;
    break-inside: avoid;
    color: var(--emerald-700);
    padding: 0.18rem 0;
}

.no-results {
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    text-align: center;
    color: var(--slate-600);
}

@media (min-width: 768px) {
    .hero-carousel {
        height: 80vh;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

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

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

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

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

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .hero-carousel {
        min-height: 560px;
    }

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

    .hero-arrow {
        display: none;
    }

    .section {
        padding: 3rem 0;
    }

    .section-head,
    .toolbar {
        grid-template-columns: 1fr;
        align-items: start;
    }

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

    .card-body {
        padding: 0.8rem;
    }

    .movie-card p,
    .mini-tags {
        display: none;
    }

    .rank-item {
        grid-template-columns: 3rem 6rem 1fr;
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .rank-num {
        width: 2.65rem;
        height: 2.65rem;
        font-size: 1.25rem;
    }

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

    .detail-card,
    .side-card {
        padding: 1rem;
    }
}

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

    .horizontal-row .movie-card {
        width: 16rem;
    }

    .rank-item {
        grid-template-columns: 2.65rem 1fr;
    }

    .rank-poster {
        display: none;
    }
}
