:root {
    color-scheme: dark;
    --bg: #030712;
    --panel: #111827;
    --panel-soft: #1f2937;
    --line: #243244;
    --text: #f9fafb;
    --muted: #9ca3af;
    --muted-strong: #d1d5db;
    --accent: #f97316;
    --accent-soft: rgba(249, 115, 22, 0.16);
    --accent-strong: #fb923c;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 30rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 28rem),
        var(--bg);
    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 {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(17, 24, 39, 0.94);
    border-bottom: 1px solid rgba(55, 65, 81, 0.75);
    backdrop-filter: blur(16px);
}

.header-inner,
.shell,
.footer-grid,
.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.site-logo {
    font-size: 22px;
    flex: 0 0 auto;
}

.logo-icon {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.32);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
    color: var(--muted-strong);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--accent-strong);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(31, 41, 55, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.7);
    border-radius: 14px;
    padding: 6px;
}

.header-search input,
.mobile-nav input,
.large-search input,
.filter-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
}

.header-search input {
    width: 180px;
    padding: 6px 8px;
}

.header-search button,
.large-search button,
.mobile-nav button {
    border: 0;
    border-radius: 10px;
    color: white;
    background: var(--accent);
    padding: 7px 12px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid rgba(75, 85, 99, 0.8);
    color: white;
    background: rgba(31, 41, 55, 0.9);
    border-radius: 12px;
    padding: 8px 10px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 16px;
    border: 1px solid rgba(55, 65, 81, 0.8);
    border-radius: 18px;
    background: #111827;
}

.mobile-nav.open {
    display: grid;
    gap: 12px;
}

.mobile-nav form {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(75, 85, 99, 0.8);
    border-radius: 14px;
    background: #1f2937;
}

.hero-slider {
    position: relative;
    min-height: 86vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    transition: opacity 0.55s ease, transform 0.55s ease;
    opacity: 1;
}

.hero-slide.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.74) 42%, rgba(3, 7, 18, 0.35) 100%),
        linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.1) 42%, rgba(3, 7, 18, 0.75) 100%);
    backdrop-filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 86px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 54px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow,
.section-heading span,
.page-hero span,
.about-content span {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--accent-strong);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.about-content h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 82px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.about-content p {
    max-width: 760px;
    margin: 24px 0 0;
    color: var(--muted-strong);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(249, 115, 22, 0.35);
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.12);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    padding: 7px 12px;
}

.tag-row span {
    padding: 4px 8px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 13px;
    padding: 10px 18px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn.primary,
.btn.full {
    color: white;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    box-shadow: 0 16px 28px rgba(249, 115, 22, 0.24);
}

.btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.btn.text {
    color: #fed7aa;
}

.btn.full {
    width: 100%;
    margin-top: 20px;
}

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    background: #111827;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-poster span {
    display: block;
    padding: 16px;
    color: white;
    font-weight: 800;
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.24), rgba(17, 24, 39, 0.94));
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 18px;
    transform: translateX(-50%);
}

.hero-controls button {
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    background: rgba(17, 24, 39, 0.72);
    cursor: pointer;
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 28px;
    line-height: 1;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
}

.hero-dots button.active {
    width: 30px;
    background: var(--accent);
}

.section {
    padding: 72px 0 0;
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
}

.section-heading.align-left {
    margin-left: 0;
    text-align: left;
}

.section-heading.compact {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
}

.section-heading p {
    margin: 12px 0 0;
    color: var(--muted);
}

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

