:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(30, 41, 59, 0.9);
    --line: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #06b6d4;
    --cyan-light: #22d3ee;
    --blue: #2563eb;
    --shadow: 0 22px 70px rgba(8, 145, 178, 0.18);
}

body {
    background: radial-gradient(circle at top left, rgba(8, 145, 178, 0.18), transparent 32rem), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
    display: block;
}

[hidden] {
    display: none !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(30, 41, 59, 0.95);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.45);
}

.nav-shell {
    max-width: 1280px;
    height: 4rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.35);
}

.brand-text {
    font-size: 1.22rem;
    background: linear-gradient(90deg, var(--cyan-light), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link,
.mobile-nav-link {
    color: #cbd5e1;
    border-radius: 0.65rem;
    transition: 0.2s ease;
}

.nav-link {
    padding: 0.55rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 650;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
    color: var(--cyan-light);
    background: rgba(6, 182, 212, 0.13);
}

.nav-link-soft {
    color: #94a3b8;
}

.nav-toggle {
    display: none;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.9);
}

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

.mobile-nav.is-open {
    display: grid;
    gap: 0.45rem;
}

.mobile-nav-link {
    padding: 0.75rem 0.9rem;
    font-weight: 650;
}

.hero-carousel {
    position: relative;
    min-height: 68vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
    transform: scale(1.02);
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.7) 38%, rgba(2, 6, 23, 0.24) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.2));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 68vh;
    margin: 0 auto;
    padding: 7rem 1rem 5.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

.hero-pill,
.page-hero p:first-child,
.section-heading p {
    color: var(--cyan-light);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-pill {
    padding: 0.45rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(6, 182, 212, 0.28);
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.14);
    backdrop-filter: blur(12px);
}

.hero-content h1 {
    max-width: 46rem;
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin: 0 0 1rem;
}

.hero-content p {
    max-width: 42rem;
    color: #cbd5e1;
    font-size: 1.08rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.hero-tags,
.tag-row,
.detail-tags,
.pill-row,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-tags span,
.tag-row span,
.detail-tags a,
.pill-row span,
.chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.64);
    color: #cbd5e1;
    padding: 0.34rem 0.7rem;
    font-size: 0.82rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    padding: 0 1.3rem;
    border-radius: 0.8rem;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 16px 45px rgba(6, 182, 212, 0.28);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(12px);
}

.btn-soft {
    border: 1px solid rgba(6, 182, 212, 0.18);
    background: rgba(6, 182, 212, 0.12);
    color: var(--cyan-light);
}

.btn:hover,
.movie-card:hover,
.category-card:hover,
.overview-card:hover {
    transform: translateY(-3px);
}

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.56);
    color: white;
    font-size: 2rem;
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
}

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    right: 2rem;
    bottom: 2rem;
    display: flex;
    gap: 0.55rem;
}

.hero-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    transition: 0.2s ease;
}

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

.home-intro,
.content-section,
.detail-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3.5rem 1rem 0;
}

.home-intro {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.home-intro h2,
.section-heading h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: white;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.home-intro h2 {
    max-width: 48rem;
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    line-height: 1.2;
}

.home-intro p {
    margin: 0 0 0.5rem;
    color: var(--cyan-light);
    font-weight: 800;
}

.home-search,
.search-box {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.home-search input,
.search-box input {
    min-width: 18rem;
    background: transparent;
    color: white;
    outline: none;
    padding: 0.7rem 0.75rem;
}

.home-search button {
    padding: 0.7rem 1.05rem;
    border-radius: 0.75rem;
    color: white;
    background: var(--cyan);
    font-weight: 800;
}

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

.section-heading h2 {
    font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.section-heading p {
    margin-bottom: 0.3rem;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.16);
    transition: 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 24px 60px rgba(8, 145, 178, 0.16);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

.movie-cover img,
.rank-cover img,
.overview-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .movie-cover img,
.rank-item:hover .rank-cover img,
.overview-card:hover img {
    transform: scale(1.08);
}

.cover-year,
.cover-region,
.cover-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
}

.cover-year {
    right: 0.55rem;
    bottom: 0.55rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.74);
}

.cover-region {
    left: 0.55rem;
    top: 0.55rem;
    max-width: calc(100% - 1.1rem);
    padding: 0.25rem 0.5rem;
    background: rgba(6, 182, 212, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cover-play {
    inset: 50% auto auto 50%;
    width: 3.2rem;
    height: 3.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 182, 212, 0.88);
    color: white;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition: 0.25s ease;
}

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

.movie-card-body {
    padding: 1rem;
}

.movie-card-body h3 {
    margin: 0 0 0.6rem;
    color: white;
    font-size: 1.02rem;
    font-weight: 850;
    line-height: 1.35;
}

.movie-card-body h3 a:hover,
.rank-info h3 a:hover {
    color: var(--cyan-light);
}

.movie-card-body p,
.rank-info p,
.category-card p,
.overview-card p,
.footer-brand p,
.page-hero p,
.text-panel p,
.lead-text {
    color: #cbd5e1;
    line-height: 1.75;
}

.movie-card-body p {
    min-height: 3.25rem;
    margin: 0 0 0.8rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.8rem;
    color: #64748b;
    font-size: 0.78rem;
}

.tag-row {
    margin-top: 0.8rem;
}

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

.category-card,
.overview-card a,
.text-panel,
.side-card,
.search-panel,
.page-hero {
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(8, 47, 73, 0.36));
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.18);
}

