:root {
    color-scheme: dark;
    --bg: #111827;
    --bg-soft: #1f2937;
    --bg-card: #1f2937;
    --bg-card-hover: #273447;
    --border: #374151;
    --text: #f9fafb;
    --muted: #9ca3af;
    --muted-strong: #d1d5db;
    --accent: #facc15;
    --accent-strong: #f59e0b;
    --accent-text: #111827;
    --danger: #ef4444;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.12), transparent 32rem), var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "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;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(55, 65, 81, 0.8);
    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: var(--accent-text);
    box-shadow: 0 12px 28px rgba(250, 204, 21, 0.22);
}

.brand-text {
    font-size: 21px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 9px 14px;
    border-radius: 12px;
    color: var(--muted-strong);
    font-size: 15px;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: var(--bg-soft);
    color: var(--accent);
}

.nav-search {
    margin-left: auto;
    width: min(320px, 28vw);
    display: flex;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
}

.nav-search input,
.mobile-search input,
.hero-search input,
.wide-search input,
.filter-bar input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.nav-search input {
    width: 100%;
    padding: 10px 12px;
}

.nav-search button,
.mobile-search button,
.hero-search button,
.wide-search button {
    border: 0;
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 700;
    padding: 0 16px;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    background: var(--bg-soft);
    color: var(--text);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--border);
    padding: 16px 24px 20px;
}

.mobile-search {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
}

.mobile-search input {
    flex: 1;
    padding: 12px;
}

.mobile-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.mobile-links a {
    border-radius: 12px;
    background: var(--bg-soft);
    padding: 12px;
    color: var(--muted-strong);
}

.hero-slider {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #05070d;
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-overlay {
    position: absolute;
    inset: 0;
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.68;
    transform: scale(1.03);
}

.hero-overlay {
    background: linear-gradient(90deg, #111827 0%, rgba(17, 24, 39, 0.92) 34%, rgba(17, 24, 39, 0.42) 64%, rgba(17, 24, 39, 0.82) 100%), linear-gradient(0deg, #111827 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 86px 24px 190px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.eyebrow span {
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.82);
    color: var(--accent);
    border: 1px solid rgba(250, 204, 21, 0.25);
    padding: 5px 11px;
    font-size: 13px;
    font-weight: 700;
}

.hero-content h1,
.page-hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

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

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

.primary-btn,
.ghost-btn,
.section-more,
.category-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-btn {
    min-height: 46px;
    padding: 0 22px;
    background: var(--accent);
    color: var(--accent-text);
    box-shadow: 0 16px 32px rgba(250, 204, 21, 0.2);
}

.primary-btn:hover {
    transform: translateY(-2px);
    background: #fde047;
}

.ghost-btn {
    min-height: 46px;
    padding: 0 22px;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(17, 24, 39, 0.56);
}

.ghost-btn:hover,
.section-more:hover,
.category-pill:hover {
    color: var(--accent);
    border-color: rgba(250, 204, 21, 0.42);
}

.hero-panel {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 6;
    width: min(1232px, calc(100% - 48px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 18px;
    align-items: stretch;
}

.hero-search {
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.82);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
}

.hero-search input {
    flex: 1;
    padding: 0 18px;
}

.hero-thumbs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.hero-thumb {
    min-width: 0;
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    background: rgba(31, 41, 55, 0.78);
    color: var(--muted-strong);
    padding: 8px;
    text-align: left;
    transition: 0.2s ease;
}

.hero-thumb img {
    width: 56px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #1f2937, #374151);
}

.hero-thumb span {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
    font-weight: 700;
}

.hero-thumb:hover,
.hero-thumb.is-active {
    border-color: rgba(250, 204, 21, 0.55);
    background: rgba(55, 65, 81, 0.92);
    color: var(--text);
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
}

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

.section-heading h2,
.rank-title h2,
.text-block h2 {
    margin: 0;
    color: var(--text);
}

.section-heading h2,
.rank-title h2 {
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.03em;
}

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

.section-more,
.category-pill {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border);
    color: var(--muted-strong);
    background: rgba(31, 41, 55, 0.7);
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--bg-soft);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.category-tile img,
.overview-cover img,
.movie-poster img,
.list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1f2937, #374151);
}

