:root {
    --bg: #0a0e1a;
    --bg-soft: #111827;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --primary: #0284c7;
    --primary-light: #38bdf8;
    --primary-dark: #0369a1;
    --line: rgba(14, 165, 233, 0.22);
    --text: #ffffff;
    --muted: #cbd5e1;
    --muted-dark: #94a3b8;
    --shadow: 0 22px 70px rgba(2, 132, 199, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(2, 132, 199, 0.2), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.16), transparent 34rem),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(10, 14, 26, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.container {
    width: min(100% - 2rem, 1280px);
    margin: 0 auto;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 1.25rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.logo-mark {
    position: relative;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    box-shadow: 0 0 26px rgba(56, 189, 248, 0.35);
}

.logo-mark::before {
    content: "";
    position: absolute;
    inset: 0.55rem 0.68rem;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    background: #fff;
}

.logo-title {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.logo-subtitle {
    display: block;
    margin-top: 0.1rem;
    color: var(--muted-dark);
    font-size: 0.78rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    color: var(--muted);
    font-weight: 600;
}

.main-nav a {
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--primary-light);
}

.search-form {
    position: relative;
    min-width: 240px;
}

.search-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
    outline: none;
    padding: 0.72rem 1rem 0.72rem 2.55rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.search-form button {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 1.4rem;
    height: 1.4rem;
    border: 0;
    color: var(--muted-dark);
    background: transparent;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: rgba(15, 23, 42, 0.85);
    color: var(--text);
    padding: 0.55rem 0.75rem;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 1rem 0 1.2rem;
}

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

.mobile-nav {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
    color: var(--muted);
    font-weight: 600;
}

.page-main {
    min-height: 100vh;
    padding-top: 76px;
}

.hero {
    position: relative;
    height: min(80vh, 780px);
    min-height: 560px;
    overflow: hidden;
    background: var(--bg-soft);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 14, 26, 0.96), rgba(10, 14, 26, 0.58), rgba(10, 14, 26, 0.25)),
        linear-gradient(0deg, var(--bg), rgba(10, 14, 26, 0.15) 58%, rgba(10, 14, 26, 0.45));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    height: 100%;
    padding: 7rem 0 5.5rem;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(56, 189, 248, 0.36);
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.18);
    color: #e0f2fe;
    padding: 0.45rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.hero h1 {
    margin: 1.1rem 0 0.8rem;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

.hero-desc {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.32rem);
    line-height: 1.7;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.3rem;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
}

.meta-pill.primary {
    background: rgba(2, 132, 199, 0.88);
    border-color: rgba(56, 189, 248, 0.35);
    color: #fff;
    font-weight: 700;
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.65rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.78rem 1.35rem;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 16px 32px rgba(2, 132, 199, 0.25);
}

.btn-ghost {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
    backdrop-filter: blur(10px);
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    transform: translateY(-50%);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(10, 14, 26, 0.55);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-control:hover {
    background: rgba(2, 132, 199, 0.76);
}

.hero-prev {
    left: 1.3rem;
}

.hero-next {
    right: 1.3rem;
}

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

.hero-dot {
    width: 0.6rem;
    height: 0.6rem;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.45);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 2.1rem;
    background: var(--primary-light);
}

.section {
    padding: 4.2rem 0 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title {
    margin: 0.55rem 0 0;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    line-height: 1.15;
}

.section-desc {
    max-width: 760px;
    margin: 0.6rem 0 0;
    color: var(--muted-dark);
    line-height: 1.75;
}

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

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

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

.movie-card > a {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(14, 165, 233, 0.16);
    border-radius: 1.1rem;
    background: rgba(15, 23, 42, 0.28);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card > a:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(15, 23, 42, 0.5);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.9);
}

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

.movie-card a:hover .poster img,
.featured-card:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 14, 26, 0.85), transparent 55%);
}

.card-badge,
.rank-badge,
.poster-year {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
}

.card-badge {
    top: 0.7rem;
    left: 0.7rem;
    background: rgba(2, 132, 199, 0.9);
    color: #fff;
    padding: 0.32rem 0.58rem;
}

.poster-year {
    right: 0.7rem;
    bottom: 0.7rem;
    background: rgba(15, 23, 42, 0.74);
    color: #e2e8f0;
    border: 1px solid rgba(226, 232, 240, 0.13);
    padding: 0.28rem 0.55rem;
}

.play-float {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 3.2rem;
    height: 3.2rem;
    transform: translate(-50%, -50%) scale(0.86);
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.9);
    color: #fff;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 0.9rem;
}

.card-title {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text {
    margin: 0.48rem 0 0;
    color: var(--muted-dark);
    font-size: 0.86rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.72rem;
    color: #64748b;
    font-size: 0.78rem;
}

.featured-list {
    display: grid;
    gap: 1.25rem;
}

.featured-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) 1fr;
    overflow: hidden;
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 1.35rem;
    background: rgba(15, 23, 42, 0.36);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.featured-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.52);
    box-shadow: var(--shadow);
}

.featured-media {
    position: relative;
    min-height: 250px;
    overflow: hidden;
}

.featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.featured-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 14, 26, 0.78), transparent 62%);
}

.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.6rem;
}

.featured-content h3 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2.15rem);
    line-height: 1.2;
}

