:root {
    color-scheme: dark;
    --bg: #030712;
    --panel: rgba(17, 24, 39, 0.86);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #ffffff;
    --muted: #9ca3af;
    --soft: #d1d5db;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --green: #22c55e;
    --orange: #f97316;
    --pink: #ec4899;
    --purple: #a855f7;
    --red: #ef4444;
    --yellow: #eab308;
    --teal: #14b8a6;
    --slate: #94a3b8;
    --radius: 1.25rem;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.18), transparent 34rem),
        radial-gradient(circle at 85% 10%, rgba(34, 211, 238, 0.14), transparent 32rem),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    transition: background 0.28s ease, box-shadow 0.28s ease, backdrop-filter 0.28s ease;
}

.site-header.is-scrolled {
    background: rgba(17, 24, 39, 0.94);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.site-header-inner,
.section-inner {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.logo-mark {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.35);
    color: #fff;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.65rem;
}

.nav-link {
    color: var(--soft);
    font-size: 0.95rem;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--cyan);
}

.menu-toggle {
    display: none;
    width: 2.65rem;
    height: 2.65rem;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.72);
}

.menu-toggle span {
    display: block;
    width: 1.25rem;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--text);
}

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 5s ease;
}

.hero-slide.is-active img {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.94) 0%, rgba(3, 7, 18, 0.62) 47%, rgba(3, 7, 18, 0.18) 100%),
        linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.05) 44%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(1180px, calc(100% - 2rem));
    transform: translate(-50%, -44%);
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
    color: var(--cyan);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(2.5rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.08em;
}

.hero p {
    max-width: 650px;
    margin: 1.35rem 0 0;
    color: var(--soft);
    font-size: clamp(1rem, 2.2vw, 1.32rem);
    line-height: 1.7;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hero-tags {
    margin-top: 1.6rem;
}

.hero-tags span,
.tag-row span,
.meta-pill {
    border: 1px solid rgba(59, 130, 246, 0.34);
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #bfdbfe;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.38rem 0.7rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    margin-top: 2.25rem;
}

.btn,
.section-more,
.category-link,
.play-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.8rem;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary,
.play-now {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    padding: 0.85rem 1.4rem;
    box-shadow: 0 18px 38px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.66);
    color: var(--text);
    padding: 0.82rem 1.25rem;
    backdrop-filter: blur(12px);
}

.btn:hover,
.section-more:hover,
.category-link:hover,
.play-now:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.44);
    color: #fff;
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 1.2rem;
}

.hero-control.next {
    right: 1.2rem;
}

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

.hero-dot {
    width: 0.55rem;
    height: 0.55rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.22s ease, background 0.22s ease;
}

.hero-dot.is-active {
    width: 2.05rem;
    background: var(--blue);
}

.quick-search {
    position: absolute;
    right: max(1rem, calc((100% - 1180px) / 2));
    bottom: 7rem;
    z-index: 5;
    width: min(380px, calc(100% - 2rem));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    padding: 1rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-box input,
.filter-select,
.text-input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.95rem;
    outline: none;
    background: rgba(2, 6, 23, 0.76);
    color: var(--text);
    padding: 0.85rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.filter-select:focus,
.text-input:focus {
    border-color: rgba(59, 130, 246, 0.9);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.quick-results {
    display: none;
    margin-top: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(3, 7, 18, 0.95);
}

.quick-results.is-open {
    display: block;
}

.quick-result-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.72rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.quick-result-item:last-child {
    border-bottom: 0;
}

.quick-result-item img {
    width: 4.8rem;
    height: 3rem;
    border-radius: 0.65rem;
    object-fit: cover;
}

.quick-result-item strong {
    display: block;
    font-size: 0.9rem;
}

.quick-result-item span span {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.74rem;
}

main,
.page-main {
    min-height: 70vh;
}

.content-section {
    padding: 4.6rem 0;
}

.content-section.alt {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.5), rgba(3, 7, 18, 0));
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.category-card p,
.detail-lead,
.article-content p {
    color: var(--muted);
    line-height: 1.75;
}

.section-heading p {
    max-width: 42rem;
    margin: 0.5rem 0 0;
}

.section-more,
.category-link {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.62);
    color: var(--soft);
    padding: 0.75rem 1rem;
}

.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: var(--radius);
    background: rgba(17, 24, 39, 0.68);
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.48);
    background: rgba(17, 24, 39, 0.9);
    transform: translateY(-5px);
}

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

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

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

.card-play {
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.92);
    color: #fff;
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.35);
}

.rank-badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    display: grid;
    min-width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 0.75rem;
    background: rgba(234, 179, 8, 0.9);
    color: #0f172a;
    font-size: 0.85rem;
}

.card-body {
    padding: 1rem;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
    color: var(--muted);
    font-size: 0.76rem;
}

.card-meta span + span::before {
    content: "·";
    margin-right: 0.45rem;
    color: rgba(148, 163, 184, 0.55);
}

