:root {
    color-scheme: dark;
    --bg: #07111f;
    --bg-soft: #0e1b2d;
    --bg-card: #111f32;
    --bg-elevated: rgba(16, 30, 49, 0.86);
    --text: #f8fafc;
    --muted: #9aa8bc;
    --line: rgba(148, 163, 184, 0.22);
    --gold: #f59e0b;
    --gold-soft: rgba(245, 158, 11, 0.16);
    --blue: #38bdf8;
    --green: #22c55e;
    --red: #ef4444;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.38);
    --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.28);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 8%, rgba(245, 158, 11, 0.16), transparent 34%),
        radial-gradient(circle at 88% 12%, rgba(56, 189, 248, 0.13), transparent 30%),
        linear-gradient(180deg, #07111f 0%, #0a1424 42%, #050b14 100%);
    color: var(--text);
}

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

img,
video {
    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(7, 17, 31, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.34);
    font-weight: 900;
}

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

.brand-text strong,
.footer-brand strong {
    font-size: 1.18rem;
    letter-spacing: 0.02em;
}

.brand-text small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

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

.nav-link {
    padding: 10px 13px;
    border-radius: 999px;
    color: #cbd5e1;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(245, 158, 11, 0.16);
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search span {
    position: absolute;
    left: 14px;
    color: var(--muted);
    font-size: 0.86rem;
    pointer-events: none;
}

.header-search input,
.search-panel input {
    width: 250px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    padding: 12px 16px 12px 54px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.78);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.search-panel input:focus {
    border-color: rgba(245, 158, 11, 0.72);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
    background: rgba(15, 23, 42, 0.96);
}

.mobile-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--text);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.94);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

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

.mobile-nav a {
    padding: 11px 12px;
    border-radius: 12px;
    color: #dbe4f0;
    background: rgba(255, 255, 255, 0.04);
}

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

.hero {
    position: relative;
    margin: 28px auto 56px;
    min-height: 620px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow-lg);
    isolation: isolate;
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.1) contrast(1.02);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.95) 0%, rgba(3, 7, 18, 0.78) 36%, rgba(3, 7, 18, 0.28) 76%, rgba(3, 7, 18, 0.7) 100%),
        linear-gradient(0deg, rgba(3, 7, 18, 0.82), transparent 40%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(720px, calc(100% - 42px));
    padding: 86px 0 88px 64px;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid rgba(245, 158, 11, 0.42);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.13);
    font-size: 0.9rem;
    font-weight: 700;
}

.hero h1 {
    margin: 22px 0 16px;
    font-size: clamp(2.7rem, 6vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero h1 span,
.gradient-text {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 42%, #fb7185 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    margin: 0;
    max-width: 660px;
    color: #dbe4f0;
    font-size: clamp(1rem, 1.7vw, 1.28rem);
    line-height: 1.8;
}

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

.hero-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.13);
}

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

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

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.26);
}

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

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

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 64px;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 38px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 64px;
    background: #fbbf24;
}

.section {
    margin: 46px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-link {
    display: inline-flex;
    align-items: center;
    min-width: max-content;
    color: #fbbf24;
    font-weight: 800;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: -18px;
}

.feature-card,
.category-card,
.info-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.072), rgba(255, 255, 255, 0.034));
    box-shadow: var(--shadow-md);
}

.feature-card {
    padding: 22px;
}

.feature-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.08rem;
}

.feature-card span,
.category-card p,
.info-card p {
    color: var(--muted);
    line-height: 1.7;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    min-height: 184px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -38px;
    bottom: -44px;
    width: 118px;
    height: 118px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(160deg, rgba(245, 158, 11, 0.13), rgba(255, 255, 255, 0.05));
}

.category-card .emoji {
    font-size: 2.5rem;
}

.category-card h3 {
    position: relative;
    margin: 20px 0 8px;
    font-size: 1.25rem;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(10, 20, 36, 0.98));
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.24);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.36);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(56, 189, 248, 0.16));
}

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

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

.cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.82));
}

