:root {
    color-scheme: dark;
    --bg: #030712;
    --bg-soft: #0b1120;
    --bg-card: rgba(17, 24, 39, 0.82);
    --bg-card-solid: #111827;
    --line: rgba(75, 85, 99, 0.5);
    --text: #f9fafb;
    --muted: #9ca3af;
    --muted-strong: #d1d5db;
    --orange: #f97316;
    --orange-soft: rgba(249, 115, 22, 0.18);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    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.12), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.menu-open {
    overflow: hidden;
}

img {
    background: linear-gradient(145deg, rgba(249, 115, 22, 0.24), rgba(17, 24, 39, 0.88));
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    padding-top: 4rem;
}

.site-nav {
    position: fixed;
    z-index: 50;
    top: 0;
    left: 0;
    right: 0;
    border-bottom: 1px solid rgba(31, 41, 55, 0.92);
    background: rgba(3, 7, 18, 0.92);
    backdrop-filter: blur(14px);
}

.nav-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    color: white;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 0.85rem;
    color: white;
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.nav-link {
    font-size: 0.92rem;
    color: #d1d5db;
    transition: color 0.2s ease;
}

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

.nav-search {
    position: relative;
    width: 18rem;
}

.nav-search input,
.search-panel input,
.filter-field input,
.filter-field select {
    width: 100%;
    border: 1px solid #374151;
    border-radius: 0.85rem;
    background: rgba(17, 24, 39, 0.9);
    color: white;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    padding: 0.62rem 0.9rem 0.62rem 2.4rem;
}

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

.search-icon {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    transform: translateY(-50%);
    color: #9ca3af;
}

.mobile-toggle {
    display: none;
    color: white;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
}

.mobile-menu {
    display: none;
    border-top: 1px solid rgba(55, 65, 81, 0.75);
    padding: 0.75rem 1rem 1rem;
    background: rgba(3, 7, 18, 0.98);
}

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

.mobile-menu .nav-link {
    display: block;
    padding: 0.8rem 0.75rem;
    border-radius: 0.85rem;
}

.mobile-menu .nav-link:hover,
.mobile-menu .nav-link.is-active {
    background: rgba(249, 115, 22, 0.15);
}

.container {
    width: min(100% - 2rem, 80rem);
    margin: 0 auto;
}

.hero-carousel {
    position: relative;
    min-height: calc(100vh - 4rem);
    overflow: hidden;
    border-bottom: 1px solid rgba(31, 41, 55, 0.7);
    background: #050816;
}

.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-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-bg-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.72) 46%, rgba(3, 7, 18, 0.42) 100%),
        linear-gradient(0deg, rgba(3, 7, 18, 1) 0%, rgba(3, 7, 18, 0.12) 55%, rgba(3, 7, 18, 0.75) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 4rem);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.65fr);
    align-items: center;
    gap: 3rem;
    padding: 5rem 0 4rem;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(249, 115, 22, 0.28);
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
    color: #fed7aa;
    padding: 0.4rem 0.75rem;
    font-size: 0.86rem;
    font-weight: 700;
}

.hero-title {
    margin-top: 1.25rem;
    font-size: clamp(2.6rem, 8vw, 5.8rem);
    line-height: 0.96;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-desc {
    max-width: 48rem;
    margin-top: 1.4rem;
    color: #d1d5db;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    line-height: 1.85;
}

.hero-meta,
.movie-meta,
.card-meta,
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.hero-meta {
    margin-top: 1.5rem;
}

.meta-pill,
.tag,
.rank-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.32rem 0.65rem;
    background: rgba(17, 24, 39, 0.78);
    color: #e5e7eb;
    border: 1px solid rgba(75, 85, 99, 0.55);
    font-size: 0.8rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    border-radius: 0.95rem;
    padding: 0 1.15rem;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
    color: white;
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.24);
}

