:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: #1e293b;
    --panel-strong: #273449;
    --line: #334155;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 34rem),
        linear-gradient(180deg, #0f172a 0%, #111827 46%, #0f172a 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
    transition: transform 0.3s ease;
}

.brand:hover .brand-icon,
.footer-brand:hover .brand-icon {
    transform: scale(1.08) rotate(-3deg);
}

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

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

.nav-link {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 14px;
    color: #cbd5e1;
    border-radius: 999px;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.16);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: rgba(51, 65, 85, 0.75);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 12px 20px 18px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav-link {
    padding: 12px 14px;
    color: #cbd5e1;
    border-radius: 12px;
}

.mobile-nav-link:hover {
    color: #ffffff;
    background: rgba(51, 65, 85, 0.85);
}

.hero-carousel {
    position: relative;
    min-height: min(760px, calc(100vh - 68px));
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.65) 45%, rgba(15, 23, 42, 0.12) 100%),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.55) 35%, transparent 75%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 16%;
    width: min(1180px, calc(100% - 48px));
    transform: translateX(-50%);
    z-index: 2;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--amber);
    font-weight: 800;
}

.hero-content h1 {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.02;
    text-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 24px;
    color: #d6dee9;
    font-size: clamp(16px, 2.2vw, 22px);
    line-height: 1.7;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
}

.hero-meta span,
.detail-meta span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.hero-actions,
.section-more {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), #f97316);
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.44);
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.68);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.page-shell {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 54px 0 76px;
}

.page-top {
    padding-top: 42px;
}

section + section {
    margin-top: 64px;
}

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

.section-heading h2,
.search-panel h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.1;
}

.section-heading p,
.search-panel p,
.page-hero p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.search-panel,
.page-hero,
.player-card,
.detail-copy,
.side-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 24px;
    align-items: center;
    padding: 28px;
}

.search-box input {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    color: #ffffff;
    outline: none;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    transition: border 0.25s ease, box-shadow 0.25s ease;
}

.search-box input:focus {
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-results {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.search-results.open {
    display: grid;
}

.search-result-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    transition: transform 0.25s ease, border 0.25s ease;
}

.search-result-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.55);
}

.search-result-card img {
    width: 72px;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(51, 65, 85, 0.68);
}

.search-result-card strong,
.search-result-card small {
    display: block;
}

.search-result-card small {
    margin-top: 4px;
    color: var(--muted);
}

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(238px, 280px);
    gap: 18px;
    overflow-x: auto;
    padding: 2px 4px 18px;
    scroll-snap-type: x proximity;
}

.rail-item {
    scroll-snap-align: start;
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    color: #ffffff;
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius-md);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.018);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 28px 75px rgba(0, 0, 0, 0.38);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(51, 65, 85, 0.9), rgba(15, 23, 42, 0.96));
}

.featured-card .poster-wrap {
    aspect-ratio: 16 / 10;
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.06) 58%);
    opacity: 0.78;
    transition: opacity 0.35s ease;
}

.movie-card:hover .poster-gradient {
    opacity: 0.92;
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    color: #ffffff;
    background: var(--amber);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.corner-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 4px 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.66);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.movie-card-body {
    display: grid;
    gap: 7px;
    padding: 13px 13px 15px;
}

.movie-title {
    color: #ffffff;
    font-weight: 850;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.movie-genre,
.movie-desc {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.movie-genre,
.movie-desc {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    overflow: hidden;
    min-height: 236px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, border 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.45);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    height: 120px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
}

.category-thumbs img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.category-info {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.category-info strong {
    font-size: 20px;
}

.category-info em {
    color: var(--amber);
    font-style: normal;
    font-weight: 800;
}

.category-info small {
    color: var(--muted);
    line-height: 1.6;
}

.section-more {
    justify-content: center;
    margin-top: 30px;
}

.slim-hero {
    padding: 34px;
}

.slim-hero h1 {
    margin-bottom: 12px;
}

.listing-tools {
    margin-top: 34px;
}

.narrow-search {
    max-width: 520px;
    margin-bottom: 18px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 26px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 15px;
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.filter-chip:hover,
.filter-chip.active {
    color: #ffffff;
    background: var(--amber);
    transform: translateY(-1px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--muted);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(260px, 0.9fr);
    gap: 28px;
    align-items: start;
}

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

.player-card {
    overflow: hidden;
}

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

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 0 26px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), #f97316);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 18px 50px rgba(245, 158, 11, 0.35);
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.player-start:hover {
    transform: translate(-50%, -50%) scale(1.04);
}

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

.player-start-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.player-status {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    min-height: 24px;
    color: #e2e8f0;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.player-caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.player-caption strong {
    color: #ffffff;
}

.detail-copy {
    padding: 28px;
}

.detail-title-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.lead-line {
    color: #dbe4ef;
    font-size: 18px;
    line-height: 1.8;
}

.detail-section {
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-section h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.detail-sidebar {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 92px;
}

.side-card {
    padding: 20px;
}

.poster-card {
    padding: 0;
    overflow: hidden;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: rgba(51, 65, 85, 0.8);
}

.info-list {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px 14px;
    margin: 0;
}

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

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

.related-section {
    margin-top: 64px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 72px 96px 1fr 46px;
    gap: 18px;
    align-items: center;
    min-height: 126px;
    padding: 14px 18px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    transition: transform 0.25s ease, border 0.25s ease;
}

.rank-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.45);
}

.rank-number {
    color: var(--amber);
    font-size: 30px;
    font-weight: 950;
    text-align: center;
}

.rank-poster img {
    width: 96px;
    height: 116px;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(51, 65, 85, 0.8);
}

.rank-info strong,
.rank-info em,
.rank-info small {
    display: block;
}

.rank-info strong {
    font-size: 20px;
}

.rank-info em {
    margin-top: 6px;
    color: var(--amber);
    font-style: normal;
}

.rank-info small {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.6;
}

.rank-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: var(--amber);
    border-radius: 999px;
}

.site-footer {
    background: #0b1120;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-inner {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 46px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--muted);
    line-height: 1.8;
}

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

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

.footer-bottom {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    text-align: center;
}

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

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

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

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

    .nav-toggle {
        display: block;
    }

    .hero-content {
        bottom: 12%;
    }

    .hero-control {
        width: 44px;
        height: 44px;
        font-size: 34px;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

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

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

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

    .detail-sidebar {
        position: static;
        grid-template-columns: minmax(160px, 260px) 1fr;
    }

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

@media (max-width: 720px) {
    .header-inner,
    .page-shell,
    .footer-inner {
        width: min(100% - 32px, 1280px);
        padding-left: 0;
        padding-right: 0;
    }

    .header-inner {
        height: 64px;
    }

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

    .hero-carousel {
        min-height: 640px;
    }

    .hero-content {
        width: calc(100% - 32px);
    }

    .hero-meta {
        gap: 8px;
    }

    .hero-prev {
        left: 10px;
    }

    .hero-next {
        right: 10px;
    }

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

    .category-grid,
    .large-categories {
        grid-template-columns: 1fr;
    }

    .search-results {
        grid-template-columns: 1fr;
    }

    .detail-title-row,
    .player-caption {
        display: grid;
    }

    .detail-copy,
    .slim-hero,
    .search-panel {
        padding: 22px;
    }

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

    .rank-card {
        grid-template-columns: 46px 72px 1fr;
        gap: 12px;
    }

    .rank-play {
        display: none;
    }

    .rank-poster img {
        width: 72px;
        height: 92px;
    }

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