:root {
    --bg: #020617;
    --surface: #0f172a;
    --surface-soft: #111827;
    --card: #ffffff;
    --muted: #64748b;
    --text: #0f172a;
    --text-dark: #f8fafc;
    --line: rgba(148, 163, 184, 0.24);
    --cyan: #0891b2;
    --cyan-light: #22d3ee;
    --blue: #2563eb;
    --shadow: 0 22px 60px rgba(2, 6, 23, 0.18);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: #f8fafc;
    line-height: 1.65;
}

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 36px rgba(8, 145, 178, 0.35);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-4deg);
}

.brand-text {
    font-size: 22px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.mobile-link {
    padding: 10px 15px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.1);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #e2e8f0;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #0f172a;
}

.mobile-panel {
    display: none;
    padding: 0 18px 18px;
    background: rgba(255, 255, 255, 0.96);
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: var(--bg);
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.72s ease;
}

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

.hero-content {
    width: min(1180px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    padding: 96px 0 120px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(8, 145, 178, 0.18);
    border: 1px solid rgba(103, 232, 249, 0.28);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
    max-width: 760px;
    margin: 20px 0 18px;
    font-size: clamp(40px, 7vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.hero p,
.page-hero p,
.detail-intro p {
    max-width: 700px;
    margin: 0 0 28px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
    font-weight: 800;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.primary-action,
.ghost-action,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 900;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-action {
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.28);
}

.ghost-action {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.primary-action:hover,
.ghost-action:hover,
.section-more:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: #fff;
}

.hero-side-card {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 84px;
    z-index: 4;
    width: min(360px, calc(100% - 48px));
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    color: #fff;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.hero-side-card > span,
.ranking-head h2,
.section-heading h2 {
    font-size: 24px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.content-section,
.page-shell,
.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.no-top {
    padding-top: 0;
}

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

.section-heading h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
}

.section-heading p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
}

.section-more,
.text-link {
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.1);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(8, 145, 178, 0.38);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 2.85;
    overflow: hidden;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 40%, rgba(34, 211, 238, 0.08), transparent 44%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after {
    opacity: 1;
}

.play-dot {
    position: absolute;
    right: 13px;
    bottom: 13px;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.28);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(12px);
}

.movie-body {
    padding: 18px;
}

.movie-body h2 {
    margin: 8px 0 9px;
    font-size: 19px;
    line-height: 1.28;
    letter-spacing: -0.03em;
}

.movie-body h2 a:hover {
    color: var(--cyan);
}

.movie-body p {
    display: -webkit-box;
    min-height: 4.8em;
    margin: 0 0 14px;
    overflow: hidden;
    color: #475569;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.tag-row span {
    color: #0369a1;
    border-color: rgba(8, 145, 178, 0.16);
    background: rgba(8, 145, 178, 0.09);
}

.movie-card.compact .movie-body h2 {
    font-size: 17px;
}

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

.category-tile {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    border-radius: 26px;
    color: #fff;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
}

.category-tile strong {
    font-size: 25px;
    letter-spacing: -0.04em;
}

.category-tile span {
    display: block;
    margin-top: 10px;
    color: #e0f2fe;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.ranking-panel {
    position: sticky;
    top: 88px;
    padding: 22px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(180deg, #0f172a, #111827);
    box-shadow: var(--shadow);
}

.ranking-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.ranking-head h2 {
    margin: 0;
}

.ranking-head a {
    color: #67e8f9;
    font-weight: 800;
}

.ranking-list,
.hero-side-card {
    display: grid;
    gap: 12px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 13px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    color: inherit;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.22s ease, transform 0.22s ease;
}

.horizontal-card:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.15);
}

.mini-poster {
    display: block;
    aspect-ratio: 1 / 1.18;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
}

.horizontal-card strong {
    display: block;
    margin-bottom: 4px;
    line-height: 1.3;
}

.horizontal-card em {
    color: #cbd5e1;
    font-size: 13px;
    font-style: normal;
}

.page-shell {
    padding-bottom: 70px;
}

.page-hero {
    min-height: 360px;
    margin: 26px 0 40px;
    display: flex;
    align-items: center;
    padding: 52px;
    border-radius: 32px;
    color: #fff;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.compact-hero {
    background: radial-gradient(circle at 10% 20%, rgba(34, 211, 238, 0.22), transparent 34%), linear-gradient(135deg, #0f172a, #1e3a8a);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 15px;
    padding: 0 14px;
    color: #0f172a;
    background: #f8fafc;
    outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.category-card {
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.category-covers span {
    display: block;
    aspect-ratio: 2 / 2.8;
    border-radius: 16px;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
    letter-spacing: -0.04em;
}

.category-card p {
    margin: 0 0 16px;
    color: var(--muted);
}

.detail-shell {
    width: 100%;
}

.detail-hero {
    min-height: 560px;
    padding: 34px max(24px, calc((100vw - 1180px) / 2)) 54px;
    color: #fff;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 38px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 800;
}

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-head-grid {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster {
    aspect-ratio: 2 / 2.85;
    border-radius: 26px;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.detail-intro h1 {
    margin-top: 18px;
}

.detail-tags {
    margin-top: 18px;
}

.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: -52px auto 0;
    position: relative;
    z-index: 2;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    background: #000;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.36);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(8, 145, 178, 0.22), rgba(2, 6, 23, 0.46));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 46px rgba(8, 145, 178, 0.36);
    font-size: 34px;
}

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

.detail-content {
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.story-card,
.detail-side {
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.story-card h2,
.detail-side h2 {
    margin: 0 0 14px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.story-card p {
    margin: 0 0 26px;
    color: #334155;
}

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

.detail-side dl {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    margin: 0;
}

.detail-side dt {
    color: var(--muted);
    font-weight: 900;
}

.detail-side dd {
    margin: 0;
    color: #0f172a;
    font-weight: 750;
}

.related-section {
    width: min(1180px, calc(100% - 32px));
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: #020617;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-brand {
    color: #fff;
    font-size: 22px;
}

.site-footer p {
    max-width: 420px;
    color: #94a3b8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a:hover {
    color: #67e8f9;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: #94a3b8;
}

[hidden] {
    display: none !important;
}

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

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

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

    .ranking-panel {
        position: relative;
        top: 0;
    }

    .hero-side-card {
        display: none;
    }
}

@media (max-width: 760px) {
    .nav-links {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .mobile-panel.open {
        display: grid;
        gap: 8px;
    }

    .brand-text {
        font-size: 18px;
    }

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        padding: 78px 0 116px;
    }

    .hero h1,
    .page-hero h1,
    .detail-intro h1 {
        font-size: clamp(34px, 12vw, 52px);
    }

    .hero-arrow {
        display: none;
    }

    .section-heading {
        display: grid;
        align-items: start;
    }

    .movie-grid,
    .featured-grid,
    .all-grid,
    .ranking-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .movie-body {
        padding: 14px;
    }

    .movie-body h2 {
        font-size: 16px;
    }

    .movie-body p {
        min-height: 4.4em;
        font-size: 13px;
    }

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

    .page-hero {
        min-height: 300px;
        padding: 28px;
        border-radius: 24px;
    }

    .detail-hero {
        padding: 24px 16px 72px;
    }

    .detail-head-grid {
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 18px;
        align-items: center;
    }

    .detail-meta,
    .detail-tags {
        gap: 6px;
    }

    .player-section {
        margin-top: -38px;
    }

    .player-frame {
        border-radius: 20px;
    }

    .detail-content,
    .related-section,
    .player-section {
        width: calc(100% - 24px);
    }

    .story-card,
    .detail-side {
        padding: 20px;
        border-radius: 22px;
    }

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

@media (max-width: 460px) {
    .movie-grid,
    .featured-grid,
    .all-grid,
    .ranking-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

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