:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-900: #14532d;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

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

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

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.28);
}

.logo-text {
    white-space: nowrap;
    font-size: 20px;
}

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

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

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--green-700);
    background: var(--green-50);
}

.nav-search,
.mobile-panel form,
.hero-search,
.search-page-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: 999px;
    overflow: hidden;
}

.nav-search input,
.mobile-panel input,
.hero-search input,
.search-page-form input {
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 12px 16px;
    background: transparent;
}

.nav-search button,
.mobile-panel button,
.hero-search button,
.search-page-form button {
    border: 0;
    color: var(--white);
    background: var(--green-600);
    padding: 12px 18px;
    font-weight: 700;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--green-50);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: var(--green-700);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--gray-200);
    padding: 16px;
    background: var(--white);
}

.mobile-panel a {
    display: block;
    padding: 12px 0;
    font-weight: 700;
    color: var(--gray-700);
}

.mobile-panel.is-open {
    display: block;
}

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 15% 20%, rgba(34, 197, 94, 0.55), transparent 30%),
        linear-gradient(135deg, #052e16 0%, #14532d 48%, #020617 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -30% 35%;
    height: 420px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.25), transparent 60%);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    z-index: 1;
    min-height: 660px;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(460px, 1.05fr);
    align-items: center;
    gap: 48px;
    padding: 72px 0;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--green-600);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow.light {
    color: #bbf7d0;
}

.hero-intro h1,
.page-hero h1,
.detail-content-grid h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-intro p {
    max-width: 620px;
    margin: 20px 0 0;
    color: #dcfce7;
    font-size: 18px;
}

.hero-search {
    max-width: 560px;
    margin-top: 28px;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.hero-search input {
    flex: 1;
    color: var(--white);
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.76);
}

.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-category-links a {
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #f0fdf4;
    font-weight: 700;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.38);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(24px);
    opacity: 0;
    transform: translateX(24px) scale(0.98);
    pointer-events: none;
    transition: 0.45s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4.3;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.hero-poster img,
.poster-link img,
.detail-panel img,
.overview-posters img,
.ranking-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-feature-copy h2 {
    margin: 14px 0 12px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-feature-copy p {
    margin: 0;
    color: #dcfce7;
}

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

.hero-tags span,
.detail-badges span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #052e16;
    background: #bbf7d0;
}

.detail-badges span,
.tag-row span {
    color: var(--green-700);
    background: var(--green-50);
}

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

.primary-button,
.ghost-button,
.section-link,
.category-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: var(--green-600);
    padding: 12px 20px;
    box-shadow: 0 18px 36px rgba(34, 197, 94, 0.28);
}

.primary-button:hover,
.nav-search button:hover,
.hero-search button:hover,
.search-page-form button:hover {
    background: var(--green-700);
}

.ghost-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 11px 18px;
}

.hero-controls {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-controls button {
    pointer-events: auto;
}

.hero-controls > button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    font-size: 24px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.36);
}

.hero-dots button.active {
    width: 24px;
    border-radius: 999px;
    background: var(--white);
}

.section {
    padding: 72px 0;
}

.gray-section {
    background: var(--gray-100);
}

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

.section-heading h2,
.rank-layout h2,
.movie-detail-content h2,
.side-recommend h2,
.detail-panel h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading p,
.rank-layout p {
    max-width: 650px;
    margin: 10px 0 0;
    color: var(--gray-500);
}

.section-link {
    color: var(--green-700);
    background: var(--green-50);
    padding: 10px 16px;
}

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

.category-tile,
.overview-card,
.movie-card,
.ranking-card,
.detail-panel,
.movie-detail-content,
.side-recommend,
.player-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.category-tile,
.overview-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.category-tile a,
.overview-card a {
    display: block;
    height: 100%;
    padding: 22px;
}

.category-tile span:first-child,
.overview-card span {
    display: inline-flex;
    color: var(--green-700);
    font-weight: 800;
}

.category-tile h3,
.overview-card h2 {
    margin: 10px 0 8px;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.category-tile p,
.overview-card p {
    margin: 0;
    color: var(--gray-500);
    font-size: 14px;
}

.category-samples {
    display: grid;
    gap: 8px;
    padding: 0 22px 22px;
}

.category-samples a {
    padding: 8px 0;
    border-top: 1px solid var(--gray-100);
    color: var(--gray-700);
    font-size: 14px;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    transition: 0.22s ease;
}

.movie-card:hover,
.ranking-card:hover,
.overview-card:hover,
.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.1;
    overflow: hidden;
    background: linear-gradient(135deg, var(--green-50), var(--gray-100));
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.72), transparent);
}

.poster-year,
.poster-type {
    position: absolute;
    z-index: 1;
    top: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(10px);
}

.poster-year {
    left: 12px;
}

.poster-type {
    right: 12px;
}

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

.movie-meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
}

.movie-meta-line span + span::before,
.detail-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: var(--gray-200);
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.movie-card p {
    min-height: 50px;
    margin: 0 0 12px;
    color: var(--gray-500);
    font-size: 14px;
}

