:root {
    --brand-900: #0f172a;
    --brand-800: #1e293b;
    --teal-700: #0f766e;
    --teal-600: #0d9488;
    --cyan-600: #0891b2;
    --blue-600: #2563eb;
    --amber-500: #f59e0b;
    --rose-500: #f43f5e;
    --paper: #ffffff;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --radius-xl: 1.5rem;
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.10);
}

body {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 50%, #f8fafc 100%);
    color: #1f2937;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--teal-600), var(--cyan-600), var(--blue-600));
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.28);
}

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

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--teal-600);
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08) rotate(5deg);
}

.brand-name {
    font-size: 1.2rem;
}

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

.nav-link,
.mobile-nav-link {
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.92rem;
    font-weight: 650;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.nav-link-muted {
    opacity: 0.92;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 4px;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.hero-carousel {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.hero-track {
    position: relative;
    height: 590px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    z-index: 0;
    filter: saturate(1.08) contrast(1.05);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.65) 42%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    height: 45%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 74px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 36px;
    align-items: end;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 8px 13px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: #ccfbf1;
    background: rgba(20, 184, 166, 0.18);
    backdrop-filter: blur(10px);
    font-size: 0.92rem;
    font-weight: 700;
}

.hero-content h1,
.page-hero h1 {
    max-width: 820px;
    font-size: clamp(2.35rem, 6vw, 5rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
}

.hero-content p {
    max-width: 720px;
    margin-top: 18px;
    color: #dbeafe;
    font-size: 1.1rem;
    line-height: 1.8;
}

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

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

.button-primary {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(255, 255, 255, 0.18);
}

.button-secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

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

.hero-side-card {
    padding: 22px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.hero-side-card h2 {
    margin-bottom: 12px;
    font-size: 1.15rem;
    font-weight: 800;
}

.hero-side-card a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: #e0f2fe;
}

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

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 26px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-arrow,
.hero-dot {
    pointer-events: auto;
}

.hero-arrows {
    display: flex;
    gap: 10px;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 1.4rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(20, 184, 166, 0.7);
    transform: scale(1.05);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 30px;
    background: #ffffff;
}

.main-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 72px;
}

.section-block {
    margin-top: 54px;
}

.section-block:first-child {
    margin-top: 0;
}

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

.section-title h2 {
    color: #0f172a;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

.section-more {
    color: var(--teal-700);
    font-weight: 800;
}

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

.movie-card {
    min-width: 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--paper);
    box-shadow: var(--shadow-soft);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card);
}

.movie-card a {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4.2;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e, #1d4ed8);
}

.movie-card-compact .poster-wrap {
    aspect-ratio: 16 / 10;
}

.poster-wrap img {
    transition: transform 0.5s ease;
}

.movie-card:hover .poster-wrap img,
.wide-card:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 52%);
}

.score-pill,
.rank-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
    font-size: 0.84rem;
    font-weight: 800;
}

.rank-badge {
    left: 14px;
    right: auto;
    background: linear-gradient(135deg, var(--amber-500), #ef4444);
}

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

.movie-meta,
.wide-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--muted);
    font-size: 0.86rem;
}

.movie-card h3 {
    margin-top: 10px;
    color: #111827;
    font-size: 1.08rem;
    font-weight: 850;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.movie-card:hover h3,
.wide-card:hover h3 {
    color: var(--teal-700);
}

.movie-card p {
    margin-top: 8px;
    min-height: 44px;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-row span,
.detail-tags span,
.category-chip {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--teal-700);
    background: #ccfbf1;
    font-size: 0.78rem;
    font-weight: 750;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 24px;
    border-radius: var(--radius-xl);
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal-600), var(--cyan-600), var(--blue-600));
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -45px;
    bottom: -45px;
    width: 145px;
    height: 145px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    font-size: 1.35rem;
    font-weight: 900;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    color: #e0f2fe;
    line-height: 1.65;
}

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

