:root {
    color-scheme: dark;
    --bg: #0a0a0a;
    --surface: #171717;
    --surface-soft: #1f1f1f;
    --surface-strong: #262626;
    --line: #2f2f2f;
    --text: #f5f5f5;
    --muted: #a3a3a3;
    --muted-strong: #d4d4d4;
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    --radius: 18px;
    --wrap: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 30rem),
        linear-gradient(180deg, #0a0a0a 0%, #111111 45%, #0a0a0a 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.max-wrap {
    width: min(var(--wrap), calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.78);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(var(--wrap), calc(100% - 32px));
    min-height: 72px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: auto 1fr minmax(240px, 340px);
    gap: 22px;
    align-items: center;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.logo-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #111111;
    box-shadow: 0 18px 36px rgba(245, 158, 11, 0.24);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--muted-strong);
    font-weight: 700;
    font-size: 14px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--amber);
    background: var(--amber-soft);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: currentColor;
}

.global-search {
    position: relative;
}

.global-search input,
.filter-panel input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    background: rgba(23, 23, 23, 0.9);
    color: var(--text);
    padding: 0 16px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.global-search input:focus,
.filter-panel input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px var(--amber-soft);
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, calc(100vw - 32px));
    display: none;
    max-height: 560px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 15, 15, 0.96);
    box-shadow: var(--shadow);
}

.search-results.is-open {
    display: grid;
    gap: 8px;
}

.search-result-item {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: var(--amber-soft);
}

.search-result-item img {
    width: 54px;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface-strong);
}

.search-result-item strong {
    display: block;
    color: var(--text);
    font-size: 14px;
}

.search-result-item small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.home-hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #000000;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.62) 46%, rgba(0, 0, 0, 0.12) 100%),
        linear-gradient(0deg, #0a0a0a 0%, transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--wrap), calc(100% - 32px));
    height: 100%;
    margin-inline: auto;
    display: flex;
    max-width: var(--wrap);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-top: 28px;
}

.hero-kicker,
.section-kicker,
.detail-kicker,
.page-hero > span,
.category-overview-text > span {
    display: inline-flex;
    width: fit-content;
    padding: 6px 11px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.13);
    color: var(--amber);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 18px 0 16px;
    font-size: clamp(42px, 7vw, 88px);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: var(--muted-strong);
    font-size: 18px;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 700;
}

.hero-actions,
.page-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #111111;
    box-shadow: 0 18px 36px rgba(245, 158, 11, 0.24);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.btn-text {
    color: var(--amber);
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: var(--text);
    font-size: 32px;
    transform: translateY(-50%);
    transition: background 0.25s ease, color 0.25s ease;
}

.hero-control:hover {
    background: var(--amber);
    color: #111111;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 26px;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 32px;
    background: var(--amber);
}

.content-section {
    padding: 64px 0 0;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-article h2,
.detail-side-list h2,
.ranking-page-list h2,
.category-overview-text h2 {
    margin: 10px 0 8px;
    line-height: 1.1;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.category-overview-text p,
.site-footer p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
}

.section-head > a,
.ranking-panel-head a {
    color: var(--amber);
    font-weight: 900;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(38, 38, 38, 0.8), rgba(18, 18, 18, 0.92));
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.75);
    box-shadow: 0 22px 46px rgba(245, 158, 11, 0.10);
}

.movie-card-featured {
    grid-column: span 2;
    grid-row: span 2;
}

.movie-cover-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(255, 255, 255, 0.03));
}

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

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

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

.movie-badge,
.movie-year {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.movie-badge {
    left: 12px;
    top: 12px;
    color: var(--amber);
}

.movie-year {
    right: 12px;
    bottom: 12px;
}

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

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card h3 a {
    transition: color 0.25s ease;
}

.movie-card:hover h3 a {
    color: var(--amber);
}

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

.movie-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #737373;
    font-size: 12px;
}

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

.ranking-panel,
.detail-side-list,
.detail-article,
.player-shell,
.filter-panel,
.category-overview-card,
.page-hero,
.detail-layout,
.prev-next-links {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(23, 23, 23, 0.76);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 18px;
}

.ranking-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 950;
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    transition: background 0.25s ease, transform 0.25s ease;
}

.rank-item:not(:has(.rank-index)) {
    grid-template-columns: 74px 1fr;
}

