:root {
    --bg: #050505;
    --bg-soft: #0e0e12;
    --bg-card: rgba(24, 24, 27, 0.78);
    --bg-card-solid: #18181b;
    --line: rgba(251, 146, 60, 0.22);
    --line-soft: rgba(255, 255, 255, 0.09);
    --text: #f8fafc;
    --muted: #a1a1aa;
    --muted-2: #71717a;
    --accent: #f97316;
    --accent-soft: #fb923c;
    --accent-deep: #9a3412;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 20% 8%, rgba(249, 115, 22, 0.18), transparent 32rem),
        radial-gradient(circle at 86% 20%, rgba(154, 52, 18, 0.16), transparent 28rem),
        linear-gradient(180deg, #050505 0%, #09090b 42%, #050505 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 5, 5, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(var(--max), calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, #fb923c, #f97316 48%, #fed7aa);
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.32);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-text strong {
    color: var(--accent);
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1 1 auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav a {
    color: #d4d4d8;
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.site-nav a:hover {
    color: var(--accent);
}

.header-search,
.footer-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.footer-search input,
.toolbar-section input,
.search-page-panel input {
    min-width: 0;
    color: var(--text);
    background: rgba(24, 24, 27, 0.74);
    border: 1px solid rgba(113, 113, 122, 0.55);
    border-radius: 999px;
    outline: none;
    padding: 11px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 220px;
}

.header-search input:focus,
.footer-search input:focus,
.toolbar-section input:focus,
.search-page-panel input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

.header-search button,
.footer-search button,
.search-page-panel button {
    border: 0;
    color: #111827;
    cursor: pointer;
    font-weight: 800;
    border-radius: 999px;
    padding: 11px 16px;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(24, 24, 27, 0.7);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

.hero {
    position: relative;
    min-height: clamp(560px, 78vh, 760px);
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slider,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.96) 0%, rgba(5, 5, 5, 0.74) 38%, rgba(5, 5, 5, 0.24) 72%),
        linear-gradient(0deg, #050505 0%, transparent 40%, rgba(5, 5, 5, 0.42) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    min-height: clamp(560px, 78vh, 760px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 86px 0 150px;
    max-width: 1180px;
}

.hero-kicker,
.detail-kicker,
.page-hero span,
.section-heading > span {
    display: inline-flex;
    width: fit-content;
    color: var(--accent-soft);
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    background: rgba(249, 115, 22, 0.08);
    border-radius: 999px;
    padding: 8px 12px;
}

.hero-content h1 {
    max-width: 780px;
    margin: 20px 0 18px;
    font-size: clamp(42px, 8vw, 92px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 650px;
    color: #e4e4e7;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin: 22px 0 0;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    color: #fed7aa;
    border: 1px solid rgba(251, 146, 60, 0.32);
    background: rgba(154, 52, 18, 0.28);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 750;
}

.hero-actions,
.detail-info .primary-button {
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.text-link,
.rank-action,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 850;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #111827;
    background: linear-gradient(135deg, #fed7aa, var(--accent-soft) 38%, var(--accent));
    padding: 13px 20px;
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.26);
}

.ghost-button {
    color: var(--text);
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.06);
    padding: 12px 18px;
    margin-left: 10px;
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover,
.rank-action:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 108px;
    width: min(var(--max), calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-soft);
    color: var(--text);
    border-radius: 999px;
    background: rgba(24, 24, 27, 0.62);
    cursor: pointer;
    backdrop-filter: blur(12px);
}

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

.hero-dots .hero-dot {
    width: 34px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dots .hero-dot.is-active {
    background: var(--accent);
}

.hero-search-panel {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 24px;
    width: min(var(--max), calc(100% - 32px));
    transform: translateX(-50%);
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(10, 10, 12, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-search-panel label {
    display: block;
    color: var(--accent-soft);
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-search-panel form > div {
    display: flex;
    gap: 10px;
}

.hero-search-panel input {
    flex: 1 1 auto;
    width: 100%;
    color: var(--text);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 14px 16px;
    background: rgba(24, 24, 27, 0.84);
    outline: none;
}

.hero-search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 14px 20px;
    color: #111827;
    font-weight: 900;
    cursor: pointer;
    background: var(--accent);
}

.category-ribbon,
.content-section,
.page-main,
.detail-main {
    width: min(var(--max), calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.category-ribbon {
    margin-top: 30px;
}

.category-ribbon-inner {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.category-ribbon a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text);
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(24, 24, 27, 0.68);
    padding: 16px;
}

.category-ribbon small {
    color: var(--accent-soft);
}

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

.section-heading {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 18px;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-heading p,
.side-panel p,
.article-section p,
.category-overview-card p,
.page-hero p,
.player-note,
.muted {
    color: var(--muted);
    line-height: 1.75;
}

.section-more,
.text-link,
.rank-action {
    color: var(--accent-soft);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.55);
    background: rgba(31, 31, 36, 0.92);
}

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

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #111827;
    background: var(--accent);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 850;
}

.card-body {
    padding: 16px;
}

.card-tags {
    margin-bottom: 10px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.34;
}

.card-body h3 a:hover,
.rank-info h3 a:hover {
    color: var(--accent);
}

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

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 76px 1fr auto;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(24, 24, 27, 0.7);
    padding: 12px;
}

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

.rank-cover {
    display: block;
    width: 76px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
}

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

.rank-info h3 {
    margin: 0 0 4px;
}

.rank-info p {
    margin: 3px 0;
    color: var(--muted);
    line-height: 1.55;
}

.rank-action {
    border: 1px solid var(--line);
    padding: 9px 13px;
}

.side-panel,
.search-page-panel,
.toolbar-section,
.article-section {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(24, 24, 27, 0.72);
    padding: 22px;
}

.side-panel {
    position: sticky;
    top: 96px;
}

.side-panel h2 {
    margin-top: 0;
}

.side-panel dl {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

.side-panel dl div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 10px;
}

.side-panel dt {
    color: var(--muted);
}

.side-panel dd {
    margin: 0;
    color: var(--accent-soft);
    font-weight: 900;
}

.block-button {
    width: 100%;
}

.page-main {
    padding: 40px 0 80px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(24, 24, 27, 0.7) 42%, rgba(5, 5, 5, 0.9)),
        radial-gradient(circle at 82% 18%, rgba(251, 146, 60, 0.24), transparent 26rem);
    padding: 48px;
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 6vw, 64px);
    letter-spacing: -0.05em;
}

.page-stats {
    margin-top: 24px;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    border-radius: 18px;
    border: 1px solid var(--line);
    padding: 12px 18px;
    background: rgba(5, 5, 5, 0.34);
}

.page-stats strong {
    color: var(--accent-soft);
    font-size: 32px;
}

.page-stats small {
    color: var(--muted);
}

.toolbar-section {
    margin: 26px 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.toolbar-section label {
    color: var(--accent-soft);
    font-weight: 850;
}

.toolbar-section input {
    flex: 1 1 auto;
}

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

.category-overview-card {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(24, 24, 27, 0.72);
    overflow: hidden;
}

.category-cover-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 180px;
    background: #111;
}

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

.category-overview-card div {
    padding: 20px;
}

.category-overview-card span {
    color: var(--accent-soft);
    font-weight: 850;
}

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

.wide-rank-list .rank-row {
    grid-template-columns: 70px 94px 1fr auto;
}

.detail-main {
    padding: 28px 0 80px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin: 14px 0 24px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 26px;
    background:
        linear-gradient(135deg, rgba(24, 24, 27, 0.82), rgba(5, 5, 5, 0.94)),
        radial-gradient(circle at 84% 16%, rgba(249, 115, 22, 0.18), transparent 26rem);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: #111;
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 460px;
    object-fit: cover;
}

.detail-info {
    align-self: center;
}

.detail-info h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 6vw, 68px);
    letter-spacing: -0.06em;
    line-height: 1;
}

.detail-one-line {
    color: #e4e4e7;
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags {
    margin: 20px 0;
}

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

.detail-meta div {
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: rgba(5, 5, 5, 0.24);
    padding: 12px;
}

.detail-meta dt {
    color: var(--muted-2);
    font-size: 13px;
}

.detail-meta dd {
    margin: 5px 0 0;
    font-weight: 850;
}

.player-section {
    margin-top: 30px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    color: var(--text);
    cursor: pointer;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.18), rgba(0, 0, 0, 0.64) 58%);
}