.category-tile img,
.movie-poster img,
.list-thumb img,
.overview-cover img {
    transition: transform 0.35s ease, filter 0.35s ease;
}

.category-tile:hover img,
.movie-card:hover .movie-poster img,
.list-card:hover .list-thumb img,
.category-overview-card:hover .overview-cover img {
    transform: scale(1.06);
    filter: saturate(1.08);
}

.tile-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), transparent 62%);
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-tile strong {
    bottom: 48px;
    font-size: 24px;
}

.category-tile em {
    bottom: 18px;
    color: var(--muted-strong);
    font-size: 13px;
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(55, 65, 81, 0.74);
    border-radius: var(--radius-md);
    background: rgba(31, 41, 55, 0.74);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(250, 204, 21, 0.4);
    background: var(--bg-card-hover);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 52%;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.9), transparent);
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 900;
    opacity: 0;
    transform: translateY(6px);
    transition: 0.2s ease;
}

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

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

.movie-card-meta,
.detail-meta,
.mini-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card h3,
.list-card h3 {
    margin: 8px 0 7px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a,
.list-card h3 a,
.category-overview-card h2 a {
    transition: color 0.2s ease;
}

.movie-card h3 a:hover,
.list-card h3 a:hover,
.category-overview-card h2 a:hover {
    color: var(--accent);
}

.movie-card p,
.list-card p,
.category-overview-card p,
.footer-inner p,
.text-block p {
    color: var(--muted-strong);
}

.movie-card p {
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
}

.tag-row,
.detail-tags,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span,
.detail-tags span,
.chip-row button {
    border-radius: 999px;
    background: rgba(55, 65, 81, 0.9);
    color: var(--muted-strong);
    padding: 4px 9px;
    font-size: 12px;
}

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

.rank-box,
.detail-card,
.category-overview-card,
.filter-bar,
.search-tools {
    border: 1px solid rgba(55, 65, 81, 0.78);
    border-radius: var(--radius-lg);
    background: rgba(31, 41, 55, 0.76);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.rank-box {
    position: sticky;
    top: 92px;
    padding: 20px;
}

.rank-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.rank-title a {
    color: var(--accent);
    font-weight: 700;
}

.rank-list,
.rank-page-list {
    display: grid;
    gap: 14px;
}

.list-card {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 16px;
    border: 1px solid rgba(55, 65, 81, 0.72);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.48);
    overflow: hidden;
    transition: 0.2s ease;
}

.rank-page-list .list-card {
    grid-template-columns: 150px 1fr;
}

.list-card:hover {
    border-color: rgba(250, 204, 21, 0.38);
    background: rgba(55, 65, 81, 0.58);
}

.list-thumb {
    position: relative;
    min-height: 132px;
    overflow: hidden;
}

.rank-page-list .list-thumb {
    min-height: 190px;
}

.rank-number {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 900;
}

.list-info {
    padding: 12px 12px 12px 0;
    min-width: 0;
}

.rank-page-list .list-info {
    padding: 22px 22px 22px 0;
}

.list-card p {
    margin: 0 0 12px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: center;
    padding: 72px 24px;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.74)), var(--hero-image), linear-gradient(135deg, #1f2937, #111827);
    background-size: cover;
    background-position: center;
}

.page-hero > div {
    position: relative;
    z-index: 2;
    width: min(1232px, 100%);
    margin: 0 auto;
}

.small-hero {
    min-height: 290px;
    background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.18), transparent 30rem), linear-gradient(135deg, #1f2937, #111827);
}

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    padding: 16px;
}

.overview-cover {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 4 / 3;
}

