* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --panel-lift: #1e293b;
    --line: rgba(148, 163, 184, 0.2);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --dim: #94a3b8;
    --orange: #f97316;
    --orange-strong: #ea580c;
    --red: #dc2626;
    --yellow: #facc15;
    --radius: 1.25rem;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 36rem), linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 18px;
}

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

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: #fff;
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.35);
    transition: transform 0.25s ease;
}

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

.brand-text {
    font-size: 1.25rem;
    color: #fff;
}

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

.nav-link {
    padding: 9px 13px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(148, 163, 184, 0.14);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    outline: none;
    background: rgba(15, 23, 42, 0.86);
    color: #fff;
    transition: border 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search input {
    width: 230px;
    padding: 10px 13px;
}

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.player-overlay {
    border: 0;
}

.header-search button,
.mobile-search button,
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--orange), var(--red));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 14px 36px rgba(249, 115, 22, 0.28);
    transition: transform 0.25s ease, filter 0.25s ease;
}

.header-search button {
    padding: 10px 15px;
}

.primary-btn {
    padding: 13px 24px;
}

.primary-btn:hover,
.header-search button:hover,
.mobile-search button:hover {
    transform: translateY(-1px) scale(1.02);
    filter: brightness(1.05);
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-weight: 700;
    transition: background 0.25s ease, border 0.25s ease;
}

.secondary-btn:hover {
    border-color: rgba(249, 115, 22, 0.55);
    background: rgba(249, 115, 22, 0.12);
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    font-size: 1.3rem;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 14px 16px 18px;
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 14px;
}

.mobile-search input {
    min-width: 0;
    padding: 11px 13px;
}

.mobile-search button {
    padding: 11px 15px;
}

.mobile-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 700;
}

.mobile-link:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #fff;
}

.mobile-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.mobile-pill,
.hero-pill,
.card-badges span,
.tag-row span,
.meta-chip,
.rank-meta span {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
}

.mobile-pill {
    padding: 6px 10px;
    color: var(--muted);
    font-size: 0.85rem;
}

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

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

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

.hero-image {
    position: absolute;
    inset: 0;
}

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

.hero-image::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.64) 43%, rgba(0, 0, 0, 0.18) 100%), linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.72));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 620px;
}

.hero-copy {
    width: min(680px, 100%);
    padding: 46px 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--orange);
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
}

.hero h1 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(2.35rem, 6vw, 4.6rem);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p {
    width: min(620px, 100%);
    margin: 0 0 26px;
    color: #d1d5db;
    font-size: 1.1rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.hero-pill,
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: #e2e8f0;
    font-size: 0.9rem;
}

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

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    transform: translateY(-50%);
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.08);
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

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

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

.main-wrap {
    padding: 58px 0 72px;
}

.section-stack {
    display: grid;
    gap: 58px;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: #fff;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.section-head h2 {
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.section-head p,
.page-title p,
.detail-title p,
.category-card p,
.site-footer p {
    color: var(--dim);
}

.section-link {
    color: #fb923c;
    font-weight: 800;
}

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

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

.movie-card,
.category-card,
.rank-card,
.info-panel,
.filter-panel,
.player-shell,
.detail-copy,
.search-hero,
.page-title {
    border: 1px solid rgba(148, 163, 184, 0.17);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.9));
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(249, 115, 22, 0.48);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.movie-card.wide .poster-link {
    aspect-ratio: 16 / 10;
}

.poster-link img,
.rank-cover img,
.detail-poster img,
.category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.rank-card:hover .rank-cover img,
.category-card:hover .category-thumb img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.82));
    opacity: 0.88;
}

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.92);
    color: #fff;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translateY(0);
}

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

.card-badges,
.tag-row,
.rank-meta,
.detail-meta,
.breadcrumb,
.page-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-badges span {
    padding: 4px 8px;
    color: #fdba74;
    font-size: 0.75rem;
}

.movie-card h3,
.rank-card h3,
.category-card h3 {
    margin: 0;
    color: #fff;
    font-size: 1.02rem;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover {
    color: #fb923c;
}

.movie-card p,
.rank-card p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--dim);
    font-size: 0.82rem;
}

.tag-row span {
    padding: 4px 8px;
    color: #cbd5e1;
    font-size: 0.74rem;
}