.rank-preview {
    background: linear-gradient(135deg, #052e16, #0f172a);
    color: var(--white);
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
    gap: 48px;
    align-items: center;
}

.rank-layout p {
    color: #dcfce7;
    margin-bottom: 24px;
}

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

.rank-list li {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.rank-list span {
    color: #bbf7d0;
    font-size: 22px;
    font-weight: 900;
}

.rank-list a {
    font-weight: 800;
}

.rank-list em {
    display: block;
    color: #dcfce7;
    font-size: 13px;
    font-style: normal;
}

.page-hero,
.detail-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.4), transparent 32%),
        linear-gradient(135deg, #052e16, #0f172a);
}

.page-hero.slim {
    padding: 72px 0;
}

.page-hero p {
    max-width: 720px;
    color: #dcfce7;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #bbf7d0;
    font-size: 14px;
}

.filter-bar {
    display: grid;
    gap: 14px;
    margin-bottom: 26px;
}

.filter-bar input {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 18px;
    outline: 0;
    padding: 14px 16px;
    background: var(--white);
}

.filter-chip {
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    padding: 8px 13px;
    color: var(--gray-700);
    background: var(--white);
    font-weight: 700;
}

.filter-chip.active,
.filter-chip:hover {
    color: var(--white);
    border-color: var(--green-600);
    background: var(--green-600);
}

.overview-posters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    height: 130px;
    margin: -22px -22px 18px;
    overflow: hidden;
}

.overview-posters img {
    min-width: 0;
    background: var(--gray-100);
}

.ranking-grid {
    display: grid;
    gap: 18px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    border-radius: var(--radius-md);
    padding: 14px;
    transition: 0.22s ease;
}

.ranking-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    background: var(--gray-100);
}

.ranking-poster span {
    position: absolute;
    left: 10px;
    top: 10px;
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--white);
    background: var(--green-600);
    font-weight: 900;
}

.ranking-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.ranking-card p {
    margin: 0 0 12px;
    color: var(--gray-500);
}

.search-page-form {
    max-width: 720px;
    margin-top: 24px;
}

.search-page-form input {
    flex: 1;
}

.search-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.search-toolbar a {
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--green-700);
    background: var(--green-50);
    font-weight: 800;
}

.detail-hero {
    padding: 38px 0 58px;
}

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

.player-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #020617;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: linear-gradient(to top, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.2));
    font-size: 18px;
    font-weight: 900;
    z-index: 3;
}

.player-card.is-playing .play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    color: var(--green-900);
    background: var(--white);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.detail-panel {
    display: grid;
    gap: 14px;
    border-radius: var(--radius-lg);
    padding: 14px;
    color: var(--gray-900);
}

.detail-panel img {
    aspect-ratio: 3 / 4;
    border-radius: 20px;
    background: var(--gray-100);
}

.detail-meta {
    padding: 0 4px;
}

.category-pill {
    justify-self: start;
    padding: 9px 13px;
    color: var(--green-700);
    background: var(--green-50);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

.movie-detail-content,
.side-recommend {
    border-radius: var(--radius-lg);
    padding: 28px;
}

.movie-detail-content h1 {
    color: var(--gray-900);
}

.movie-detail-content .one-line {
    margin: 18px 0;
    color: var(--green-700);
    font-size: 20px;
    font-weight: 800;
}

.movie-detail-content h2 {
    margin: 28px 0 10px;
    font-size: 28px;
}

.movie-detail-content p {
    color: var(--gray-700);
    font-size: 17px;
}

.side-card-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.movie-card.compact {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    border-radius: 18px;
}

.movie-card.compact .poster-link {
    aspect-ratio: 3 / 4;
}

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

.movie-card.compact h3 {
    font-size: 16px;
}

.movie-card.compact p,
.movie-card.compact .tag-row,
.movie-card.compact .poster-year,
.movie-card.compact .poster-type {
    display: none;
}

.site-footer {
    padding-top: 54px;
    color: #cbd5e1;
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
}

.footer-logo {
    color: var(--white);
    font-size: 24px;
}

.site-footer p {
    max-width: 650px;
    color: #94a3b8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

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

.footer-links a {
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
}

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

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1080px) {
    .hero-grid,
    .rank-layout,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .mobile-menu-button {
        display: inline-flex;
        margin-left: auto;
    }

    .header-inner {
        height: 64px;
    }

    .hero-grid {
        min-height: auto;
        padding: 44px 0;
        gap: 32px;
    }

    .hero-slide {
        grid-template-columns: 132px minmax(0, 1fr);
        gap: 18px;
        padding: 18px;
    }

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

    .hero-feature-copy h2 {
        font-size: 26px;
    }

    .hero-feature-copy p,
    .ghost-button {
        display: none;
    }

    .section {
        padding: 48px 0;
    }

    .section-heading {
        display: block;
    }

    .section-link {
        margin-top: 14px;
    }

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

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

    .detail-panel {
        grid-template-columns: 120px minmax(0, 1fr);
        align-items: start;
    }

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

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

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

    .hero-intro h1,
    .page-hero h1,
    .detail-content-grid h1 {
        font-size: 36px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .hero-controls {
        left: 18px;
        right: 18px;
    }

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

    .hero-search button,
    .search-page-form button {
        border-radius: 0 0 20px 20px;
    }

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

    .ranking-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }

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

    .movie-detail-content,
    .side-recommend {
        padding: 20px;
    }
}
