:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.72);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --blue: #2563eb;
    --blue-soft: rgba(37, 99, 235, 0.2);
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 22px;
    --radius-small: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #000 100%);
    color: var(--text);
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.86), rgba(15, 23, 42, 0.94));
    border-bottom: 1px solid rgba(37, 99, 235, 0.35);
    backdrop-filter: blur(16px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 22px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: radial-gradient(circle at 30% 25%, #fef3c7, var(--amber) 38%, #1d4ed8 100%);
    color: #020617;
    font-size: 15px;
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.38);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong,
.footer-brand {
    color: #fff;
    font-size: 20px;
    letter-spacing: 0.04em;
    font-weight: 800;
}

.brand-text small {
    color: #bfdbfe;
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 600;
}

.nav-link {
    position: relative;
    padding: 10px 0;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--amber);
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--amber);
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.68);
    color: white;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.mobile-nav a {
    display: block;
    padding: 11px 0;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

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

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.82) 22%, rgba(2, 6, 23, 0.24) 64%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.58) 48%, rgba(2, 6, 23, 0.78) 100%);
}

.hero-content {
    position: relative;
    min-height: 72vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 92px;
}

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

.eyebrow {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--amber);
    font-weight: 800;
    letter-spacing: 0.06em;
}

.eyebrow span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(10px);
}

.hero h1,
.page-hero h1,
.movie-title-block h1 {
    margin: 0;
    color: white;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.movie-title-block p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #d1d5db;
    font-size: 18px;
}

.hero-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
}

.hero-meta span,
.meta-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.76);
    color: #cbd5e1;
    font-size: 13px;
}

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

.primary-button,
.ghost-button,
.mini-search button,
.filter-bar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease;
}

.primary-button,
.mini-search button {
    background: var(--amber);
    color: #111827;
    box-shadow: 0 16px 42px rgba(245, 158, 11, 0.28);
}

.primary-button:hover,
.mini-search button:hover {
    background: var(--amber-dark);
    transform: translateY(-2px);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.52);
    color: #fff;
}

.ghost-button:hover {
    border-color: var(--amber);
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hero-dots,
.hero-arrows {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

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

.hero-arrows button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.58);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.search-strip {
    border-top: 1px solid rgba(37, 99, 235, 0.2);
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
    background: rgba(15, 23, 42, 0.62);
}

.search-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
}

.search-strip strong {
    display: block;
    color: white;
    font-size: 18px;
}

.search-strip span {
    color: var(--muted);
    font-size: 14px;
}

.mini-search {
    display: flex;
    width: min(100%, 520px);
    gap: 10px;
}

.mini-search input,
.filter-bar input,
.filter-bar select {
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #f8fafc;
    padding: 0 16px;
    outline: 0;
}

.mini-search input {
    flex: 1;
}

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

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

.section-head h2,
.rank-panel h2,
.related-panel h2,
.info-card h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.16;
}

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

.section-more {
    color: var(--amber);
    font-weight: 800;
    white-space: nowrap;
}

.card-grid,
.poster-grid,
.category-grid,
.category-overview-grid {
    display: grid;
    gap: 20px;
}

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

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

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

.small-grid {
    gap: 16px;
}

.movie-card {
    min-width: 0;
}

.card-link,
.rank-item > a,
.category-card,
.category-overview-card,
.related-card {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--bg-card);
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.24);
    transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.card-link:hover,
.rank-item > a:hover,
.category-card:hover,
.category-overview-card:hover,
.related-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 20px 56px rgba(37, 99, 235, 0.22);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.compact-card .poster-wrap,
.poster-grid .poster-wrap {
    aspect-ratio: 3 / 4;
}

.poster-wrap img,
.rank-item img,
.related-card img,
.category-overview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-link:hover img,
.rank-item > a:hover img,
.related-card:hover img,
.category-overview-card:hover img {
    transform: scale(1.08);
}

.poster-shade,
.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08) 58%);
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.92);
    color: #111827;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-link:hover .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.corner-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: white;
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.card-body strong {
    color: white;
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link:hover .card-body strong {
    color: var(--amber);
}

.card-desc {
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-line {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.86);
    color: #cbd5e1;
    font-size: 12px;
}

.category-section,
.category-feature-section:nth-of-type(even) {
    background: rgba(15, 23, 42, 0.32);
}

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

.category-card {
    padding: 28px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.78));
}

.category-icon {
    display: block;
    font-size: 42px;
    margin-bottom: 16px;
}

.category-card strong,
.category-overview-card strong {
    display: block;
    color: white;
    font-size: 22px;
    font-style: normal;
}

