:root {
    color-scheme: dark;
    --forest-950: #0b1712;
    --forest-900: #10231a;
    --forest-800: #173626;
    --forest-700: #224b34;
    --earth-950: #17110d;
    --earth-900: #241a12;
    --earth-800: #332417;
    --moss-700: #477045;
    --moss-600: #5f8d56;
    --moss-500: #84a96b;
    --moss-400: #a8c583;
    --parchment-100: #faf2dd;
    --parchment-200: #ecdfc4;
    --parchment-300: #d7c7a8;
    --parchment-400: #b7a37e;
    --panel: rgba(24, 42, 30, 0.78);
    --panel-strong: rgba(16, 35, 26, 0.95);
    --line: rgba(236, 223, 196, 0.12);
    --shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.24);
    --shadow-strong: 0 28px 70px rgba(0, 0, 0, 0.44);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--parchment-200);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(132, 169, 107, 0.18), transparent 34rem),
        linear-gradient(180deg, var(--forest-950), var(--earth-950));
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(rgba(250, 242, 221, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(250, 242, 221, 0.018) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(16, 35, 26, 0.94);
    border-bottom: 1px solid rgba(132, 169, 107, 0.22);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

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

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: var(--parchment-100);
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--moss-700), var(--moss-500));
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(250, 242, 221, 0.2), 0 12px 22px rgba(0, 0, 0, 0.26);
}

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

.brand-name {
    color: var(--parchment-100);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    margin-top: 5px;
    color: var(--parchment-300);
    font-size: 12px;
}

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