.btn-ghost {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.hero-poster-card {
    position: relative;
    max-width: 24rem;
    justify-self: end;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.7rem;
    background: rgba(17, 24, 39, 0.58);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.hero-poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 1.25rem;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.hero-control,
.hero-dot {
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: white;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(10px);
}

.hero-control {
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 999px;
    font-size: 1.2rem;
}

.hero-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    opacity: 0.55;
}

.hero-dot.is-active {
    width: 1.8rem;
    background: var(--orange);
    opacity: 1;
}

.section {
    padding: 4.5rem 0;
}

.section-muted {
    background: linear-gradient(90deg, rgba(124, 45, 18, 0.22), rgba(17, 24, 39, 0.35));
    border-top: 1px solid rgba(31, 41, 55, 0.6);
    border-bottom: 1px solid rgba(31, 41, 55, 0.6);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.section-title {
    margin-top: 0.75rem;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-desc {
    max-width: 48rem;
    margin-top: 0.75rem;
    color: var(--muted);
    line-height: 1.8;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.1rem;
}

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

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(249, 115, 22, 0.22), rgba(17, 24, 39, 0.9));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}

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

.poster-frame::after {
    content: attr(data-title);
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.2rem 0.65rem 0.65rem;
    color: white;
    font-weight: 800;
    font-size: 0.88rem;
    line-height: 1.35;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.poster-frame.image-error::after,
.movie-card:hover .poster-frame::after {
    opacity: 1;
}

.poster-frame.image-error {
    display: flex;
    align-items: end;
}

.movie-card:hover img {
    transform: scale(1.055);
}

.poster-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: white;
    background: rgba(0, 0, 0, 0.36);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-overlay {
    opacity: 1;
}

.play-symbol {
    width: 2.8rem;
    height: 2.8rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.92);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

.corner-badge {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    z-index: 2;
    max-width: calc(100% - 1.1rem);
    padding: 0.25rem 0.52rem;
    border-radius: 0.55rem;
    color: white;
    background: rgba(249, 115, 22, 0.95);
    font-size: 0.72rem;
    font-weight: 800;
}

.movie-card-title {
    margin-top: 0.72rem;
    color: white;
    font-weight: 800;
    font-size: 0.96rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card:hover .movie-card-title {
    color: #fb923c;
}

.card-meta {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.card-line {
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 12rem;
    border: 1px solid rgba(75, 85, 99, 0.45);
    border-radius: 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(145deg, rgba(31, 41, 55, 0.86), rgba(3, 7, 18, 0.88));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.24;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card:hover img {
    transform: scale(1.06);
    opacity: 0.34;
}

.category-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 9.5rem;
    flex-direction: column;
    justify-content: end;
}

.category-card h2,
.category-card h3 {
    font-size: 1.5rem;
    font-weight: 900;
}

.category-card p {
    margin-top: 0.45rem;
    color: var(--muted-strong);
    line-height: 1.7;
}

.page-hero {
    padding: 6rem 0 3.5rem;
    background:
        linear-gradient(180deg, rgba(3, 7, 18, 0.2), var(--bg)),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 24rem);
}

.breadcrumb {
    margin-bottom: 1.2rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.breadcrumb a:hover {
    color: var(--orange);
}

.page-title {
    max-width: 62rem;
    font-size: clamp(2rem, 6vw, 4.4rem);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.page-desc {
    max-width: 56rem;
    margin-top: 1.1rem;
    color: var(--muted-strong);
    font-size: 1.05rem;
    line-height: 1.9;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 12rem 12rem;
    gap: 0.85rem;
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid rgba(75, 85, 99, 0.45);
    border-radius: 1.2rem;
    background: rgba(17, 24, 39, 0.66);
    backdrop-filter: blur(10px);
}

.filter-field input,
.filter-field select,
.search-panel input {
    min-height: 3rem;
    padding: 0 0.9rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(17rem, 0.78fr);
    gap: 2rem;
    align-items: start;
}

.video-shell {
    border: 1px solid rgba(75, 85, 99, 0.46);
    border-radius: 1.35rem;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.76);
    box-shadow: var(--shadow);
}

.video-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 1rem;
    background: #000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
    color: white;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.58));
}

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

.video-player .play-icon {
    width: 4.5rem;
    height: 4.5rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.32);
    font-size: 2rem;
}

.player-status {
    position: absolute;
    z-index: 4;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    color: #fed7aa;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.info-card,
.content-card,
.rank-card,
.search-panel {
    border: 1px solid rgba(75, 85, 99, 0.45);
    border-radius: 1.25rem;
    background: rgba(17, 24, 39, 0.72);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.info-card,
.content-card,
.search-panel {
    padding: 1.25rem;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 1rem;
    object-fit: cover;
}

.info-list {
    margin-top: 1rem;
    display: grid;
    gap: 0.72rem;
    color: var(--muted-strong);
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.28);
    padding-bottom: 0.72rem;
}

.info-list span:first-child {
    color: var(--muted);
}

.content-card {
    margin-top: 1.4rem;
}

.content-card h2 {
    margin-bottom: 0.75rem;
    font-size: 1.45rem;
    font-weight: 900;
}

.content-card p {
    color: var(--muted-strong);
    line-height: 1.95;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.rank-list {
    display: grid;
    gap: 0.9rem;
}

.rank-card {
    display: grid;
    grid-template-columns: 4rem 6rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-number {
    font-size: 1.35rem;
    font-weight: 900;
    color: #fb923c;
    text-align: center;
}

.rank-card img {
    width: 5.4rem;
    aspect-ratio: 3 / 4;
    border-radius: 0.8rem;
    object-fit: cover;
}

.rank-card h2,
.rank-card h3 {
    font-size: 1.1rem;
    font-weight: 900;
}

.rank-card p {
    margin-top: 0.35rem;
    color: var(--muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-results {
    margin-top: 2rem;
}

.empty-state {
    display: none;
    padding: 2rem;
    color: var(--muted);
    text-align: center;
    border: 1px dashed rgba(75, 85, 99, 0.55);
    border-radius: 1.2rem;
}

.site-footer {
    margin-top: 4rem;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    background: rgba(3, 7, 18, 0.86);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem;
    padding: 3rem 0 2rem;
}

.footer-title {
    margin-bottom: 0.85rem;
    color: white;
    font-weight: 900;
}

.footer-text,
.footer-list a,
.footer-bottom {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.8;
}

.footer-list {
    display: grid;
    gap: 0.55rem;
}

.footer-list a:hover {
    color: var(--orange);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 0 2rem;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
}

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

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

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

    .mobile-toggle {
        display: inline-flex;
    }

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

    .hero-poster-card {
        justify-self: start;
        width: min(100%, 18rem);
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 3rem 4.5rem minmax(0, 1fr);
    }

    .rank-card .rank-pill {
        display: none;
    }

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

@media (max-width: 640px) {
    .container {
        width: min(100% - 1rem, 80rem);
    }

    .hero-content {
        padding-top: 3rem;
        gap: 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .section {
        padding: 3rem 0;
    }

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

    .grid-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

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

    .page-hero {
        padding-top: 4rem;
    }

    .rank-card {
        grid-template-columns: 2.6rem 4rem minmax(0, 1fr);
        gap: 0.7rem;
    }

    .footer-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}
