:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --shadow-soft: 0 20px 60px rgba(28, 25, 23, 0.12);
    --radius-xl: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--green-700);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.site-logo::before {
    content: "";
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--green-600), #34d399);
    box-shadow: 0 12px 30px rgba(22, 163, 74, 0.28);
}

.site-logo--footer {
    color: white;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    color: var(--stone-600);
    font-weight: 700;
    font-size: 15px;
}

.site-nav a {
    transition: color 0.2s ease;
}

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

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: white;
    background: var(--green-600);
}

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

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

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

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

.hero-slide__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-slide__content {
    position: absolute;
    inset: 0;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: white;
    max-width: 1180px;
}

.hero-slide__labels,
.detail-labels,
.movie-card__tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-slide__labels span,
.hero-slide__labels a,
.detail-labels span {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 13px;
    font-weight: 800;
}

.hero-slide__labels a,
.detail-labels span:first-child {
    background: var(--green-600);
}

.hero-slide h1 {
    width: min(760px, 100%);
    margin: 22px 0 18px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-slide p {
    width: min(650px, 100%);
    margin: 0 0 22px;
    color: #e7e5e4;
    font-size: 18px;
    line-height: 1.8;
}

.hero-slide__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #d6d3d1;
    margin-bottom: 30px;
    font-weight: 700;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 14px;
    color: white;
    background: var(--green-600);
    font-weight: 900;
    box-shadow: 0 16px 34px rgba(22, 163, 74, 0.34);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover {
    background: var(--green-700);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 42px rgba(22, 163, 74, 0.38);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-50%) scale(1.08);
}

.hero-arrow--prev {
    left: 24px;
    transform: translateY(-50%);
}

.hero-arrow--next {
    right: 24px;
    transform: translateY(-50%);
}

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

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

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

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

.section--intro {
    padding-top: 64px;
}

.section--soft {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 28px;
    padding: 48px;
    border-radius: 34px;
    background: linear-gradient(135deg, var(--green-50), #fff7ed);
}

.section__heading {
    margin-bottom: 30px;
}

.section__heading span,
.page-hero span {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--green-600);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section__heading h2,
.page-hero h1 {
    margin: 0;
    color: var(--stone-800);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.section__heading p,
.page-hero p {
    max-width: 820px;
    margin: 14px 0 0;
    color: var(--stone-600);
    font-size: 17px;
    line-height: 1.8;
}

.section__heading--row {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
}

.text-link {
    color: var(--green-700);
    font-weight: 900;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 16px;
    margin-bottom: 26px;
}

.search-box,
.select-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--stone-200);
    border-radius: 18px;
    background: white;
    box-shadow: 0 8px 24px rgba(28, 25, 23, 0.05);
}

.search-box span,
.select-box span {
    color: var(--stone-500);
    font-weight: 900;
}

.search-box input,
.select-box select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--stone-800);
    background: transparent;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(231, 229, 228, 0.9);
    border-radius: 20px;
    background: white;
    box-shadow: 0 10px 26px rgba(28, 25, 23, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

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

.movie-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--stone-200);
}

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

.movie-card:hover .movie-card__media img {
    transform: scale(1.08);
}

.movie-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity 0.24s ease;
}

.movie-card:hover .movie-card__shade {
    opacity: 1;
}

.movie-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 9px;
    color: white;
    background: var(--green-600);
    font-size: 12px;
    font-weight: 900;
}

.movie-card__body {
    padding: 18px;
}

.movie-card__body h3 {
    min-height: 46px;
    margin: 0 0 10px;
    color: var(--stone-800);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 950;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.movie-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    color: var(--stone-500);
    font-size: 12px;
    font-weight: 800;
}

.movie-card__meta a {
    color: var(--green-700);
}

.movie-card__tags span,
.tag-cloud span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--stone-600);
    background: var(--stone-100);
    font-size: 12px;
    font-weight: 800;
}

.movie-card--compact .movie-card__body h3 {
    min-height: 0;
}

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

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 28px;
    background: var(--stone-900);
    box-shadow: 0 16px 36px rgba(28, 25, 23, 0.12);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.category-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.16));
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 2;
    display: block;
    margin: 0 22px;
    color: white;
}

.category-card strong {
    margin-top: 110px;
    font-size: 24px;
    font-style: normal;
    font-weight: 950;
}

