:root {
    --emerald-950: #022c22;
    --emerald-900: #064e3b;
    --emerald-800: #065f46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-100: #d1fae5;
    --emerald-50: #ecfdf5;
    --green-400: #4ade80;
    --amber-500: #f59e0b;
    --blue-600: #2563eb;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--emerald-50), #ffffff 32%, #ffffff);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--emerald-900), var(--emerald-700));
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(2, 44, 34, 0.2);
}

.nav-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.brand-icon,
.footer-logo span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.25s ease, color 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    padding: 10px;
}

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

.mobile-nav {
    display: none;
    padding: 0 20px 16px;
    max-width: 1280px;
    margin: 0 auto;
}

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

main {
    min-height: 60vh;
}

.hero-slider {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: var(--emerald-950);
}

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

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

.hero-overlay,
.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 44, 34, 0.92), rgba(4, 120, 87, 0.72) 48%, rgba(0, 0, 0, 0.38));
}

.hero-content {
    position: relative;
    z-index: 1;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 52px;
    color: #ffffff;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green-400);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-title-row h1 {
    margin: 16px 0;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-title-row p {
    max-width: 760px;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    color: rgba(236, 253, 245, 0.88);
    line-height: 1.8;
}

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

.hero-tags {
    margin: 28px 0;
}

.hero-tags span,
.detail-tags span,
.tag-cloud span {
    display: inline-flex;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: blur(12px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.primary-btn,
.ghost-btn,
.hero-search button,
.rank-more,
.cta-band a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn,
.hero-search button,
.cta-band a {
    background: #ffffff;
    color: var(--emerald-700);
    box-shadow: 0 16px 28px rgba(2, 44, 34, 0.2);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.primary-btn:hover,
.ghost-btn:hover,
.hero-search button:hover,
.cta-band a:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(2, 44, 34, 0.22);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
    aspect-ratio: 3 / 4.2;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
}

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

.hero-poster:hover img {
    transform: scale(1.07);
}

.hero-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--emerald-700);
    font-size: 1.7rem;
    box-shadow: var(--shadow);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 2rem;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.active {
    background: #ffffff;
}

.hero-search-section {
    max-width: 1180px;
    margin: -44px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    background: #ffffff;
    padding: 14px;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero-search input,
.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 16px;
    color: var(--text);
    outline: none;
    background: #ffffff;
}

.hero-search input:focus,
.filter-grid input:focus,
.filter-grid select:focus {
    border-color: var(--emerald-600);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.category-pills {
    margin: 18px 0 0;
    justify-content: center;
}

.category-pills a {
    padding: 9px 15px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--emerald-700);
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 20px;
}

.wide-section {
    background: linear-gradient(90deg, #eff6ff, var(--emerald-50));
}

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

.section-title > span,
.rank-head span,
.filter-heading span {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--emerald-100);
    color: var(--emerald-700);
    font-size: 1.3rem;
    flex: 0 0 auto;
}

.section-title div {
    margin-right: auto;
}

.section-title h2,
.rank-head h2,
.filter-heading h2,
.detail-card h2,
.side-info h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.2;
}

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

.section-title a {
    color: var(--emerald-700);
    font-weight: 800;
}

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

.feature-cards.inline {
    padding: 0;
}

.feature-cards a {
    display: grid;
    gap: 10px;
    padding: 30px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-cards a:hover,
.movie-card:hover,
.category-card:hover,
.mini-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.feature-cards span {
    font-size: 2rem;
}

.feature-cards strong {
    font-size: 1.35rem;
}

.feature-cards em {
    color: var(--muted);
    font-style: normal;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-cover {
    position: relative;
    margin: 0;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b, #10b981);
}

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

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

.cover-year,
.cover-region,
.rank-badge {
    position: absolute;
    top: 10px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffffff;
}

.cover-year {
    right: 10px;
    background: var(--emerald-600);
}

.cover-region {
    left: 10px;
    background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
    left: 10px;
    top: 48px;
    background: var(--amber-500);
}

.movie-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
}

.movie-body h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.movie-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--emerald-50);
    color: var(--emerald-700);
    font-size: 0.76rem;
    font-weight: 700;
}

.movie-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.86rem;
}

.movie-meta span:last-child {
    color: var(--amber-500);
    font-weight: 900;
}

.two-column,
.ranking-layout,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.rank-panel {
    border-radius: var(--radius);
    background: #ffffff;
    padding: 24px;
    box-shadow: var(--shadow);
}

