:root {
    color-scheme: dark;
    --bg: #0a0a0a;
    --bg-soft: #141414;
    --bg-card: #1f1f1f;
    --bg-card-hover: #252525;
    --border: #333333;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --muted-deep: #6b7280;
    --accent: #f97316;
    --accent-strong: #ea580c;
    --accent-soft: rgba(234, 88, 12, 0.2);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    min-width: 320px;
}

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

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

button,
input,
select {
    font: inherit;
}

body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: var(--bg-soft);
}

body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #404040;
}

::selection {
    background: var(--accent-strong);
    color: #ffffff;
}

.container {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

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

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #ffffff;
    background: var(--accent-strong);
    transition: background 0.25s ease, transform 0.25s ease;
}

.brand:hover .logo-mark {
    background: var(--accent);
    transform: translateY(-1px);
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 20px;
    line-height: 1.1;
    color: #ffffff;
}

.brand-copy small {
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    color: #d1d5db;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fb923c;
}

.nav-link-muted {
    color: var(--muted);
    font-size: 14px;
}

.nav-divider {
    width: 1px;
    height: 18px;
    background: var(--border);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
}

.mobile-menu-button span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--border);
    padding: 16px;
    background: var(--bg-soft);
}

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

.mobile-nav a {
    color: #d1d5db;
    font-weight: 600;
}

.hero {
    position: relative;
    min-height: 500px;
    height: 70vh;
    overflow: hidden;
    background: var(--bg);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s 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.02);
}

.hero-shade,
.detail-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0a0a0a 0%, rgba(10, 10, 10, 0.68) 48%, rgba(10, 10, 10, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 64px;
}

.hero-copy {
    max-width: 780px;
    animation: slideUp 0.5s ease-out;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #fb923c;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero-kicker::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.16);
}

.hero h1,
.detail-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    color: #ffffff;
    letter-spacing: -0.04em;
}

.hero-title {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.1;
}

.hero p,
.detail-hero p {
    max-width: 760px;
    margin: 0 0 24px;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.75;
}

.hero-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-cloud span {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--accent-strong);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--accent-strong);
    color: #ffffff;
}

.button-primary:hover {
    background: var(--accent);
}

.button-ghost {
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    background: rgba(0, 0, 0, 0.26);
}

.button-soft {
    background: var(--accent-soft);
    color: #fb923c;
    border-color: rgba(234, 88, 12, 0.3);
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

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

.quick-search-panel {
    position: relative;
    z-index: 4;
    margin-top: -34px;
}

.movie-filter-form {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(31, 31, 31, 0.94);
    box-shadow: var(--shadow);
}

.movie-filter-form label {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 700;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 12px;
}

.search-row-wide {
    grid-template-columns: 1fr 220px 180px;
}

.search-row input,
.search-row select {
    min-height: 46px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-soft);
    color: var(--text);
    padding: 0 14px;
    outline: none;
}

.search-row input:focus,
.search-row select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

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

.surface-section {
    background: var(--bg-soft);
}

.timeline-section {
    background: linear-gradient(to bottom, var(--bg), var(--bg-soft));
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.section-heading small {
    display: block;
    margin-bottom: 4px;
    color: #fb923c;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    color: #ffffff;
}

.heading-bar {
    width: 5px;
    height: 36px;
    border-radius: 999px;
    background: var(--accent);
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow);
}

.card-image {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg);
}

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

.movie-card:hover .card-image img,
.category-art:hover img,
.rank-thumb:hover img {
    transform: scale(1.08);
}

.card-year {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(10, 10, 10, 0.82);
    color: #d1d5db;
    font-size: 12px;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    transition: color 0.2s ease;
}

.card-title:hover,
.rank-copy h2 a:hover,
.category-card h2 a:hover {
    color: #fb923c;
}

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

.card-meta,
.detail-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted-deep);
    font-size: 13px;
}

.card-meta span,
.detail-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-meta span:not(:last-child)::after,
.detail-meta-row span:not(:last-child)::after {
    content: "";
    width: 4px;
    height: 4px;
    margin-left: 8px;
    border-radius: 50%;
    background: var(--border);
}

.movie-card-horizontal {
    display: flex;
    min-height: 150px;
}

.movie-card-horizontal .card-image {
    width: 220px;
    flex: 0 0 220px;
    aspect-ratio: 16 / 9;
}

.movie-card-horizontal .card-title {
    min-height: 0;
}

