:root {
    --emerald-950: #022c22;
    --emerald-900: #064e3b;
    --emerald-800: #065f46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --emerald-100: #d1fae5;
    --green-600: #16a34a;
    --green-300: #86efac;
    --amber-500: #f59e0b;
    --blue-600: #2563eb;
    --rose-600: #e11d48;
    --text-main: #111827;
    --text-muted: #6b7280;
    --line-soft: #e5e7eb;
    --bg-soft: #f0fdf4;
    --shadow-soft: 0 12px 30px rgba(6, 95, 70, 0.12);
    --shadow-card: 0 10px 22px rgba(15, 23, 42, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-main);
    background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 42%, #f8fafc 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--emerald-800), var(--green-600));
    box-shadow: 0 10px 26px rgba(6, 78, 59, 0.22);
}

.site-nav {
    min-height: 68px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}

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

.site-logo {
    color: #ffffff;
    font-size: 21px;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.nav-links a {
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 12px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.13);
    transform: translateY(-1px);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.top-search input {
    width: 210px;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 8px 10px;
}

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

.top-search button,
.nav-toggle {
    border: 0;
    color: var(--emerald-800);
    background: #ffffff;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
}

.nav-toggle {
    display: none;
}

.hero-slider {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: var(--emerald-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
}

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

.hero-slide img.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.58) saturate(1.08);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 44, 34, 0.88), rgba(6, 95, 70, 0.68) 48%, rgba(20, 83, 45, 0.34));
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(2, 44, 34, 0.88));
}

.hero-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 36px;
}

.hero-copy {
    color: #ffffff;
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--green-300);
    font-weight: 800;
    margin-bottom: 18px;
}

.hero-copy h1,
.hero-copy h2 {
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    margin: 0 0 18px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p {
    color: #d1fae5;
    font-size: clamp(17px, 2vw, 23px);
    margin: 0 0 24px;
}

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

.hero-tags span,
.card-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--emerald-800);
    background: var(--emerald-100);
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

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

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

.btn {
    color: var(--emerald-800);
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.btn-outline {
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.btn-soft {
    color: var(--emerald-800);
    background: var(--emerald-100);
}

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

.hero-panel {
    padding: 22px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 22px 48px rgba(0, 0, 0, 0.18);
}

.hero-panel h3 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 21px;
}

.hero-focus-list {
    display: grid;
    gap: 12px;
}

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

.hero-dot {
    width: 36px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    padding: 0;
}

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

.section {
    padding: 62px 0;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-heading p,
.page-hero p {
    color: var(--text-muted);
    margin: 8px 0 0;
    max-width: 760px;
}

.stats-grid,
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.stat-card,
.category-card,
.info-card,
.detail-panel,
.player-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.stat-card {
    padding: 28px;
    text-align: center;
}

.stat-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 50%;
    color: var(--emerald-700);
    background: var(--emerald-100);
    font-size: 28px;
}

.stat-card h3,
.category-card h3,
.info-card h2,
.detail-panel h2 {
    margin: 0 0 10px;
}

.stat-card p,
.category-card p,
.info-card p,
.detail-panel p,
.movie-card p,
.rank-copy p {
    color: var(--text-muted);
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: radial-gradient(circle at 30% 20%, rgba(134, 239, 172, 0.35), transparent 34%), linear-gradient(135deg, var(--emerald-900), var(--emerald-600));
}

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

.movie-card:hover .poster-frame img,
.category-card:hover img {
    transform: scale(1.08);
}

.badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.year-badge {
    top: 10px;
    right: 10px;
    background: var(--emerald-600);
}

.region-badge {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 74px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.62);
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: var(--emerald-800);
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-weight: 900;
}

.movie-card:hover .play-float {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

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

.movie-card h3 a:hover {
    color: var(--emerald-600);
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    font-size: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 13px;
}

.mini-movie {
    display: grid;
    grid-template-columns: 42px 54px 1fr;
    gap: 12px;
    align-items: center;
    color: #ffffff;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.11);
    transition: background 0.25s ease;
}

.mini-movie:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mini-movie img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--emerald-900), var(--emerald-600));
}

.mini-rank {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--emerald-900);
    background: #ffffff;
    font-weight: 900;
}

.mini-movie strong {
    display: block;
    line-height: 1.25;
}

.mini-movie em {
    display: block;
    margin-top: 4px;
    color: #d1fae5;
    font-size: 12px;
    font-style: normal;
}

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