.player-overlay span {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    color: #111827;
    font-size: 34px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 54px rgba(249, 115, 22, 0.46);
}

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

.player-overlay small {
    color: var(--muted);
}

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

.player-note {
    margin: 14px 0 0;
}

.article-section {
    margin-top: 26px;
}

.article-section h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.compact-card .card-body p {
    min-height: 0;
}

.search-page-panel {
    margin: 26px 0;
}

.search-page-panel form {
    display: flex;
    gap: 12px;
}

.search-page-panel input {
    flex: 1 1 auto;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.72);
    margin-top: 70px;
}

.footer-grid,
.footer-bottom {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding: 42px 0;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: var(--accent);
}

.footer-grid p,
.footer-grid li {
    color: var(--muted);
    line-height: 1.7;
}

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

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted-2);
    border-top: 1px solid var(--line-soft);
    padding: 18px 0 28px;
}

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

@media (max-width: 1080px) {
    .header-search {
        display: none;
    }

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

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

    .split-section,
    .detail-hero,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }

    .detail-poster img {
        max-height: 620px;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: auto;
        min-height: 66px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    .site-nav {
        display: none;
        order: 10;
        width: 100%;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        border-top: 1px solid var(--line-soft);
        padding-top: 12px;
    }

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

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        padding-bottom: 210px;
    }

    .hero-content h1 {
        font-size: 44px;
    }

    .hero-search-panel form > div,
    .search-page-panel form,
    .toolbar-section {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search-panel button,
    .search-page-panel button {
        width: 100%;
    }

    .hero-controls {
        bottom: 140px;
    }

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

    .section-heading {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .rank-row,
    .wide-rank-list .rank-row {
        grid-template-columns: 42px 70px 1fr;
    }

    .rank-action {
        grid-column: 2 / -1;
        width: fit-content;
    }

    .page-hero {
        padding: 28px;
    }

    .detail-hero {
        padding: 18px;
    }

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

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

@media (max-width: 520px) {
    .movie-grid,
    .small-grid,
    .category-ribbon-inner,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
        gap: 10px;
    }

    .ghost-button {
        margin-left: 0;
    }

    .hero-controls {
        bottom: 152px;
    }
}
