:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --emerald: #10b981;
    --emerald-2: #059669;
    --cyan: #06b6d4;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.7;
}

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

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

button,
input {
    font: inherit;
}

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

.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: 80;
    color: #fff;
    background: linear-gradient(90deg, #1e293b, #0f172a);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #052e1a;
    background: linear-gradient(135deg, #34d399, #67e8f9);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.45);
}

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

.brand-title {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    margin-top: 5px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
}

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

.nav-link {
    padding: 9px 13px;
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.icon-button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.18);
}

.mobile-only {
    display: none;
}

.search-panel {
    display: none;
    padding: 0 0 18px;
}

.search-panel.is-open {
    display: block;
}

.search-panel input,
.quick-search-box input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    outline: 0;
    border-radius: 16px;
    color: #fff;
    background: rgba(15, 23, 42, 0.76);
    padding: 14px 18px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.search-panel input:focus,
.quick-search-box input:focus {
    border-color: rgba(16, 185, 129, 0.85);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav-inner {
    display: grid;
    padding: 12px 0;
}

.hero-carousel {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    background: #0f172a;
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.25)),
        linear-gradient(0deg, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.08) 45%, rgba(15, 23, 42, 0.72));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 610px;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 760px;
    color: #fff;
    padding: 42px 0 88px;
}

.eyebrow {
    margin: 0 0 14px;
    color: #67e8f9;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy h2 {
    margin: 18px 0 12px;
    color: #6ee7b7;
    font-size: clamp(24px, 4vw, 40px);
    line-height: 1.2;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: 19px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.24);
    font-size: 12px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #052e1a;
    background: linear-gradient(135deg, #34d399, #67e8f9);
    box-shadow: 0 16px 36px rgba(16, 185, 129, 0.32);
}

.primary-button:hover,
.small-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(16px);
}

.small-button {
    min-height: 38px;
    color: #fff;
    background: var(--emerald-2);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 3;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    pointer-events: none;
}

.hero-controls button {
    pointer-events: auto;
    border: 0;
    cursor: pointer;
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    font-size: 28px;
}

.hero-dots {
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 34px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
    background: #34d399;
}

.quick-search-section {
    margin-top: -56px;
    position: relative;
    z-index: 5;
}

.quick-search-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
    align-items: center;
    padding: 26px;
    border-radius: 26px;
    color: #fff;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.quick-search-card p {
    margin: 0;
    color: #cbd5e1;
}

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

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

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

.section-more {
    color: var(--emerald-2);
    font-weight: 900;
    white-space: nowrap;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 62px rgba(15, 23, 42, 0.16);
}

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

.poster-link img,
.category-tile img,
.ranking-thumb img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.card-gradient,
.category-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.05) 62%);
}

.play-chip,
.duration-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
}

.play-chip {
    left: 14px;
    bottom: 14px;
    width: 38px;
    height: 38px;
    background: rgba(16, 185, 129, 0.92);
}

