:root {
    --bg-950: #020617;
    --bg-900: #0f172a;
    --bg-850: #111c31;
    --bg-800: #1e293b;
    --bg-700: #334155;
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --sky: #38bdf8;
    --sky-600: #0284c7;
    --blue: #2563eb;
    --ring: rgba(56, 189, 248, 0.25);
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 36rem),
        linear-gradient(180deg, var(--bg-950), var(--bg-900) 42%, var(--bg-950));
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(18px);
}

.navbar {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.35);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #e2e8f0;
    font-weight: 650;
}

.nav-links a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: var(--sky);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(51, 65, 85, 0.85);
    color: white;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: white;
    border-radius: 999px;
}

.hero {
    position: relative;
    height: 78vh;
    min-height: 620px;
    overflow: hidden;
    background: #000000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.68) 45%, rgba(0, 0, 0, 0.18)),
        linear-gradient(0deg, var(--bg-950), transparent 42%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    transform: translateY(-45%);
    width: min(660px, calc(100vw - 48px));
}

.hero-tags,
.detail-meta,
.rank-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-tags span,
.detail-meta span,
.rank-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--soft);
    font-size: 0.9rem;
}

.hero-tags span:first-child,
.detail-meta span:first-child {
    background: rgba(2, 132, 199, 0.95);
    border-color: rgba(125, 211, 252, 0.4);
    color: #ffffff;
}

.hero-content h1 {
    margin: 18px 0 18px;
    font-size: clamp(2.5rem, 6vw, 5.4rem);
    line-height: 0.96;
    letter-spacing: -0.08em;
}

.hero-content p {
    margin: 0;
    color: #d1d5db;
    font-size: clamp(1rem, 2vw, 1.28rem);
    line-height: 1.8;
    max-width: 58ch;
}

.hero-actions,
.detail-heading,
.section-head,
.category-strip,
.filter-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-actions {
    margin-top: 32px;
}

.primary-btn,
.ghost-btn,
.hero-category,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-600), var(--blue));
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.hero-category:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.ghost-btn,
.hero-category {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.52);
    color: #ffffff;
    font-size: 2.2rem;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(2, 132, 199, 0.95);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--sky);
}

.page-shell {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.home-shell {
    padding-top: 56px;
}

.top-page {
    padding-top: 112px;
}

.page-title {
    max-width: 760px;
    margin: 0 auto 36px;
    text-align: center;
}

.page-title.align-left {
    margin-left: 0;
    text-align: left;
}

.page-title p {
    margin: 0 0 10px;
    color: var(--sky);
    font-weight: 800;
    letter-spacing: 0.18em;
}

.page-title h1 {
    margin: 0 0 16px;
    font-size: clamp(2.2rem, 4vw, 4rem);
    letter-spacing: -0.06em;
}

.page-title span {
    color: var(--muted);
    line-height: 1.8;
}

.filter-panel {
    margin: 0 0 36px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 16px;
    align-items: center;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.search-box {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

.search-box input::placeholder {
    color: #64748b;
}

.filter-pill {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-pill.is-active,
.filter-pill:hover {
    color: #ffffff;
    background: var(--sky-600);
    border-color: rgba(125, 211, 252, 0.5);
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 54px;
}

.category-strip a {
    min-height: 118px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 16px 50px rgba(2, 6, 23, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-strip a:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.4);
}

.category-strip strong {
    font-size: 1.45rem;
}

.category-strip span {
    color: var(--muted);
    line-height: 1.6;
}

.content-section,
.featured-block,
.category-panel {
    margin-bottom: 72px;
}

.section-head {
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-head > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    letter-spacing: -0.04em;
}

.section-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.13);
    border: 1px solid rgba(56, 189, 248, 0.22);
}

.section-link {
    color: var(--sky);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.18);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 20px 55px rgba(2, 6, 23, 0.24);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 28px 70px rgba(2, 132, 199, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-900);
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.1);
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
}

.play-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--sky-600);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.badge {
    position: absolute;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(2, 132, 199, 0.92);
}

.badge-left {
    left: 12px;
    bottom: 12px;
}

.badge-right {
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.68);
}

.card-body {
    padding: 18px;
}

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

.card-body h3 a:hover,
.rank-item h2 a:hover {
    color: var(--sky);
}

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

.card-meta {
    justify-content: space-between;
    color: #64748b;
    font-size: 0.78rem;
}