.category-card,
.overview-card a {
    display: block;
    padding: 1.15rem;
    transition: 0.22s ease;
}

.category-card strong,
.overview-card h2 {
    display: block;
    margin-bottom: 0.55rem;
    color: white;
    font-size: 1.2rem;
}

.category-card div,
.overview-card div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

.category-card div span,
.overview-card div:last-child span {
    color: var(--cyan-light);
    font-size: 0.82rem;
}

.rank-list {
    display: grid;
    gap: 0.9rem;
}

.rank-item {
    display: grid;
    grid-template-columns: 11rem 1fr;
    gap: 1rem;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.58);
    transition: 0.22s ease;
}

.rank-cover {
    position: relative;
    overflow: hidden;
    min-height: 7rem;
}

.rank-cover span {
    position: absolute;
    left: 0.6rem;
    top: 0.6rem;
    min-width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    font-weight: 900;
}

.rank-info {
    padding: 1rem 1rem 1rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rank-info h3 {
    margin: 0 0 0.5rem;
    color: white;
    font-size: 1.05rem;
}

.page-hero {
    max-width: 1280px;
    margin: 2rem auto 0;
    padding: 3rem 1rem;
    background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.2), transparent 28rem), linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.54));
}

.page-hero > div {
    max-width: 56rem;
}

.page-hero h1 {
    margin: 0.4rem 0 0.8rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.small-hero {
    min-height: auto;
}

.overview-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    height: 5.6rem;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 0.8rem;
}

.chip-row {
    margin-top: 1.2rem;
}

.chip {
    cursor: pointer;
}

.chip.is-active,
.chip:hover {
    border-color: rgba(34, 211, 238, 0.4);
    background: rgba(6, 182, 212, 0.18);
    color: var(--cyan-light);
}

.search-panel {
    padding: 1rem;
}

.search-box {
    margin-bottom: 1rem;
    box-shadow: none;
}

.search-box input {
    flex: 1;
    min-width: 0;
}

.search-box span {
    color: var(--muted);
    white-space: nowrap;
}

.detail-wrap {
    padding-top: 2rem;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 1.2rem;
    color: var(--muted);
    font-size: 0.9rem;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.85fr);
    gap: 1.5rem;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 1.1rem;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 1.1rem;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12), rgba(2, 6, 23, 0.62));
    color: white;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.player-overlay.is-hidden {
    display: none;
}

.player-play {
    width: 5rem;
    height: 5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 45px rgba(6, 182, 212, 0.34);
    font-size: 1.7rem;
}

.detail-info,
.text-panel,
.side-card {
    padding: 1.25rem;
}

.detail-info {
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: rgba(15, 23, 42, 0.5);
}

.detail-info h1 {
    margin: 0.85rem 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.detail-tags {
    margin-top: 1rem;
}

.text-panel h2,
.side-card h2,
.footer-links h2 {
    margin: 0 0 0.9rem;
    color: white;
    font-size: 1.25rem;
    font-weight: 850;
}

.detail-side {
    position: sticky;
    top: 5.5rem;
}

.side-list {
    display: grid;
    gap: 0.9rem;
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 9.5rem 1fr;
}

.movie-card-compact .movie-cover {
    height: 100%;
    min-height: 6rem;
}

.movie-card-compact .movie-card-body p,
.movie-card-compact .tag-row {
    display: none;
}

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

.footer-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1rem;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 2rem;
}

.footer-brand p {
    max-width: 32rem;
    margin-top: 1rem;
    color: var(--muted);
}

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

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

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

.footer-bottom {
    padding: 1.2rem 1rem 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

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

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

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

    .detail-side {
        position: static;
    }
}

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

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

    .hero-content {
        padding: 6rem 1rem 5rem;
    }

    .hero-control {
        display: none;
    }

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

    .home-search {
        width: 100%;
    }

    .home-search input {
        min-width: 0;
        flex: 1;
    }

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

    .rank-item,
    .movie-card-compact {
        grid-template-columns: 8rem 1fr;
    }

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

@media (max-width: 560px) {
    .brand-text {
        font-size: 1rem;
    }

    .hero-carousel,
    .hero-content {
        min-height: 74vh;
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .hero-dots {
        left: 1rem;
        right: auto;
        bottom: 1.2rem;
    }

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

    .rank-item,
    .movie-card-compact {
        grid-template-columns: 1fr;
    }

    .rank-cover,
    .movie-card-compact .movie-cover {
        min-height: auto;
        aspect-ratio: 16 / 9;
    }

    .home-intro,
    .content-section,
    .detail-wrap {
        padding-top: 2.3rem;
    }
}