.movie-card h3 {
    display: -webkit-box;
    min-height: 3.05rem;
    margin: 0 0 0.55rem;
    overflow: hidden;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.55rem;
    margin: 0 0 0.85rem;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.52;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.tag-row span {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    font-size: 0.72rem;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 12rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(34, 211, 238, 0.08));
    padding: 1.25rem;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -2.5rem;
    bottom: -2.5rem;
    width: 8rem;
    height: 8rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.12;
}

.category-card h3 {
    position: relative;
    margin: 0 0 0.6rem;
    font-size: 1.25rem;
}

.category-card p,
.category-card .category-link {
    position: relative;
}

.category-card p {
    min-height: 5.2rem;
    margin: 0 0 1rem;
    font-size: 0.9rem;
}

.accent-blue { color: var(--blue); }
.accent-cyan { color: var(--cyan); }
.accent-orange { color: var(--orange); }
.accent-green { color: var(--green); }
.accent-pink { color: var(--pink); }
.accent-purple { color: var(--purple); }
.accent-red { color: var(--red); }
.accent-yellow { color: var(--yellow); }
.accent-teal { color: var(--teal); }
.accent-slate { color: var(--slate); }

.page-hero {
    padding: 8.8rem 0 3.5rem;
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(34, 211, 238, 0.08) 42%, rgba(3, 7, 18, 0) 72%),
        var(--bg);
}

.page-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.5rem);
}

.page-hero p {
    max-width: 56rem;
    margin: 1rem 0 0;
    font-size: 1.06rem;
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr 14rem 12rem;
    gap: 0.9rem;
    margin-bottom: 1.4rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.58);
}

.hidden-by-filter {
    display: none !important;
}

.no-results {
    display: none;
    margin: 2rem 0;
    padding: 2.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.7);
    color: var(--muted);
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 3rem 8rem 1fr;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.72);
    padding: 0.8rem;
}

.ranking-row .rank-no {
    display: grid;
    width: 2.45rem;
    height: 2.45rem;
    place-items: center;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, var(--yellow), var(--orange));
    color: #111827;
    font-weight: 900;
}

.ranking-row img {
    width: 8rem;
    height: 5rem;
    border-radius: 0.85rem;
    object-fit: cover;
}

.ranking-row h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.ranking-row p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.detail-hero {
    position: relative;
    padding: 8rem 0 2.8rem;
    overflow: hidden;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    filter: blur(1px);
}

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

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg), rgba(3, 7, 18, 0.55));
}

.detail-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 2rem;
    align-items: start;
}

.player-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1.55rem;
    background: #000;
    box-shadow: var(--shadow);
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-frame video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #020617;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.22), rgba(0, 0, 0, 0.62));
}

.play-button {
    position: relative;
    z-index: 2;
    display: grid;
    width: 5rem;
    height: 5rem;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 18px 45px rgba(59, 130, 246, 0.45);
}

.detail-title {
    margin-top: 1.6rem;
}

.detail-title h1 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 5vw, 4.25rem);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.detail-lead {
    max-width: 58rem;
    font-size: 1.06rem;
}

.side-panel,
.article-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.74);
    padding: 1.25rem;
}

.side-panel {
    position: sticky;
    top: 6rem;
}

.side-panel h2,
.article-card h2 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

.side-link {
    display: flex;
    gap: 0.8rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.side-link:last-child {
    border-bottom: 0;
}

.side-link img {
    width: 5.8rem;
    height: 3.7rem;
    border-radius: 0.75rem;
    object-fit: cover;
}

.side-link strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.92rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.side-link span {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.76rem;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 2rem;
    align-items: start;
    padding-bottom: 4rem;
}

.article-card {
    margin-bottom: 1.2rem;
}

.article-content p {
    margin: 0;
    font-size: 1.02rem;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.85rem;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.85);
    padding: 2.8rem 0 1.2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

.site-footer p {
    max-width: 36rem;
    color: var(--muted);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    justify-content: flex-end;
    gap: 0.8rem;
}

.footer-links a {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    padding: 0.55rem 0.85rem;
}

.footer-bottom {
    width: min(1180px, calc(100% - 2rem));
    margin: 2rem auto 0;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: #64748b;
    font-size: 0.85rem;
}

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

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

    .side-panel {
        position: static;
    }

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

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

    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 64px;
        right: 1rem;
        left: 1rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 1rem;
        background: rgba(17, 24, 39, 0.98);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-link {
        padding: 1rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    }

    .nav-link:last-child {
        border-bottom: 0;
    }

    .hero-content {
        top: 44%;
    }

    .quick-search {
        right: 1rem;
        bottom: 4.3rem;
    }

    .hero-control {
        display: none;
    }

    .content-section {
        padding: 3.2rem 0;
    }

    .section-heading {
        display: block;
    }

    .section-more {
        margin-top: 1rem;
    }

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

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

    .ranking-row {
        grid-template-columns: 2.6rem 6.2rem 1fr;
    }

    .ranking-row img {
        width: 6.2rem;
        height: 4rem;
    }

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

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

@media (max-width: 500px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .page-hero h1,
    .detail-title h1 {
        letter-spacing: -0.04em;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn,
    .play-now {
        width: 100%;
    }
}