.card-meta span:last-child {
    max-width: 68%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.scroll-row {
    display: flex;
    gap: 18px;
    padding-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.scroll-row .movie-card {
    width: 320px;
    flex: 0 0 auto;
}

.featured-block,
.category-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(51, 65, 85, 0.85));
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: var(--shadow);
}

.featured-cover {
    min-height: 420px;
    position: relative;
}

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

.featured-copy,
.category-copy {
    padding: clamp(28px, 5vw, 56px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.featured-copy span,
.category-copy span {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-600), var(--blue));
    font-weight: 800;
}

.featured-copy h2,
.category-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    letter-spacing: -0.06em;
}

.featured-copy p,
.category-copy p {
    margin: 0 0 26px;
    color: #d1d5db;
    line-height: 1.85;
}

.category-panel {
    grid-template-columns: 0.75fr 1.25fr;
    padding: 8px;
}

.category-panel .movie-grid {
    padding: 18px;
}

.back-link {
    display: inline-flex;
    margin-bottom: 28px;
    color: var(--muted);
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #ffffff;
}

.rank-list {
    display: grid;
    gap: 18px;
}

.rank-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.22);
}

.rank-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
}

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

.rank-cover span {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 900;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-600), var(--blue));
}

.rank-item h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.rank-item p {
    margin: 0 0 14px;
    color: var(--soft);
    line-height: 1.75;
}

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

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-poster {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    background: #000000;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-mask {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.2), rgba(0, 0, 0, 0.78));
}

.player-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-600), var(--blue));
    box-shadow: 0 24px 60px rgba(2, 132, 199, 0.45);
    transform: translate(-50%, -50%);
    font-size: 2rem;
}

.detail-card,
.related-panel {
    margin-top: 24px;
    padding: clamp(22px, 4vw, 34px);
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 20px 55px rgba(2, 6, 23, 0.22);
}

.detail-heading {
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.detail-heading p {
    margin: 0 0 10px;
    color: var(--sky);
    font-weight: 800;
}

.detail-heading h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    letter-spacing: -0.06em;
}

.one-line {
    margin: 0 0 18px;
    color: #bae6fd;
    font-size: 1.16rem;
    line-height: 1.8;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 26px;
}

.tag-list span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.92);
}

.story-section {
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.13);
}

.story-section h2,
.related-panel h2 {
    margin: 0 0 16px;
    font-size: 1.35rem;
}

.story-section p {
    color: #d1d5db;
    line-height: 1.95;
}

.related-panel {
    position: sticky;
    top: 92px;
    margin-top: 0;
}

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

.related-list .movie-card {
    display: grid;
    grid-template-columns: 136px 1fr;
}

.related-list .poster-link {
    height: 100%;
    aspect-ratio: auto;
}

.related-list .card-body {
    padding: 12px;
}

.related-list .card-body p,
.related-list .card-meta span:last-child,
.related-list .badge,
.related-list .play-dot {
    display: none;
}

.site-footer {
    margin-top: 90px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
}

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

.footer-grid h2 {
    margin: 0 0 16px;
    font-size: 1.05rem;
}

.footer-grid a {
    display: block;
    margin: 7px 0;
    transition: color 0.2s ease;
}

.footer-grid a:hover {
    color: var(--sky);
}

.footer-bottom {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 22px 0;
    color: #64748b;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.is-filtered-out {
    display: none !important;
}

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

    .player-layout,
    .featured-block,
    .category-panel {
        grid-template-columns: 1fr;
    }

    .related-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .navbar {
        padding: 0 16px;
    }

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

    .nav-links {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        display: none;
        padding: 16px 24px 22px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        background: rgba(15, 23, 42, 0.98);
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    }

    .site-header.nav-open .nav-links {
        display: flex;
    }

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

    .hero-content {
        top: 52%;
        left: 20px;
        width: calc(100vw - 40px);
    }

    .hero-actions {
        align-items: stretch;
    }

    .hero-arrow {
        display: none;
    }

    .page-shell,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 32px, 1280px);
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .filter-pills {
        gap: 10px;
    }

    .category-strip,
    .movie-grid.four,
    .movie-grid,
    .movie-grid.mini,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .related-list .movie-card {
        grid-template-columns: 120px 1fr;
    }

    .featured-cover {
        min-height: 250px;
    }
}
