:root {
    --green-950: #052e16;
    --green-900: #064e3b;
    --green-800: #065f46;
    --green-700: #047857;
    --green-600: #16a34a;
    --green-500: #22c55e;
    --green-100: #dcfce7;
    --green-50: #f0fdf4;
    --gray-950: #111827;
    --gray-700: #374151;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.1);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-950);
    background: var(--green-50);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--white);
    background: linear-gradient(90deg, var(--green-700), var(--green-500));
    box-shadow: 0 10px 30px rgba(6, 95, 70, 0.24);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 68px;
}

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

.brand {
    font-size: 22px;
    white-space: nowrap;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: var(--green-700);
    background: var(--white);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

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

.desktop-nav a,
.mobile-panel a {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover {
    color: var(--white);
}

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

.nav-search input,
.mobile-panel input,
.search-panel input,
.filter-panel input {
    width: 230px;
    border: 0;
    outline: none;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.nav-search input::placeholder,
.mobile-panel input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.nav-search button,
.mobile-panel button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: var(--green-800);
    background: var(--white);
    font-weight: 800;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
}

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

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

.mobile-panel form {
    display: flex;
    gap: 8px;
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: var(--green-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transition: opacity 0.65s ease;
}

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

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 54px;
    align-items: center;
    color: var(--white);
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: var(--green-100);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-weight: 900;
    line-height: 1.08;
}

.hero-copy h1 {
    max-width: 720px;
    font-size: clamp(38px, 7vw, 72px);
}

.hero-copy p,
.page-hero p,
.detail-lead {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0;
}

.hero-tags span,
.detail-tags span {
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--green-950);
    background: rgba(220, 252, 231, 0.94);
    font-size: 13px;
    font-weight: 800;
}

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

.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: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: linear-gradient(90deg, var(--green-600), var(--green-500));
    box-shadow: 0 15px 35px rgba(34, 197, 94, 0.32);
}

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

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-card:hover {
    transform: translateY(-3px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--green-800), var(--green-500));
}

.hero-poster img,
.detail-poster,
.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    color: var(--green-700);
    background: rgba(255, 255, 255, 0.94);
    transform: translate(-50%, -50%);
    font-size: 28px;
    box-shadow: var(--shadow-card);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--white);
}

.section-block {
    padding: 70px 0;
}

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

.section-head h2 {
    margin: 0;
    color: var(--gray-950);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
}

.section-head a {
    color: var(--green-700);
    font-weight: 900;
}

.light-head h2,
.light-head a,
.light-head .section-kicker {
    color: var(--white);
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.16);
}

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

.poster-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--green-900), var(--green-500));
}

.poster-frame img {
    transition: transform 0.32s ease;
}

.movie-card:hover .poster-frame img {
    transform: scale(1.07);
}

.badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--white);
    font-size: 12px;
    font-weight: 900;
    background: rgba(5, 46, 22, 0.78);
    backdrop-filter: blur(12px);
}

.badge-top {
    top: 10px;
    left: 10px;
}

.badge-bottom {
    right: 10px;
    bottom: 10px;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    color: var(--green-700);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-card-content {
    padding: 18px;
}

.movie-card h3 {
    display: -webkit-box;
    min-height: 54px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--gray-950);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-meta span,
.detail-meta span {
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--green-800);
    background: var(--green-100);
    font-size: 12px;
    font-weight: 800;
}

.category-band {
    padding: 70px 0;
    color: var(--white);
    background: linear-gradient(135deg, var(--green-900), var(--green-700));
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: var(--radius-lg);
    padding: 24px;
    color: var(--white);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    transition: transform 0.22s ease, background 0.22s ease;
}