.sticky-panel {
    position: sticky;
    top: 96px;
}

.rank-head,
.filter-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: #f9fafb;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.mini-card img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #064e3b, #10b981);
}

.mini-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card small {
    color: var(--muted);
    line-height: 1.7;
}

.mini-rank {
    position: absolute;
    left: 4px;
    top: 4px;
    z-index: 1;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--emerald-600);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 900;
}

.rank-more {
    width: 100%;
    margin-top: 18px;
    background: var(--emerald-600);
    color: #ffffff;
}

.cta-band,
.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(120deg, var(--emerald-900), var(--emerald-600));
}

.cta-band {
    text-align: center;
    padding: 78px 20px;
}

.cta-band h2,
.cta-band p {
    margin: 0 auto 18px;
    max-width: 720px;
}

.cta-band h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.cta-band p {
    color: rgba(236, 253, 245, 0.9);
    line-height: 1.8;
}

.page-hero {
    padding: 92px 20px 74px;
    text-align: center;
}

.small-hero {
    text-align: left;
}

.page-hero > * {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.page-actions {
    margin-top: 24px;
}

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

.category-card {
    padding: 20px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-covers {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
    gap: 8px;
    margin-bottom: 18px;
}

.category-covers img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 16px;
    background: linear-gradient(135deg, #064e3b, #10b981);
}

.category-covers img:first-child {
    height: 210px;
    grid-row: span 2;
}

.category-card h2 {
    margin: 0 0 10px;
}

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

.category-card span {
    color: var(--emerald-700);
    font-weight: 900;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 24px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(150px, 1fr));
    gap: 14px;
}

.empty-state {
    display: none;
    padding: 48px;
    margin-top: 24px;
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--muted);
    text-align: center;
    box-shadow: var(--shadow);
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(2px) saturate(1.1);
    transform: scale(1.03);
}

.detail-inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 20px 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: rgba(236, 253, 245, 0.82);
    font-size: 0.95rem;
}

.breadcrumb a {
    color: #ffffff;
    font-weight: 700;
}

.breadcrumb em {
    font-style: normal;
}

.detail-title-row {
    margin-top: 52px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: end;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card,
.detail-card,
.detail-side {
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.player-shell {
    position: relative;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 44, 34, 0.28), rgba(0, 0, 0, 0.72));
    color: #ffffff;
}

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

.player-overlay span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--emerald-700);
    font-size: 2rem;
    box-shadow: var(--shadow);
}

.player-overlay strong {
    font-size: 1.2rem;
}

.detail-card {
    padding: 30px;
}

.detail-card h2 {
    margin-top: 28px;
    margin-bottom: 12px;
}

.detail-card h2:first-of-type {
    margin-top: 18px;
}

.detail-card p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
    font-size: 1.04rem;
}

.detail-tags span,
.tag-cloud span {
    background: var(--emerald-50);
    color: var(--emerald-700);
}

.detail-side {
    position: sticky;
    top: 96px;
}

.side-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #064e3b, #10b981);
}

.side-info {
    padding: 24px;
}

.side-info p {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin: 14px 0 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.side-info strong {
    color: var(--text);
    flex: 0 0 auto;
}

.side-info span {
    text-align: right;
}

.site-footer {
    background: linear-gradient(180deg, var(--emerald-900), var(--emerald-950));
    color: #ffffff;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 20px;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 32px;
}

.footer-inner p,
.footer-inner a,
.footer-inner span {
    display: block;
    color: rgba(209, 250, 229, 0.82);
    line-height: 1.9;
}

.footer-inner h3 {
    margin: 0 0 14px;
    color: var(--green-400);
}

.footer-bottom {
    border-top: 1px solid rgba(209, 250, 229, 0.16);
    padding: 20px;
    text-align: center;
    color: rgba(209, 250, 229, 0.72);
}

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

    .two-column,
    .ranking-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .detail-side,
    .sticky-panel {
        position: static;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .hero-slider {
        height: auto;
        min-height: 620px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 70px 20px 92px;
    }

    .hero-poster {
        max-width: 260px;
    }

    .hero-arrow {
        display: none;
    }

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

    .feature-cards,
    .category-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 620px) {
    .section-wrap {
        padding: 52px 16px;
    }

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

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

    .page-hero {
        padding: 72px 16px 56px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-title-row h1 {
        font-size: 2.45rem;
    }

    .detail-inner {
        padding: 40px 16px 56px;
    }

    .detail-card {
        padding: 22px;
    }
}