.category-card em,
.category-overview-card em {
    display: block;
    min-height: 46px;
    margin: 8px 0 18px;
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
}

.category-card span:last-child,
.category-overview-card span:last-child {
    color: var(--amber);
    font-weight: 800;
}

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

.rank-panel,
.info-card,
.related-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.66);
    box-shadow: var(--shadow);
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.rank-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.rank-item > a {
    display: grid;
    grid-template-columns: 46px 84px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
}

.full-rank .rank-item > a {
    grid-template-columns: 56px 118px minmax(0, 1fr);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--amber);
    font-weight: 900;
}

.rank-item img {
    aspect-ratio: 16 / 10;
    border-radius: 10px;
}

.rank-content {
    display: grid;
    min-width: 0;
}

.rank-content strong {
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-content em,
.rank-content span {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 84px 0 70px;
    background:
        radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.18), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.52), rgba(2, 6, 23, 0.98));
    border-bottom: 1px solid rgba(37, 99, 235, 0.22);
}

.compact-page-hero h1 {
    font-size: clamp(38px, 6vw, 62px);
}

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

.category-overview-card {
    min-height: 320px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-overview-card img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.category-overview-card > *:not(img):not(.category-overlay) {
    position: relative;
    z-index: 2;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.62);
}

.filter-bar input {
    flex: 1 1 320px;
}

.filter-bar select {
    min-width: 150px;
}

.result-count {
    margin-left: auto;
    color: var(--amber);
    font-weight: 800;
}

.movie-hero {
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(37, 99, 235, 0.24);
}

.movie-hero-inner {
    padding: 42px 0 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: #93c5fd;
}

.movie-title-block {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 30px;
    align-items: end;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    width: 100%;
    object-fit: cover;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
}

.detail-meta span {
    background: rgba(15, 23, 42, 0.78);
}

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

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

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.34);
    border-radius: 28px;
    background: #000;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 18rem),
        rgba(0, 0, 0, 0.34);
    color: white;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: var(--amber);
    color: #111827;
    font-size: 30px;
    box-shadow: 0 0 48px rgba(245, 158, 11, 0.45);
}

.player-overlay strong {
    font-size: 22px;
}

.player-overlay em,
.player-message {
    color: #cbd5e1;
    font-style: normal;
}

.player-message {
    position: absolute;
    left: 20px;
    bottom: 14px;
    margin: 0;
    font-size: 13px;
}

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

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

.info-card,
.related-panel {
    padding: 24px;
}

.info-card p {
    margin: 14px 0 0;
    color: #d1d5db;
    white-space: pre-line;
}

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

.info-list div {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
}

.info-list dt {
    color: var(--muted);
}

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

.related-panel {
    position: sticky;
    top: 92px;
}

.related-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.related-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
}

.related-card img {
    aspect-ratio: 16 / 10;
    border-radius: 10px;
}

.related-card span {
    display: grid;
    align-content: center;
    min-width: 0;
}

.related-card strong {
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card em,
.related-card small {
    color: var(--muted);
    font-style: normal;
}

.site-footer {
    border-top: 1px solid rgba(37, 99, 235, 0.2);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), #000);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

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

.site-footer h3 {
    margin: 0 0 14px;
    color: white;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

.is-hidden-card {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
    }

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

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

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

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

    .rank-panel,
    .related-panel {
        position: static;
    }
}

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

    .hero,
    .hero-content {
        min-height: 74vh;
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 86px;
    }

    .hero p,
    .page-hero p,
    .movie-title-block p {
        font-size: 16px;
    }

    .search-strip-inner,
    .section-head,
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .mini-search {
        width: 100%;
    }

    .feature-grid,
    .card-grid,
    .poster-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body strong {
        font-size: 15px;
    }

    .card-desc,
    .meta-row,
    .tag-line {
        display: none;
    }

    .rank-item > a,
    .full-rank .rank-item > a {
        grid-template-columns: 42px 90px minmax(0, 1fr);
    }

    .movie-title-block {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 16px;
        align-items: center;
    }

    .movie-title-block h1 {
        font-size: 30px;
    }

    .detail-poster {
        border-radius: 16px;
    }

    .player-frame {
        border-radius: 18px;
    }

    .play-circle {
        width: 66px;
        height: 66px;
    }

    .related-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .feature-grid,
    .card-grid,
    .poster-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .mini-search {
        display: grid;
    }

    .hero-arrows {
        display: none;
    }

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

    .detail-poster {
        width: min(220px, 100%);
    }
}
