:root {
    --dark-900: #050608;
    --dark-850: #080a0d;
    --dark-800: #0b0d10;
    --dark-700: #101419;
    --dark-650: #141920;
    --dark-600: #151a21;
    --dark-500: #1f2731;
    --text: #f6f7fb;
    --muted: #a5adba;
    --soft: #d4d9e2;
    --primary: #f5871f;
    --primary-2: #d66d0f;
    --line: rgba(255,255,255,.08);
    --shadow: 0 24px 60px rgba(0,0,0,.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--dark-800);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(21,26,33,.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

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

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary);
    box-shadow: 0 10px 24px rgba(245,135,31,.25);
    font-size: 14px;
}

.site-logo strong {
    font-size: 21px;
    letter-spacing: .02em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #c7ced9;
    font-size: 15px;
}

.desktop-nav a,
.mobile-panel a {
    transition: color .2s ease;
}

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

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

.header-search input,
.mobile-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    color: #fff;
    background: var(--dark-700);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.header-search input:focus,
.mobile-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(245,135,31,.75);
    box-shadow: 0 0 0 3px rgba(245,135,31,.12);
}

.header-search button,
.mobile-panel button,
.filter-bar button,
.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    cursor: pointer;
    color: #fff;
    background: var(--primary);
    transition: transform .2s ease, background .2s ease;
}

.header-search button:hover,
.mobile-panel button:hover,
.filter-bar button:hover,
.primary-btn:hover {
    background: var(--primary-2);
    transform: translateY(-1px);
}

.ghost-btn {
    background: rgba(255,255,255,.08);
    border: 1px solid var(--line);
}

.ghost-btn:hover {
    background: rgba(255,255,255,.14);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    color: #fff;
    background: transparent;
    border: 0;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: var(--dark-700);
    padding: 18px 16px 22px;
}

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

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-panel form {
    display: flex;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 560px;
    height: 72vh;
    max-height: 820px;
    overflow: hidden;
    background: var(--dark-900);
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(5,6,8,.96) 0%, rgba(11,13,16,.82) 38%, rgba(11,13,16,.18) 100%);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    z-index: 1;
    height: 45%;
    background: linear-gradient(0deg, var(--dark-800), transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    padding-top: 18px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 14px;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.hero p {
    margin: 0 0 24px;
    color: #d6dce6;
    max-width: 620px;
    font-size: 18px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.tag-row span,
.meta-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #ffd6ac;
    background: rgba(245,135,31,.16);
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: max(16px, calc((100vw - 1180px) / 2));
    bottom: 42px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 99px;
    background: rgba(255,255,255,.28);
    cursor: pointer;
}

.hero-dots button.active {
    background: var(--primary);
}

main {
    min-height: 60vh;
}

.section {
    padding: 72px 0 0;
}

.section:last-child {
    padding-bottom: 72px;
}

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

.section-kicker {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.section h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-head p,
.page-title p,
.category-card p,
.movie-info p,
.detail-copy p,
.review-box p {
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    overflow: hidden;
    background: var(--dark-600);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
    transition: transform .24s ease, border-color .24s ease, background .24s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(245,135,31,.3);
    background: #18202a;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

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

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,.82), rgba(0,0,0,.05) 58%, rgba(0,0,0,.08));
}

.poster-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 34px;
    opacity: 0;
    background: rgba(0,0,0,.22);
    transition: opacity .24s ease;
}

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

.poster-year,
.poster-region,
.rank-num {
    position: absolute;
    border-radius: 8px;
    padding: 4px 8px;
    color: #fff;
    font-size: 12px;
    line-height: 1;
}

.poster-year {
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,.66);
}

.poster-region {
    left: 10px;
    bottom: 10px;
    background: rgba(245,135,31,.94);
}

.rank-num {
    left: 10px;
    top: 10px;
    background: rgba(245,135,31,.94);
    font-style: normal;
    font-weight: 800;
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 17px;
    line-height: 1.35;
}

.movie-info h3 a:hover {
    color: var(--primary);
}

.movie-info p {
    min-height: 45px;
    margin: 0 0 14px;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    padding: 22px;
    min-height: 158px;
    border-radius: 20px;
    background: linear-gradient(145deg, var(--dark-600), var(--dark-700));
    border: 1px solid var(--line);
    transition: transform .22s ease, border-color .22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245,135,31,.36);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    margin: 0 0 16px;
    font-size: 14px;
}

.category-card span {
    color: var(--primary);
}

.rank-list {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 24px;
}

.rank-panel,
.review-box,
.detail-panel,
.player-panel,
.filter-panel {
    background: var(--dark-700);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.rank-panel {
    padding: 20px;
}

.mini-list {
    display: grid;
    gap: 10px;
}

.mini-link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.035);
    transition: background .2s ease, transform .2s ease;
}

.mini-link:hover {
    background: rgba(245,135,31,.12);
    transform: translateX(3px);
}

.mini-link b {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #fff;
    background: var(--primary);
    border-radius: 9px;
}

.mini-link em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.page-title {
    padding: 56px 0 26px;
}

.page-title p {
    max-width: 780px;
    margin: 14px 0 0;
}

.filter-panel {
    padding: 18px;
    margin: 12px 0 30px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.5fr .7fr .7fr auto;
    gap: 12px;
}

.empty-state {
    display: none;
    color: var(--muted);
    padding: 30px;
    text-align: center;
    background: var(--dark-700);
    border-radius: 18px;
}

.detail-hero {
    padding: 42px 0 26px;
    background: radial-gradient(circle at 70% 0%, rgba(245,135,31,.13), transparent 35%), var(--dark-800);
}

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

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

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

.player-panel {
    overflow: hidden;
}

.video-wrap {
    position: relative;
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0,0,0,.25), rgba(0,0,0,.72));
    cursor: pointer;
    z-index: 2;
}

.play-layer.hidden {
    display: none;
}

.play-layer span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 18px 42px rgba(245,135,31,.36);
    font-size: 30px;
    padding-left: 4px;
}

.detail-copy {
    padding: 24px;
}

.detail-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-copy h2,
.review-box h2,
.detail-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.review-box,
.detail-panel {
    padding: 22px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 20px;
    background: var(--dark-600);
    border: 1px solid var(--line);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--dark-900);
    padding: 34px 0;
    color: var(--muted);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

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

.footer-inner p {
    margin: 8px 0 0;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 14px 20px;
}

.footer-inner a:hover {
    color: var(--primary);
}

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

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

    .menu-toggle {
        display: block;
    }

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

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

    .detail-cover {
        max-width: 360px;
    }
}

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

    .site-logo strong {
        font-size: 18px;
    }

    .hero {
        min-height: 620px;
        height: auto;
    }

    .hero-content {
        align-items: flex-end;
        padding: 110px 0 90px;
    }

    .hero-slide::before {
        background: linear-gradient(0deg, rgba(5,6,8,.98) 0%, rgba(11,13,16,.82) 52%, rgba(11,13,16,.2) 100%);
    }

    .grid.cols-2,
    .grid.cols-3,
    .grid.cols-4,
    .category-strip,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .section {
        padding-top: 48px;
    }

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

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

    .mini-link {
        grid-template-columns: auto 1fr;
    }

    .mini-link em {
        grid-column: 2;
    }
}

@media (max-width: 480px) {
    .grid.cols-2,
    .grid.cols-3,
    .grid.cols-4,
    .category-strip,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .movie-info p {
        min-height: 0;
    }

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

    .primary-btn,
    .ghost-btn {
        text-align: center;
    }
}
