:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-solid: #111827;
    --line: rgba(96, 165, 250, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --orange: #f97316;
    --red: #ef4444;
    --green: #10b981;
    --pink: #ec4899;
    --purple: #a855f7;
    --yellow: #eab308;
    --radius: 22px;
    --shadow: 0 20px 70px rgba(2, 6, 23, 0.5);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #000 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

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

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

.brand-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.45);
}

.brand-name {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
    -webkit-background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #7dd3fc;
}

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

.header-search input,
.mobile-search input,
.filter-field input,
.filter-field select {
    width: 260px;
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 999px;
    outline: none;
    padding: 10px 15px;
    background: rgba(15, 23, 42, 0.7);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-field input:focus,
.filter-field select:focus {
    border-color: rgba(34, 211, 238, 0.85);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.header-search button,
.mobile-search button,
.filter-actions button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    color: #e2e8f0;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 12px 24px 20px;
    border-top: 1px solid rgba(96, 165, 250, 0.18);
    background: rgba(2, 6, 23, 0.96);
}

.mobile-nav.is-open {
    display: grid;
    gap: 10px;
}

.mobile-nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.68);
}

.mobile-nav-link.is-active {
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.18);
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img,
.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-shade,
.detail-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.18)),
        linear-gradient(0deg, var(--bg), transparent 62%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    max-width: 1280px;
    min-height: 600px;
    margin: 0 auto;
    padding: 80px 24px;
}

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

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin: 0 0 22px;
    padding: 8px 16px;
    border: 1px solid rgba(96, 165, 250, 0.34);
    border-radius: 999px;
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.18);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero-line,
.page-hero p,
.detail-line {
    max-width: 780px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 20px;
}

.hero-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 0;
}

.hero-tags span,
.card-tags span {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 5px 10px;
    color: #bfdbfe;
    background: rgba(15, 23, 42, 0.72);
    font-size: 13px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 26px 0 0;
    color: #dbeafe;
}

.hero-meta span {
    border-radius: 12px;
    padding: 8px 12px;
    background: rgba(2, 6, 23, 0.55);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 34px 0 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    padding: 0 24px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.38);
}

.btn-ghost {
    border: 1px solid rgba(125, 211, 252, 0.36);
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.62);
}

.hero-board {
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: var(--radius);
    padding: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-board h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.hero-mini-card {
    display: grid;
    grid-template-columns: 32px 76px 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-mini-card:first-of-type {
    border-top: 0;
}

.hero-mini-card span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--yellow));
    font-weight: 800;
}

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

.hero-mini-card strong {
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.4;
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px;
}

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

.section-kicker {
    display: inline-block;
    width: 5px;
    height: 34px;
    margin: 0 12px -7px 0;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--blue), var(--cyan));
}

.section-heading h2 {
    display: inline;
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -0.03em;
}

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

.section-more {
    flex-shrink: 0;
    color: #60a5fa;
    font-weight: 700;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(226px, 1fr));
    gap: 22px;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.64);
    box-shadow: 0 14px 42px rgba(2, 6, 23, 0.32);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.52);
    box-shadow: 0 20px 52px rgba(37, 99, 235, 0.18);
}

.movie-card.is-hidden {
    display: none;
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(6, 182, 212, 0.12));
}

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

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

.card-cover::after {
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.card-duration,
.card-category {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    background: rgba(2, 6, 23, 0.76);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 700;
}

.card-duration {
    top: 10px;
    right: 10px;
}

.card-category {
    left: 10px;
    bottom: 10px;
    background: rgba(37, 99, 235, 0.82);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    min-height: 3.1em;
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.45;
}

.card-body h3 a:hover {
    color: #60a5fa;
}

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

.card-tags {
    margin-top: 14px;
}

.card-tags span {
    padding: 4px 8px;
    font-size: 12px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 14px 0 0;
    color: #94a3b8;
    font-size: 13px;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #eab308);
    box-shadow: 0 8px 22px rgba(249, 115, 22, 0.42);
}

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

.category-tile {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.45;
}

.category-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.76), rgba(2, 6, 23, 0.94));
}