.cover-year,
.rank-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.cover-year {
    right: 12px;
    background: rgba(15, 23, 42, 0.74);
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.play-hover {
    position: absolute;
    inset: 0;
    width: 58px;
    height: 58px;
    margin: auto;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: scale(0.82);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
    transform: scale(1);
}

.movie-body {
    padding: 18px;
}

.movie-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #93a4b8;
    font-size: 0.82rem;
}

.category-pill,
.tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-weight: 700;
}

.category-pill {
    padding: 5px 8px;
    color: #f8fafc;
    background: rgba(56, 189, 248, 0.16);
}

.movie-body h3 {
    margin: 12px 0 8px;
    font-size: 1.15rem;
    line-height: 1.42;
}

.movie-body h3 a:hover {
    color: #fbbf24;
}

.movie-body p {
    margin: 0;
    min-height: 3.2em;
    color: #b7c4d5;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag {
    padding: 5px 8px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    font-size: 0.78rem;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(330px, 0.7fr);
    gap: 26px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: auto 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.46);
}

.ranking-item img {
    width: 92px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
}

.list-index {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    font-weight: 900;
}

.ranking-text {
    min-width: 0;
}

.ranking-text strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-text small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    margin: 32px 0;
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(56, 189, 248, 0.08)),
        rgba(15, 23, 42, 0.8);
    box-shadow: var(--shadow-md);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2.1rem, 4vw, 4rem);
    letter-spacing: -0.05em;
}

.page-hero p {
    margin: 0;
    max-width: 820px;
    color: #c9d5e4;
    line-height: 1.8;
    font-size: 1.06rem;
}

.search-panel {
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
}

.search-panel input {
    width: 100%;
    padding-left: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: 28px;
    align-items: stretch;
    margin: 22px 0 42px;
}

.player-shell {
    position: relative;
    min-height: 430px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #020617;
    box-shadow: var(--shadow-lg);
}

.player-shell video {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.76));
    transition: opacity 0.22s ease;
    pointer-events: auto;
}

.player-shell.is-playing .player-overlay,
.player-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.player-start {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 24px 48px rgba(245, 158, 11, 0.32);
    font-size: 2.2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.player-start:hover {
    transform: scale(1.08);
}

.detail-info {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow-md);
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: #dbe4f0;
    background: rgba(255, 255, 255, 0.05);
}

.detail-info p {
    color: #cbd5e1;
    line-height: 1.85;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

.article-block,
.side-block {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow-md);
}

.article-block {
    padding: 30px;
}

.article-block h2,
.side-block h2 {
    margin: 0 0 16px;
    font-size: 1.5rem;
}

.article-block p {
    color: #c9d5e4;
    line-height: 1.95;
    font-size: 1.03rem;
}

.side-block {
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 98px;
}

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

.related-list .ranking-item {
    grid-template-columns: 78px minmax(0, 1fr);
}

.related-list .ranking-item img {
    width: 78px;
    height: 52px;
}

.related-list .list-index {
    display: none;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(3, 7, 18, 0.6);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 28px;
}

.footer-brand {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.footer-brand p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-links a {
    padding: 8px 10px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
}

.footer-links a:hover {
    color: #fbbf24;
}

.empty-state {
    display: none;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}

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

.movie-card[hidden],
.ranking-item[hidden] {
    display: none;
}

@media (max-width: 1100px) {
    .desktop-nav {
        display: none;
    }

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

    .header-inner {
        justify-content: space-between;
    }

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

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

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

    .side-block {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 68px;
    }

    .brand-text small,
    .header-search {
        display: none;
    }

    .hero {
        min-height: 560px;
        margin-top: 18px;
        border-radius: 22px;
    }

    .hero-content {
        width: calc(100% - 28px);
        min-height: 560px;
        padding: 52px 0 82px 24px;
    }

    .hero-dots {
        left: 24px;
        bottom: 24px;
    }

    .feature-strip,
    .category-grid,
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-hero {
        padding: 28px;
    }

    .detail-info,
    .article-block {
        padding: 22px;
    }

    .player-shell,
    .player-shell video {
        min-height: 260px;
    }

    .ranking-item {
        grid-template-columns: auto 76px minmax(0, 1fr);
    }

    .ranking-item img {
        width: 76px;
        height: 52px;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}
