:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-strong: rgba(30, 41, 59, 0.9);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(148, 163, 184, 0.3);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --brand: #10b981;
    --brand-2: #14b8a6;
    --accent: #38bdf8;
    --warning: #f59e0b;
    --danger: #fb7185;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 22px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 6%, rgba(16, 185, 129, 0.15), transparent 28rem),
        radial-gradient(circle at 84% 18%, rgba(56, 189, 248, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

main {
    min-height: 70vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
}

.header-inner {
    width: min(100% - 32px, var(--container));
    min-height: 74px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr minmax(260px, 340px);
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.28);
}

.brand-text {
    font-size: 1.24rem;
    background: linear-gradient(90deg, #d1fae5, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.primary-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.nav-link {
    padding: 10px 13px;
    border-radius: 12px;
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(30, 41, 59, 0.92);
    transform: translateY(-1px);
}

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

.global-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.global-search-input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
    padding: 11px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.global-search-input:focus {
    border-color: rgba(20, 184, 166, 0.72);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.search-button,
.btn {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    padding: 11px 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(16, 185, 129, 0.34);
}

.global-search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(460px, 90vw);
    max-height: 70vh;
    overflow: auto;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.98);
    box-shadow: var(--shadow);
}

.global-search-results.show {
    display: grid;
    gap: 8px;
}

.search-result-item {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
    transition: background 0.2s ease, color 0.2s ease;
}

.search-result-item:hover {
    color: #ffffff;
    background: rgba(30, 41, 59, 0.95);
}

.search-result-item img {
    width: 54px;
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(15, 23, 42, 0.8);
}

.search-result-item strong,
.search-result-item small {
    display: block;
}

.search-result-item small {
    color: var(--muted);
}

.hero-section {
    width: min(100% - 32px, var(--container));
    margin: 28px auto 0;
}

.hero-shell {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.hero-kicker {
    position: absolute;
    top: 28px;
    left: 32px;
    z-index: 4;
    max-width: 760px;
}

.hero-kicker h1 {
    margin: 0 0 12px;
    font-size: clamp(2.3rem, 6vw, 5.4rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hero-kicker p {
    max-width: 740px;
    margin: 0;
    color: rgba(226, 232, 240, 0.88);
    font-size: 1.08rem;
}

.hero-track {
    position: relative;
    height: 620px;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.74) 38%, rgba(2, 6, 23, 0.28) 70%, rgba(2, 6, 23, 0.72) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 54%);
}

.hero-content {
    position: absolute;
    left: 34px;
    bottom: 42px;
    z-index: 3;
    max-width: 650px;
}

.hero-eyebrow,
.section-eyebrow,
.breadcrumb {
    color: #67e8f9;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h2 {
    margin: 0 0 12px;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    line-height: 1;
}

.hero-content p {
    max-width: 620px;
    margin: 0 0 18px;
    color: rgba(241, 245, 249, 0.86);
    font-size: 1.06rem;
}

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

.hero-tags span,
.tag-row span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(15, 23, 42, 0.56);
    padding: 5px 10px;
    font-size: 0.82rem;
}

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

.btn-primary {
    display: inline-flex;
}

.btn-ghost {
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 32px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    padding: 0;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.section,
.page-head,
.detail-section {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 62px 0;
}

.page-head {
    padding-bottom: 28px;
}

.page-head h1,
.section-title h2,
.detail-title h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-head p,
.section-title p {
    max-width: 780px;
    margin: 14px 0 0;
    color: var(--muted-strong);
}

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

.section-title a {
    color: #67e8f9;
    font-weight: 800;
}

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

.category-card {
    display: grid;
    gap: 16px;
    min-height: 278px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.9));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(20, 184, 166, 0.6);
    background: linear-gradient(180deg, rgba(20, 184, 166, 0.18), rgba(15, 23, 42, 0.94));
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 120px;
    overflow: hidden;
}

.category-cover-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.86;
}

