:root {
    color-scheme: dark;
    --bg-deep: #030712;
    --bg-main: #0f172a;
    --bg-card: #111827;
    --bg-card-soft: rgba(17, 24, 39, 0.84);
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(249, 115, 22, 0.45);
    --text: #ffffff;
    --muted: #d1d5db;
    --muted-dark: #9ca3af;
    --accent: #f97316;
    --accent-hover: #ea580c;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --container: min(1280px, calc(100% - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg-deep);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.16), transparent 32rem),
        linear-gradient(180deg, #030712 0%, #111827 42%, #030712 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(3, 7, 18, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: var(--container);
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.36);
    font-size: 15px;
}

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

.desktop-nav a,
.mobile-nav a {
    color: var(--muted);
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
    color: var(--accent);
}

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

.nav-search input,
.filter-toolbar input,
.filter-toolbar select {
    border: 1px solid var(--border);
    background: rgba(17, 24, 39, 0.92);
    color: var(--text);
    border-radius: 12px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 220px;
    padding: 10px 14px;
}

.nav-search button {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text);
    background: var(--accent);
}

.nav-search input:focus,
.filter-toolbar input:focus,
.filter-toolbar select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-radius: 12px;
    padding: 9px 12px;
}

.mobile-nav {
    display: none;
    width: var(--container);
    margin: 0 auto;
    padding: 0 0 18px;
    gap: 14px;
    flex-direction: column;
}

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

.mobile-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 8px;
}

.mobile-category-links a {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

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

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: -22px;
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.35);
    transform: scale(1.06);
}

.hero-gradient,
.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 40%, rgba(249, 115, 22, 0.22), transparent 28rem),
        linear-gradient(90deg, rgba(3, 7, 18, 0.94), rgba(3, 7, 18, 0.62) 52%, rgba(3, 7, 18, 0.94)),
        linear-gradient(180deg, rgba(3, 7, 18, 0.25), #030712 98%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: var(--container);
    min-height: 100vh;
    margin: 0 auto;
    padding: 112px 0 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    align-items: center;
    gap: 56px;
}

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

.eyebrow,
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(42px, 8vw, 86px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 720px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: clamp(18px, 2.2vw, 26px);
    line-height: 1.65;
}

.hero-tags {
    margin-top: 24px;
}

.hero-actions,
.detail-copy .primary-button {
    margin-top: 32px;
}

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 13px 22px;
    font-weight: 750;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-button {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.28);
}

.primary-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.ghost-button,
.section-more {
    margin-left: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.ghost-button:hover,
.section-more:hover {
    border-color: var(--border-strong);
    background: rgba(249, 115, 22, 0.12);
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.74));
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 38px;
    line-height: 1;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

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

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

.content-section {
    width: var(--container);
    margin: 0 auto;
    padding: 64px 0;
}

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

.section-heading h2,
.ranking-panel h2,
.text-card h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.08;
}

.section-heading p,
.page-hero p,
.text-card p,
.site-footer p {
    margin: 12px 0 0;
    color: var(--muted-dark);
    line-height: 1.8;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(17, 24, 39, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    background: rgba(17, 24, 39, 0.96);
}

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

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

.movie-card:hover .poster-link img {
    transform: scale(1.06);
    filter: brightness(0.86);
}

.type-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
}

.type-badge {
    left: 10px;
}

.rank-badge {
    right: 10px;
    background: rgba(249, 115, 22, 0.9);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.92);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-body {
    padding: 15px;
}

.card-body h3 {
    min-height: 2.8em;
    margin: 0;
    font-size: 17px;
    line-height: 1.38;
}

.card-body h3 a:hover {
    color: var(--accent);
}

.card-meta,
.card-line {
    margin: 8px 0 0;
    color: var(--muted-dark);
    font-size: 13px;
    line-height: 1.5;
}

.card-line {
    display: -webkit-box;
    overflow: hidden;
    min-height: 3em;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-body .tag-row {
    margin-top: 12px;
}

.tag-row span {
    border: 1px solid rgba(249, 115, 22, 0.28);
    border-radius: 999px;
    padding: 4px 8px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.08);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    isolation: isolate;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent 0%, rgba(3, 7, 18, 0.92) 70%);
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile span {
    font-size: 22px;
    font-weight: 850;
}

.category-tile strong {
    margin-top: 6px;
    color: var(--accent);
}

.category-tile em {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    font-style: normal;
}

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

.ranking-panel {
    position: sticky;
    top: 96px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    background: rgba(17, 24, 39, 0.82);
    box-shadow: var(--shadow);
}

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