.rank-item:hover {
    background: var(--amber-soft);
    transform: translateX(3px);
}

.rank-index {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 999px;
    background: var(--amber);
    color: #111111;
    font-weight: 950;
    font-size: 13px;
}

.rank-item img {
    width: 74px;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    object-fit: cover;
    background: var(--surface-strong);
}

.rank-item strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
}

.rank-item small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

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

.category-card,
.category-overview-card {
    overflow: hidden;
}

.category-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(38, 38, 38, 0.7));
}

.category-card-main {
    display: block;
    padding: 20px;
}

.category-card-main span,
.category-overview-text > span {
    color: var(--amber);
    font-size: 13px;
    font-weight: 900;
}

.category-card-main strong {
    display: block;
    margin-top: 8px;
    line-height: 1.35;
}

.category-samples {
    display: grid;
    gap: 1px;
    padding: 0 20px 20px;
}

.category-samples a {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-samples a:hover {
    color: var(--amber);
}

.page-main {
    padding-top: 42px;
    padding-bottom: 72px;
}

.page-hero {
    padding: clamp(28px, 5vw, 52px);
    margin-bottom: 28px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 32rem),
        rgba(23, 23, 23, 0.76);
}

.small-hero {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-overview-grid {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 22px;
    padding: 22px;
}

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

.filter-panel {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px;
    margin-bottom: 24px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-buttons button {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted-strong);
    font-weight: 800;
}

.filter-buttons button:hover,
.filter-buttons button.is-active {
    border-color: rgba(245, 158, 11, 0.6);
    background: var(--amber-soft);
    color: var(--amber);
}

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

.category-movie-grid .movie-card.is-hidden {
    display: none;
}

.ranking-page-list h2 {
    font-size: 30px;
}

.wide-ranking-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 28px;
    padding: 24px;
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    object-fit: cover;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.detail-one-line {
    max-width: 780px;
    color: var(--muted-strong);
    font-size: 18px;
}

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

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

.detail-meta-grid div {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

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

.detail-meta-grid dd {
    margin: 4px 0 0;
    font-weight: 900;
}

.player-section {
    padding-top: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.7));
    color: var(--text);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.player-shell.is-playing .player-start {
    opacity: 0;
    visibility: hidden;
}

.play-icon {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    border-radius: 999px;
    background: var(--amber);
    color: #111111;
    font-size: 28px;
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.32);
}

.player-status {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 3;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: var(--muted-strong);
    font-size: 12px;
    backdrop-filter: blur(8px);
}

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

.detail-article,
.detail-side-list {
    padding: 24px;
}

.detail-article h2,
.detail-side-list h2 {
    font-size: 28px;
}

.detail-article p {
    margin: 0 0 24px;
    color: var(--muted-strong);
    font-size: 17px;
    white-space: pre-line;
}

.prev-next-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    margin-top: 28px;
}

.prev-next-links a {
    color: var(--amber);
    font-weight: 900;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: rgba(10, 10, 10, 0.82);
}

.footer-inner {
    width: min(var(--wrap), calc(100% - 32px));
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: 36px 0;
    align-items: center;
}

.footer-logo {
    color: var(--amber);
}

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

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

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

@media (max-width: 1080px) {
    .header-inner {
        grid-template-columns: auto auto;
    }

    .nav-toggle {
        display: block;
        justify-self: end;
    }

    .nav-links,
    .global-search {
        grid-column: 1 / -1;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 0;
    }

    body.nav-open .nav-links {
        display: flex;
    }

    .global-search {
        padding-bottom: 14px;
    }

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

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

    .ranking-panel,
    .detail-side-list {
        position: static;
    }

    .detail-layout {
        grid-template-columns: 280px minmax(0, 1fr);
    }

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

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

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

    .home-hero {
        min-height: 620px;
    }

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

    .hero-content p {
        font-size: 16px;
    }

    .hero-control {
        display: none;
    }

    .section-head,
    .filter-panel,
    .footer-inner,
    .prev-next-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .category-movie-grid,
    .category-grid,
    .wide-ranking-list,
    .category-overview-list {
        grid-template-columns: 1fr;
    }

    .movie-card-featured {
        grid-column: span 1;
        grid-row: span 1;
    }

    .category-overview-card,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-cover img {
        aspect-ratio: 16 / 10;
    }

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

    .footer-inner {
        display: flex;
    }

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