:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #60a5fa;
    --dark: #020617;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.12), transparent 28%),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

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

.nav-wrap {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #020617;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 28px rgba(34, 211, 238, 0.28);
}

.brand-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--cyan);
    background: rgba(15, 23, 42, 0.82);
}

.nav-search {
    width: 250px;
    display: flex;
    align-items: center;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 13px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search:focus-within {
    border-color: rgba(34, 211, 238, 0.85);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.nav-search input,
.mobile-search input,
.search-panel input,
.filter-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.nav-search input {
    padding: 10px 0 10px 14px;
}

.nav-search button {
    border: 0;
    width: 42px;
    height: 42px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    border: 0;
    background: rgba(15, 23, 42, 0.88);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
    background: var(--text);
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

.mobile-panel a,
.mobile-search button {
    padding: 12px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
}

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.mobile-search input {
    padding: 12px 14px;
    border-radius: 12px;
    background: #0f172a;
    border: 1px solid #1e293b;
}

.mobile-search button {
    border: 0;
    cursor: pointer;
}

.hero {
    position: relative;
    height: min(720px, 76vh);
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: opacity 0.75s ease, transform 1.2s ease;
}

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

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.64) 48%, rgba(2, 6, 23, 0.78) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.42) 44%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 78px;
}

.hero-copy {
    width: min(720px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero h1,
.detail-title-block h1,
.page-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p,
.detail-title-block p,
.page-hero p {
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.14);
    border: 1px solid rgba(34, 211, 238, 0.24);
    font-size: 13px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #020617;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 36px rgba(34, 211, 238, 0.23);
}

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

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.28);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.home-layout,
.page-main {
    padding-top: 58px;
    padding-bottom: 40px;
}

.section {
    margin-bottom: 72px;
}

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

.section-head h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.035em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-link {
    color: var(--cyan);
    font-weight: 800;
    white-space: nowrap;
}

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

.page-movie-grid {
    align-items: stretch;
}

.movie-card {
    min-width: 0;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
    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, 211, 238, 0.45);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.movie-card:hover .poster img {
    transform: scale(1.06);
    filter: brightness(0.82);
}

.poster-play {
    position: absolute;
    inset: auto 12px 12px auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #020617;
    background: var(--cyan);
    box-shadow: 0 12px 26px rgba(34, 211, 238, 0.22);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translateY(0);
}

.card-body {
    padding: 14px;
}

.card-title,
.rank-title {
    display: block;
    color: #f8fafc;
    font-weight: 800;
    line-height: 1.4;
}

.card-title:hover,
.rank-title:hover {
    color: var(--cyan);
}

.card-desc {
    min-height: 42px;
    margin: 8px 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta,
.inline-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
}

.card-meta span,
.inline-meta span {
    padding: 5px 8px;
    border-radius: 9px;
    background: rgba(30, 41, 59, 0.85);
}

.highlight-panel {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.78));
}

.horizontal-list {
    display: grid;
    gap: 14px;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: stretch;
}

.poster-small {
    aspect-ratio: auto;
    height: 100%;
    min-height: 148px;
}

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

.category-tile,
.category-overview-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 22px;
    background: var(--panel);
    border: 1px solid var(--line);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-covers img {
    aspect-ratio: 2 / 3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.category-tile h3,
.category-overview-card h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 22px;
}

.category-tile p,
.category-overview-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.category-overview-card {
    grid-template-columns: 210px 1fr;
    align-items: stretch;
}

.category-covers-large {
    grid-template-columns: repeat(4, 1fr);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.mini-links a {
    padding: 6px 9px;
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.1);
    font-size: 13px;
}

.page-hero {
    padding: 42px;
    margin-bottom: 32px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.78));
    border: 1px solid var(--line);
}

.compact-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #cbd5e1;
}

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

.breadcrumb span::before,
.breadcrumb a + span::before,
.breadcrumb a + a::before {
    content: "/";
    margin-right: 10px;
    color: #475569;
}

