:root {
    --bg: #f3f7f2;
    --paper: #ffffff;
    --ink: #1c2b24;
    --muted: #63736b;
    --line: #dfe9e2;
    --green-950: #082c1d;
    --green-900: #0f3f2b;
    --green-800: #145434;
    --green-700: #1f6f46;
    --green-600: #288650;
    --green-500: #35a866;
    --green-100: #dff5e8;
    --gold: #f5c96a;
    --shadow: 0 18px 45px rgba(14, 63, 43, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(53, 168, 102, 0.16), transparent 34rem),
        linear-gradient(180deg, #eef8f1 0%, var(--bg) 42%, #ffffff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(135deg, var(--green-950), var(--green-800));
    box-shadow: 0 10px 30px rgba(4, 34, 23, 0.22);
}

.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 18px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.brand-text {
    font-size: 1.35rem;
    white-space: nowrap;
}

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

.nav-link {
    padding: 8px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    min-width: 240px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.header-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 8px 12px;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.header-search button,
.search-panel button,
.primary-button,
.secondary-button,
.play-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
    box-shadow: 0 12px 30px rgba(31, 111, 70, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.header-search button {
    padding: 8px 14px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 800;
}

.secondary-button {
    color: var(--green-950);
    background: #ffffff;
}

.header-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.play-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 18px 42px rgba(31, 111, 70, 0.36);
}

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

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 0 24px 18px;
}

.mobile-nav a {
    padding: 11px 12px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: var(--green-950);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(245, 201, 106, 0.3), transparent 26rem),
        radial-gradient(circle at 86% 28%, rgba(53, 168, 102, 0.3), transparent 24rem);
    pointer-events: none;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    padding: 74px 0 96px;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.65s ease, visibility 0.55s ease;
    background-image:
        linear-gradient(90deg, rgba(8, 44, 29, 0.96) 0%, rgba(8, 44, 29, 0.82) 44%, rgba(8, 44, 29, 0.3) 100%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.56fr);
    gap: 42px;
    align-items: center;
}

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

.hero-kicker,
.section-kicker,
.crumbs,
.card-meta,
.detail-meta {
    color: var(--green-100);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 12px 0 18px;
    max-width: 760px;
    font-size: clamp(2.6rem, 7vw, 5.7rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1.02rem, 1.8vw, 1.22rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 28px 0 24px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
}

.hero-tags span {
    color: #eafff0;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    transform: rotate(2deg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.52));
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 28px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

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

.hero-arrows {
    display: flex;
    gap: 10px;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.section {
    padding: 62px 0;
}

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

.section-title h1,
.section-title h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-title p,
.page-title p,
.category-card p,
.detail-summary p,
.detail-review p {
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 10px 28px rgba(14, 63, 43, 0.1);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeee3, #f5fbf7);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(8, 44, 29, 0.78);
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 17px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--green-700);
}

.card-body h2 {
    margin: 8px 0 8px;
    font-size: 1.14rem;
    line-height: 1.28;
}

.card-body p {
    min-height: 3.2em;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.94rem;
}

.tag-row span,
.detail-tags a {
    color: var(--green-800);
    background: var(--green-100);
}

.text-link {
    display: inline-flex;
    margin-top: 14px;
    color: var(--green-700);
    font-weight: 900;
}

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

.category-card,
.search-panel,
.detail-box,
.breadcrumb-bar,
.rank-item {
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 28px rgba(14, 63, 43, 0.1);
    border: 1px solid rgba(223, 233, 226, 0.78);
}

.category-card {
    padding: 24px;
}

.category-title {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--green-800);
    font-size: 1.24rem;
    font-weight: 900;
}

.category-samples {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.category-samples a {
    color: var(--green-700);
    font-weight: 700;
}

.page-hero {
    padding: 58px 0 28px;
}

.page-title {
    display: grid;
    gap: 12px;
    max-width: 780px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    margin-bottom: 28px;
}

.search-panel input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    padding: 13px 18px;
    color: var(--ink);
    background: #ffffff;
}

.search-panel button {
    padding: 0 24px;
}

.empty-state {
    display: none;
    padding: 28px;
    text-align: center;
    color: var(--muted);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 120px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-number {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--green-500), var(--green-800));
    font-weight: 900;
}

.rank-thumb {
    border-radius: 14px;
    overflow: hidden;
}

.rank-thumb img {
    width: 120px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.rank-body h2 {
    margin: 0 0 6px;
    font-size: 1.1rem;
}

.rank-body p {
    margin: 0;
    color: var(--muted);
}

.rank-score {
    color: var(--green-700);
    font-weight: 900;
}

.breadcrumb-bar {
    margin-top: 28px;
    padding: 14px 18px;
}

.crumbs {
    color: var(--green-700);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 34px;
    align-items: start;
    padding: 36px 0 26px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.detail-info h1 {
    margin: 0 0 14px;
    font-size: clamp(2.1rem, 5vw, 4.1rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--green-700);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0;
}

.detail-box {
    padding: 26px;
    margin-bottom: 24px;
}

.detail-box h2 {
    margin: 0 0 12px;
    font-size: 1.45rem;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(8, 44, 29, 0.36), rgba(0, 0, 0, 0.58));
    z-index: 3;
}

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

.play-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    font-size: 1.05rem;
    font-weight: 900;
}

.play-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--green-800);
    background: #ffffff;
}

.site-footer {
    margin-top: 64px;
    color: rgba(255, 255, 255, 0.82);
    background: linear-gradient(135deg, var(--green-950), #0a2118);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 28px;
    padding: 42px 0;
}

.footer-grid h2 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 1.05rem;
}

.footer-grid p {
    margin: 0;
}

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

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

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

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

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

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

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

    .hero-poster {
        max-width: 360px;
        transform: none;
    }
}

@media (max-width: 760px) {
    .topbar {
        min-height: 64px;
    }

    .brand-text {
        font-size: 1.08rem;
    }

    .header-search {
        display: none;
    }

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

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

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

    .hero-slide {
        padding: 46px 0 88px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .section {
        padding: 42px 0;
    }

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

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

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

    .rank-item {
        grid-template-columns: 42px 86px 1fr;
    }

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

    .rank-thumb img {
        width: 86px;
    }

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