:root {
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --teal-600: #0d9488;
    --cyan-600: #0891b2;
    --rose-500: #f43f5e;
    --amber-400: #fbbf24;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.10);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: linear-gradient(135deg, var(--gray-50), var(--emerald-50), #f0fdfa);
    color: var(--gray-900);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--emerald-600), var(--teal-600), var(--cyan-600));
    box-shadow: 0 12px 30px rgba(5, 150, 105, 0.25);
}

.nav-shell {
    width: min(100% - 32px, var(--container));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    color: var(--white);
    line-height: 1.15;
}

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

.brand-copy small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
}

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

.desktop-nav > a,
.nav-dropdown > button {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-weight: 700;
    padding: 8px 0;
}

.desktop-nav > a:hover,
.desktop-nav > a.is-active,
.nav-dropdown:hover > button {
    color: var(--white);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    width: 190px;
    transform: translateX(-50%) translateY(8px);
    background: var(--white);
    border-radius: 16px;
    padding: 10px;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--gray-700);
    font-size: 14px;
}

.nav-dropdown-menu a:hover {
    background: var(--emerald-50);
    color: var(--emerald-600);
}

.header-search {
    position: relative;
    width: min(280px, 24vw);
}

.global-search-input,
.local-search input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 11px 18px;
}

.global-search-input {
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.global-search-input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.search-results {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(440px, 92vw);
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    padding: 10px;
    display: none;
    max-height: 520px;
    overflow: auto;
}

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

.search-result-item {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    padding: 8px;
    border-radius: 14px;
}

.search-result-item:hover {
    background: var(--emerald-50);
}

.search-result-item img {
    width: 54px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--gray-100);
}

.search-result-item strong,
.search-result-item span {
    display: block;
}

.search-result-item strong {
    font-size: 14px;
    color: var(--gray-900);
}

.search-result-item span {
    margin-top: 4px;
    color: var(--gray-500);
    font-size: 12px;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-nav a {
    display: block;
    color: var(--white);
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-carousel {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: var(--gray-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease;
}

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

.hero-overlay,
.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.25));
}

.hero-inner,
.detail-hero-content {
    position: relative;
    z-index: 2;
    width: min(100% - 32px, var(--container));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(720px, 100%);
    color: var(--white);
}

.hero-kicker,
.section-heading span,
.page-hero span {
    color: var(--amber-400);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.detail-hero h1 {
    margin: 14px 0 20px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p,
.detail-hero p {
    width: min(680px, 100%);
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(18px, 2vw, 22px);
}

.hero-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.detail-tags span:first-child,
.hero-tags span:first-child {
    background: var(--emerald-500);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 48px;
    padding: 0 24px;
    font-weight: 900;
    transition: 0.25s ease;
}

.primary-button {
    background: linear-gradient(90deg, var(--emerald-500), var(--teal-600));
    color: var(--white);
    box-shadow: 0 16px 30px rgba(16, 185, 129, 0.35);
}

.primary-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 36px rgba(16, 185, 129, 0.42);
}

.ghost-button {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    font-size: 28px;
    backdrop-filter: blur(10px);
}

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

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

.hero-dot.is-active {
    width: 32px;
    background: var(--white);
}

.section-shell {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 72px 0;
}

.intro-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 28px 0 0;
}

.intro-strip div {
    border-radius: var(--radius-lg);
    padding: 22px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(14px);
}

.intro-strip strong,
.intro-strip span {
    display: block;
}

.intro-strip strong {
    font-size: 18px;
}

.intro-strip span {
    margin-top: 4px;
    color: var(--gray-500);
    font-size: 14px;
}

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

.section-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
}

.section-heading > a {
    color: var(--emerald-600);
    font-weight: 900;
}

.light-heading h2,
.light-heading > a,
.light-heading span {
    color: var(--white);
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
}

.movie-card figure {
    position: relative;
    height: 240px;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--emerald-100), #cffafe);
}

.compact-card figure {
    height: 190px;
}

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

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

.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    border-radius: 999px;
    padding: 6px 12px;
    background: var(--rose-500);
    color: var(--white);
    font-size: 12px;
    font-weight: 900;
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -42%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--emerald-600);
    opacity: 0;
    transition: 0.25s ease;
    font-weight: 900;
}

.movie-card:hover .play-float {
    opacity: 1;
    transform: translate(-50%, -50%);
}

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

.movie-card-body h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.35;
}

.movie-card-body p {
    display: -webkit-box;
    margin: 0 0 16px;
    color: var(--gray-500);
    font-size: 14px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--gray-500);
    font-size: 13px;
}

.movie-meta span:first-child {
    color: var(--emerald-600);
    font-weight: 900;
}