.feature-band {
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(100deg, rgba(30, 41, 59, 0.95), rgba(51, 65, 85, 0.72));
}

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

.rank-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 86px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    transition: transform 0.25s ease, border 0.25s ease;
}

.rank-card:hover {
    border-color: rgba(249, 115, 22, 0.48);
    transform: translateY(-2px);
}

.rank-num {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: #fff;
    font-weight: 900;
}

.rank-cover {
    display: block;
    width: 86px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.rank-card h3 {
    margin-bottom: 5px;
}

.rank-card p {
    min-height: auto;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.rank-meta span {
    padding: 3px 8px;
    color: #cbd5e1;
    font-size: 0.76rem;
}

.page-title,
.search-hero {
    margin-bottom: 28px;
    padding: 34px;
    border-radius: 28px;
}

.page-title h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.page-title p {
    max-width: 760px;
    margin: 12px 0 0;
}

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

.category-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 24px;
    transition: transform 0.25s ease, border 0.25s ease;
}

.category-card:hover {
    border-color: rgba(249, 115, 22, 0.48);
    transform: translateY(-4px);
}

.category-thumb {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 8px;
    height: 168px;
}

.category-thumb a {
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
}

.category-thumb a:first-child {
    grid-row: span 2;
}

.category-card h3 {
    font-size: 1.2rem;
}

.category-card p {
    margin: 0;
}

.category-card .primary-btn {
    padding: 10px 14px;
}

.filter-panel {
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 22px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(150px, 1fr));
    gap: 14px;
    align-items: end;
}

.filter-grid label {
    display: grid;
    gap: 7px;
    color: var(--dim);
    font-size: 0.86rem;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 11px 12px;
}

.filter-status {
    margin-top: 14px;
    color: var(--dim);
}

.filter-status strong {
    color: #fb923c;
}

[data-card].is-hidden {
    display: none;
}

.no-results {
    display: none;
    padding: 30px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 22px;
    color: var(--muted);
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

.breadcrumb {
    margin: 28px auto 18px;
    color: var(--dim);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #fb923c;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    align-items: end;
    margin-bottom: 32px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 28px;
    aspect-ratio: 2 / 3;
    background: #111827;
    box-shadow: var(--shadow);
}

.detail-title h1 {
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 1.05;
}

.detail-title p {
    max-width: 820px;
    margin: 18px 0 24px;
    font-size: 1.05rem;
}

.detail-meta {
    margin-bottom: 24px;
}

.player-shell {
    margin-bottom: 34px;
    padding: 18px;
    border-radius: 28px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.78));
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.03em;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 16px 44px rgba(249, 115, 22, 0.42);
    font-size: 2rem;
}

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

.detail-copy,
.info-panel {
    padding: 24px;
    border-radius: 24px;
}

.detail-copy h2,
.info-panel h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 1.35rem;
}

.detail-copy p {
    margin: 0 0 18px;
    color: #dbeafe;
}

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

.info-row {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    color: var(--muted);
}

.info-row strong {
    color: #fff;
}

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

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.9);
    padding: 42px 0;
}

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

.footer-brand {
    margin-bottom: 10px;
    color: #fff;
    font-size: 1.25rem;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 1rem;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 7px 0;
    color: var(--dim);
}

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

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

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

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

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

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

    .mobile-toggle {
        display: grid;
        place-items: center;
    }

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

    .hero-arrow {
        display: none;
    }

    .rank-list,
    .detail-hero,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(260px, 70vw);
    }
}

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

    .brand-text {
        font-size: 1.06rem;
    }

    .hero,
    .hero-content {
        min-height: 520px;
    }

    .hero-copy {
        padding-top: 34px;
    }

    .main-wrap {
        padding: 38px 0 52px;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

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

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

    .rank-cover {
        width: 72px;
    }

    .page-title,
    .search-hero,
    .feature-band {
        padding: 22px;
        border-radius: 22px;
    }

    .filter-grid .filter-search {
        grid-column: 1 / -1;
    }

    .detail-copy,
    .info-panel,
    .player-shell {
        padding: 16px;
    }
}

@media (max-width: 440px) {
    .movie-grid,
    .movie-grid.small,
    .recommend-row,
    .category-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }
}
