:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #38bdf8;
    --accent-strong: #2563eb;
    --accent-glow: rgba(56, 189, 248, 0.38);
    --radius: 24px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 14% 12%, rgba(56, 189, 248, 0.18), transparent 28rem),
        radial-gradient(circle at 80% 5%, rgba(79, 70, 229, 0.18), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #082f49 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(22px);
}

.header-inner {
    width: min(1440px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 900;
    background: linear-gradient(135deg, #0ea5e9, #2563eb, #7c3aed);
    box-shadow: 0 16px 40px rgba(14, 165, 233, 0.26);
}

.brand-text strong {
    display: block;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

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

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    transform: translateY(-1px);
}

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

.header-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
    color: #ffffff;
    border: 1px solid var(--line);
    outline: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 210px;
    padding: 11px 14px;
}

.header-search input:focus,
.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(56, 189, 248, 0.75);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.header-search button,
.hero-search button,
.primary-btn,
.ghost-btn,
.section-more,
.player-cover span {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    color: #ffffff;
}

.header-search button,
.hero-search button,
.primary-btn {
    padding: 11px 18px;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    box-shadow: 0 14px 38px rgba(37, 99, 235, 0.34);
}

.ghost-btn,
.section-more {
    padding: 10px 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.72);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1440px, calc(100% - 40px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.94);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.hero,
.page-shell,
.content-section,
.detail-layout,
.site-footer {
    width: min(1440px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}

.hero {
    padding: 34px 0 28px;
}

.hero-frame {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 36px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(340px, 0.55fr);
    gap: 48px;
    align-items: center;
    padding: 64px;
    opacity: 0;
    transform: scale(1.018);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    filter: blur(20px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.42;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.56) 58%, rgba(2, 6, 23, 0.86)),
        radial-gradient(circle at 22% 24%, rgba(56, 189, 248, 0.22), transparent 26rem);
}

.hero-kicker,
.kicker,
.breadcrumb,
.card-meta,
.detail-meta {
    color: var(--accent);
    letter-spacing: 0.08em;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 16px 0 20px;
    font-size: clamp(44px, 7vw, 92px);
    line-height: 0.96;
    max-width: 920px;
}

.hero-desc {
    max-width: 760px;
    margin: 0 0 18px;
    color: #e2e8f0;
    font-size: clamp(18px, 2vw, 24px);
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.hero-meta span,
.detail-meta span {
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    color: #e2e8f0;
    letter-spacing: 0;
    text-transform: none;
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.56);
    aspect-ratio: 2 / 3;
}

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

.hero-poster:hover img,
.movie-card:hover img,
.rank-list a:hover img {
    transform: scale(1.06);
}

.hero-dots {
    position: absolute;
    left: 64px;
    bottom: 38px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 38px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.32);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #38bdf8;
    box-shadow: 0 0 22px var(--accent-glow);
}

.hero-bottom {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(260px, 1.1fr) minmax(300px, 1fr);
    gap: 18px;
    margin-top: 20px;
}

.hero-search,
.hero-category-links,
.hero-mini-row,
.filter-panel,
.page-hero,
.info-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 58px rgba(2, 6, 23, 0.28);
}

.hero-search {
    display: flex;
    gap: 10px;
    padding: 14px;
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 13px 16px;
}

.hero-category-links {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 14px;
}

.hero-category-links a {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.18);
}

.hero-mini-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 12px;
}

.hero-mini-card {
    position: relative;
    min-height: 98px;
    overflow: hidden;
    border-radius: 18px;
    isolation: isolate;
}

.hero-mini-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-mini-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
}

.hero-mini-card span {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 8px;
    z-index: 2;
    font-size: 12px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-section,
.page-shell {
    padding: 52px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1.08;
}

.section-heading p,
.page-hero p,
.info-card p,
.detail-copy p,
.footer-grid p {
    color: var(--muted);
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58));
    box-shadow: 0 18px 56px rgba(2, 6, 23, 0.28);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: 0 24px 80px rgba(2, 132, 199, 0.2);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #0f172a;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.34);
}

.card-body {
    padding: 15px;
}

.card-body h2 {
    min-height: 50px;
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-meta {
    margin: 0 0 10px;
    font-size: 12px;
    color: #7dd3fc;
    letter-spacing: 0;
    text-transform: none;
}

.card-desc {
    min-height: 64px;
    margin: 0 0 12px;
    color: #cbd5e1;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    padding: 6px 9px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.14);
    font-size: 12px;
    font-weight: 700;
}

.page-hero {
    padding: 48px;
    margin-top: 34px;
    overflow: hidden;
    position: relative;
}

.page-hero::before {
    content: "";
    position: absolute;
    width: 440px;
    height: 440px;
    right: -120px;
    top: -160px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.22), transparent 68%);
}

.page-hero h1,
.page-hero p,
.page-hero .hero-actions {
    position: relative;
}

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

.category-card,
.info-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 56px rgba(2, 6, 23, 0.26);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-card h2,
.info-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 13px 16px;
}

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

.rank-list a {
    display: grid;
    grid-template-columns: 58px 80px 1fr auto;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.7);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-list a:hover {
    transform: translateX(5px);
    border-color: rgba(56, 189, 248, 0.4);
}

.rank-num {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.rank-list img {
    width: 80px;
    height: 110px;
    object-fit: cover;
    border-radius: 14px;
    transition: transform 0.35s ease;
}

.rank-title strong {
    display: block;
    margin-bottom: 4px;
    font-size: 18px;
}

.rank-title span,
.rank-extra {
    color: var(--muted);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    gap: 28px;
    padding: 36px 0 56px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 30px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    z-index: 3;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.88));
}

.player-cover span {
    position: relative;
    z-index: 2;
    padding: 16px 28px;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.34);
}

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

.detail-copy,
.detail-side {
    display: grid;
    gap: 22px;
}

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

.detail-copy h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.detail-copy p {
    margin: 0;
    color: #dbeafe;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

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

.breadcrumb {
    margin: 0 0 16px;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
}

.breadcrumb a {
    color: #bae6fd;
}

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

.site-footer {
    margin-top: 50px;
    padding: 44px 0;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.footer-grid a:hover {
    color: #ffffff;
}

.copyright {
    margin: 24px 0 0;
    color: var(--muted);
}

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1180px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 300px;
        padding: 44px;
    }

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

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

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

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

    .detail-side {
        grid-template-columns: 280px 1fr;
        align-items: start;
    }
}

@media (max-width: 820px) {
    .hero,
    .page-shell,
    .content-section,
    .detail-layout,
    .site-footer,
    .header-inner,
    .mobile-nav {
        width: min(100% - 24px, 1440px);
    }

    .hero-frame {
        min-height: 760px;
        border-radius: 26px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
        padding: 28px;
    }

    .hero-poster {
        width: min(260px, 70vw);
        margin: 0 auto;
    }

    .hero-dots {
        left: 28px;
        bottom: 22px;
    }

    .hero-mini-row {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

    .category-grid,
    .filter-panel,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .rank-list a {
        grid-template-columns: 46px 64px 1fr;
    }

    .rank-extra {
        display: none;
    }

    .rank-list img {
        width: 64px;
        height: 88px;
    }

    .page-hero {
        padding: 30px;
    }
}

@media (max-width: 520px) {
    .brand-text small {
        display: none;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-actions,
    .hero-search {
        display: grid;
    }

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

    .card-body h2 {
        min-height: auto;
    }
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

.category-thumbs img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
}
