:root {
    --bg: #f0fdf4;
    --surface: #ffffff;
    --surface-soft: #ecfdf5;
    --text: #16351f;
    --muted: #64756a;
    --line: rgba(22, 101, 52, 0.14);
    --green: #16a34a;
    --green-dark: #15803d;
    --emerald: #10b981;
    --shadow: 0 18px 45px rgba(20, 83, 45, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 46%, #f8fffb 100%);
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #ffffff;
    background: linear-gradient(90deg, #16a34a 0%, #10b981 52%, #059669 100%);
    box-shadow: 0 12px 32px rgba(5, 150, 105, 0.24);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 188px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.brand-text strong,
.footer-brand {
    display: block;
    font-size: 24px;
    line-height: 1.05;
    font-weight: 800;
}

.brand-text em {
    display: block;
    margin-top: 3px;
    font-style: normal;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
}

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

.nav-link,
.mobile-link {
    padding: 9px 10px;
    border-radius: 999px;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input {
    width: 210px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    outline: none;
    padding: 0 16px;
    transition: width 0.2s ease, background 0.2s ease;
}

.top-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.top-search input:focus {
    width: 270px;
    background: rgba(255, 255, 255, 0.22);
}

.top-search button,
.mobile-search button,
.button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

.top-search button,
.mobile-search button {
    height: 40px;
    padding: 0 16px;
    color: var(--green-dark);
    background: #ffffff;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
}

.mobile-toggle span {
    width: 21px;
    height: 2px;
    margin: 0 auto;
    border-radius: 99px;
    background: #ffffff;
}

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

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

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(115deg, #15803d 0%, #10b981 48%, #059669 100%);
}

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

.hero-container {
    position: relative;
    z-index: 2;
    min-height: 580px;
    padding: 76px 0 110px;
}

.hero-slide {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: 48px;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    inset: 76px 0 110px;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hero-copy h1 {
    margin: 12px 0 8px;
    max-width: 760px;
    font-size: clamp(36px, 5.6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.hero-copy h2 {
    margin: 0 0 14px;
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1.15;
}

.hero-copy p {
    max-width: 690px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

.hero-kicker,
.detail-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ecfdf5;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

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

.hero-tags {
    margin: 22px 0 30px;
}

.hero-tags span,
.card-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    box-shadow: 0 14px 30px rgba(20, 83, 45, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px rgba(20, 83, 45, 0.22);
}

.button-primary {
    color: #047857;
    background: #ffffff;
}

.button-secondary {
    color: #ffffff;
    background: linear-gradient(90deg, var(--green), var(--emerald));
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    width: min(380px, 100%);
    aspect-ratio: 3 / 4.05;
    margin-left: auto;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 34px 80px rgba(6, 95, 70, 0.45);
    transform: rotate(2.2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 12px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 26px;
    pointer-events: none;
}

.hero-poster img,
.card-cover img,
.detail-poster img,
.category-card-covers img,
.category-tile img,
.ranking-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.18), rgba(16, 185, 129, 0.1));
}

.hero-play,
.card-play {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--green-dark);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.hero-play {
    left: 26px;
    bottom: 26px;
    width: 64px;
    height: 64px;
    font-size: 24px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 0;
    bottom: 62px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-wave {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    z-index: 3;
}

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

.soft-panel {
    background: linear-gradient(90deg, #ecfdf5 0%, #f0fdf4 100%);
}

.white-panel {
    background: #ffffff;
}

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

.section-heading h2 {
    margin: 0;
    color: #172e1d;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    font-weight: 900;
}

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

.section-more,
.text-link {
    color: var(--green-dark);
    font-weight: 850;
}

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

.category-tile {
    position: relative;
    min-height: 164px;
    overflow: hidden;
    padding: 24px;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, #16a34a, #059669);
    box-shadow: var(--shadow);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.35), rgba(0, 0, 0, 0.08));
}

.category-tile strong,
.category-tile small,
.category-icon {
    position: relative;
    z-index: 2;
}

.category-tile strong {
    display: block;
    margin: 16px 0 8px;
    font-size: 22px;
}

.category-tile small {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.category-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
}

.category-tile img {
    position: absolute;
    top: 0;
    right: 0;
    width: 44%;
    height: 100%;
    opacity: 0.24;
    filter: saturate(1.2);
}

.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 32px rgba(20, 83, 45, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(22, 163, 74, 0.28);
    box-shadow: var(--shadow);
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4.1;
    background: #dcfce7;
}

.card-cover img {
    transition: transform 0.35s ease;
}

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

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.86);
    font-size: 12px;
    font-weight: 800;
    line-height: 28px;
}

.card-play {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
}

.card-content {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.card-meta a {
    color: var(--green-dark);
}

.card-content h2 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.32;
    font-weight: 900;
}

.card-content p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.72;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-tags span {
    color: var(--green-dark);
    background: #dcfce7;
}

.movie-card--horizontal {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
}

.movie-card--horizontal .card-cover {
    aspect-ratio: auto;
    min-height: 178px;
}

.movie-card--large .card-cover {
    aspect-ratio: 16 / 10;
}

.movie-card--large .card-content h2 {
    font-size: 28px;
}

.featured-layout,
.ranking-layout,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 28px;
}

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

.page-hero,
.detail-hero {
    color: #ffffff;
    background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.16), transparent 30%), linear-gradient(115deg, #15803d 0%, #10b981 52%, #047857 100%);
}

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

.page-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

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

.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(20, 83, 45, 0.08);
}

.category-card-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 150px;
    background: #dcfce7;
}

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

