*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --color-primary: #16a34a;
    --color-primary-dark: #047857;
    --color-primary-soft: #dcfce7;
    --color-accent: #22c55e;
    --color-bg: #f0fdf4;
    --color-surface: #ffffff;
    --color-text: #111827;
    --color-muted: #64748b;
    --color-border: rgba(22, 163, 74, 0.18);
    --shadow-soft: 0 18px 45px rgba(15, 118, 110, 0.14);
    --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.10);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
    color: var(--color-text);
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 28%, #f8fafc 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(15, 118, 110, 0.10);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #16a34a, #059669);
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.28);
}

.brand-text {
    font-size: 22px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--color-primary-dark);
    background: var(--color-primary-soft);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(320px, 28vw);
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #ffffff;
}

.header-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 9px 8px 9px 14px;
    background: transparent;
}

.header-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #16a34a, #059669);
    cursor: pointer;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--color-primary-soft);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--color-primary-dark);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(187, 247, 208, 0.38), transparent 34%), linear-gradient(135deg, #15803d 0%, #10b981 48%, #047857 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.13;
    background-image: radial-gradient(circle at 2px 2px, #ffffff 1px, transparent 0);
    background-size: 40px 40px;
}

.hero-shell {
    position: relative;
    z-index: 2;
    min-height: 640px;
    padding: 74px 0 120px;
}

.hero-slide {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
    align-items: center;
    gap: 48px;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
    position: absolute;
    inset: 74px 0 120px;
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative;
    inset: auto;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #065f46;
    background: rgba(220, 252, 231, 0.88);
    font-size: 14px;
    font-weight: 800;
}

.hero-copy h1 {
    max-width: 780px;
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    text-shadow: 0 16px 34px rgba(6, 78, 59, 0.32);
}

.hero-copy p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.90);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

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

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

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

.button-primary {
    color: #065f46;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(4, 120, 87, 0.24);
}

.button-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
}

.detail-copy .button-primary,
.split-layout .button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #16a34a, #059669);
}

.detail-copy .button-ghost {
    color: #065f46;
    border-color: var(--color-border);
    background: #ffffff;
}

.hero-tags,
.movie-meta,
.rank-meta,
.ranking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.movie-meta span,
.rank-meta span,
.ranking-meta span {
    border-radius: 999px;
    padding: 6px 10px;
    color: #065f46;
    background: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta span,
.rank-meta span,
.ranking-meta span {
    color: #0f766e;
    background: #ecfdf5;
}

.hero-poster {
    position: relative;
    height: min(460px, 58vh);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(2, 44, 34, 0.42);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 16px;
    z-index: -1;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.28);
    filter: blur(18px);
}

.hero-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

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

.hero-arrow {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 30px;
}

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

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

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

.hero-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 120px;
}

.section {
    padding: 72px 0;
}

.section-soft {
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.section-gradient {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 55%, #ffffff 100%);
}

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

.section-heading h2,
.split-layout h2,
.page-hero h1,
.detail-copy h1 {
    margin: 12px 0 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading a {
    color: var(--color-primary-dark);
    font-weight: 900;
}

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

.category-card,
.category-overview-card,
.movie-card,
.rank-card,
.ranking-row,
.content-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-card:hover,
.ranking-row:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.category-glow {
    position: absolute;
    width: 160px;
    height: 160px;
    right: -70px;
    top: -70px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.18);
}

.category-mini-posters {
    display: flex;
    height: 74px;
    margin-bottom: 18px;
}

.category-mini-posters img {
    width: 54px;
    border: 3px solid #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.category-mini-posters img + img {
    margin-left: -14px;
}

.category-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.category-card p,
.movie-card-body p,
.rank-body p,
.ranking-info p,
.content-card p,
.page-hero p,
.split-layout p,
.site-footer p,
.category-overview-card p {
    color: var(--color-muted);
    line-height: 1.75;
}

.category-card em {
    display: inline-flex;
    margin-top: 10px;
    color: var(--color-primary-dark);
    font-style: normal;
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #bbf7d0, #10b981);
}

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

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    color: #065f46;
    background: rgba(255, 255, 255, 0.90);
}

.poster-play {
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.92);
}

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

.movie-title,
.rank-title,
.ranking-title,
.category-overview-title {
    display: inline-block;
    color: #0f172a;
    font-size: 19px;
    font-weight: 900;
    line-height: 1.35;
}

.movie-title:hover,
.rank-title:hover,
.ranking-title:hover,
.category-overview-title:hover {
    color: var(--color-primary-dark);
}

.movie-meta {
    margin: 11px 0;
}

.tag-list,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list span,
.detail-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #15803d;
    background: #f0fdf4;
    font-size: 12px;
    font-weight: 800;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    padding: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-poster {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 3 / 4;
    background: #dcfce7;
}

.rank-body p {
    margin: 8px 0 12px;
}