.category-card em {
    margin-top: 8px;
    color: #e7e5e4;
    font-size: 14px;
    line-height: 1.6;
    font-style: normal;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(28, 25, 23, 0.88), rgba(20, 83, 45, 0.72)), var(--page-hero-image, none) center / cover;
    color: white;
}

.page-hero--compact {
    background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.3), transparent 32%), linear-gradient(135deg, var(--stone-900), #064e3b);
}

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

.page-hero h1,
.page-hero p {
    color: white;
}

.page-hero p {
    color: #e7e5e4;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 76px 150px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--stone-200);
    border-radius: 24px;
    background: white;
    box-shadow: 0 12px 28px rgba(28, 25, 23, 0.06);
}

.rank-card strong {
    color: var(--green-600);
    font-size: 34px;
    font-weight: 950;
}

.rank-card__image {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 10;
}

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

.rank-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 950;
}

.rank-card p {
    margin: 0 0 10px;
    color: var(--stone-600);
    line-height: 1.7;
}

.rank-card span {
    color: var(--stone-500);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    background: var(--stone-900);
    color: white;
}

.detail-hero__bg {
    position: absolute;
    inset: 0;
}

.detail-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px);
    transform: scale(1.04);
    opacity: 0.58;
}

.detail-hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52)), linear-gradient(0deg, var(--stone-900), transparent 45%);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: #d6d3d1;
    font-size: 14px;
    font-weight: 800;
}

.breadcrumb a:hover {
    color: white;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    align-items: center;
    margin-top: 64px;
}

.detail-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(40px, 6vw, 74px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.detail-copy p {
    max-width: 760px;
    margin: 0 0 30px;
    color: #e7e5e4;
    font-size: 19px;
    line-height: 1.8;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: black;
    box-shadow: 0 26px 72px rgba(28, 25, 23, 0.2);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: white;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.1));
    cursor: pointer;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--green-600);
    box-shadow: 0 18px 44px rgba(22, 163, 74, 0.42);
    font-size: 34px;
    padding-left: 4px;
}

.play-overlay strong {
    font-size: 20px;
    font-weight: 950;
}

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

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 32px;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 22px;
}

.text-panel,
.info-panel {
    padding: 28px;
    border: 1px solid var(--stone-200);
    border-radius: 24px;
    background: white;
    box-shadow: 0 12px 28px rgba(28, 25, 23, 0.06);
}

.text-panel h2,
.info-panel h2 {
    margin: 0 0 14px;
    color: var(--stone-800);
    font-size: 24px;
    font-weight: 950;
}

.text-panel p {
    margin: 0;
    color: var(--stone-600);
    font-size: 16px;
    line-height: 1.9;
}

.info-panel dl {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px 14px;
    margin: 0 0 20px;
}

.info-panel dt {
    color: var(--stone-500);
    font-weight: 900;
}

.info-panel dd {
    margin: 0;
    color: var(--stone-800);
    font-weight: 800;
}

.site-footer {
    margin-top: 40px;
    background: var(--stone-900);
    color: #d6d3d1;
}

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

.site-footer p {
    margin: 12px 0 0;
    color: var(--stone-400);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
    font-weight: 800;
}

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

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1024px) {
    .site-nav {
        position: fixed;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border-radius: 22px;
        background: white;
        box-shadow: var(--shadow-soft);
    }

    .site-nav.is-open {
        display: flex;
    }

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

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

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

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

@media (max-width: 720px) {
    .hero-carousel {
        min-height: 560px;
        height: 78vh;
    }

    .hero-slide__overlay {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.2));
    }

    .hero-slide__content {
        justify-content: flex-end;
        padding-bottom: 96px;
    }

    .hero-arrow {
        display: none;
    }

    .section,
    .section--soft {
        width: min(100% - 24px, 1180px);
        padding: 44px 0;
    }

    .section--soft {
        padding: 30px 18px;
    }

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

    .movie-grid,
    .category-grid,
    .category-grid--large {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 54px 96px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    .rank-card strong {
        font-size: 24px;
    }

    .rank-card h3 {
        font-size: 17px;
    }

    .rank-card p {
        display: none;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-hero__inner {
        padding-bottom: 44px;
    }

    .detail-layout {
        margin-top: 34px;
    }

    .detail-copy h1 {
        font-size: 40px;
    }

    .site-footer__inner,
    .section__heading--row {
        flex-direction: column;
        align-items: flex-start;
    }
}
