:root {
    --color-green-50: #ecfdf5;
    --color-green-100: #d1fae5;
    --color-green-500: #22c55e;
    --color-green-600: #16a34a;
    --color-green-700: #15803d;
    --color-emerald-700: #047857;
    --color-stone-50: #fafaf9;
    --color-stone-100: #f5f5f4;
    --color-stone-200: #e7e5e4;
    --color-stone-300: #d6d3d1;
    --color-stone-500: #78716c;
    --color-stone-600: #57534e;
    --color-stone-700: #44403c;
    --color-stone-800: #292524;
    --color-stone-900: #1c1917;
    --shadow-soft: 0 18px 45px rgba(41, 37, 36, 0.12);
    --shadow-card: 0 12px 30px rgba(41, 37, 36, 0.10);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--color-stone-800);
    background: linear-gradient(180deg, var(--color-stone-50), #ffffff 45%, #ffffff);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(231, 229, 228, 0.86);
    backdrop-filter: blur(16px);
}

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-green-600), var(--color-emerald-700));
    border-radius: 13px;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.26);
}

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

.brand-text strong,
.footer-brand strong {
    color: var(--color-stone-800);
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.brand-text small,
.footer-brand small {
    color: var(--color-stone-500);
    font-size: 12px;
}

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

.desktop-nav a {
    color: var(--color-stone-700);
    font-weight: 650;
    transition: color 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--color-green-600);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-nav input,
.filter-search input {
    width: 250px;
    height: 42px;
    padding: 0 14px;
    color: var(--color-stone-800);
    background: var(--color-stone-50);
    border: 1px solid var(--color-stone-200);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-search input:focus {
    border-color: var(--color-green-500);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.header-search button,
.mobile-nav button,
.primary-button,
.secondary-button,
.filter-search button {
    min-height: 42px;
    padding: 0 18px;
    color: #ffffff;
    font-weight: 700;
    background: var(--color-green-600);
    border: 0;
    border-radius: 12px;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-nav button:hover,
.primary-button:hover,
.filter-search button:hover {
    background: var(--color-green-700);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.22);
}

.secondary-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.34);
    backdrop-filter: blur(10px);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    color: var(--color-stone-700);
    background: var(--color-stone-100);
    border: 0;
    border-radius: 12px;
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, var(--container));
    margin: 0 auto 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--color-stone-200);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
}

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

.mobile-nav a {
    color: var(--color-stone-700);
    font-weight: 650;
}

.mobile-nav form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

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

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: var(--color-stone-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-image {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #14532d, #1c1917);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image.poster-missing::after,
.poster-frame.poster-missing::after,
.player-shell.poster-missing::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(34, 197, 94, 0.28), transparent 32%),
        linear-gradient(135deg, #14532d, #292524 64%, #0f172a);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.10)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.54), transparent 42%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 690px;
    color: #ffffff;
    padding-block: 76px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.hero-badges span:first-child {
    background: var(--color-green-600);
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 620px;
    margin: 0 0 24px;
    color: rgba(245, 245, 244, 0.88);
    font-size: clamp(17px, 2vw, 21px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    color: rgba(245, 245, 244, 0.76);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.30);
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(255, 255, 255, 0.55);
    border: 0;
    border-radius: 999px;
    transition: width 0.25s ease, background 0.25s ease;
}

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

main {
    display: block;
}

.section {
    padding: 70px 0;
}

.section.compact-section {
    padding: 48px 0;
}

.soft-panel {
    padding: clamp(24px, 4vw, 48px);
    background: linear-gradient(135deg, var(--color-green-50), #ffffff);
    border: 1px solid rgba(209, 250, 229, 0.85);
    border-radius: 30px;
    box-shadow: var(--shadow-card);
}

.stone-panel {
    padding: clamp(24px, 4vw, 48px);
    background: var(--color-stone-100);
    border-radius: 30px;
}

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

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

.section-heading p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--color-stone-600);
}

.section-kicker {
    color: var(--color-green-600);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-action {
    flex: 0 0 auto;
    color: var(--color-green-700);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(231, 229, 228, 0.92);
    border-radius: 20px;
    box-shadow: 0 5px 16px rgba(41, 37, 36, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 197, 94, 0.34);
    box-shadow: var(--shadow-card);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-green-100), var(--color-stone-900));
}

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

.movie-card:hover .poster-frame img {
    transform: scale(1.06);
    filter: saturate(1.12);
}

.poster-badge,
.poster-year {
    position: absolute;
    top: 12px;
    z-index: 1;
    padding: 4px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.52);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.poster-badge {
    left: 12px;
}

.poster-year {
    right: 12px;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(22, 163, 74, 0.86);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card h3 {
    margin: 0 0 9px;
    color: var(--color-stone-800);
    font-size: 17px;
    line-height: 1.35;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--color-stone-600);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--color-stone-500);
    font-size: 13px;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.movie-tags span,
.detail-tags span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    color: var(--color-stone-600);
    font-size: 12px;
    font-weight: 700;
    background: var(--color-stone-100);
    border-radius: 999px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--color-stone-200);
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(41, 37, 36, 0.05);
}

