* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #020617;
    --emerald: #10b981;
    --emerald-dark: #047857;
    --emerald-soft: #d1fae5;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 34rem), var(--bg);
    line-height: 1.65;
}

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

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

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

.nav-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong,
.footer-brand {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-text em {
    margin-top: 4px;
    font-size: 0.76rem;
    color: var(--muted);
    font-style: normal;
}

.desktop-nav,
.mobile-nav {
    align-items: center;
    gap: 4px;
}

.desktop-nav {
    display: flex;
}

.desktop-nav a,
.mobile-nav a {
    padding: 9px 13px;
    border-radius: 999px;
    color: #334155;
    font-size: 0.95rem;
    transition: 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--emerald-dark);
    background: var(--emerald-soft);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 9px;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

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

main {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 760px;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 32px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.68;
    background: linear-gradient(135deg, #064e3b, #020617);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.78) 0%, transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(680px, calc(100% - 40px));
    padding: 92px 0 0 68px;
    color: #ffffff;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--emerald-soft);
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.eyebrow {
    color: var(--emerald-dark);
    background: var(--emerald-soft);
    border-color: transparent;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 18px;
    font-size: clamp(2.3rem, 6vw, 5.6rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-one-line {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08rem;
}

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

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 650;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.large-tags span {
    font-size: 0.88rem;
    padding: 7px 12px;
}

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

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

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    box-shadow: 0 18px 35px rgba(16, 185, 129, 0.26);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn.ghost.dark {
    color: var(--text);
    background: #ffffff;
    border-color: var(--line);
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 68px;
    bottom: 218px;
    display: flex;
    gap: 8px;
}

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

.hero-dots button.active {
    background: var(--emerald);
}

.hero-search-card {
    position: absolute;
    z-index: 5;
    left: 36px;
    right: 36px;
    bottom: 34px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.hero-search-card h2 {
    margin: 0 0 6px;
    font-size: clamp(1.4rem, 3vw, 2.15rem);
    letter-spacing: -0.04em;
}

.hero-search-card p {
    max-width: 780px;
    margin: 0 0 16px;
    color: #475569;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px;
    gap: 12px;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.search-box span {
    color: var(--emerald-dark);
    font-weight: 900;
}

.search-box input,
.filter-panel select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.filter-panel select {
    min-height: 48px;
    padding: 0 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.hero-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
}

.hero-chip-row a {
    padding: 8px 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: var(--emerald-dark);
    font-weight: 750;
    font-size: 0.88rem;
}

.content-section {
    margin: 58px 0;
}

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

.section-head h2 {
    margin: 12px 0 6px;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    color: var(--emerald-dark);
    font-weight: 800;
}

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

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

.movie-card {
    min-width: 0;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 22px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b, #0f172a);
}

.movie-cover img,
.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.cover-shade {
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.78), transparent);
}

.cover-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 9px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.7);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.cover-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--emerald);
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.3);
}

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

.movie-card-meta {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.movie-card h3 {
    margin: 7px 0 8px;
    font-size: 1rem;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-content h3 a:hover {
    color: var(--emerald-dark);
}

.movie-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 3.1em;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.88rem;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.ranking-box {
    position: sticky;
    top: 92px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.ranking-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 900;
}

.ranking-title a {
    color: var(--emerald-dark);
    font-size: 0.88rem;
}

.rank-list {
    display: grid;
    gap: 8px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    background: #f8fafc;
    transition: 0.2s ease;
}

.rank-row:hover {
    background: #ecfdf5;
}

.rank-no {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    border-radius: 11px;
    font-size: 0.78rem;
    font-weight: 900;
}

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

.rank-meta {
    color: var(--muted);
    font-size: 0.8rem;
}

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

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

.category-card {
    padding: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.category-card-title {
    display: inline-flex;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.category-card-title:hover {
    color: var(--emerald-dark);
}

.category-card p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.94rem;
}

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

.mini-link {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid #f1f5f9;
}

.mini-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 750;
}

.mini-link em {
    color: var(--muted);
    font-size: 0.78rem;
    font-style: normal;
    white-space: nowrap;
}

.feature-band,
.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(34px, 6vw, 68px);
    border-radius: 30px;
    background:
        radial-gradient(circle at 82% 14%, rgba(16, 185, 129, 0.35), transparent 22rem),
        linear-gradient(135deg, #06271f, #020617);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.feature-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 58px;
}

.feature-band h2,
.page-hero h1 {
    margin: 14px 0 10px;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.feature-band p,
.page-hero p {
    color: rgba(255, 255, 255, 0.78);
}

.small-hero,
.category-hero {
    margin-top: 22px;
}

.category-hero .filter-panel,
.rank-hero .filter-panel {
    margin-top: 22px;
    max-width: 900px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 88px 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.rank-cover {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #064e3b, #0f172a);
}

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

.rank-content h3 {
    margin: 4px 0 5px;
    font-size: 1.08rem;
}

.rank-content p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--muted);
}

.detail-hero {
    margin-top: 22px;
    padding: clamp(24px, 4vw, 46px);
    border-radius: 30px;
    background:
        radial-gradient(circle at 84% 18%, rgba(16, 185, 129, 0.26), transparent 22rem),
        linear-gradient(135deg, #031b17, #020617);
    color: #ffffff;
    box-shadow: var(--shadow);
}

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

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    aspect-ratio: 16 / 9;
}

.video-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.2));
}