.category-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 240px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
}

.category-content strong {
    font-size: 24px;
}

.category-content p {
    margin: 10px 0 12px;
    color: #dbeafe;
}

.category-content em {
    color: #93c5fd;
    font-style: normal;
    font-weight: 800;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.category-chips span {
    max-width: 100%;
    overflow: hidden;
    border-radius: 999px;
    padding: 4px 8px;
    color: #e0f2fe;
    background: rgba(2, 6, 23, 0.38);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.from-green .category-glow { background: linear-gradient(135deg, rgba(16, 185, 129, 0.75), rgba(2, 6, 23, 0.94)); }
.from-orange .category-glow { background: linear-gradient(135deg, rgba(249, 115, 22, 0.75), rgba(2, 6, 23, 0.94)); }
.from-cyan .category-glow { background: linear-gradient(135deg, rgba(6, 182, 212, 0.75), rgba(2, 6, 23, 0.94)); }
.from-blue .category-glow { background: linear-gradient(135deg, rgba(37, 99, 235, 0.75), rgba(2, 6, 23, 0.94)); }
.from-red .category-glow { background: linear-gradient(135deg, rgba(239, 68, 68, 0.75), rgba(2, 6, 23, 0.94)); }
.from-pink .category-glow { background: linear-gradient(135deg, rgba(236, 72, 153, 0.75), rgba(2, 6, 23, 0.94)); }
.from-purple .category-glow { background: linear-gradient(135deg, rgba(168, 85, 247, 0.75), rgba(2, 6, 23, 0.94)); }
.from-yellow .category-glow { background: linear-gradient(135deg, rgba(234, 179, 8, 0.75), rgba(2, 6, 23, 0.94)); }

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr 220px 180px auto;
    gap: 14px;
    align-items: end;
    margin: 0 0 24px;
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 22px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.68);
}

.filter-field {
    display: grid;
    gap: 7px;
}

.filter-field label {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
}

.filter-field input,
.filter-field select {
    width: 100%;
    border-radius: 14px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-actions span {
    color: #93c5fd;
    font-size: 13px;
    white-space: nowrap;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(96, 165, 250, 0.18);
}

.slim-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 76px 24px 34px;
}

.slim-hero > div {
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 28px;
    padding: 46px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.24), transparent 24rem),
        rgba(15, 23, 42, 0.66);
    box-shadow: var(--shadow);
}

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

.detail-inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 26px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: #93c5fd;
}

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

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

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

.detail-copy {
    max-width: 820px;
}

.detail-tags {
    margin-bottom: 28px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 30px;
}

.detail-meta-grid span {
    display: grid;
    gap: 4px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    padding: 12px;
    color: #dbeafe;
    background: rgba(2, 6, 23, 0.48);
}

.detail-meta-grid b {
    color: #93c5fd;
    font-size: 12px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 26px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    padding-left: 5px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 42px rgba(37, 99, 235, 0.46);
    font-size: 32px;
}

.player-overlay strong {
    font-size: 22px;
}

.story-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    padding: 30px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.66);
    box-shadow: var(--shadow);
}

.story-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.story-card p {
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: 17px;
}

.story-card p:last-child {
    margin-bottom: 0;
}

.site-footer {
    border-top: 1px solid rgba(96, 165, 250, 0.18);
    background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px;
}

.footer-inner p {
    max-width: 620px;
    margin: 8px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #93c5fd;
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-board {
        max-width: 560px;
    }

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

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

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

    .brand-name {
        font-size: 19px;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-search {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .mobile-search input {
        width: 100%;
    }

    .hero,
    .hero-inner {
        min-height: auto;
    }

    .hero-inner {
        padding: 64px 16px;
    }

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .hero-line,
    .page-hero p,
    .detail-line {
        font-size: 17px;
    }

    .content-section,
    .slim-hero,
    .detail-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-heading,
    .footer-inner {
        display: grid;
    }

    .movie-grid,
    .movie-grid-four,
    .category-grid,
    .detail-layout,
    .detail-meta-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .slim-hero > div {
        padding: 28px;
    }
}
