:root {
    --bg: #030712;
    --bg-soft: #0b1120;
    --card: rgba(17, 24, 39, 0.82);
    --card-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --accent: #e5e7eb;
    --accent-soft: rgba(229, 231, 235, 0.14);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(148, 163, 184, 0.16), transparent 34rem),
        radial-gradient(circle at 80% 20%, rgba(51, 65, 85, 0.28), transparent 30rem),
        var(--bg);
    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;
    max-width: 100%;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(3, 7, 18, 0.86);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #020617;
    background: linear-gradient(135deg, #f8fafc, #94a3b8);
    box-shadow: 0 12px 36px rgba(148, 163, 184, 0.25);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.brand-text em {
    margin-top: 5px;
    color: var(--muted-2);
    font-size: 12px;
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    flex: 0 0 auto;
    padding: 10px 13px;
    color: #cbd5e1;
    border-radius: 12px;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    color: #fff;
    background: rgba(148, 163, 184, 0.13);
    transform: translateY(-1px);
}

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85) contrast(1.06);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.94) 0%, rgba(3, 7, 18, 0.72) 40%, rgba(3, 7, 18, 0.22) 100%),
        linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.2) 45%, rgba(3, 7, 18, 0.64) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%);
    max-width: 1180px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    color: #cbd5e1;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 760px;
    margin: 18px 0 18px;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.98;
    font-weight: 300;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 680px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-tags {
    margin: 26px 0;
}

.hero-tags a,
.hero-tags span,
.detail-meta span,
.tag-row span,
.card-meta a,
.card-meta span {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(10px);
    font-size: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
    color: #020617;
    background: #f8fafc;
}

.btn.ghost {
    color: #fff;
    border: 1px solid rgba(248, 250, 252, 0.32);
    background: rgba(15, 23, 42, 0.38);
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.24);
    cursor: pointer;
}

.hero-dot.active {
    background: #f8fafc;
}

.search-band {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.58);
}

.search-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 30px 0;
}

.search-inner h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 400;
}

.search-inner p {
    margin: 0;
    color: var(--muted);
}

.search-box {
    min-width: min(420px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 9px 9px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(3, 7, 18, 0.56);
}

.search-box span {
    color: #cbd5e1;
    font-size: 14px;
}

.search-box input {
    width: 100%;
    min-height: 38px;
    color: #fff;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
}

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

.inline-search {
    margin-top: 24px;
    max-width: 460px;
}

.content-section {
    padding: 58px 0;
}

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

.section-head h2,
.detail-copy h2,
.category-overview-card h2 {
    margin: 10px 0 8px;
    font-size: clamp(26px, 3vw, 42px);
    font-weight: 300;
    letter-spacing: -0.04em;
}

.section-head p,
.detail-copy p,
.category-overview-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.text-link {
    color: #fff;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.48);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.72));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(226, 232, 240, 0.35);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.1;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.72), transparent 50%);
}

.rank-badge,
.year-pill {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 30px;
    padding: 0 10px;
    color: #020617;
    background: #f8fafc;
    font-weight: 800;
}

.year-pill {
    right: 12px;
    bottom: 12px;
    min-width: 54px;
    height: 28px;
    color: #e2e8f0;
    background: rgba(2, 6, 23, 0.64);
    font-size: 12px;
}

.card-body {
    display: flex;
    min-height: 210px;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 52px;
    color: #fff;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 600;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.72;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin-top: auto;
}

.tag-row {
    min-height: 28px;
}

.tag-row span {
    padding: 5px 8px;
    color: #94a3b8;
    font-size: 11px;
}

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

.category-tile,
.category-overview-card {
    display: flex;
    min-height: 142px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.64));
    transition: transform 0.22s ease, background 0.22s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.9), rgba(15, 23, 42, 0.72));
}

.category-tile span {
    font-size: 22px;
    font-weight: 500;
}

.category-tile em,
.category-overview-card p {
    color: var(--muted);
    font-style: normal;
    line-height: 1.72;
}

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

.page-hero {
    position: relative;
    padding: 88px 0 46px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(120deg, rgba(30, 41, 59, 0.6), rgba(3, 7, 18, 0.98)),
        radial-gradient(circle at 80% 0%, rgba(148, 163, 184, 0.18), transparent 26rem);
}

.page-hero h1 {
    max-width: 760px;
    margin: 14px 0;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.02;
    font-weight: 300;
    letter-spacing: -0.06em;
}

.page-hero p {
    max-width: 720px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.82;
}

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

.category-overview-card {
    min-height: 240px;
}

.category-overview-card h2 {
    font-size: 30px;
}

.mini-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.mini-list a {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(3, 7, 18, 0.34);
    font-size: 13px;
}

.ranking-grid,
.category-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.compact-card .card-body {
    min-height: 160px;
}

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

.detail-main {
    background: #030712;
}

.detail-hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(0.75);
    transform: scale(1.05);
}

.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, #030712 0%, rgba(3, 7, 18, 0.88) 44%, rgba(3, 7, 18, 0.58) 100%),
        linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.35) 100%);
}

.detail-layout {
    position: relative;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
    min-height: 640px;
    padding: 90px 0 62px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(248, 250, 252, 0.14);
    border-radius: 26px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    max-width: 860px;
    margin: 14px 0 18px;
    font-size: clamp(46px, 6vw, 86px);
    line-height: 0.96;
    font-weight: 300;
    letter-spacing: -0.07em;
}

.back-link {
    color: #cbd5e1;
    border-bottom: 1px solid rgba(226, 232, 240, 0.42);
}

.one-line {
    max-width: 780px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta,
.large-tags {
    margin: 20px 0;
}

.player-section {
    padding: 38px 0 20px;
}

.video-wrap {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(248, 250, 252, 0.14);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.08));
    cursor: pointer;
}

.play-overlay span {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(248, 250, 252, 0.9);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    clip-path: polygon(36% 25%, 36% 75%, 76% 50%);
}

.video-wrap.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.detail-copy {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding: 40px 0 12px;
}

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

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

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

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

.footer-logo {
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 600;
}

.site-footer p {
    max-width: 480px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-links a {
    padding: 8px 11px;
    color: #cbd5e1;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.is-hidden {
    display: none !important;
}

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

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

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

    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
    }

    .main-nav {
        width: 100%;
    }

    .hero {
        min-height: 82vh;
    }

    .hero-content {
        bottom: 9%;
    }

    .hero-content p {
        font-size: 16px;
    }

    .search-inner,
    .section-head,
    .footer-grid {
        align-items: stretch;
        flex-direction: column;
        display: flex;
    }

    .movie-grid,
    .ranking-grid,
    .category-list,
    .related-grid,
    .overview-grid,
    .detail-copy {
        grid-template-columns: 1fr;
    }

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

    .detail-layout {
        grid-template-columns: 1fr;
        gap: 26px;
        align-items: end;
        min-height: auto;
        padding: 52px 0;
    }

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

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

    .footer-links {
        justify-content: flex-start;
    }
}
