:root {
    --green-950: #052e1f;
    --green-900: #064e35;
    --green-800: #07643f;
    --green-700: #0f7a4a;
    --green-600: #16a05c;
    --green-500: #22c55e;
    --green-100: #dcfce7;
    --ink: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --card: #ffffff;
    --soft: #f7fbf7;
    --shadow: 0 18px 45px rgba(6, 78, 53, 0.13);
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f3faf3 0%, #ffffff 42%, #f6faf7 100%);
    color: var(--ink);
    min-width: 320px;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--green-700), var(--green-950));
    box-shadow: 0 10px 30px rgba(4, 64, 42, 0.25);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

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

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

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

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

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(3, 58, 37, 0.58);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.top-search input,
.mobile-search input {
    width: 210px;
    border: 0;
    outline: 0;
    color: #ffffff;
    padding: 11px 8px 11px 16px;
    background: transparent;
}

.top-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(220, 252, 231, 0.8);
}

.top-search button,
.mobile-search button {
    border: 0;
    color: #ffffff;
    padding: 10px 14px;
    background: rgba(34, 197, 94, 0.25);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    color: #ffffff;
    border: 0;
    border-radius: 12px;
    padding: 8px 11px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.mobile-search {
    border-radius: 18px;
}

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

.section,
.hero-slider,
.detail-shell,
.category-hero,
.search-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-slider {
    position: relative;
    margin-top: 34px;
    min-height: 520px;
    overflow: hidden;
    color: #ffffff;
    border-radius: 34px;
    background: radial-gradient(circle at 22% 28%, rgba(34, 197, 94, 0.42), transparent 34%), linear-gradient(135deg, #052e1f 0%, #075338 58%, #0b1f17 100%);
    box-shadow: var(--shadow);
}

.hero-track {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 36px;
    align-items: center;
    padding: 58px;
    opacity: 0;
    transform: translateX(24px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-copy {
    position: relative;
    z-index: 2;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #d9ffe5;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

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

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.btn,
.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 0;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.btn.primary {
    color: var(--green-950);
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

.secondary-btn,
.btn.secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.primary-btn:hover,
.secondary-btn:hover,
.btn:hover {
    transform: translateY(-2px);
}

.hero-media {
    position: relative;
    z-index: 2;
}

.hero-media a {
    display: block;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
    transform: rotate(2deg);
    transition: transform 0.35s ease;
}

.hero-media a:hover {
    transform: rotate(0deg) scale(1.02);
}

.hero-media img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
}

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

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

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

.section {
    padding: 58px 0 0;
}

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

.section-heading h2,
.category-hero h1,
.detail-title h1,
.search-shell h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-heading p,
.category-hero p,
.search-shell p,
.detail-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.more-link {
    color: var(--green-700);
    font-weight: 800;
}

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.09);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(6, 78, 53, 0.17);
}

.movie-poster {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #064e35, #111827);
}

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

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

.movie-poster figcaption {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(22, 160, 92, 0.92);
    backdrop-filter: blur(8px);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--green-700);
    font-size: 13px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.3;
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #175b38;
    background: #ecfdf3;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    min-height: 184px;
    padding: 22px;
    border-radius: 26px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 28%), linear-gradient(135deg, var(--green-700), var(--green-950));
    box-shadow: var(--shadow);
    transition: transform 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0;
    font-size: 24px;
}

.category-card p {
    margin: 12px 0 18px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.65;
}

.category-card span {
    font-weight: 900;
}

.rank-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.rank-panel {
    padding: 22px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.rank-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.rank-row a {
    display: grid;
    grid-template-columns: 42px 58px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.rank-row:first-of-type a {
    border-top: 0;
}

.rank-number {
    color: var(--green-700);
    font-weight: 900;
    font-size: 20px;
}

.rank-row img {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--green-900);
}

.rank-info {
    display: grid;
    min-width: 0;
}

.rank-info strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-info em {
    overflow: hidden;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.category-hero,
.search-shell {
    padding: 46px 0 10px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
    padding: 14px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    flex: 1 1 180px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    outline: 0;
    background: #ffffff;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--green-600);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.13);
}

.detail-shell {
    padding: 36px 0 0;
}

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

.breadcrumb a {
    color: var(--green-700);
    font-weight: 800;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
    padding: 28px;
    border-radius: 32px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--green-900), #111827);
}

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

.detail-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.meta-badges span {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--green-800);
    background: var(--green-100);
    font-weight: 800;
}

.player-section,
.text-panel,
.related-section {
    margin-top: 34px;
    padding: 26px;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.player-section h2,
.text-panel h2,
.related-section h2 {
    margin: 0 0 18px;
    font-size: 26px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    cursor: pointer;
}

.video-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-mask {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #ffffff;
    text-align: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-shell.is-playing .video-mask {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-btn {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--green-900);
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.play-btn span {
    margin-left: 5px;
    font-size: 30px;
}

.video-mask strong {
    width: min(680px, calc(100% - 32px));
    font-size: clamp(22px, 4vw, 34px);
}

.text-panel p {
    margin: 0 0 16px;
    color: #344054;
    line-height: 1.9;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.info-box {
    padding: 16px;
    border-radius: 18px;
    background: #f3faf3;
}

.info-box span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.info-box strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
}

.search-results {
    margin-top: 24px;
}

.empty-state {
    display: none;
    padding: 26px;
    border-radius: 22px;
    color: var(--muted);
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

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

.hide-card {
    display: none;
}

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

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

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

    .hero-media {
        display: none;
    }

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

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

@media (max-width: 720px) {
    .nav-shell,
    .section,
    .hero-slider,
    .detail-shell,
    .category-hero,
    .search-shell,
    .mobile-panel {
        width: min(100% - 22px, 1180px);
    }

    .brand span:last-child {
        font-size: 18px;
    }

    .hero-slider,
    .hero-track {
        min-height: 560px;
    }

    .hero-slide {
        padding: 34px 24px 70px;
    }

    .hero-dots {
        left: 24px;
        bottom: 24px;
    }

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

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

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

    .detail-hero,
    .player-section,
    .text-panel,
    .related-section {
        padding: 18px;
        border-radius: 24px;
    }

    .detail-poster img {
        min-height: auto;
        aspect-ratio: 4 / 3;
    }

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

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

    .rank-heat {
        display: none;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .action-row {
        display: grid;
    }

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

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