.duration-chip {
    right: 12px;
    bottom: 15px;
    min-height: 26px;
    padding: 2px 9px;
    background: rgba(15, 23, 42, 0.76);
    font-size: 12px;
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-card-body {
    padding: 16px;
}

.movie-card h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-copy h3 a:hover,
.detail-side-card a:hover {
    color: var(--emerald-2);
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.card-meta {
    gap: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.card-meta span + span::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-right: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    vertical-align: middle;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

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

.category-tile {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    background: #0f172a;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.category-tile strong,
.category-tile em {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
}

.category-tile strong {
    bottom: 50px;
    font-size: 24px;
}

.category-tile em {
    bottom: 20px;
    color: #dbeafe;
    font-size: 13px;
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.24), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e293b 58%, #064e3b);
}

.page-hero {
    padding: 58px 0 68px;
}

.slim-hero {
    padding: 48px 0;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #6ee7b7;
}

.filter-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.filter-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-line span {
    color: #334155;
    font-weight: 900;
}

.filter-line button {
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    color: #334155;
    background: #f1f5f9;
    cursor: pointer;
}

.filter-line button.active,
.filter-line button:hover {
    color: #fff;
    background: var(--emerald-2);
}

.empty-state {
    display: none;
    margin: 30px 0;
    padding: 28px;
    border-radius: 20px;
    color: #64748b;
    text-align: center;
    background: #fff;
}

.empty-state.is-visible {
    display: block;
}

.ranking-list {
    display: grid;
    gap: 16px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 58px 170px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.compact-ranking .ranking-item {
    grid-template-columns: 48px 140px minmax(0, 1fr) auto;
}

.ranking-number {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-weight: 900;
}

.ranking-thumb {
    display: block;
    height: 96px;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

.ranking-copy h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.ranking-copy p {
    margin: 0 0 10px;
    color: var(--muted);
}

.overview-stack {
    display: grid;
    gap: 34px;
}

.category-overview-block {
    padding: 24px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
}

.category-overview-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.category-overview-head h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.category-overview-head p {
    margin: 0;
    color: var(--muted);
}

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

.detail-bg,
.detail-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.detail-bg {
    object-fit: cover;
    filter: blur(4px) saturate(1.08);
    transform: scale(1.04);
}

.detail-shade {
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.70), rgba(15, 23, 42, 0.48)),
        linear-gradient(0deg, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.18));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 48px 0 72px;
}

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

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    background: #0f172a;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
}

.lead-text {
    max-width: 780px;
    color: #e2e8f0;
    font-size: 20px;
}

.detail-meta {
    margin: 18px 0;
}

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

.player-card {
    padding: 18px;
    border-radius: 30px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
}

.movie-video,
.video-overlay,
.video-overlay img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    z-index: 1;
    object-fit: contain;
}

.video-overlay {
    z-index: 2;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #000;
}

.video-overlay img {
    object-fit: cover;
    opacity: 0.76;
}

.video-overlay span {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 86px;
    height: 86px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #052e1a;
    background: linear-gradient(135deg, #34d399, #67e8f9);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
    font-size: 34px;
}

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

.detail-body-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.detail-article,
.detail-side-card {
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
}

.detail-article {
    padding: 32px;
}

.detail-article h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-article p {
    margin: 0 0 26px;
    color: #334155;
    font-size: 17px;
}

.detail-side-card {
    align-self: start;
    padding: 26px;
}

.detail-side-card h2 {
    margin: 0 0 16px;
}

.detail-side-card dl {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px 14px;
    margin: 0;
}

.detail-side-card dt {
    color: #64748b;
    font-weight: 800;
}

.detail-side-card dd {
    margin: 0;
    color: #0f172a;
}

.site-footer {
    margin-top: 44px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding: 48px 0 32px;
}

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

.site-footer p {
    color: #94a3b8;
}

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

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 9px;
}

.site-footer a:hover {
    color: #6ee7b7;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding: 18px 0;
    text-align: center;
    color: #94a3b8;
}

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

    .mobile-only {
        display: inline-grid;
    }

    .quick-search-card,
    .detail-layout,
    .detail-body-section,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .ranking-item,
    .compact-ranking .ranking-item {
        grid-template-columns: 44px 112px minmax(0, 1fr);
    }

    .ranking-item .small-button {
        grid-column: 2 / -1;
        justify-self: start;
    }

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

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

    .brand-title {
        font-size: 17px;
    }

    .brand-subtitle {
        display: none;
    }

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

    .hero-copy p,
    .lead-text {
        font-size: 16px;
    }

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

    .quick-search-section {
        margin-top: 0;
        padding-top: 18px;
        background: #0f172a;
    }

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

    .section-heading,
    .category-overview-head {
        align-items: start;
        flex-direction: column;
    }

    .movie-grid,
    .featured-grid,
    .category-page-grid,
    .mini-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .ranking-item,
    .compact-ranking .ranking-item {
        grid-template-columns: 42px 92px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .ranking-thumb {
        height: 72px;
    }

    .ranking-copy p {
        display: none;
    }

    .detail-hero-inner {
        padding: 34px 0 44px;
    }

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

    .detail-article,
    .detail-side-card {
        padding: 22px;
    }

    .video-overlay span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
