:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --line-bright: rgba(148, 163, 184, 0.32);
    --text: #f8fafc;
    --muted: #94a3b8;
    --subtle: #64748b;
    --brand: #22c55e;
    --brand-2: #14b8a6;
    --brand-3: #38bdf8;
    --warn: #f59e0b;
    --danger: #ef4444;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 0%, rgba(20, 184, 166, 0.16), transparent 34rem),
        radial-gradient(circle at 88% 14%, rgba(34, 197, 94, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #07111f 46%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -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;
    width: 100%;
    height: auto;
}

button,
input,
select {
    font: inherit;
}

.site-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(20px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    color: #052e16;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 16px 34px rgba(34, 197, 94, 0.25);
}

.brand-title {
    display: block;
    font-size: 1.08rem;
    font-weight: 850;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    display: block;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.1;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.main-nav a {
    position: relative;
    transition: color 0.22s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: #ffffff;
}

.main-nav a::after {
    position: absolute;
    right: 0;
    bottom: -9px;
    left: 0;
    height: 2px;
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    background: linear-gradient(90deg, var(--brand), var(--brand-3));
    transition: transform 0.22s ease;
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-form {
    position: relative;
    width: min(280px, 30vw);
}

.search-form input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.86);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form input {
    padding: 11px 42px 11px 16px;
}

.search-form button {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    color: #052e16;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    cursor: pointer;
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(34, 197, 94, 0.72);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
    background: rgba(15, 23, 42, 0.96);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.84);
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.98);
}

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

.mobile-panel-inner {
    display: grid;
    gap: 16px;
    padding: 18px 0 22px;
}

.mobile-nav {
    display: grid;
    gap: 8px;
}

.mobile-nav a {
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.78);
}

.hero {
    position: relative;
    overflow: hidden;
    margin: 28px auto 0;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 32px;
    background: #020617;
    box-shadow: var(--shadow);
}

.hero::before {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.70) 42%, rgba(2, 6, 23, 0.30) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.08) 46%, rgba(2, 6, 23, 0.46) 100%);
}

.hero-stage {
    position: relative;
    min-height: clamp(560px, 72vh, 760px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.1s ease;
    pointer-events: none;
}

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

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

.hero-content {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 34px;
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 72px 0 48px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 12px;
    border: 1px solid rgba(34, 197, 94, 0.30);
    border-radius: 999px;
    color: #bbf7d0;
    background: rgba(20, 83, 45, 0.28);
    font-size: 0.84rem;
    font-weight: 650;
}

.hero h1,
.page-title h1,
.detail-title h1 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(2.6rem, 7vw, 6.1rem);
}

.hero-lead {
    max-width: 700px;
    margin: 20px 0 0;
    color: #cbd5e1;
    font-size: clamp(1.02rem, 2vw, 1.28rem);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 0;
}

.meta-pill,
.tag-pill,
.info-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(10px);
}

.meta-pill {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.78);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 197, 94, 0.42);
    background: rgba(30, 41, 59, 0.88);
}

.btn-primary {
    color: #052e16;
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 38px rgba(34, 197, 94, 0.22);
    font-weight: 800;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4ade80, #2dd4bf);
}

.hero-side-card {
    align-self: end;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

.hero-side-card img {
    aspect-ratio: 2 / 2.7;
    object-fit: cover;
}

.hero-side-card div {
    padding: 16px;
}

.hero-side-card strong {
    display: block;
    font-size: 1.05rem;
}

.hero-side-card span {
    color: var(--muted);
    font-size: 0.88rem;
}

.hero-dots {
    position: absolute;
    right: 30px;
    bottom: 30px;
    z-index: 8;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.44);
    cursor: pointer;
    transition: width 0.22s ease, background 0.22s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: linear-gradient(90deg, var(--brand), var(--brand-3));
}

.section {
    padding: 54px 0 0;
}

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

.section-title h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.55rem);
    font-weight: 850;
    letter-spacing: -0.025em;
}

.section-title p,
.page-title p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
}

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

.quick-card,
.category-card,
.panel-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.48));
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.20);
}

.quick-card {
    min-height: 154px;
    padding: 22px;
}

.quick-card::after,
.category-card::after,
.panel-card::after {
    position: absolute;
    inset: auto -40px -70px auto;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    content: "";
    background: rgba(34, 197, 94, 0.10);
    filter: blur(2px);
}