.filter-search {
    display: flex;
    gap: 8px;
    flex: 1 1 340px;
}

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

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    min-height: 36px;
    border: 1px solid var(--color-stone-200);
}

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

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: -40px;
    position: relative;
    z-index: 3;
}

.stat-card {
    padding: 22px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--color-stone-200);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
}

.stat-card strong {
    display: block;
    color: var(--color-green-700);
    font-size: 28px;
    line-height: 1;
}

.stat-card span {
    display: block;
    margin-top: 8px;
    color: var(--color-stone-600);
    font-size: 14px;
}

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

.category-card {
    min-height: 180px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #ffffff, var(--color-green-50));
    border: 1px solid rgba(209, 250, 229, 0.95);
    border-radius: 22px;
    box-shadow: 0 9px 22px rgba(41, 37, 36, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card small {
    color: var(--color-green-700);
    font-weight: 900;
    letter-spacing: 0.10em;
}

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

.category-card p {
    margin: 0;
    color: var(--color-stone-600);
    font-size: 14px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 96px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--color-stone-200);
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(41, 37, 36, 0.05);
}

.rank-number {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-green-600), var(--color-emerald-700));
    border-radius: 14px;
}

.rank-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-stone-200);
    border-radius: 13px;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-body h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-body p {
    margin: 0;
    color: var(--color-stone-600);
    font-size: 14px;
}

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

.page-hero {
    padding: 76px 0 46px;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.36), transparent 28%),
        linear-gradient(135deg, var(--color-stone-900), #14532d);
}

.page-hero .section-heading h1,
.page-hero .section-heading p,
.page-hero .section-kicker {
    color: #ffffff;
}

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

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

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

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--color-stone-200);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
}

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

.player-shell video {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff;
    background:
        radial-gradient(circle at 50% 46%, rgba(22, 163, 74, 0.34), transparent 22%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
    border: 0;
}

.play-overlay span {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 28px;
    background: var(--color-green-600);
    border-radius: 999px;
    box-shadow: 0 18px 38px rgba(22, 163, 74, 0.38);
}

.play-overlay strong {
    font-size: 24px;
}

.play-overlay em {
    color: rgba(255, 255, 255, 0.72);
    font-style: normal;
}

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

.player-info {
    padding: 20px 24px;
    color: var(--color-stone-600);
}

.detail-card {
    padding: 28px;
    margin-top: 24px;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 18px;
    color: var(--color-stone-700);
    font-size: 16px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
}

.side-card {
    padding: 22px;
}

.info-table {
    display: grid;
    gap: 12px;
}

.info-row {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-stone-200);
}

.info-row span:first-child {
    color: var(--color-stone-500);
}

.info-row span:last-child {
    color: var(--color-stone-800);
    font-weight: 700;
}

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

.empty-result {
    display: none;
    padding: 36px;
    text-align: center;
    color: var(--color-stone-600);
    background: var(--color-stone-100);
    border-radius: 18px;
}

.empty-result.is-visible {
    display: block;
}

.site-footer {
    margin-top: 80px;
    color: var(--color-stone-300);
    background: linear-gradient(135deg, var(--color-stone-800), var(--color-stone-900));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 34px;
    padding: 54px 0;
}

.footer-brand .brand-icon {
    flex: 0 0 auto;
}

.footer-brand strong {
    color: #ffffff;
}

.footer-brand small {
    color: var(--color-stone-300);
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 16px;
}

.site-footer p {
    max-width: 360px;
    color: var(--color-stone-400);
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: var(--color-stone-400);
    font-size: 14px;
}

.site-footer a:hover {
    color: var(--color-green-500);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 22px 16px;
    color: var(--color-stone-500);
    border-top: 1px solid rgba(214, 211, 209, 0.14);
}

@media (max-width: 1060px) {
    .header-search {
        display: none;
    }

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

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

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

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

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .header-inner {
        min-height: 66px;
    }

    .hero {
        min-height: 560px;
        height: auto;
    }

    .hero-content {
        align-items: flex-end;
    }

    .hero-copy {
        padding: 120px 0 86px;
    }

    .hero-arrow {
        top: auto;
        bottom: 24px;
        transform: none;
    }

    .hero-arrow.prev {
        left: 18px;
    }

    .hero-arrow.next {
        right: 18px;
    }

    .stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 24px;
    }

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

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

    .rank-item {
        grid-template-columns: 48px 78px 1fr;
    }

    .rank-heat {
        grid-column: 3;
    }

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

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

    .brand-text strong {
        font-size: 17px;
    }

    .brand-icon {
        width: 38px;
        height: 38px;
    }

    .hero-copy {
        padding-top: 92px;
    }

    .hero-meta {
        gap: 12px;
    }

    .section {
        padding: 48px 0;
    }

    .section-heading {
        display: block;
    }

    .section-action {
        display: inline-flex;
        margin-top: 14px;
    }

    .movie-grid,
    .movie-grid.dense,
    .related-grid,
    .category-grid,
    .stats-row,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: 42px 1fr;
    }

    .rank-thumb {
        display: none;
    }

    .rank-heat {
        grid-column: 2;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
