:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --card: rgba(15, 23, 42, 0.86);
    --card-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --orange: #f97316;
    --red: #dc2626;
    --amber: #f59e0b;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 5%, rgba(249, 115, 22, 0.18), transparent 26rem),
        radial-gradient(circle at 80% 0, rgba(220, 38, 38, 0.15), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.nav-shell {
    width: min(1220px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.brand-text {
    white-space: nowrap;
    font-size: 18px;
}

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

.nav-link {
    color: var(--soft);
    padding: 9px 13px;
    border-radius: 999px;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(249, 115, 22, 0.16);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.5);
}

.nav-search input,
.big-search input,
.filter-bar input {
    width: 220px;
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
    padding: 8px 12px;
}

.nav-search button,
.big-search button,
.primary-btn,
.ghost-btn,
.section-more,
.filter-buttons button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-search button,
.big-search button,
.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.22);
}

.nav-search button {
    padding: 8px 13px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.75);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #fff;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
}

.mobile-panel a,
.mobile-panel form {
    display: flex;
    align-items: center;
    min-height: 42px;
    color: var(--soft);
}

.mobile-panel input {
    flex: 1;
    min-width: 0;
    color: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.56);
    padding: 10px 12px;
}

.mobile-panel button {
    margin-left: 8px;
    color: #fff;
    border: 0;
    border-radius: 999px;
    background: var(--orange);
    padding: 10px 15px;
}

body.menu-open .mobile-panel {
    display: block;
}

main {
    padding-top: 68px;
}

.hero-slider {
    position: relative;
    min-height: 720px;
    overflow: hidden;
}

.hero-stage,
.hero-slide,
.hero-backdrop {
    position: absolute;
    inset: 0;
}

.hero-slide {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.56fr);
    align-items: center;
    gap: 48px;
    width: 100%;
    padding: 80px max(24px, calc((100% - 1220px) / 2)) 66px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.025);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-backdrop {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 46%, rgba(2, 6, 23, 0.36) 100%),
        linear-gradient(180deg, transparent 0%, #020617 100%),
        var(--hero-image) center / cover no-repeat;
    filter: saturate(1.12);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-kicker,
.quick-copy p,
.section-heading p,
.rank-copy p,
.page-hero p,
.category-block-head p,
.detail-copy > p {
    margin: 0 0 10px;
    color: var(--orange);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 720px;
    margin: 24px 0 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.detail-meta,
.tag-cloud,
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.tag-cloud span,
.breadcrumb a,
.breadcrumb strong {
    color: var(--soft);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    padding: 7px 12px;
}

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

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    font-weight: 800;
}

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

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.movie-card:hover,
.category-tile:hover,
.compact-card:hover,
.rank-row:hover {
    transform: translateY(-3px);
}

.hero-poster {
    align-self: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.1;
    object-fit: cover;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(8px);
    transform: translateY(-50%);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

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

.hero-dot.is-active {
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.quick-panel,
.content-section,
.rank-section,
.category-block,
.filter-bar,
.ranking-list,
.detail-grid,
.player-section {
    width: min(1220px, calc(100% - 32px));
    margin: 34px auto;
}

.quick-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 480px);
    gap: 26px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(127, 29, 29, 0.34));
    box-shadow: var(--shadow);
}

.quick-copy h2,
.section-heading h2,
.rank-copy h2,
.page-hero h1,
.category-block-head h2,
.detail-article h2,
.detail-side h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 42px);
    letter-spacing: -0.03em;
}

.quick-copy span,
.category-block-head span,
.page-hero span,
.rank-copy span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.8;
}

.big-search {
    display: flex;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.54);
}

.big-search input {
    flex: 1;
    width: auto;
    min-width: 0;
    padding: 13px 16px;
}

.big-search button {
    padding: 0 22px;
}

.section-heading,
.category-block-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 22px;
}

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

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

.movie-card,
.category-tile,
.compact-card,
.rank-row,
.detail-article,
.detail-side,
.video-frame {
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
    transition: 0.22s ease;
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
}

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

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 2.85;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.compact-card:hover img,
.rank-cover:hover img {
    transform: scale(1.06);
}

.play-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    color: #fff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 800;
}

.movie-info {
    padding: 16px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: rgba(148, 163, 184, 0.45);
}

.movie-info h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-info h3 a:hover,
.rank-title:hover strong {
    color: var(--orange);
}

.movie-info p {
    min-height: 45px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.tag-cloud span {
    padding: 5px 8px;
    font-size: 12px;
}

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

.category-tile {
    display: block;
    min-height: 190px;
    padding: 22px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 9rem),
        rgba(15, 23, 42, 0.8);
}

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

.category-tile p {
    color: var(--muted);
    line-height: 1.7;
}

.category-tile div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-tile div span {
    color: var(--soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    padding: 5px 8px;
    font-size: 12px;
}

.rank-section {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
    gap: 24px;
    align-items: stretch;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(69, 10, 10, 0.32));
}