.all-categories .category-card {
    color: var(--gray-950);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.category-index {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.all-categories .category-index {
    color: var(--green-700);
}

.category-card h3 {
    margin: 14px 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 16px;
    color: inherit;
    opacity: 0.86;
}

.category-card small {
    color: inherit;
    opacity: 0.7;
}

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

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

.ranking-item {
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.ranking-link {
    display: grid;
    grid-template-columns: 58px 96px minmax(0, 1fr) 24px;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
}

.ranking-number {
    color: var(--green-700);
    font-size: 26px;
    font-weight: 950;
}

.ranking-item img {
    width: 96px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--green-100);
}

.ranking-copy strong {
    display: block;
    overflow: hidden;
    color: var(--gray-950);
    font-size: 17px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-copy em {
    display: block;
    color: var(--gray-500);
    font-style: normal;
}

.ranking-arrow {
    color: var(--green-700);
    font-size: 28px;
}

.page-hero,
.detail-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--green-900), var(--green-600));
}

.page-hero {
    padding: 84px 0;
}

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

.page-hero h1 {
    font-size: clamp(34px, 6vw, 58px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 750;
}

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

.filter-panel,
.search-panel {
    margin-bottom: 26px;
    border-radius: var(--radius-lg);
    padding: 20px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.filter-panel input,
.search-panel input {
    width: min(520px, 100%);
    color: var(--gray-950);
    background: var(--gray-100);
    box-shadow: inset 0 0 0 1px var(--gray-200);
}

.search-panel form {
    display: flex;
    gap: 10px;
}

.search-panel button {
    color: var(--white);
    background: var(--green-600);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-tags button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--green-800);
    background: var(--green-100);
    font-weight: 850;
    cursor: pointer;
}

.empty-state {
    display: none;
    margin: 34px 0 0;
    border-radius: var(--radius-lg);
    padding: 26px;
    text-align: center;
    color: var(--gray-500);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

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

.pager-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 34px;
}

.pager-row a {
    border-radius: 999px;
    padding: 12px 18px;
    color: var(--green-800);
    background: var(--green-100);
    font-weight: 900;
}

.detail-hero {
    padding: 54px 0 76px;
    background-position: center;
    background-size: cover;
}

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

.detail-poster {
    overflow: hidden;
    width: 300px;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    background: linear-gradient(135deg, var(--green-800), var(--green-500));
}

.detail-copy h1 {
    font-size: clamp(34px, 6vw, 62px);
}

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

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle, rgba(5, 46, 22, 0.22), rgba(0, 0, 0, 0.66));
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    color: var(--green-700);
    background: rgba(255, 255, 255, 0.94);
    font-size: 34px;
    box-shadow: var(--shadow-soft);
}

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

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    padding-bottom: 16px;
}

.story-card {
    border-radius: var(--radius-lg);
    padding: 28px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.story-card h2 {
    margin: 0 0 14px;
    color: var(--gray-950);
    font-size: 26px;
}

.story-card p {
    margin: 0;
    color: var(--gray-700);
    white-space: pre-line;
}

.related-grid .compact-card .poster-frame,
.search-grid .compact-card .poster-frame {
    aspect-ratio: 16 / 10;
}

.site-footer {
    color: var(--white);
    background: linear-gradient(135deg, var(--green-950), var(--green-800));
}

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

.footer-grid p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.78);
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 7px 0;
    color: rgba(255, 255, 255, 0.76);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-carousel {
        min-height: 720px;
    }

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

    .hero-poster,
    .detail-poster {
        width: min(320px, 78vw);
        margin: 0 auto;
    }

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

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

    .site-header .brand {
        font-size: 18px;
    }

    .hero-carousel {
        min-height: 760px;
    }

    .hero-inner {
        gap: 28px;
        padding: 42px 0 74px;
    }

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

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

    .ranking-link {
        grid-template-columns: 48px 78px minmax(0, 1fr) 18px;
        gap: 10px;
        padding: 10px;
    }

    .ranking-item img {
        width: 78px;
        height: 54px;
    }

    .search-panel form,
    .mobile-panel form,
    .pager-row {
        flex-direction: column;
    }

    .section-block,
    .category-band {
        padding: 46px 0;
    }
}
