:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --blue: #38bdf8;
    --blue-deep: #2563eb;
    --cyan: #22d3ee;
    --gold: #facc15;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.46);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 8%, rgba(37, 99, 235, 0.28), transparent 32rem),
        radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.16), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

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.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-weight: 800;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--blue-deep), var(--cyan));
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(56, 189, 248, 0.28);
}

.brand-text {
    font-size: 1.45rem;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: var(--soft);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #93c5fd;
}

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

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

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

.header-search button,
.mobile-search button,
.page-search button,
.big-search button {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.page-search input:focus,
.big-search input:focus,
.inline-filter input:focus {
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
    background: rgba(15, 23, 42, 0.98);
}

.header-search button:hover,
.mobile-search button:hover,
.page-search button:hover,
.big-search button:hover,
.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.85);
    border-radius: 14px;
    cursor: pointer;
}

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

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

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

.mobile-search input {
    flex: 1;
    min-width: 0;
    padding: 11px 16px;
}

.hero-carousel {
    position: relative;
    height: min(760px, 74vh);
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg,
.detail-bg,
.category-hero img,
.ranking-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.12);
}

.hero-shade,
.detail-shade,
.category-hero-shade,
.ranking-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 40%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.5) 36%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: end;
    gap: 56px;
    height: 100%;
    padding: 110px 0 86px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 16px;
    padding: 7px 12px;
    color: #bfdbfe;
    font-size: 0.86rem;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 999px;
}

.hero-copy h1,
.detail-info h1,
.category-hero-content h1,
.ranking-hero-content h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(2.45rem, 6vw, 5.25rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy p,
.category-hero-content p,
.ranking-hero-content p,
.page-hero p {
    max-width: 720px;
    color: #cbd5e1;
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    line-height: 1.8;
}

.hero-tags,
.detail-tags,
.card-tags,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-tags a,
.card-tags span,
.quick-links a {
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 999px;
}

.hero-tags span,
.detail-tags a,
.quick-links a {
    padding: 8px 12px;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 700;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
}

.ghost-btn {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
    align-self: end;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    transform: translateY(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.hero-poster:hover {
    transform: translateY(0);
    border-color: rgba(56, 189, 248, 0.55);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
}

.hero-poster span {
    display: block;
    padding: 16px;
    color: #dbeafe;
    text-align: center;
    font-weight: 700;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    background: rgba(15, 23, 42, 0.56);
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 28px;
    height: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 48px;
    background: var(--blue);
}

.quick-search-panel {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-top: -34px;
    padding: 22px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.big-search input,
.page-search input {
    width: min(640px, 100%);
    padding: 14px 18px;
}

.content-section {
    padding: 56px 0 10px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-link,
.text-link {
    color: #93c5fd;
    font-weight: 700;
}

.movie-grid {
    display: grid;
    gap: 18px;
}

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

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

.movie-card {
    overflow: hidden;
    min-width: 0;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.46);
    box-shadow: 0 26px 80px rgba(14, 165, 233, 0.16);
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #020617;
}

.card-cover img {
    width: 100%;
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.3s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.07);
    opacity: 0.86;
}

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 28px;
    padding: 0 10px;
    font-weight: 800;
    border-radius: 999px;
}

.score-badge {
    right: 10px;
    bottom: 10px;
    color: #111827;
    background: var(--gold);
}

.rank-badge {
    left: 10px;
    top: 10px;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.86);
}

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

.card-body h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: #93c5fd;
}

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

.card-tags span {
    padding: 5px 8px;
    font-size: 0.75rem;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 0.78rem;
}

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

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

.category-title {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 1.25rem;
    font-weight: 800;
}

.category-block p,
.category-card p {
    color: var(--muted);
    line-height: 1.7;
}

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

.mini-card {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.mini-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 16px;
}

.mini-card span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.mini-card small {
    color: var(--muted);
}

.inline-filter {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.inline-filter input {
    width: min(420px, 100%);
    padding: 13px 18px;
}

.filter-status {
    color: var(--muted);
}

.page-main {
    min-height: 70vh;
}

.page-hero,
.small-hero {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: center;
    padding: 76px 0 24px;
}

.search-hero {
    align-items: end;
}

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

.category-card {
    display: grid;
    gap: 18px;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.category-cover-stack img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.category-hero,
.ranking-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    background: #020617;
}

.category-hero-content,
.ranking-hero-content {
    position: relative;
    z-index: 2;
    padding: 120px 0 74px;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.ranking-sidebar {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 10px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
    border-radius: 24px;
}

.ranking-sidebar h2 {
    margin: 0 0 8px;
}

.ranking-line {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 14px;
}

.ranking-line span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: #fff;
    background: rgba(37, 99, 235, 0.8);
    border-radius: 10px;
}

.ranking-line strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-line em {
    color: var(--gold);
    font-style: normal;
    font-weight: 800;
}

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

.detail-hero-content {
    position: relative;
    z-index: 2;
    padding: 92px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    color: var(--soft);
}

.breadcrumb a:hover {
    color: #93c5fd;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
}

.detail-cover {
    width: 100%;
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-info {
    max-width: 780px;
}

.detail-one-line {
    color: var(--soft);
    font-size: 1.18rem;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.detail-meta span,
.detail-meta strong {
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.detail-meta strong {
    color: var(--gold);
}

.jump-player {
    margin-top: 26px;
}

.player-section {
    margin-top: -54px;
}

.player-stage {
    position: relative;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #fff;
    border: none;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    padding-left: 5px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    border-radius: 50%;
    box-shadow: 0 18px 50px rgba(37, 99, 235, 0.46);
}

.player-error {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 4;
    padding: 10px 14px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.9);
    border-radius: 999px;
    transform: translateX(-50%);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding: 54px 0 10px;
}

.detail-article,
.detail-aside {
    padding: 28px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid var(--line);
    border-radius: 28px;
}

.detail-article h2,
.detail-aside h2 {
    margin: 0 0 16px;
}

.detail-article p {
    color: var(--soft);
    line-height: 2;
}

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

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

.detail-aside dd {
    margin: 0 0 8px;
    color: var(--text);
}

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

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    padding: 28px 0;
    color: var(--muted);
}

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

.is-hidden-by-filter {
    display: none;
}

@media (max-width: 1180px) {
    .library-grid,
    .featured-grid,
    .compact-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

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

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

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .hero-poster {
        display: none;
    }

    .quick-search-panel,
    .ranking-layout,
    .detail-content,
    .page-hero {
        grid-template-columns: 1fr;
        display: grid;
    }

    .quick-search-panel {
        margin-top: 18px;
    }

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

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

    .ranking-sidebar {
        position: static;
    }
}

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

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

    .hero-carousel {
        height: 680px;
        min-height: 680px;
    }

    .hero-content {
        padding: 96px 0 78px;
    }

    .hero-control {
        display: none;
    }

    .quick-search-panel {
        padding: 16px;
    }

    .big-search,
    .page-search,
    .inline-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .big-search input,
    .page-search input,
    .inline-filter input {
        width: 100%;
    }

    .library-grid,
    .featured-grid,
    .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

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

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

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

    .card-body {
        padding: 12px;
    }

    .card-body p,
    .card-tags {
        display: none;
    }

    .detail-info h1 {
        font-size: clamp(2.1rem, 12vw, 3.6rem);
    }

    .detail-hero {
        min-height: 680px;
    }

    .player-section {
        margin-top: -30px;
    }

    .detail-article,
    .detail-aside {
        padding: 20px;
    }
}