.category-info {
    display: grid;
    gap: 8px;
    padding: 0 18px 18px;
}

.category-info strong {
    font-size: 1.28rem;
}

.category-info em,
.category-info small {
    color: var(--muted);
    font-style: normal;
}

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

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

.movie-card {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(20, 184, 166, 0.54);
    background: var(--bg-card-strong);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.78);
}

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

.movie-card:hover .poster-frame img {
    transform: scale(1.08);
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 50%);
    opacity: 0.72;
}

.poster-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    transform: translate(-50%, -50%) scale(0.84);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #fb7185);
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.card-content {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.card-content strong {
    font-size: 1.05rem;
    line-height: 1.28;
}

.card-content em {
    min-height: 46px;
    color: var(--muted-strong);
    font-style: normal;
    font-size: 0.92rem;
}

.card-meta {
    color: var(--muted);
    font-size: 0.84rem;
}

.compact-card {
    grid-template-columns: 96px 1fr;
    align-items: stretch;
}

.compact-card .poster-frame {
    aspect-ratio: auto;
    height: 100%;
    min-height: 132px;
}

.compact-card .card-content em {
    min-height: 0;
}

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

.ranking-list .compact-card {
    min-height: 150px;
}

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

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-input {
    width: min(100%, 420px);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.7);
    padding: 12px 16px;
}

.filter-chip {
    cursor: pointer;
}

.filter-chip.active {
    color: #04111d;
    background: #67e8f9;
}

.detail-hero {
    width: min(100% - 32px, var(--container));
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.28));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-cover span {
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 24px 80px rgba(16, 185, 129, 0.45);
    font-size: 2rem;
}

.detail-title {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.94));
    box-shadow: 0 22px 62px rgba(0, 0, 0, 0.26);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.86rem;
}

.detail-title p {
    margin: 0;
    color: var(--muted-strong);
}

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

.meta-list div {
    padding: 12px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.44);
}

.meta-list dt {
    color: var(--muted);
    font-size: 0.82rem;
}

.meta-list dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.article-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    padding: 26px;
}

.article-card + .article-card {
    margin-top: 20px;
}

.article-card h2 {
    margin: 0 0 14px;
    font-size: 1.6rem;
}

.article-card p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 1.02rem;
}

.site-footer {
    margin-top: 42px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.96));
}

.footer-inner {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 28px;
}

.footer-brand p {
    color: var(--muted);
}

.footer-links h2 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.footer-link-grid {
    display: grid;
    gap: 8px;
}

.footer-link-grid a {
    color: var(--muted);
}

.footer-link-grid a:hover {
    color: #67e8f9;
}

.footer-bottom {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.92rem;
}

.empty-message {
    display: none;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
}

.empty-message.show {
    display: block;
}

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

@media (max-width: 980px) {
    .header-inner {
        grid-template-columns: auto auto;
        justify-content: space-between;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .primary-nav,
    .global-search {
        grid-column: 1 / -1;
        display: none;
    }

    body.menu-open .primary-nav,
    body.menu-open .global-search {
        display: flex;
    }

    body.menu-open .primary-nav {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 0 0;
    }

    body.menu-open .global-search {
        padding-bottom: 14px;
    }

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

    .category-grid,
    .movie-grid,
    .movie-grid.wide,
    .ranking-list,
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .header-inner,
    .hero-section,
    .section,
    .page-head,
    .detail-section,
    .detail-hero,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, var(--container));
    }

    .hero-shell,
    .hero-track {
        min-height: 620px;
        height: 620px;
    }

    .hero-kicker {
        top: 20px;
        left: 20px;
        right: 20px;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 72px;
    }

    .hero-content h2 {
        font-size: 2.2rem;
    }

    .hero-dots {
        left: 20px;
        right: auto;
    }

    .section-title {
        display: grid;
        align-items: start;
    }

    .category-grid,
    .movie-grid,
    .movie-grid.wide,
    .ranking-list,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .compact-card {
        grid-template-columns: 104px 1fr;
    }

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