.quick-card strong,
.category-card strong {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 1.08rem;
}

.quick-card span,
.category-card span {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.94rem;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 197, 94, 0.42);
    box-shadow: 0 28px 68px rgba(0, 0, 0, 0.30);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.94);
}

.poster-link img {
    aspect-ratio: 2 / 2.9;
    object-fit: cover;
    transition: transform 0.36s ease, filter 0.36s ease;
}

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

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #052e16;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-size: 0.78rem;
    font-weight: 800;
}

.type-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(2, 6, 23, 0.72);
    font-size: 0.75rem;
    backdrop-filter: blur(10px);
}

.play-mini {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%) scale(0.82);
    border-radius: 999px;
    color: #052e16;
    background: rgba(34, 197, 94, 0.92);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-card-body {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.movie-card-body h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.86rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: #86efac;
    font-size: 0.75rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 24px;
}

.tag-pill {
    padding: 3px 8px;
    color: #cbd5e1;
    font-size: 0.74rem;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 74px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.70);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(34, 197, 94, 0.36);
    background: rgba(30, 41, 59, 0.72);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #052e16;
    background: linear-gradient(135deg, var(--brand), var(--brand-3));
    font-weight: 900;
}

.rank-cover {
    width: 70px;
    height: 96px;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
}

.rank-cover img {
    height: 100%;
    object-fit: cover;
}

.rank-copy h3 {
    margin: 0 0 5px;
    font-size: 1rem;
}

.rank-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.rank-score {
    color: #fde68a;
    font-weight: 850;
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
}

.category-card .category-topline {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-bottom: 20px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #86efac;
    background: rgba(34, 197, 94, 0.10);
    font-size: 0.82rem;
}

.page-hero {
    padding: 46px 0 4px;
}

.page-title {
    align-items: start;
    margin-bottom: 28px;
}

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

.breadcrumb a:hover {
    color: #bbf7d0;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 180px 180px 180px;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.66);
}

.filter-bar input,
.filter-bar select {
    padding: 11px 14px;
    border-radius: 16px;
}

.no-results {
    display: none;
    padding: 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.66);
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

.detail-hero {
    padding: 34px 0 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
    gap: 24px;
    align-items: start;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 22px;
    border: 0;
    color: #f8fafc;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78)),
        rgba(2, 6, 23, 0.18);
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-button {
    display: grid;
    place-items: center;
    gap: 12px;
    text-align: center;
}

.player-icon {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    color: #052e16;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 22px 44px rgba(34, 197, 94, 0.28);
    font-size: 2rem;
}

.player-button strong {
    display: block;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.detail-panel {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.24);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px 28px 0 0;
}

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

.detail-info {
    padding: 20px;
}

.detail-title {
    margin-bottom: 18px;
}

.detail-title h1 {
    font-size: clamp(2rem, 4vw, 4rem);
}

.detail-title p {
    max-width: 850px;
    margin: 14px 0 0;
    color: #cbd5e1;
    font-size: 1.08rem;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}

.info-pill {
    justify-content: space-between;
    padding: 9px 12px;
    font-size: 0.88rem;
}

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

.article-block {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.58);
}

.article-block h2 {
    margin: 0 0 12px;
    font-size: 1.28rem;
}

.article-block p {
    margin: 0;
    color: #cbd5e1;
}

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

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.74);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    padding: 34px 0;
    color: var(--muted);
}

.footer-inner strong {
    color: #f8fafc;
}

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

.footer-links a:hover {
    color: #bbf7d0;
}

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

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

@media (max-width: 920px) {
    .main-nav,
    .header-actions .search-form {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        width: min(100% - 32px, 720px);
        padding-top: 90px;
    }

    .hero-side-card {
        display: none;
    }

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

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

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

@media (max-width: 640px) {
    .site-shell {
        width: min(100% - 22px, 1180px);
    }

    .brand-subtitle {
        display: none;
    }

    .hero {
        border-radius: 24px;
    }

    .hero-stage {
        min-height: 590px;
    }

    .hero h1 {
        font-size: clamp(2.25rem, 13vw, 3.55rem);
    }

    .hero-dots {
        right: 18px;
        bottom: 18px;
    }

    .section-head,
    .page-title,
    .footer-inner {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .movie-card-body {
        padding: 12px;
    }

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

    .rank-item {
        grid-template-columns: 42px 58px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

    .rank-cover {
        width: 56px;
        height: 78px;
    }

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

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