.filter-panel,
.search-panel {
    margin-bottom: 26px;
    padding: 16px;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
}

.filter-panel input,
.search-panel input {
    min-height: 52px;
    padding: 0 18px;
    border-radius: 14px;
    background: #0f172a;
    border: 1px solid #1e293b;
}

.search-panel input:focus,
.filter-panel input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 72px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.rank-num {
    color: var(--cyan);
    font-size: 24px;
    font-weight: 900;
}

.poster-tiny {
    width: 72px;
    border-radius: 12px;
}

.rank-info p {
    margin: 6px 0 10px;
    color: var(--muted);
    line-height: 1.6;
}

.rank-action {
    padding: 10px 14px;
    border-radius: 12px;
    color: #020617;
    font-weight: 800;
    background: var(--cyan);
}

.detail-hero {
    position: relative;
    min-height: 460px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.detail-hero-inner {
    position: relative;
    padding: 96px 0 58px;
}

.detail-title-block {
    max-width: 820px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    padding: 52px 0 30px;
}

.detail-side {
    min-width: 0;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.detail-meta-card {
    margin-top: 18px;
    padding: 18px;
    border-radius: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
}

.detail-meta-card h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.detail-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--muted);
}

.detail-meta-row strong {
    color: #f8fafc;
    text-align: right;
}

.detail-main {
    min-width: 0;
}

.player-shell {
    padding: 12px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(96, 165, 250, 0.08));
    border: 1px solid rgba(34, 211, 238, 0.18);
    box-shadow: var(--shadow);
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: rgba(2, 6, 23, 0.54);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #020617;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 30px;
    box-shadow: 0 22px 44px rgba(34, 211, 238, 0.22);
}

.article-content {
    margin-top: 28px;
    padding: 28px;
    border-radius: 24px;
    background: var(--panel);
    border: 1px solid var(--line);
}

.article-content h2 {
    margin: 26px 0 12px;
    color: #fff;
    font-size: 25px;
}

.article-content h2:first-of-type {
    margin-top: 24px;
}

.article-content p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.95;
    font-size: 16px;
}

.related-section {
    margin-top: 42px;
}

.hidden-by-search {
    display: none !important;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    padding: 44px 0 28px;
}

.footer-brand p,
.site-footer li,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #fff;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.site-footer a:hover {
    color: var(--cyan);
}

.footer-bottom {
    padding: 22px 0;
    color: #64748b;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

    .nav-search {
        margin-left: auto;
    }

    .mobile-toggle {
        display: inline-block;
    }

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

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

    .detail-layout {
        grid-template-columns: 240px 1fr;
    }
}

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

    .nav-wrap {
        height: 64px;
    }

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

    .nav-search {
        display: none;
    }

    .hero {
        min-height: 560px;
        height: 72vh;
    }

    .hero-content {
        padding-bottom: 70px;
    }

    .hero p,
    .detail-title-block p,
    .page-hero p {
        font-size: 16px;
    }

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

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

    .card-body {
        padding: 12px;
    }

    .highlight-panel,
    .page-hero,
    .article-content {
        padding: 20px;
        border-radius: 20px;
    }

    .movie-card-horizontal,
    .category-tile,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .poster-small {
        aspect-ratio: 16 / 9;
    }

    .category-covers,
    .category-covers-large {
        grid-template-columns: repeat(4, 1fr);
    }

    .rank-item {
        grid-template-columns: 44px 58px 1fr;
        gap: 12px;
    }

    .rank-action {
        grid-column: 2 / 4;
        text-align: center;
    }

    .poster-tiny {
        width: 58px;
    }

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

    .detail-side {
        display: grid;
        grid-template-columns: 130px 1fr;
        gap: 14px;
        align-items: start;
    }

    .detail-meta-card {
        margin-top: 0;
    }

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

@media (max-width: 460px) {
    .movie-grid {
        gap: 12px;
    }

    .card-desc {
        display: none;
    }

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

    .detail-poster {
        max-width: 220px;
    }
}
