*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(30, 41, 59, 0.68);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --green: #10b981;
    --green-dark: #059669;
    --yellow: #facc15;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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

img {
    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: 80;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #00140f;
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.28);
}

.brand-text {
    font-size: 1.25rem;
    color: var(--text);
    white-space: nowrap;
}

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

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(16, 185, 129, 0.16);
}

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--line);
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.78);
    border-radius: 999px;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.header-search button,
.mobile-search button {
    border: 0;
    color: #00140f;
    background: var(--green);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
}

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

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
    border-radius: 4px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
    background: rgba(2, 6, 23, 0.96);
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.6);
}

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

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

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

.hero-slide img,
.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.62) 44%, rgba(0, 0, 0, 0.14) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.24) 42%, rgba(2, 6, 23, 0.08) 100%);
}

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

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

.hero-eyebrow,
.page-kicker,
.section-kicker {
    margin: 0 0 12px;
    color: #6ee7b7;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.hero-desc {
    max-width: 620px;
    margin: 22px 0 0;
    color: #e2e8f0;
    font-size: clamp(1rem, 2vw, 1.22rem);
}

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

.hero-tags {
    margin: 28px 0 0;
}

.hero-tags span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.26);
    border-radius: 999px;
    font-size: 0.88rem;
}

.hero-actions,
.detail-copy .primary-btn {
    margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.section-link,
.category-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-btn {
    color: #00140f;
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 18px 42px rgba(16, 185, 129, 0.28);
}

.ghost-btn,
.section-link {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.category-card:hover .category-more {
    transform: translateY(-2px);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.76);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

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

main {
    position: relative;
    z-index: 1;
}

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

.section-stack {
    display: grid;
    gap: 34px;
    padding: 18px 0 40px;
}

.soft-panel {
    padding: 34px;
    background: rgba(30, 41, 59, 0.32);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-block h2,
.detail-side h2 {
    margin: 0;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.section-heading h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.86));
    transition: opacity 0.25s ease;
}

.poster-play,
.play-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    color: #fff;
    background: rgba(16, 185, 129, 0.86);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-score {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--yellow);
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(10px);
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-card:hover .poster-link img,
.movie-card-wide:hover .wide-thumb img,
.category-card:hover {
    transform: scale(1.06);
}

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play,
.movie-card-wide:hover .play-glow {
    opacity: 1;
}

.movie-card:hover .poster-play,
.movie-card-wide:hover .play-glow {
    transform: translate(-50%, -50%) scale(1);
}

.movie-card h3 {
    margin: 12px 0 5px;
    font-size: 1rem;
    line-height: 1.35;
}

.movie-card h3 a,
.movie-title {
    color: var(--text);
    transition: color 0.2s ease;
}

.movie-card h3 a:hover,
.movie-title:hover {
    color: #6ee7b7;
}

.movie-card p,
.wide-body p,
.page-hero p,
.detail-block p,
.detail-one-line,
.site-footer p {
    color: var(--muted-strong);
}

.movie-card p {
    min-height: 46px;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

.movie-meta {
    gap: 6px;
    color: var(--muted);
    font-size: 0.78rem;
}

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

.ranking-section {
    padding-top: 50px;
}

.ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.full-ranking {
    grid-template-columns: 1fr;
}

.ranking-list li {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    align-items: center;
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    color: #00140f;
    background: linear-gradient(135deg, #facc15, #34d399);
    font-weight: 900;
}

.movie-card-wide {
    display: flex;
    gap: 16px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.54);
    transition: background 0.2s ease, transform 0.2s ease;
}

.movie-card-wide:hover {
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-2px);
}

.wide-thumb {
    position: relative;
    width: 150px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    flex: 0 0 auto;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
}

.wide-body {
    min-width: 0;
    padding: 6px 4px 4px 0;
}

.wide-body p {
    margin: 8px 0;
    font-size: 0.92rem;
}

.movie-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.page-hero {
    padding: 76px 0 28px;
}

.page-hero h1 {
    max-width: 860px;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.page-hero p:last-child {
    max-width: 760px;
    margin: 18px 0 0;
    font-size: 1.08rem;
}

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

.category-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.13), rgba(59, 130, 246, 0.08)),
        rgba(30, 41, 59, 0.5);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border 0.25s ease;
}