.category-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 100%;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.14);
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    height: 138px;
    padding: 8px;
    background: linear-gradient(135deg, var(--emerald-900), var(--emerald-600));
}

.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
}

.category-card-body {
    padding: 18px;
}

.category-card p {
    margin: 0 0 16px;
    font-size: 14px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, 180px);
    gap: 14px;
    padding: 18px;
    margin: 0 0 26px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    outline: 0;
    padding: 12px 14px;
    background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.page-hero {
    padding: 56px 0 28px;
}

.page-hero-box {
    position: relative;
    overflow: hidden;
    padding: 46px;
    border-radius: var(--radius-xl);
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald-900), var(--green-600));
    box-shadow: var(--shadow-soft);
}

.page-hero-box::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.page-hero h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.1;
}

.page-hero p {
    position: relative;
    z-index: 1;
    color: #d1fae5;
    font-size: 18px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 88px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.rank-num {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald-700), var(--green-600));
    font-size: 20px;
    font-weight: 900;
}

.rank-row img {
    width: 88px;
    height: 118px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--emerald-900), var(--emerald-600));
}

.rank-copy h2,
.rank-copy h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-copy p {
    margin: 0 0 8px;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 28px;
    padding: 34px 0 64px;
}

.back-link {
    display: inline-flex;
    margin: 28px 0 0;
    color: var(--emerald-700);
    font-weight: 800;
}

.player-card {
    overflow: hidden;
}

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

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

.player-start {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.58));
}

.player-start span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    color: var(--emerald-800);
    background: rgba(255, 255, 255, 0.95);
    font-size: 31px;
    font-weight: 900;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
}

.player-box.is-playing .player-start {
    opacity: 0;
    pointer-events: none;
}

.detail-panel,
.info-card {
    padding: 26px;
}

.detail-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.detail-title span {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--emerald-800);
    background: var(--emerald-100);
    font-weight: 800;
    font-size: 13px;
}

.detail-panel h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0 22px;
    color: var(--text-muted);
}

.detail-stats span {
    padding: 8px 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.info-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--emerald-900), var(--emerald-600));
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 12px;
}

.info-list dt {
    color: var(--text-muted);
}

.info-list dd {
    margin: 0;
    font-weight: 700;
}

.related-list {
    display: grid;
    gap: 12px;
}

.related-list .mini-movie {
    grid-template-columns: 54px 1fr;
    color: var(--text-main);
    background: #f8fafc;
}

.related-list .mini-movie em {
    color: var(--text-muted);
}

.side-sticky {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 20px;
}

.not-found {
    display: none;
    padding: 28px;
    text-align: center;
    color: var(--text-muted);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.site-footer {
    color: #d1fae5;
    background: linear-gradient(180deg, var(--emerald-900), var(--emerald-950));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding: 46px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: var(--green-300);
    font-size: 18px;
}

.footer-grid p {
    margin: 12px 0 0;
}

.footer-grid ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    color: #a7f3d0;
    border-top: 1px solid rgba(167, 243, 208, 0.18);
}

@media (max-width: 1080px) {
    .site-nav {
        grid-template-columns: auto auto;
        justify-content: space-between;
    }

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

    .nav-links,
    .top-search {
        display: none;
        grid-column: 1 / -1;
    }

    .site-header.is-open .nav-links,
    .site-header.is-open .top-search {
        display: flex;
    }

    .site-header.is-open .nav-links {
        flex-wrap: wrap;
        justify-content: flex-start;
        padding-bottom: 8px;
    }

    .site-header.is-open .top-search {
        margin-bottom: 12px;
        max-width: 420px;
    }

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

    .hero-panel {
        display: none;
    }

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

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

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

    .side-sticky {
        position: static;
    }
}

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

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

    .hero-slider {
        height: 620px;
    }

    .hero-inner {
        align-items: end;
        padding-bottom: 78px;
    }

    .section {
        padding: 42px 0;
    }

    .section-heading {
        display: block;
    }

    .movie-grid,
    .category-grid,
    .stats-grid,
    .footer-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 48px 70px 1fr;
    }

    .rank-row .btn-soft {
        grid-column: 1 / -1;
    }

    .rank-row img {
        width: 70px;
        height: 94px;
    }

    .page-hero-box {
        padding: 32px 24px;
    }

    .detail-panel,
    .info-card {
        padding: 20px;
    }
}
