* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #030712;
    --bg-soft: #07111f;
    --card: rgba(17, 24, 39, 0.82);
    --card-strong: rgba(31, 41, 55, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f9fafb;
    --muted: #9ca3af;
    --soft: #d1d5db;
    --accent: #f59e0b;
    --accent-strong: #f97316;
    --accent-dark: #7c2d12;
    --glow: rgba(249, 115, 22, 0.32);
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.13), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #030712 42%, #050816 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

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

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

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

.brand-mark {
    position: relative;
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    color: #111827;
    font-size: 24px;
    font-weight: 900;
    border-radius: 16px;
    background: linear-gradient(135deg, #fbbf24, #f97316 58%, #ef4444);
    box-shadow: 0 0 36px var(--glow);
}

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

.brand-name {
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0.08em;
    font-weight: 700;
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-link,
.mobile-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border-radius: 12px;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link {
    padding: 10px 14px;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
    color: var(--text);
    background: rgba(31, 41, 55, 0.86);
}

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

.header-search {
    width: 260px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
}

.header-search input,
.quick-search input,
.local-search,
.search-page-form input {
    width: 100%;
    color: var(--text);
    outline: none;
    border: 0;
    background: transparent;
}

.header-search input {
    padding: 6px 4px 6px 12px;
}

.header-search button,
.quick-search button,
.search-page-form button {
    border: 0;
    cursor: pointer;
    color: #111827;
    font-weight: 700;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.header-search button {
    padding: 7px 13px;
}

.header-search button:hover,
.quick-search button:hover,
.search-page-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px var(--glow);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto 14px;
    gap: 8px;
    overflow-x: auto;
}

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

.mobile-nav-link {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid var(--line);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) brightness(0.5);
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.72) 43%, rgba(3, 7, 18, 0.4) 100%),
        linear-gradient(180deg, rgba(3, 7, 18, 0.08) 0%, #030712 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 58px;
    padding-top: 72px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow,
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fed7aa;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.sub-hero h1,
.detail-copy h1 {
    margin: 16px 0 0;
    line-height: 1.08;
    font-size: clamp(34px, 6vw, 76px);
    letter-spacing: -0.05em;
}

.hero-copy h2 {
    margin: 18px 0 0;
    color: #fff7ed;
    font-size: clamp(26px, 4vw, 48px);
    line-height: 1.16;
}

.hero-copy p,
.sub-hero p,
.detail-one-line {
    max-width: 760px;
    color: var(--soft);
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #e5e7eb;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

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

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, #fcd34d, #f97316);
    box-shadow: 0 20px 44px var(--glow);
}

.btn-ghost {
    border: 1px solid rgba(251, 191, 36, 0.42);
    background: rgba(124, 45, 18, 0.28);
}

.btn-plain {
    color: var(--soft);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.54);
}

.hero-poster,
.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
}

.hero-poster img,
.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

.hero-dot {
    width: 40px;
    height: 5px;
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    transition: width 0.24s ease, background 0.24s ease;
}

.hero-dot.is-active {
    width: 68px;
    background: linear-gradient(90deg, #fcd34d, #f97316);
}

.quick-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 18px;
    margin-top: -42px;
    position: relative;
    z-index: 8;
}

.quick-search,
.quick-links,
.toolbar,
.story-card,
.player-shell,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.86);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.quick-search {
    padding: 18px;
}

.quick-search label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 14px;
}

.quick-search div,
.search-page-form {
    display: flex;
    gap: 10px;
}

.quick-search input,
.search-page-form input {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(3, 7, 18, 0.62);
}

.quick-search button,
.search-page-form button {
    min-width: 96px;
    padding: 0 18px;
}