.gradient-section {
    background: linear-gradient(90deg, var(--emerald-600), var(--teal-600), var(--cyan-600));
}

.gradient-section .movie-card {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    box-shadow: none;
    backdrop-filter: blur(14px);
}

.gradient-section .movie-card-body p,
.gradient-section .movie-meta,
.gradient-section .movie-meta span:first-child {
    color: rgba(255, 255, 255, 0.78);
}

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

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--gray-900);
    box-shadow: var(--shadow-card);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.62;
}

.category-tile div {
    position: absolute;
    inset: auto 0 0;
    padding: 22px;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent);
}

.category-tile span {
    color: var(--amber-400);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
}

.category-tile h2 {
    margin: 6px 0 8px;
}

.category-tile p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

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

.ranking-row {
    display: grid;
    grid-template-columns: 54px 74px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: 0.25s ease;
}

.ranking-row:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-card);
}

.ranking-number {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose-500), #fb7185);
    color: var(--white);
    font-weight: 900;
}

.ranking-row img {
    width: 74px;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--gray-100);
}

.ranking-content strong,
.ranking-content em {
    display: block;
}

.ranking-content strong {
    font-size: 17px;
}

.ranking-content em {
    margin-top: 5px;
    color: var(--gray-500);
    font-style: normal;
    font-size: 13px;
}

.ranking-tags {
    color: var(--gray-500);
    font-size: 13px;
    white-space: nowrap;
}

.page-hero,
.detail-hero {
    position: relative;
    min-height: 330px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.page-hero::before,
.category-hero::before,
.rank-hero::before,
.soft-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.96), rgba(13, 148, 136, 0.86), rgba(8, 145, 178, 0.72));
}

.page-hero > div {
    position: relative;
    z-index: 2;
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    color: var(--white);
}

.page-hero h1 {
    margin: 8px 0 14px;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.library-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.filter-set {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
    background: var(--emerald-600);
    color: var(--white);
}

.local-search {
    width: min(360px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 999px;
    padding: 6px 6px 6px 16px;
    background: var(--white);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.local-search span {
    color: var(--emerald-600);
    font-weight: 900;
}

.local-search input {
    color: var(--gray-900);
    background: transparent;
}

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

.detail-hero {
    min-height: 450px;
    color: var(--white);
}

.detail-hero-content {
    display: block;
    height: auto;
    padding: 92px 0 68px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
    gap: 32px;
    align-items: start;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000000;
    box-shadow: var(--shadow-soft);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.05));
    cursor: pointer;
}

.player-overlay span {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding-left: 6px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--emerald-600);
    font-size: 34px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

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

.content-panel,
.info-card {
    margin-top: 24px;
    border-radius: var(--radius-xl);
    padding: 30px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.content-panel p {
    margin: 0 0 26px;
    color: var(--gray-700);
    font-size: 17px;
}

.compact-heading {
    margin-bottom: 14px;
}

.compact-heading h2 {
    font-size: 26px;
}

.tag-cloud span {
    background: var(--gray-100);
    color: var(--gray-700);
}

.detail-cover {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    background: var(--gray-100);
}

.info-card h2 {
    margin: 0 0 18px;
}

.info-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 16px;
    margin: 0 0 22px;
}

.info-card dt {
    color: var(--gray-500);
}

.info-card dd {
    margin: 0;
    font-weight: 800;
}

.full-button {
    width: 100%;
}

.site-footer {
    margin-top: 80px;
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800), var(--gray-900));
    color: rgba(255, 255, 255, 0.72);
}

.footer-shell {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1.2fr;
    gap: 40px;
    padding: 54px 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-size: 22px;
}

.footer-brand p {
    max-width: 480px;
    margin: 16px 0 0;
}

.footer-links {
    display: grid;
    gap: 8px;
    align-content: start;
}

.footer-links h2 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 18px;
}

.footer-links a:hover {
    color: var(--emerald-100);
}

.is-hidden-card {
    display: none !important;
}

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

    .mobile-toggle {
        display: block;
    }

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

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

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

    .ranking-grid,
    .detail-layout,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .library-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .local-search {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .nav-shell {
        height: 66px;
        width: min(100% - 20px, var(--container));
    }

    .brand-copy small {
        display: none;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-copy h1,
    .detail-hero h1 {
        font-size: 40px;
    }

    .section-shell {
        width: min(100% - 20px, var(--container));
        padding: 46px 0;
    }

    .intro-strip,
    .movie-grid,
    .compact-grid,
    .library-grid,
    .category-grid,
    .large-category-grid {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 42px 58px 1fr;
    }

    .ranking-tags {
        display: none;
    }

    .detail-hero-content {
        padding: 68px 0 52px;
    }

    .content-panel,
    .info-card {
        padding: 22px;
    }
}