.featured-content p {
    margin: 0.85rem 0 0;
    color: var(--muted-dark);
    line-height: 1.75;
}

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

.category-tile {
    min-height: 160px;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 1.25rem;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.17), transparent 11rem),
        rgba(15, 23, 42, 0.38);
    padding: 1.2rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.52);
    box-shadow: var(--shadow);
}

.category-tile h3 {
    margin: 0;
    font-size: 1.2rem;
}

.category-tile p {
    margin: 0.65rem 0 0;
    color: var(--muted-dark);
    line-height: 1.6;
    font-size: 0.92rem;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.rank-item {
    display: grid;
    grid-template-columns: auto 80px 1fr;
    gap: 0.9rem;
    align-items: center;
    border: 1px solid rgba(14, 165, 233, 0.16);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.3);
    padding: 0.72rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.48);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.22);
    color: var(--primary-light);
    font-weight: 900;
}

.rank-thumb {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 0.72rem;
    background: rgba(15, 23, 42, 0.85);
}

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

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

.rank-info p {
    margin: 0.3rem 0 0;
    color: var(--muted-dark);
    font-size: 0.86rem;
    line-height: 1.45;
}

.page-hero {
    padding: 4.8rem 0 2rem;
    background:
        radial-gradient(circle at top left, rgba(2, 132, 199, 0.22), transparent 32rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(10, 14, 26, 0));
}

.page-hero h1 {
    margin: 0.9rem 0 0;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    line-height: 1.08;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--muted-dark);
    font-size: 0.92rem;
}

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

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.38);
    color: var(--muted);
    padding: 0.55rem 0.9rem;
    cursor: pointer;
}

.filter-btn.is-active,
.filter-btn:hover {
    border-color: rgba(56, 189, 248, 0.55);
    color: #fff;
    background: rgba(2, 132, 199, 0.28);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 2rem;
    align-items: start;
}

.detail-cover {
    position: sticky;
    top: 100px;
    overflow: hidden;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 1.3rem;
    background: rgba(15, 23, 42, 0.38);
    box-shadow: var(--shadow);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-panel {
    border: 1px solid rgba(14, 165, 233, 0.16);
    border-radius: 1.3rem;
    background: rgba(15, 23, 42, 0.34);
    padding: 1.5rem;
}

.detail-title {
    margin: 0.75rem 0 0;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.08;
}

.detail-lead {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 1.12rem;
    line-height: 1.8;
}

.content-block {
    margin-top: 1.3rem;
}

.content-block h2,
.player-section h2 {
    margin: 0 0 0.75rem;
    font-size: 1.55rem;
}

.content-block p {
    margin: 0;
    color: var(--muted-dark);
    line-height: 1.85;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.2rem;
}

.tag-list span {
    display: inline-flex;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    color: var(--muted);
    padding: 0.42rem 0.72rem;
    font-size: 0.85rem;
}

.player-section {
    margin-top: 2rem;
}

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

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

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    background:
        radial-gradient(circle, rgba(2, 132, 199, 0.34), rgba(0, 0, 0, 0.52)),
        rgba(0, 0, 0, 0.18);
    color: #fff;
    cursor: pointer;
}

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

.play-cover span {
    display: grid;
    place-items: center;
    width: 5rem;
    height: 5rem;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.92);
    box-shadow: 0 20px 50px rgba(2, 132, 199, 0.36);
    font-size: 2rem;
    transform: translateX(0.12rem);
}

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

.related-card {
    overflow: hidden;
    border: 1px solid rgba(14, 165, 233, 0.14);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.28);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.48);
}

.related-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card h3 {
    margin: 0;
    padding: 0.75rem;
    font-size: 0.92rem;
    line-height: 1.4;
}

.empty-result {
    display: none;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 1.1rem;
    color: var(--muted-dark);
    background: rgba(15, 23, 42, 0.32);
    padding: 2rem;
    text-align: center;
}

.site-footer {
    margin-top: 4rem;
    border-top: 1px solid rgba(14, 165, 233, 0.18);
    background: rgba(10, 14, 26, 0.78);
    padding: 2.5rem 0;
    color: var(--muted-dark);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 1.5rem;
}

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 0.7rem;
    color: #fff;
}

.footer-grid p,
.footer-grid a {
    color: var(--muted-dark);
    line-height: 1.7;
}

.footer-links {
    display: grid;
    gap: 0.45rem;
}

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

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

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

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero {
        min-height: 620px;
        height: 78vh;
    }

    .hero-control {
        display: none;
    }

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

    .featured-card,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        position: relative;
        top: auto;
        max-width: 360px;
    }

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

@media (max-width: 720px) {
    .container {
        width: min(100% - 1.2rem, 1280px);
    }

    .header-row {
        min-height: 68px;
    }

    .logo-title {
        font-size: 1.08rem;
    }

    .logo-subtitle {
        display: none;
    }

    .page-main {
        padding-top: 68px;
    }

    .hero {
        min-height: 560px;
    }

    .hero-content {
        padding: 6rem 0 4.5rem;
    }

    .movie-grid,
    .movie-grid.compact,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

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

    .rank-item {
        grid-template-columns: auto 64px 1fr;
    }

    .card-body {
        padding: 0.75rem;
    }
}