.quick-links {
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quick-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    color: var(--soft);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(31, 41, 55, 0.55);
    transition: color 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.quick-links a:hover {
    color: var(--text);
    background: rgba(249, 115, 22, 0.18);
    transform: translateY(-2px);
}

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

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

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

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

.section-more {
    flex: 0 0 auto;
    color: #fed7aa;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(31, 41, 55, 0.94), rgba(15, 23, 42, 0.9));
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.category-card:hover {
    border-color: rgba(251, 191, 36, 0.42);
    transform: translateY(-5px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.category-glow {
    position: absolute;
    inset: auto -40px -60px auto;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: var(--glow);
    filter: blur(35px);
}

.category-title,
.category-desc {
    position: relative;
    z-index: 1;
    display: block;
}

.category-title {
    font-size: 24px;
    font-weight: 900;
}

.category-desc {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
}

.category-thumbs {
    position: absolute;
    right: 18px;
    bottom: 16px;
    display: flex;
    align-items: end;
    gap: 5px;
}

.category-thumbs img {
    width: 48px;
    height: 70px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.82);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    border-color: rgba(251, 191, 36, 0.42);
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.06);
    filter: saturate(1.12) brightness(1.08);
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(180deg, transparent, rgba(3, 7, 18, 0.86));
}

.card-badge,
.rank-number {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-badge {
    left: 10px;
    bottom: 10px;
    padding: 5px 9px;
    color: #111827;
    background: linear-gradient(135deg, #fcd34d, #f97316);
}

.rank-number {
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    color: #111827;
    background: #fbbf24;
    box-shadow: 0 10px 24px rgba(251, 191, 36, 0.32);
}

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

.movie-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a {
    display: -webkit-box;
    min-height: 43px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.movie-card-meta {
    color: var(--soft);
    font-size: 12px;
}

.movie-card-meta span::after {
    content: "·";
    margin-left: 8px;
    color: rgba(209, 213, 219, 0.42);
}

.movie-card-meta span:last-child::after {
    content: "";
    margin-left: 0;
}

.tag-row {
    margin-top: 10px;
}

.tag-row span {
    min-height: 22px;
    padding: 3px 7px;
    color: var(--muted);
    font-size: 11px;
}

.movie-card-compact .movie-card-body {
    padding: 12px;
}

.rank-grid .movie-card:nth-child(-n + 3),
.rank-grid-large .movie-card:nth-child(-n + 3) {
    border-color: rgba(251, 191, 36, 0.5);
}

.toolbar {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding: 14px;
}

.sticky-toolbar {
    position: sticky;
    top: 90px;
}

.local-search {
    min-height: 44px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(3, 7, 18, 0.55);
}

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

.filter-pills button {
    min-height: 36px;
    padding: 0 13px;
    cursor: pointer;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.6);
}

.filter-pills button:hover,
.filter-pills button.is-active {
    color: var(--text);
    border-color: rgba(251, 191, 36, 0.44);
    background: rgba(249, 115, 22, 0.18);
}

.sub-hero {
    padding: 76px 0 6px;
}

.sub-hero h1 {
    margin: 12px 0 12px;
}

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

.crumbs a:hover {
    color: #fed7aa;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
}

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

.category-visual img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

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

.category-overview-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

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

.category-sample-links a {
    padding: 6px 10px;
    color: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.58);
}

.category-sample-links a:hover {
    color: #fed7aa;
}

.detail-hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.detail-bg-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.72), rgba(3, 7, 18, 0.42)),
        linear-gradient(180deg, rgba(3, 7, 18, 0.15), #030712 100%);
}

.detail-inner {
    position: relative;
    z-index: 2;
    padding: 92px 0 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 46px;
    align-items: center;
}

.detail-copy h1 {
    max-width: 880px;
}

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

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

.player-section {
    margin-top: -58px;
    position: relative;
    z-index: 5;
}

.player-shell {
    position: relative;
    overflow: hidden;
    padding: 0;
    border-radius: 28px;
    background: #000;
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text);
    border: 0;
    background:
        radial-gradient(circle, rgba(249, 115, 22, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(3, 7, 18, 0.15), rgba(3, 7, 18, 0.76));
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    color: #111827;
    font-size: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fcd34d, #f97316);
    box-shadow: 0 24px 60px var(--glow);
}

.play-title {
    font-size: 20px;
    font-weight: 800;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

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

.story-card {
    padding: 24px;
}

.story-card h2 {
    margin: 8px 0 12px;
    font-size: 28px;
}

.story-card p {
    margin: 0;
    color: var(--soft);
    font-size: 16px;
}

.search-page-form {
    max-width: 760px;
    margin-top: 22px;
}

#global-search-results:empty {
    display: none;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 22px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    max-width: 650px;
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

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

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 26px;
    color: rgba(156, 163, 175, 0.72);
    font-size: 13px;
}

@media (max-width: 1180px) {
    .movie-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content {
        gap: 26px;
        align-content: center;
    }

    .hero-poster {
        display: none;
    }

    .quick-panel,
    .detail-content,
    .footer-inner,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: min(300px, 72vw);
    }
}

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

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

    .brand-subtitle {
        display: none;
    }

    .hero-carousel {
        min-height: 620px;
        height: 78vh;
    }

    .hero-content {
        padding-top: 62px;
    }

    .hero-copy p,
    .sub-hero p,
    .detail-one-line {
        font-size: 16px;
    }

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

    .quick-links,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .content-section {
        padding-top: 52px;
    }

    .sticky-toolbar {
        position: relative;
        top: auto;
    }

    .detail-inner {
        padding-top: 76px;
    }

    .detail-hero {
        min-height: auto;
    }

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

    .play-title {
        font-size: 16px;
    }
}

@media (max-width: 420px) {
    .container,
    .hero-content,
    .footer-inner,
    .copyright {
        width: min(100% - 22px, 1180px);
    }

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

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

    .movie-card h3 {
        font-size: 14px;
    }
}