.category-overview-card h2 {
    margin: 4px 0 8px;
    font-size: 26px;
}

.category-overview-card p {
    margin: 0 0 16px;
}

.overview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.overview-links a {
    border-radius: 999px;
    background: rgba(55, 65, 81, 0.86);
    color: var(--muted-strong);
    padding: 6px 10px;
    font-size: 13px;
}

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

.filter-bar {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
}

.filter-bar input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #111827;
    padding: 14px 16px;
}

.chip-row button {
    border: 0;
    transition: 0.2s ease;
}

.chip-row button:hover,
.chip-row button.is-active {
    background: var(--accent);
    color: var(--accent-text);
}

.wide-search {
    display: flex;
    width: min(680px, 100%);
    margin-top: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.76);
}

.wide-search input {
    flex: 1;
    padding: 17px 18px;
}

.wide-search button {
    padding: 0 24px;
}

.search-tools {
    margin-bottom: 24px;
    padding: 16px 18px;
    color: var(--muted-strong);
}

.detail-layout {
    width: min(1232px, calc(100% - 48px));
    margin: 0 auto;
    padding: 30px 0 10px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(250, 204, 21, 0.16);
    border-radius: var(--radius-lg);
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.18), rgba(0, 0, 0, 0.34) 38%, rgba(0, 0, 0, 0.62));
    color: var(--accent-text);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    font-size: 34px;
    font-weight: 900;
    box-shadow: 0 24px 42px rgba(0, 0, 0, 0.36);
}

.play-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.detail-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
}

.detail-head h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 48px);
    letter-spacing: -0.04em;
}

.detail-head p {
    max-width: 860px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 18px;
}

.detail-meta {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.detail-tags {
    margin-top: 16px;
}

.text-block {
    margin-top: 28px;
}

.text-block h2 {
    margin-bottom: 12px;
    font-size: 22px;
}

.text-block p {
    margin: 0;
    font-size: 16px;
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: start;
}

.footer-links a {
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--muted-strong);
    padding: 7px 12px;
    font-size: 14px;
}

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

[data-card].is-hidden {
    display: none;
}

.empty-state {
    grid-column: 1 / -1;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    background: var(--bg-soft);
    color: var(--muted-strong);
    text-align: center;
}

@media (max-width: 1180px) {
    .hero-panel {
        grid-template-columns: 1fr;
    }

    .hero-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .rank-box {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .mobile-panel.is-open {
        display: block;
    }

    .hero-slider {
        height: 720px;
    }

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

    .hero-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .category-overview-card {
        grid-template-columns: 150px 1fr;
    }

    .detail-head {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .header-inner {
        padding: 0 16px;
    }

    .brand-text {
        font-size: 18px;
    }

    .hero-slider {
        height: 760px;
    }

    .hero-content {
        padding: 70px 18px 330px;
    }

    .hero-panel {
        width: calc(100% - 28px);
        bottom: 16px;
    }

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

    .hero-search input,
    .wide-search input {
        min-height: 50px;
    }

    .hero-search button,
    .wide-search button {
        min-height: 48px;
    }

    .hero-thumbs {
        grid-template-columns: 1fr;
        max-height: 256px;
        overflow: auto;
    }

    .content-section {
        padding: 42px 16px;
    }

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

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

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

    .movie-card p,
    .tag-row {
        display: none;
    }

    .category-tile {
        min-height: 150px;
    }

    .category-overview-card,
    .list-card,
    .rank-page-list .list-card {
        grid-template-columns: 104px 1fr;
        gap: 14px;
    }

    .rank-page-list .list-info,
    .list-info {
        padding: 12px 12px 12px 0;
    }

    .list-card p,
    .mini-line {
        display: none;
    }

    .detail-layout {
        width: calc(100% - 28px);
    }

    .detail-card {
        padding: 20px;
    }

    .play-cover span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }

    .footer-inner {
        padding: 34px 16px;
    }
}