.category-tile,
.category-overview-card,
.prose-card,
.ranking-panel,
.info-card,
.poster-card,
.detail-title-card {
    border: 1px solid rgba(55, 65, 81, 0.75);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(31, 41, 55, 0.92), rgba(17, 24, 39, 0.94));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.category-tile {
    min-height: 170px;
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover {
    border-color: rgba(249, 115, 22, 0.52);
    transform: translateY(-4px);
}

.category-tile span,
.category-overview-main span {
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 800;
}

.category-tile strong,
.category-overview-main h2 {
    display: block;
    margin-top: 10px;
    font-size: 21px;
}

.category-tile em,
.category-overview-main p {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
}

.two-column,
.category-layout,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

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

.home-grid {
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(55, 65, 81, 0.72);
    border-radius: 18px;
    background: #111827;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.movie-card-link,
.movie-card-body {
    display: block;
}

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

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

.movie-card:hover .poster img {
    transform: scale(1.05);
    filter: brightness(0.72);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
    background: rgba(249, 115, 22, 0.88);
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-rank {
    position: absolute;
    left: 10px;
    top: 10px;
    display: inline-flex;
    min-width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
    background: linear-gradient(135deg, var(--accent), #dc2626);
    font-weight: 900;
}

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

.movie-card-body strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 16px;
}

.movie-meta,
.movie-desc {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta {
    margin-top: 5px;
}

.movie-desc {
    display: -webkit-box;
    min-height: 42px;
    margin: 9px 0 10px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ranking-panel {
    padding: 20px;
}

.sticky-panel,
.detail-sidebar {
    position: sticky;
    top: 88px;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 34px 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.rank-index {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
    background: rgba(249, 115, 22, 0.22);
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    border-radius: 10px;
    background: #374151;
}

.rank-cover img {
    width: 54px;
    height: 72px;
    object-fit: cover;
}

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

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-info strong {
    font-size: 14px;
}

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

.page-main {
    padding-top: 88px;
}

.page-hero {
    padding: 72px 0 24px;
}

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

.filter-box,
.large-search {
    display: flex;
    max-width: 720px;
    margin-top: 28px;
    border: 1px solid rgba(75, 85, 99, 0.8);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.78);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.filter-box input,
.large-search input {
    min-height: 58px;
    padding: 0 18px;
}

.large-search button {
    margin: 8px;
    padding: 0 22px;
}

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

.category-overview-card {
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-main {
    display: block;
    padding: 24px;
}

.mini-links {
    display: grid;
    gap: 8px;
    padding: 0 24px 24px;
}

.mini-links a {
    color: var(--muted-strong);
    font-size: 14px;
}

.mini-links a:hover {
    color: var(--accent-strong);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 22px 0;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-layout {
    padding-bottom: 30px;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(55, 65, 81, 0.82);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.22), rgba(3, 7, 18, 0.44) 50%, rgba(0, 0, 0, 0.7));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.player-panel.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-circle {
    display: inline-flex;
    width: 76px;
    height: 76px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.32);
    font-size: 28px;
}

.detail-title-card,
.prose-card {
    padding: 26px;
}

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

.detail-title-card h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
}

.detail-title-card p {
    margin: 16px 0 0;
    color: var(--muted-strong);
    font-size: 18px;
}

.detail-prose {
    margin-top: 20px;
}

.prose-card h2,
.info-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.prose-card p {
    margin: 0;
    color: var(--muted-strong);
    white-space: pre-line;
}

.related-section {
    padding-top: 36px;
}

.related-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.detail-sidebar {
    display: grid;
    gap: 20px;
}

.poster-card {
    overflow: hidden;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #374151;
}

.poster-card div {
    padding: 18px;
}

.poster-card strong,
.poster-card span {
    display: block;
}

.poster-card span {
    margin-top: 6px;
    color: var(--muted);
}

.info-card {
    padding: 20px;
}

.info-card dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
}

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

.info-card dd {
    margin: 0;
    color: var(--muted-strong);
}

.about-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.about-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: brightness(0.28) blur(2px);
}

.about-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #030712, transparent 56%), linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.42));
}

.about-content {
    position: relative;
    z-index: 2;
    padding-top: 60px;
}

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

.prose-grid.single {
    grid-template-columns: minmax(0, 1fr);
}

.search-page .movie-grid:empty::before {
    content: "未找到相关影片";
    grid-column: 1 / -1;
    color: var(--muted);
    padding: 30px;
    border: 1px solid rgba(55, 65, 81, 0.75);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.72);
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(55, 65, 81, 0.78);
    background: rgba(17, 24, 39, 0.84);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
    padding: 48px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--muted);
    font-size: 14px;
}

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

.footer-grid a:hover {
    color: var(--accent-strong);
}

.footer-logo {
    margin-bottom: 14px;
    color: white;
    font-size: 20px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(55, 65, 81, 0.72);
}

.is-hidden {
    display: none !important;
}

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

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

    .hero-content,
    .two-column,
    .category-layout,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        gap: 28px;
        padding-bottom: 110px;
    }

    .hero-poster {
        width: min(280px, 78vw);
        transform: none;
    }

    .sticky-panel,
    .detail-sidebar {
        position: static;
    }

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

@media (max-width: 640px) {
    .header-inner,
    .shell,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

    .site-logo {
        font-size: 18px;
    }

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

    .hero-content {
        margin-top: 82px;
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .page-hero h1,
    .about-content h1 {
        font-size: 38px;
    }

    .hero-actions,
    .large-search {
        flex-direction: column;
    }

    .btn,
    .large-search button {
        width: 100%;
    }

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

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

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

    .movie-desc {
        min-height: 38px;
        font-size: 12px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
