:root {
    --green-950: #052e1a;
    --green-900: #064e2e;
    --green-800: #166534;
    --green-700: #15803d;
    --green-600: #16a34a;
    --green-100: #dcfce7;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --red-600: #dc2626;
    --gray-950: #020617;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: #f9fafb;
    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,
select {
    font: inherit;
}

button {
    border: 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(22, 101, 52, 0.12);
    backdrop-filter: blur(18px);
}

.nav-shell {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--green-800);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    color: white;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--green-700), var(--green-950));
    box-shadow: 0 10px 22px rgba(21, 128, 61, 0.28);
}

.brand-text {
    font-size: 22px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

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

.nav-links a {
    padding: 10px 14px;
    color: var(--gray-700);
    border-radius: 13px;
    font-weight: 650;
    transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--green-800);
    background: var(--green-100);
}

.top-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(22, 101, 52, 0.18);
    border-radius: 999px;
    background: white;
}

.top-search input,
.mobile-panel input,
.filter-bar input,
.filter-bar select {
    border: 0;
    outline: 0;
    background: transparent;
}

.top-search input {
    width: 230px;
    padding: 10px 14px 10px 18px;
}

.top-search button,
.mobile-panel button,
.filter-bar button {
    color: white;
    background: var(--green-700);
    padding: 10px 16px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    padding: 8px 12px;
    color: var(--green-800);
    border-radius: 12px;
    background: var(--green-100);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    background: white;
    border: 1px solid rgba(22, 101, 52, 0.12);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

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

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.mobile-panel form {
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(22, 101, 52, 0.16);
    border-radius: 999px;
}

.mobile-panel input {
    min-width: 0;
    flex: 1;
    padding: 10px 14px;
}

.hero {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    color: white;
    background: radial-gradient(circle at 80% 25%, rgba(245, 158, 11, 0.42), transparent 30%), linear-gradient(135deg, var(--green-950), var(--green-800) 54%, #78350f);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -25% -10%;
    height: 280px;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(70px);
}

.hero-slide {
    display: none;
    min-height: 660px;
}

.hero-slide.active {
    display: block;
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 660px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: 44px;
    padding: 74px 0 86px;
}

.hero-eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 760;
}

.hero-eyebrow {
    color: #fef3c7;
    background: rgba(255, 255, 255, 0.14);
}

.section-eyebrow {
    color: var(--green-800);
    background: var(--green-100);
}

.hero h1 {
    margin: 22px 0 18px;
    max-width: 760px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero h1 span {
    color: #86efac;
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: #dcfce7;
    font-size: 19px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 760;
    transition: 0.2s ease;
}

.btn-primary {
    color: white;
    background: var(--green-600);
    box-shadow: 0 18px 30px rgba(22, 163, 74, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--green-700);
}

.btn-ghost {
    color: white;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    min-height: 470px;
    border-radius: 34px;
    box-shadow: 0 32px 70px rgba(2, 6, 23, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.hero-poster img {
    width: 100%;
    height: 470px;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.72), transparent 55%);
}

.hero-card-text {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
}

.hero-card-text strong {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
}

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

.hero-dots button {
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
    cursor: pointer;
}

.hero-dots button.active {
    width: 30px;
    background: #86efac;
}

.section {
    padding: 74px 0;
}

.section-white {
    background: white;
}

.section-soft {
    background: linear-gradient(135deg, #fff7ed, #f0fdf4 48%, white);
}

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

.section-head.center {
    display: block;
    max-width: 820px;
    margin: 0 auto 34px;
    text-align: center;
}

.section h2,
.page-title h1,
.detail-copy h1 {
    margin: 12px 0 10px;
    color: var(--gray-950);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-desc,
.page-title p {
    margin: 0;
    color: var(--gray-600);
    font-size: 17px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(22, 101, 52, 0.09);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--green-900), var(--amber-500));
}

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

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

.play-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.88);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 32px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red-600), var(--amber-500));
}

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

.movie-card h3 {
    margin: 0 0 7px;
    font-size: 18px;
    line-height: 1.3;
}

.movie-card h3 a:hover {
    color: var(--green-700);
}

.meta-line {
    margin: 0 0 9px;
    color: var(--gray-500);
    font-size: 13px;
}

.card-summary {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--gray-600);
    font-size: 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 4px 9px;
    color: var(--green-800);
    border-radius: 999px;
    background: var(--green-100);
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    color: white;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--green-800), #92400e);
    box-shadow: var(--shadow);
    transition: 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-card strong {
    font-size: 22px;
}

.category-card span {
    color: #dcfce7;
    font-size: 14px;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 28px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(22, 101, 52, 0.1);
    border-radius: 16px;
    background: white;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.mini-card:hover {
    color: var(--green-800);
}

.mini-rank {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 999px;
    background: var(--green-700);
    font-weight: 800;
}

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

.mini-meta {
    color: var(--gray-500);
    font-size: 13px;
}

.page-hero {
    padding: 70px 0;
    color: white;
    background: linear-gradient(135deg, var(--green-950), var(--green-800), #92400e);
}

.page-title {
    max-width: 820px;
}

.page-title h1,
.page-title p {
    color: white;
}

.page-title p {
    opacity: 0.88;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px auto;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid rgba(22, 101, 52, 0.12);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.filter-bar button {
    border-radius: 14px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--gray-500);
    font-size: 14px;
}

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

.detail-page {
    padding: 42px 0 80px;
    background: #f8fafc;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.75fr);
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-copy,
.side-card {
    border: 1px solid rgba(22, 101, 52, 0.1);
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
    cursor: pointer;
}

.play-cover span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.92);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
    font-size: 34px;
}

.player-title {
    padding: 18px 22px;
}

.player-title h1 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.16;
}

.detail-copy {
    margin-top: 24px;
    padding: 26px;
}

.detail-copy h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-copy p {
    margin: 0 0 18px;
    color: var(--gray-700);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 0;
}

.detail-meta span {
    padding: 7px 11px;
    color: var(--green-800);
    border-radius: 999px;
    background: var(--green-100);
    font-weight: 700;
    font-size: 13px;
}

.side-card {
    padding: 20px;
    margin-bottom: 22px;
}

.side-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    margin-bottom: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--green-900), var(--amber-500));
}

.side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(180deg, var(--gray-900), var(--gray-800));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
    padding: 54px 0 34px;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: white;
    font-size: 18px;
}

.site-footer p {
    margin: 14px 0 0;
    max-width: 460px;
}

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

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

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

.hidden-by-filter {
    display: none !important;
}

.empty-state {
    display: none;
    padding: 36px;
    text-align: center;
    color: var(--gray-600);
    border-radius: var(--radius);
    background: white;
}

.empty-state.show {
    display: block;
}

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

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

@media (max-width: 860px) {
    .nav-links,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .hero,
    .hero-slide,
    .hero-inner {
        min-height: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding: 54px 0 84px;
    }

    .hero-poster,
    .hero-poster img {
        min-height: 340px;
        height: 340px;
    }

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

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

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

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

    .section {
        padding: 52px 0;
    }

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

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

    .card-summary {
        display: none;
    }

    .category-card {
        min-height: 128px;
        padding: 18px;
    }

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