.ranking-panel-head a {
    color: var(--accent);
    font-weight: 750;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 34px 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.ranking-row:hover {
    background: rgba(249, 115, 22, 0.12);
}

.ranking-row span {
    color: var(--accent);
    font-weight: 900;
}

.ranking-row img {
    width: 54px;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    object-fit: cover;
}

.ranking-row strong,
.ranking-row em {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-row em {
    grid-column: 3;
    color: var(--muted-dark);
    font-size: 12px;
    font-style: normal;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
}

.page-hero {
    width: var(--container);
    margin: 0 auto;
    padding: 96px 0 24px;
}

.page-hero h1 {
    max-width: 900px;
}

.page-hero p {
    max-width: 780px;
    font-size: 18px;
}

.filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(17, 24, 39, 0.72);
}

.filter-toolbar input {
    flex: 1 1 280px;
    padding: 12px 14px;
}

.filter-toolbar select {
    padding: 12px 14px;
}

.result-count {
    margin-left: auto;
    color: var(--muted);
}

.result-count strong {
    color: var(--accent);
}

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

.overview-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    background: rgba(17, 24, 39, 0.76);
}

.overview-cover img {
    width: 150px;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    object-fit: cover;
}

.overview-card h2 {
    margin: 0;
}

.overview-card p {
    color: var(--muted);
    line-height: 1.7;
}

.overview-card strong {
    color: var(--accent);
}

.overview-card ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 14px;
}

.overview-card a:hover {
    color: var(--accent);
}

.movie-card-compact .card-body h3 {
    min-height: auto;
}

.detail-hero {
    min-height: 680px;
    background: #020617;
}

.detail-content {
    position: relative;
    z-index: 2;
    width: var(--container);
    margin: 0 auto;
    padding: 108px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
    color: var(--muted);
    font-size: 14px;
}

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

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

.detail-poster {
    width: 300px;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.detail-copy {
    max-width: 860px;
}

.detail-copy h1 {
    font-size: clamp(40px, 7vw, 76px);
}

.detail-line {
    max-width: 780px;
    margin: 24px 0;
    color: var(--muted);
    font-size: 22px;
    line-height: 1.75;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #000;
    box-shadow: var(--shadow);
}

.video-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.24), rgba(0, 0, 0, 0.62));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.video-play-overlay span {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 18px 44px rgba(249, 115, 22, 0.36);
    font-size: 30px;
}

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

.video-shell.is-playing .video-play-overlay {
    opacity: 0;
    visibility: hidden;
}

.player-status {
    position: absolute;
    left: 16px;
    bottom: 14px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.62);
    font-size: 13px;
}

.detail-text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 360px;
    gap: 22px;
    align-items: start;
}

.text-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    background: rgba(17, 24, 39, 0.78);
}

.text-card p {
    color: var(--muted);
    font-size: 16px;
}

.meta-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px 16px;
    margin: 18px 0 0;
}

.meta-card dt {
    color: var(--muted-dark);
}

.meta-card dd {
    margin: 0;
    color: var(--text);
}

.meta-card a {
    color: var(--accent);
}

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

.footer-inner {
    width: var(--container);
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 36px;
}

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

.footer-links a {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
}

.footer-links a:hover {
    border-color: var(--border-strong);
    color: var(--accent);
}

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

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

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

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

    .ranking-panel {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: inline-flex;
    }

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

    .hero-content {
        padding-top: 96px;
        gap: 28px;
    }

    .hero-poster,
    .detail-poster,
    .overview-cover img {
        width: min(100%, 320px);
        transform: none;
    }

    .hero-control {
        display: none;
    }

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

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

    .detail-line {
        font-size: 18px;
    }

    .filter-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-toolbar input,
    .filter-toolbar select {
        width: 100%;
    }

    .result-count {
        margin-left: 0;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    :root {
        --container: min(100% - 24px, 1280px);
    }

    .header-inner {
        min-height: 64px;
    }

    .logo {
        font-size: 18px;
    }

    .logo-icon {
        width: 34px;
        height: 34px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        letter-spacing: -0.035em;
    }

    .hero-copy p,
    .page-hero p {
        font-size: 16px;
    }

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

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

    .card-body h3 {
        min-height: auto;
    }

    .page-hero {
        padding-top: 72px;
    }
}

.plain-link-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.plain-link-list a {
    color: var(--muted);
}

.plain-link-list a:hover {
    color: var(--accent);
}

@media (max-width: 860px) {
    .plain-link-list {
        grid-template-columns: 1fr;
    }
}