.horizontal-list {
    display: grid;
    gap: 16px;
}

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

.category-panel,
.sidebar-card,
.detail-panel,
.player-card,
.category-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.category-panel {
    padding: 24px;
}

.category-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.category-panel h3,
.category-card h2,
.sidebar-card h2,
.detail-panel h2 {
    margin: 0 0 10px;
    color: #ffffff;
}

.category-panel p,
.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.category-panel-head a,
.text-link {
    color: #fb923c;
    font-weight: 700;
}

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

.section-link-row {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 36px;
    padding: 48px;
    border: 1px solid rgba(234, 88, 12, 0.2);
    border-radius: 24px;
    background: radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.18), transparent 34%), var(--bg-card);
}

.page-hero span {
    display: inline-block;
    margin-bottom: 12px;
    color: #fb923c;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.page-hero h1 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #d1d5db;
    line-height: 1.8;
    font-size: 18px;
}

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

.category-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 20px;
}

.category-art {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 14px;
}

.category-art img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-filter {
    margin-bottom: 32px;
}

.empty-state {
    display: none;
    margin: 32px 0 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--muted);
    text-align: center;
}

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

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

.rank-item {
    align-items: stretch;
    gap: 18px;
    padding: 14px;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 64px;
    color: #fb923c;
    font-size: 24px;
    font-weight: 900;
}

.rank-thumb {
    flex: 0 0 180px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg);
}

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

.rank-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rank-copy h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.rank-copy p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.6;
}

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

.breadcrumb a {
    color: #fb923c;
}

.detail-main {
    padding-top: 0;
}

.detail-hero {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    background: var(--bg);
}

.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 540px;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 60px;
}

.detail-meta-row {
    margin-bottom: 24px;
    color: #d1d5db;
    font-size: 15px;
}

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

.detail-content {
    display: grid;
    gap: 24px;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6));
    transition: opacity 0.25s ease;
}

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

.play-icon {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: var(--accent-strong);
    box-shadow: 0 20px 60px rgba(234, 88, 12, 0.45);
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 33px;
    top: 25px;
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #ffffff;
}

.detail-panel {
    padding: 28px;
}

.detail-panel p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.9;
    white-space: pre-line;
}

.detail-panel .lead-text {
    margin-bottom: 16px;
    color: #ffffff;
    font-size: 18px;
    font-style: italic;
}

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

.sidebar-card {
    padding: 22px;
}

.tag-cloud span {
    background: var(--accent-soft);
    color: #fb923c;
    border: 1px solid rgba(234, 88, 12, 0.3);
}

.info-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.info-list div {
    display: grid;
    gap: 4px;
}

.info-list dt {
    color: var(--muted-deep);
    font-size: 13px;
}

.info-list dd {
    margin: 0;
    color: #ffffff;
}

.site-footer {
    margin-top: auto;
    background: #1a1a1a;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    padding-top: 48px;
    padding-bottom: 36px;
}

.footer-brand p,
.site-footer li,
.site-footer a {
    color: var(--muted);
}

.footer-brand p {
    max-width: 420px;
    margin: 18px 0 0;
    line-height: 1.7;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 17px;
}

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

.site-footer a:hover {
    color: #fb923c;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    color: var(--muted-deep);
    font-size: 14px;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

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

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

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero,
    .detail-hero,
    .detail-hero-content {
        min-height: 560px;
        height: auto;
    }

    .hero-content,
    .detail-hero-content {
        padding-bottom: 72px;
    }

    .search-row,
    .search-row-wide {
        grid-template-columns: 1fr;
    }

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

    .movie-card-horizontal,
    .rank-item {
        flex-direction: column;
    }

    .movie-card-horizontal .card-image,
    .rank-thumb {
        width: 100%;
        flex: none;
    }

    .rank-number {
        align-items: flex-start;
        justify-content: flex-start;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1280px);
    }

    .brand-copy strong {
        font-size: 17px;
    }

    .brand-copy small {
        display: none;
    }

    .hero h1,
    .detail-hero h1 {
        font-size: 38px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero p,
    .detail-hero p,
    .page-hero p {
        font-size: 16px;
    }

    .page-hero {
        padding: 32px 22px;
    }

    .movie-grid,
    .related-grid,
    .mini-grid,
    .category-grid,
    .category-overview-grid,
    .detail-sidebar {
        grid-template-columns: 1fr;
    }

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