:root {
    --emerald: #10b981;
    --emerald-dark: #047857;
    --teal: #14b8a6;
    --cyan: #06b6d4;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f0fdfa;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(135deg, #f9fafb 0%, #ecfdf5 45%, #f0fdfa 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(16, 185, 129, 0.14);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #064e3b;
}

.logo-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.28);
}

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

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: background 0.25s ease, color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--emerald-dark);
    background: #ecfdf5;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #ecfdf5;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--emerald-dark);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #0f172a;
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 6s ease;
}

.hero-slide.is-active .hero-image {
    transform: scale(1.1);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(16, 185, 129, 0.45), transparent 34%),
        linear-gradient(90deg, rgba(3, 7, 18, 0.9), rgba(3, 7, 18, 0.56), rgba(3, 7, 18, 0.15)),
        linear-gradient(0deg, rgba(3, 7, 18, 0.86), transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(1180px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    color: #ffffff;
}

.hero-content h1 {
    max-width: 820px;
    margin: 14px 0 18px;
    font-size: clamp(40px, 8vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

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

.hero-kicker,
.section-kicker {
    margin: 0;
    color: var(--emerald);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #ecfdf5;
    background: rgba(16, 185, 129, 0.22);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 700;
}

.tag-row span {
    border-color: #d1fae5;
    color: var(--emerald-dark);
    background: #ecfdf5;
}

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

.primary-button,
.ghost-button,
.panel-link,
.wide-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 18px 34px rgba(16, 185, 129, 0.3);
}

.primary-button:hover,
.ghost-button:hover,
.panel-link:hover,
.wide-link:hover {
    transform: translateY(-2px);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.small-actions .ghost-button {
    color: var(--emerald-dark);
    border-color: #a7f3d0;
    background: #ffffff;
}

.hero-controls {
    position: absolute;
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 34px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

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

.hero-dot.is-active {
    background: var(--emerald);
}

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

.alt-bg {
    width: 100%;
    padding: 72px max(16px, calc((100vw - 1180px) / 2));
    background: rgba(255, 255, 255, 0.72);
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading.centered {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

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

.section-heading h2,
.page-hero h1,
.detail-text h1,
.story-card h2 {
    margin: 8px 0 0;
    color: #064e3b;
    font-size: clamp(28px, 5vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
    max-width: 760px;
    margin: 12px auto 0;
    color: var(--muted);
    line-height: 1.8;
}

.search-panel {
    display: flex;
    gap: 12px;
    align-items: center;
    max-width: 820px;
    margin: 0 auto 32px;
    padding: 10px;
    border: 1px solid #d1fae5;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.12);
}

.slim-panel {
    max-width: none;
}

.search-panel input {
    flex: 1;
    min-height: 46px;
    padding: 0 16px;
    border: 0;
    outline: 0;
    border-radius: 16px;
    color: var(--ink);
    background: #f9fafb;
    font-size: 15px;
}

.panel-link {
    color: #ffffff;
    background: var(--emerald);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(209, 250, 229, 0.9);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #d1fae5;
}

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

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

.year-pill,
.type-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(3, 7, 18, 0.72);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.type-pill {
    right: 12px;
    left: auto;
    background: rgba(16, 185, 129, 0.82);
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0;
    color: #064e3b;
    font-size: 18px;
    line-height: 1.35;
}

.movie-info h3 a:hover,
.text-link:hover {
    color: var(--emerald-dark);
}

.movie-info p {
    min-height: 46px;
    margin: 10px 0 12px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.65;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 13px;
}

.movie-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: #10b981;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 26px;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.82), rgba(3, 7, 18, 0.1));
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
}

.category-tile strong {
    bottom: 54px;
    font-size: 22px;
}

.category-tile em {
    bottom: 20px;
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    font-size: 13px;
    line-height: 1.5;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
    gap: 26px;
    align-items: start;
}

.ranking-layout.wide {
    grid-template-columns: minmax(0, 1fr) 330px;
}

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

.ranking-side,
.compact-list {
    display: grid;
    gap: 10px;
}

.sticky-side {
    position: sticky;
    top: 96px;
}

.compact-movie {
    display: grid;
    grid-template-columns: auto 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid #d1fae5;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.compact-movie img {
    width: 58px;
    height: 74px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-movie strong,
.compact-movie em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-movie strong {
    color: #064e3b;
    font-size: 15px;
}

.compact-movie em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

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

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 40px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0 46px;
}

.compact-page-hero {
    display: block;
    max-width: 900px;
    text-align: center;
}

.page-hero img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

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

.category-overview-card {
    padding: 20px;
    border: 1px solid #d1fae5;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.category-overview-head {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.category-overview-head img {
    width: 110px;
    height: 130px;
    object-fit: cover;
    border-radius: 20px;
}

.category-overview-head h2 {
    margin: 6px 0 8px;
    color: #064e3b;
}

.category-overview-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.wide-link {
    width: 100%;
    margin-top: 18px;
    color: var(--emerald-dark);
    background: #ecfdf5;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.35;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(6px);
    transform: scale(1.08);
}

.detail-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(3, 7, 18, 0.94), rgba(3, 7, 18, 0.74));
}

.detail-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 64px;
}

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

.breadcrumb a:hover {
    color: #a7f3d0;
}

.breadcrumb em {
    color: #ffffff;
    font-style: normal;
}

.detail-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-text h1 {
    color: #ffffff;
    font-size: clamp(36px, 7vw, 72px);
}

.lead-text {
    max-width: 800px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.detail-meta-list span {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
}

.detail-meta-list strong {
    display: block;
    margin-bottom: 6px;
    color: #a7f3d0;
    font-size: 12px;
}

.detail-section {
    padding-top: 46px;
    padding-bottom: 46px;
}

.player-card {
    overflow: hidden;
    border-radius: 32px;
    background: #030712;
    box-shadow: var(--shadow);
}

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

.movie-player {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.78), rgba(3, 7, 18, 0.32));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 16px 38px rgba(16, 185, 129, 0.35);
    font-size: 32px;
}

.player-overlay strong {
    max-width: 80%;
    font-size: clamp(22px, 4vw, 42px);
    text-align: center;
}

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

.story-card {
    padding: 28px;
    border: 1px solid #d1fae5;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.story-card p {
    margin: 16px 0 0;
    color: #374151;
    line-height: 1.9;
    white-space: pre-line;
}

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

.site-footer {
    margin-top: 30px;
    padding: 48px 0;
    color: #d1fae5;
    background: #064e3b;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.footer-logo {
    color: #ffffff;
}

.footer-inner p {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.7;
}

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

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

.text-link {
    color: var(--emerald-dark);
    font-weight: 900;
}

.is-filter-hidden {
    display: none;
}

@media (max-width: 1100px) {
    .movie-grid,
    .ranking-main,
    .category-grid,
    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ranking-layout,
    .ranking-layout.wide {
        grid-template-columns: 1fr;
    }

    .sticky-side {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

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

    .movie-grid,
    .ranking-main,
    .category-grid,
    .overview-grid,
    .related-grid,
    .two-column-detail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .page-hero img {
        max-height: 260px;
    }

    .detail-poster {
        max-width: 280px;
    }

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

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .section-block,
    .alt-bg,
    .detail-section {
        padding-top: 42px;
        padding-bottom: 42px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-desc,
    .lead-text {
        font-size: 16px;
    }

    .movie-grid,
    .ranking-main,
    .category-grid,
    .overview-grid,
    .related-grid,
    .two-column-detail {
        grid-template-columns: 1fr;
    }

    .search-panel {
        flex-direction: column;
        align-items: stretch;
    }

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

    .category-overview-head {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .category-overview-head img {
        width: 86px;
        height: 112px;
    }

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

    .compact-movie {
        grid-template-columns: auto 50px minmax(0, 1fr);
    }

    .compact-movie img {
        width: 50px;
        height: 66px;
    }
}