.category-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 900;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 0.3fr)) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(20, 83, 45, 0.08);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: #f8fffb;
    outline: none;
    padding: 0 12px;
}

.empty-state {
    margin: 32px 0 0;
    padding: 24px;
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    background: #ffffff;
}

.ranking-list {
    display: grid;
    gap: 10px;
    align-content: start;
}

.ranking-row {
    display: grid;
    grid-template-columns: 44px 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 76px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(20, 83, 45, 0.06);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--green), var(--emerald));
    font-weight: 900;
}

.ranking-row img {
    width: 58px;
    height: 58px;
    border-radius: 14px;
}

.rank-title {
    overflow: hidden;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    color: var(--muted);
    font-size: 13px;
}

.detail-hero .container {
    padding: 44px 0 64px;
}

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

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

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

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4.05;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 26px 70px rgba(6, 95, 70, 0.42);
}

.detail-info h1 {
    margin: 16px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 780px;
    margin: 0 0 22px;
}

.detail-meta div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
}

.detail-meta dt {
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 800;
}

.detail-meta dd {
    margin: 0;
    font-weight: 850;
}

.detail-tags {
    margin-bottom: 26px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #04140b;
    box-shadow: 0 26px 68px rgba(4, 18, 11, 0.22);
}

.movie-player {
    width: 100%;
    min-height: 540px;
    background: #04140b;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(4, 18, 11, 0.25), rgba(4, 18, 11, 0.7));
    cursor: pointer;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    color: var(--green-dark);
    background: #ffffff;
    font-size: 34px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.play-overlay strong {
    font-size: 20px;
}

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

.prose-block article {
    max-width: 900px;
    margin: 0 auto;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(20, 83, 45, 0.08);
}

.prose-block h2 {
    margin: 0 0 14px;
    font-size: 28px;
    font-weight: 900;
}

.prose-block h2 + p {
    margin-top: 0;
}

.prose-block p {
    color: #33483b;
    font-size: 17px;
    line-height: 2;
}

.site-footer {
    color: #d1fae5;
    background: #052e1b;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(180px, 0.4fr));
    gap: 36px;
    padding: 52px 0;
}

.site-footer p {
    max-width: 620px;
    color: rgba(209, 250, 229, 0.76);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer a {
    display: block;
    margin: 8px 0;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(209, 250, 229, 0.68);
    text-align: center;
}

[hidden] {
    display: none !important;
}

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

    .top-search {
        margin-left: auto;
    }

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

@media (max-width: 900px) {
    .top-search {
        display: none;
    }

    .mobile-toggle {
        display: flex;
        margin-left: auto;
    }

    .mobile-search input {
        width: 100%;
    }

    .hero {
        min-height: 760px;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        inset: 56px 0 100px;
    }

    .hero-poster {
        width: min(280px, 78vw);
        margin: 0 auto;
        transform: rotate(0deg);
    }

    .hero-dots {
        left: 50%;
        transform: translateX(-50%);
    }

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

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

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

    .detail-poster {
        width: min(320px, 85vw);
    }

    .movie-player {
        min-height: 420px;
    }
}

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

    .header-inner {
        min-height: 68px;
    }

    .brand-text strong {
        font-size: 20px;
    }

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

    .category-grid,
    .category-card-grid,
    .movie-grid--three,
    .movie-grid--four,
    .movie-grid--five,
    .movie-grid--six,
    .filter-panel,
    .detail-meta {
        grid-template-columns: 1fr;
    }

    .movie-card--horizontal {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .movie-card--horizontal .card-cover {
        min-height: 158px;
    }

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

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

    .rank-meta {
        grid-column: 3;
    }

    .movie-player {
        min-height: 260px;
    }

    .prose-block article {
        padding: 24px;
    }
}