.rank-copy .primary-btn {
    margin-top: 22px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-list a {
    display: grid;
    grid-template-columns: 50px 1fr 54px;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-num,
.rank-index {
    color: var(--amber);
    font-weight: 900;
}

.rank-list em,
.rank-stats span {
    color: #fff;
    font-style: normal;
    font-weight: 900;
}

.page-shell,
.movie-detail-shell {
    padding-top: 92px;
}

.page-hero {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 34px;
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 90% 0, rgba(249, 115, 22, 0.22), transparent 18rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.78));
    box-shadow: var(--shadow);
}

.breadcrumb {
    margin-top: 22px;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.86);
}

.filter-bar input {
    flex: 1;
    width: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.52);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-buttons button {
    color: var(--soft);
    border: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.38);
    padding: 9px 13px;
}

.filter-buttons button.active,
.filter-buttons button:hover {
    color: #fff;
    border-color: rgba(249, 115, 22, 0.45);
    background: rgba(249, 115, 22, 0.18);
}

.flat-section {
    margin-top: 22px;
}

.search-empty {
    display: none;
    margin-top: 24px;
    color: var(--soft);
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    padding: 24px;
}

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

.compact-card {
    overflow: hidden;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
}

.compact-card img {
    width: 100%;
    aspect-ratio: 2 / 2.7;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.compact-card span {
    display: block;
    padding: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 700;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 82px 1fr 120px;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 20px;
}

.rank-cover {
    overflow: hidden;
    border-radius: 14px;
}

.rank-cover img {
    width: 82px;
    aspect-ratio: 2 / 2.7;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rank-title {
    display: grid;
    gap: 5px;
}

.rank-title strong {
    font-size: 18px;
}

.rank-title em,
.rank-stats small {
    color: var(--muted);
    font-style: normal;
    line-height: 1.5;
}

.rank-stats {
    display: grid;
    gap: 4px;
    justify-items: end;
}

.detail-hero {
    position: relative;
    min-height: 640px;
    padding: 42px max(24px, calc((100% - 1220px) / 2)) 46px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0.44)),
        var(--detail-image) center / cover no-repeat;
}

.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), #020617);
}

.detail-breadcrumb,
.detail-head {
    position: relative;
    z-index: 2;
}

.detail-head {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 42px;
    align-items: end;
    margin-top: 54px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 2.85;
    object-fit: cover;
}

.detail-copy h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-meta {
    margin: 20px 0 16px;
}

.detail-tags {
    margin-bottom: 20px;
}

.detail-line {
    max-width: 800px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.85;
}

.player-section {
    margin-top: -86px;
    position: relative;
    z-index: 5;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    border: 0;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.16), rgba(2, 6, 23, 0.68));
    cursor: pointer;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 46px rgba(249, 115, 22, 0.35);
    font-size: 36px;
}

.play-overlay.is-hidden {
    display: none;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
}

.detail-article,
.detail-side {
    border-radius: 24px;
    padding: 26px;
}

.detail-article p {
    color: var(--soft);
    font-size: 16px;
    line-height: 1.92;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 14px 16px;
    margin: 22px 0 0;
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    color: #fff;
}

.related-section {
    padding-bottom: 20px;
}

.site-footer {
    margin-top: 58px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.68);
}

.footer-inner {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 0;
}

.footer-brand {
    color: #fff;
    font-size: 20px;
}

.footer-inner p,
.footer-links {
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    text-align: right;
}

.is-filtered-out {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-slide,
    .detail-head,
    .quick-panel,
    .rank-section,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        max-width: 360px;
    }

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

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

@media (max-width: 760px) {
    .nav-shell {
        width: min(100% - 24px, 1220px);
    }

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

    .hero-slider {
        min-height: 780px;
    }

    .hero-slide {
        gap: 28px;
        padding: 62px 18px 72px;
    }

    .hero-content p,
    .detail-line {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-panel,
    .content-section,
    .rank-section,
    .category-block,
    .filter-bar,
    .ranking-list,
    .detail-grid,
    .player-section,
    .page-hero {
        width: calc(100% - 24px);
    }

    .quick-panel,
    .page-hero,
    .rank-section {
        padding: 22px;
    }

    .section-heading,
    .category-block-head,
    .filter-bar,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .big-search {
        border-radius: 22px;
        flex-direction: column;
    }

    .big-search button {
        min-height: 44px;
    }

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

    .movie-info {
        padding: 13px;
    }

    .rank-row {
        grid-template-columns: 64px 1fr;
    }

    .rank-cover img {
        width: 64px;
    }

    .rank-stats {
        grid-column: 2;
        justify-items: start;
    }

    .detail-hero {
        min-height: auto;
        padding: 28px 16px 118px;
    }

    .detail-head {
        margin-top: 32px;
    }

    .player-section {
        margin-top: -74px;
    }

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

    .footer-links {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .category-grid,
    .full-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        max-width: 260px;
    }
}