.page-hero {
    padding: 70px 0 58px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(187, 247, 208, 0.32), transparent 34%), linear-gradient(135deg, #15803d, #059669);
}

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

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

.breadcrumb a:hover {
    color: #ffffff;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    padding: 18px;
}

.category-cover-wall {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 82px;
    gap: 6px;
    overflow: hidden;
    border-radius: 18px;
    background: #dcfce7;
}

.category-overview-card span {
    color: var(--color-primary-dark);
    font-weight: 900;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select,
.search-page-form input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    outline: 0;
    padding: 12px 14px;
    color: #0f172a;
    background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-page-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.filter-count {
    padding: 12px 14px;
    border-radius: 999px;
    color: #065f46;
    background: #ecfdf5;
    font-weight: 900;
    white-space: nowrap;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 70px 110px minmax(0, 1fr) 120px;
    gap: 18px;
    align-items: center;
    padding: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ranking-index {
    color: var(--color-primary-dark);
    font-size: 28px;
    font-weight: 1000;
}

.ranking-poster {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 3 / 4;
    background: #dcfce7;
}

.ranking-info p {
    margin: 8px 0 12px;
}

.ranking-score {
    display: grid;
    justify-items: end;
    color: var(--color-primary-dark);
}

.ranking-score strong {
    font-size: 24px;
}

.search-page-form {
    display: flex;
    gap: 12px;
    max-width: 680px;
    margin-top: 28px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.search-page-form input {
    border: 0;
    background: #ffffff;
}

.search-filter-panel {
    grid-template-columns: repeat(3, 1fr) auto;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #022c22;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    filter: blur(2px);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 44, 34, 0.94), rgba(2, 44, 34, 0.58));
}

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

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

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 6px solid rgba(255, 255, 255, 0.24);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.detail-copy h1 {
    color: #ffffff;
    font-size: clamp(38px, 6vw, 68px);
}

.detail-one-line {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
    line-height: 1.8;
}

.detail-section {
    padding-top: 46px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
    align-items: start;
}

.player-column,
.detail-sidebar {
    display: grid;
    gap: 22px;
}

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

.player-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(22, 163, 74, 0.22), rgba(0, 0, 0, 0.55));
    cursor: pointer;
}

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

.player-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    color: #065f46;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    font-size: 30px;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 16px;
    z-index: 4;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    pointer-events: none;
}

.content-card {
    padding: 22px;
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.content-card p {
    margin: 0;
    color: #334155;
}

.info-list {
    display: grid;
    gap: 11px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.info-list li,
.side-links a {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(15, 118, 110, 0.18);
}

.info-list span,
.side-links em {
    color: var(--color-muted);
    font-style: normal;
}

.info-list strong,
.side-links span {
    text-align: right;
}

.side-links {
    display: grid;
    gap: 10px;
}

.side-links a:hover span {
    color: var(--color-primary-dark);
}

.site-footer {
    padding: 46px 0;
    color: #cbd5e1;
    background: #052e2b;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1fr;
    gap: 32px;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a:hover {
    color: #86efac;
}

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

@media (max-width: 980px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 14px 0;
    }

    .main-nav,
    .header-search {
        display: none;
        width: 100%;
    }

    .main-nav.is-open,
    .header-search.is-open {
        display: flex;
    }

    .main-nav.is-open {
        order: 3;
        flex-wrap: wrap;
        margin-left: 0;
    }

    .header-search.is-open {
        order: 4;
    }

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

    .hero {
        min-height: auto;
    }

    .hero-shell {
        min-height: 0;
        padding: 48px 0 96px;
    }

    .hero-slide,
    .hero-slide.is-active {
        position: relative;
        inset: auto;
        grid-template-columns: 1fr;
    }

    .hero-slide:not(.is-active) {
        display: none;
    }

    .hero-poster {
        height: 420px;
        transform: none;
    }

    .hero-controls {
        bottom: 42px;
    }

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

    .split-layout,
    .detail-content-grid,
    .footer-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-row {
        grid-template-columns: 50px 90px minmax(0, 1fr);
    }

    .ranking-score {
        grid-column: 2 / -1;
        justify-items: start;
    }
}

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

    .brand-text {
        font-size: 19px;
    }

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

    .hero-poster {
        height: 360px;
        border-radius: 24px;
    }

    .section {
        padding: 48px 0;
    }

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

    .category-grid,
    .movie-grid,
    .filter-panel,
    .search-filter-panel,
    .detail-layout,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(260px, 70vw);
    }

    .rank-card {
        grid-template-columns: 76px 1fr;
    }

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

    .ranking-title,
    .movie-title {
        font-size: 17px;
    }

    .search-page-form {
        align-items: stretch;
        flex-direction: column;
        border-radius: 22px;
    }

    .footer-categories {
        grid-template-columns: 1fr;
    }
}