.nav-link {
    color: var(--parchment-200);
    font-size: 15px;
    font-weight: 650;
    transition: color 0.24s ease, transform 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--moss-400);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--parchment-100);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid var(--line);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: var(--forest-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9) brightness(0.42);
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 32%, rgba(132, 169, 107, 0.28), transparent 25rem),
        linear-gradient(90deg, rgba(11, 23, 18, 0.96), rgba(11, 23, 18, 0.56) 52%, rgba(11, 23, 18, 0.74)),
        linear-gradient(0deg, var(--forest-950) 0%, transparent 36%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 58px;
    align-items: center;
    min-height: 600px;
    padding: 82px 0 130px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--moss-400);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-content h1 {
    margin: 0;
    color: var(--parchment-100);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.hero-copy h1 {
    max-width: 760px;
    font-size: clamp(42px, 7vw, 82px);
}

.hero-copy p {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--parchment-200);
    font-size: 18px;
    line-height: 1.85;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags a,
.filter-tags button {
    color: var(--parchment-200);
    background: rgba(132, 169, 107, 0.14);
    border: 1px solid rgba(132, 169, 107, 0.28);
    border-radius: 999px;
}

.hero-tags span,
.detail-tags a {
    padding: 8px 12px;
    font-size: 13px;
}

.tag-row span {
    padding: 5px 9px;
    font-size: 12px;
}

.hero-actions,
.detail-actions,
.slim-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    font-weight: 800;
    border-radius: 14px;
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.primary-button {
    color: var(--forest-950);
    background: linear-gradient(135deg, var(--moss-400), var(--moss-600));
    box-shadow: 0 16px 32px rgba(132, 169, 107, 0.24);
}

.ghost-button {
    color: var(--parchment-100);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(250, 242, 221, 0.14);
}

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

.ghost-button.inline {
    min-height: 40px;
    margin-top: 16px;
}

.primary-button.full {
    width: 100%;
    margin-top: 18px;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(250, 242, 221, 0.16);
    border-radius: 28px;
    box-shadow: var(--shadow-strong);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    color: var(--forest-950);
    font-size: 13px;
    font-weight: 900;
    background: var(--moss-400);
    border-radius: 999px;
}

.hero-thumbs {
    position: absolute;
    right: 0;
    bottom: 34px;
    left: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.hero-thumb {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    color: var(--parchment-200);
    text-align: left;
    background: rgba(16, 35, 26, 0.68);
    border: 1px solid rgba(250, 242, 221, 0.12);
    border-radius: 16px;
    backdrop-filter: blur(14px);
    cursor: pointer;
}

.hero-thumb.is-active {
    border-color: rgba(168, 197, 131, 0.72);
    box-shadow: 0 0 0 1px rgba(168, 197, 131, 0.22);
}

.hero-thumb img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.hero-thumb span {
    overflow: hidden;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.section-block,
.search-panel,
.page-main {
    padding: 58px 0;
}

.search-panel {
    margin-top: -42px;
    padding: 34px;
    background: rgba(16, 35, 26, 0.88);
    border: 1px solid rgba(250, 242, 221, 0.12);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

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

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

.section-heading h2,
.text-card h2,
.footer-grid h2 {
    margin: 0;
    color: var(--parchment-100);
    font-weight: 850;
    line-height: 1.2;
}

.section-heading h2 {
    font-size: clamp(26px, 4vw, 42px);
}

.section-heading p,
.page-hero p,
.text-card p,
.footer-grid p {
    color: var(--parchment-300);
    line-height: 1.8;
}

.compact-heading h2 {
    font-size: 27px;
}

.search-box,
.filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.search-box input,
.filter-row input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    color: var(--parchment-100);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(250, 242, 221, 0.14);
    border-radius: 16px;
    outline: none;
}

.search-box input:focus,
.filter-row input:focus {
    border-color: rgba(168, 197, 131, 0.72);
    box-shadow: 0 0 0 4px rgba(132, 169, 107, 0.12);
}

.search-box button,
.filter-row button,
.filter-tags button {
    color: var(--parchment-100);
    background: rgba(132, 169, 107, 0.16);
    border: 1px solid rgba(132, 169, 107, 0.32);
    border-radius: 16px;
    cursor: pointer;
}

.search-box button,
.filter-row button {
    min-height: 54px;
    padding: 0 20px;
    font-weight: 800;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.search-result-card {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.search-result-card img {
    width: 68px;
    height: 92px;
    object-fit: cover;
    border-radius: 10px;
}

.search-result-card h3 {
    margin: 0 0 6px;
    color: var(--parchment-100);
    font-size: 16px;
}

.search-result-card p {
    margin: 0;
    color: var(--parchment-300);
    font-size: 13px;
    line-height: 1.6;
}

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

.category-card,
.category-overview-card,
.ranking-panel,
.text-card,
.filter-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    padding: 28px;
}

.category-card::after {
    position: absolute;
    right: -30px;
    bottom: -40px;
    width: 130px;
    height: 130px;
    content: "";
    background: radial-gradient(circle, rgba(132, 169, 107, 0.35), transparent 68%);
}

.category-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--forest-950);
    font-weight: 900;
    background: var(--moss-400);
    border-radius: 14px;
}

.category-card h2,
.category-overview-card h2 {
    margin: 18px 0 10px;
    color: var(--parchment-100);
}

.category-card p,
.category-overview-card p {
    margin: 0;
    color: var(--parchment-300);
    line-height: 1.75;
}

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

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

.movie-card {
    overflow: hidden;
    background: rgba(16, 35, 26, 0.82);
    border: 1px solid rgba(250, 242, 221, 0.12);
    border-radius: 22px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 197, 131, 0.54);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.34);
}