.category-card a {
    display: block;
    min-height: 210px;
    padding: 28px;
}

.category-card p {
    margin: 0 0 12px;
    color: #6ee7b7;
    font-weight: 900;
}

.category-card h2 {
    min-height: 58px;
    margin: 0 0 20px;
    font-size: 1.2rem;
    color: #e2e8f0;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.category-samples span {
    padding: 4px 9px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.76);
    border-radius: 999px;
    font-size: 0.82rem;
}

.category-more {
    min-height: 38px;
    color: #00140f;
    background: var(--green);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px 180px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    padding: 70px 0;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    filter: blur(18px);
    transform: scale(1.05);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.84) 48%, rgba(2, 6, 23, 0.62) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 100%);
}

.detail-wrap {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    background: rgba(30, 41, 59, 0.7);
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
}

.breadcrumb a:hover {
    color: #6ee7b7;
}

.detail-copy h1 {
    font-size: clamp(2.3rem, 5vw, 4.8rem);
}

.detail-one-line {
    max-width: 760px;
    margin: 18px 0 0;
    font-size: 1.12rem;
}

.detail-meta {
    margin: 22px 0;
    color: var(--muted-strong);
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.7);
}

.player-section {
    margin-top: -44px;
    padding-bottom: 42px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.24);
    border-radius: 26px;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18), rgba(2, 6, 23, 0.52));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #00140f;
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 22px 60px rgba(16, 185, 129, 0.42);
    transition: transform 0.2s ease;
}

.player-button:hover {
    transform: scale(1.08);
}

.player-button span {
    position: relative;
    left: 3px;
    font-size: 2rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding: 24px 0 30px;
}

.detail-block,
.detail-side {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.5);
    box-shadow: var(--shadow);
}

.detail-block {
    padding: 30px;
    margin-bottom: 22px;
}

.detail-block h2,
.detail-side h2 {
    font-size: 1.55rem;
    margin-bottom: 14px;
}

.detail-block p {
    margin: 0;
    font-size: 1.02rem;
}

.detail-side {
    align-self: start;
    padding: 26px;
}

.detail-side dl {
    margin: 0;
    display: grid;
    gap: 14px;
}

.detail-side div {
    display: grid;
    gap: 4px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.detail-side div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.detail-side dt {
    color: var(--muted);
    font-size: 0.86rem;
}

.detail-side dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

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

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 34px 0;
}

.footer-logo {
    font-size: 1.2rem;
    color: var(--text);
}

.site-footer p {
    max-width: 620px;
    margin: 10px 0 0;
}

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

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

.footer-links a:hover {
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.5);
}

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

.is-filter-hidden {
    display: none !important;
}

@media (max-width: 1120px) {
    .header-search {
        display: none;
    }

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

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

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

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

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

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

    .hero {
        height: 76vh;
    }

    .hero-mask {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(2, 6, 23, 0.92) 72%, #020617 100%);
    }

    .hero-content {
        align-items: end;
        padding-bottom: 90px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-actions,
    .section-heading,
    .footer-grid {
        align-items: stretch;
        flex-direction: column;
    }

    .poster-grid,
    .wide-grid,
    .catalog-grid,
    .compact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .ranking-list {
        grid-template-columns: 1fr;
    }

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

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

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

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

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

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

    .hero {
        min-height: 560px;
    }

    .hero h1,
    .hero h2 {
        font-size: 2.45rem;
    }

    .poster-grid,
    .wide-grid,
    .catalog-grid,
    .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .movie-card-wide {
        align-items: stretch;
    }

    .wide-thumb {
        width: 116px;
    }

    .ranking-list li {
        grid-template-columns: 40px 1fr;
    }

    .rank-num {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .soft-panel,
    .detail-block,
    .detail-side,
    .category-card a {
        padding: 20px;
    }

    .player-button {
        width: 68px;
        height: 68px;
    }
}