.play-overlay span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    background: var(--emerald);
    border-radius: 999px;
    box-shadow: 0 18px 38px rgba(16, 185, 129, 0.34);
    font-size: 2rem;
}

.play-overlay strong {
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.56);
}

.player-panel.is-playing .play-overlay {
    display: none;
}

.detail-info .hero-kicker {
    color: var(--emerald-soft);
}

.detail-info h1 {
    color: #ffffff;
}

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

.meta-list div {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
}

.meta-list dt {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.78rem;
}

.meta-list dd {
    margin: 3px 0 0;
    font-weight: 800;
}

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

.story-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.story-card.accent {
    background: linear-gradient(135deg, #ecfdf5, #ffffff);
}

.story-card h2 {
    margin: 12px 0 12px;
    font-size: 1.55rem;
    letter-spacing: -0.03em;
}

.story-card p {
    margin: 0;
    color: #334155;
}

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

.site-footer {
    margin-top: 70px;
    background: #020617;
    color: #ffffff;
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.footer-inner p {
    max-width: 560px;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: start;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: var(--emerald);
}

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

.image-missing img,
img.image-missing {
    opacity: 0;
}

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

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

    .split-layout,
    .detail-layout,
    .detail-copy {
        grid-template-columns: 1fr;
    }

    .ranking-box {
        position: static;
    }
}

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

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

    main,
    .nav-shell,
    .mobile-nav,
    .footer-inner {
        width: min(100% - 24px, 1200px);
    }

    .hero {
        min-height: 860px;
        border-radius: 24px;
    }

    .hero-content {
        width: calc(100% - 32px);
        padding: 52px 16px 0;
    }

    .hero-dots {
        left: 20px;
        bottom: 322px;
    }

    .hero-search-card {
        left: 14px;
        right: 14px;
        bottom: 14px;
        padding: 18px;
        border-radius: 22px;
    }

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

    .section-head,
    .feature-band,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .rank-card .rank-index {
        position: absolute;
        margin-left: 6px;
        margin-top: 6px;
    }

    .rank-card .text-link {
        grid-column: 2;
    }

    .rank-cover {
        grid-row: span 2;
    }

    .page-hero,
    .detail-hero {
        border-radius: 24px;
        padding: 24px;
    }

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

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

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.4rem;
    }

    .movie-card {
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr);
    }

    .movie-cover {
        height: 100%;
        aspect-ratio: auto;
    }
}