.wide-card {
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wide-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.wide-card a {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    min-height: 172px;
}

.wide-poster {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e, #1d4ed8);
}

.wide-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wide-body h3 {
    color: #111827;
    font-size: 1.14rem;
    font-weight: 850;
}

.wide-body p {
    margin: 10px 0 14px;
    color: #64748b;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-500), var(--rose-500));
    font-weight: 900;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(120deg, var(--teal-600), var(--cyan-600), var(--blue-600));
}

.compact-hero {
    padding: 72px 0;
}

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

.page-hero p:last-child {
    max-width: 780px;
    margin-top: 18px;
    color: #ecfeff;
    font-size: 1.08rem;
    line-height: 1.75;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 16px;
    margin-bottom: 30px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #475569;
    font-size: 0.86rem;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    color: #111827;
    background: var(--soft);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--teal-600);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.empty-state {
    display: none;
    padding: 54px 24px;
    border-radius: var(--radius-xl);
    text-align: center;
    color: #64748b;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.detail-panel,
.related-panel,
.player-panel {
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.detail-head {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    padding: 28px;
}

.detail-cover {
    aspect-ratio: 3 / 4.2;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f766e, #1d4ed8);
}

.detail-info h1 {
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-meta {
    margin-top: 18px;
    font-size: 0.95rem;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.detail-intro {
    margin-top: 22px;
    color: #334155;
    font-size: 1.08rem;
    line-height: 1.8;
}

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

.movie-video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.42);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    width: 94px;
    height: 94px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--teal-600);
    background: #ffffff;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
    font-size: 2.3rem;
    transform: translateZ(0);
    transition: transform 0.22s ease;
}

.player-overlay:hover .play-circle {
    transform: scale(1.08);
}

.content-section {
    padding: 28px;
    border-top: 1px solid var(--line);
}

.content-section h2 {
    margin-bottom: 14px;
    color: #111827;
    font-size: 1.35rem;
    font-weight: 900;
}

.content-section p {
    color: #334155;
    font-size: 1.02rem;
    line-height: 1.9;
}

.review-box {
    border-radius: 18px;
    padding: 22px;
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.breadcrumb {
    margin-bottom: 20px;
    color: #64748b;
    font-size: 0.92rem;
}

.breadcrumb a {
    color: var(--teal-700);
    font-weight: 800;
}

.related-panel {
    padding: 22px;
}

.related-panel h2 {
    margin-bottom: 16px;
    color: #111827;
    font-size: 1.28rem;
    font-weight: 900;
}

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

.related-mini {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-mini img {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f766e, #1d4ed8);
}

.related-mini h3 {
    color: #111827;
    font-size: 0.98rem;
    font-weight: 850;
    line-height: 1.35;
}

.related-mini p {
    margin-top: 6px;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.45;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
}

.footer-brand {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 1.2rem;
}

.site-footer p {
    max-width: 460px;
    line-height: 1.75;
}

.site-footer h2 {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 1.06rem;
    font-weight: 850;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 9px 0;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #5eead4;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    font-size: 0.9rem;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--teal-600);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.back-top:hover {
    transform: translateY(-3px);
}

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

    .mobile-menu-button {
        display: flex;
    }

    .hero-content,
    .detail-layout,
    .detail-head,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

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

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

@media (max-width: 760px) {
    .hero-carousel,
    .hero-track {
        min-height: 540px;
        height: 540px;
    }

    .hero-content {
        padding-bottom: 82px;
    }

    .hero-content h1,
    .page-hero h1 {
        font-size: 2.2rem;
    }

    .hero-content p,
    .page-hero p:last-child {
        font-size: 1rem;
    }

    .main-shell {
        padding-top: 34px;
    }

    .section-title {
        align-items: start;
        flex-direction: column;
    }

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

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

    .movie-card p {
        min-height: 40px;
        font-size: 0.86rem;
    }

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

    .wide-card a {
        grid-template-columns: 120px minmax(0, 1fr);
        min-height: 140px;
    }

    .wide-body {
        padding: 14px;
    }

    .wide-body p {
        -webkit-line-clamp: 2;
        font-size: 0.88rem;
    }

    .detail-head,
    .content-section,
    .related-panel {
        padding: 20px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .nav-shell,
    .mobile-nav,
    .main-shell,
    .footer-shell,
    .hero-content,
    .hero-controls,
    .page-hero-inner {
        width: min(100% - 24px, 1180px);
    }

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

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

    .wide-card a,
    .related-mini {
        grid-template-columns: 96px minmax(0, 1fr);
    }
}