.movie-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.24);
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.045);
}

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    color: var(--parchment-100);
    font-size: 12px;
    font-weight: 800;
    background: rgba(16, 35, 26, 0.82);
    border: 1px solid rgba(250, 242, 221, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.movie-card-body h2 {
    margin: 0 0 10px;
    color: var(--parchment-100);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-body p {
    margin: 0 0 14px;
    color: var(--parchment-300);
    font-size: 14px;
    line-height: 1.68;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: auto;
    color: var(--parchment-400);
    font-size: 12px;
}

.tag-row {
    margin-top: 12px;
}

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

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.rank-no,
.ranking-number {
    color: var(--moss-400);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    color: var(--parchment-100);
    font-weight: 750;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-meta {
    grid-column: 2;
    color: var(--parchment-400);
    font-size: 12px;
}

.page-main {
    min-height: 68vh;
}

.page-hero {
    padding: 62px 0 30px;
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 66px);
}

.page-hero p {
    max-width: 760px;
    margin-top: 18px;
    font-size: 18px;
}

.category-overview-grid {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 24px;
}

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

.category-cover-stack img {
    height: 150px;
    object-fit: cover;
    border-radius: 14px;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.mini-links a {
    padding: 7px 10px;
    color: var(--parchment-200);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
}

.filter-panel {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.filter-tags button {
    min-height: 36px;
    padding: 0 13px;
}

.filter-tags button.is-active {
    color: var(--forest-950);
    background: var(--moss-400);
}

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

.ranking-grid {
    display: grid;
    gap: 16px;
}

.ranking-card a {
    display: grid;
    grid-template-columns: 70px 92px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    background: rgba(16, 35, 26, 0.82);
    border: 1px solid var(--line);
    border-radius: 20px;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.ranking-card a:hover {
    transform: translateY(-2px);
    border-color: rgba(168, 197, 131, 0.54);
}

.ranking-card img {
    width: 92px;
    height: 128px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-card h2 {
    margin: 0 0 8px;
    color: var(--parchment-100);
}

.ranking-card p {
    margin: 0 0 12px;
    color: var(--parchment-300);
    line-height: 1.7;
}

.detail-shell {
    padding-top: 34px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--parchment-400);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--moss-400);
}

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

.detail-poster img {
    width: 100%;
    border-radius: 28px;
    box-shadow: var(--shadow-strong);
}

.detail-meta-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.detail-meta-box span {
    padding: 10px;
    color: var(--parchment-200);
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.detail-content h1 {
    font-size: clamp(38px, 6vw, 74px);
}

.detail-one-line {
    max-width: 780px;
    margin: 20px 0 0;
    color: var(--parchment-200);
    font-size: 19px;
    line-height: 1.8;
}

.detail-tags {
    margin-top: 22px;
}

.player-section {
    padding-top: 54px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(250, 242, 221, 0.12);
    border-radius: 28px;
    box-shadow: var(--shadow-strong);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--forest-950);
    background: radial-gradient(circle, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.38));
    border: 0;
    cursor: pointer;
}

.player-start span {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    padding-left: 6px;
    color: var(--forest-950);
    font-size: 38px;
    background: var(--moss-400);
    border-radius: 50%;
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.42);
}

.player-start.is-hidden {
    display: none;
}

.detail-text-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding-top: 28px;
}

.text-card {
    padding: 26px;
}

.text-card h2 {
    font-size: 25px;
}

.text-card p {
    margin-bottom: 0;
}

.site-footer {
    margin-top: 62px;
    background: rgba(9, 20, 15, 0.98);
    border-top: 1px solid rgba(250, 242, 221, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
    padding: 44px 0;
}

.footer-logo {
    color: var(--parchment-100);
    font-size: 22px;
    font-weight: 900;
}

.footer-grid h2 {
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.footer-links a {
    color: var(--parchment-300);
}

.footer-bottom {
    padding: 18px 0 26px;
    color: var(--parchment-400);
    border-top: 1px solid rgba(250, 242, 221, 0.08);
    font-size: 13px;
}

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero-content,
    .two-column-home,
    .detail-layout,
    .detail-text-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .hero-thumbs,
    .category-grid,
    .movie-grid,
    .home-grid,
    .related-grid,
    .category-movie-grid,
    .search-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ranking-panel {
        position: static;
    }

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

@media (max-width: 680px) {
    .site-container {
        width: min(100% - 22px, 1180px);
    }

    .brand-subtitle {
        display: none;
    }

    .brand-name {
        font-size: 18px;
    }

    .hero-carousel {
        min-height: 620px;
    }

    .hero-content {
        min-height: 520px;
        padding-top: 58px;
        padding-bottom: 158px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .hero-thumbs {
        grid-template-columns: 1fr;
        gap: 8px;
        bottom: 18px;
    }

    .hero-thumb:not(.is-active) {
        display: none;
    }

    .search-panel {
        padding: 22px;
    }

    .search-box,
    .filter-row,
    .category-overview-card,
    .ranking-card a {
        grid-template-columns: 1fr;
    }

    .category-grid,
    .movie-grid,
    .home-grid,
    .related-grid,
    .category-movie-grid,
    .search-results {
        grid-template-columns: 1fr;
    }

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

    .category-cover-stack img {
        height: 180px;
    }

    .ranking-number {
        font-size: 26px;
    }

    .detail-poster {
        max-width: none;
    }

    .player-start span {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }
}
