:root {
    --emerald-900: #064e3b;
    --emerald-800: #065f46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --teal-700: #0f766e;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --white: #ffffff;
    --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 16px 35px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.18);
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--gray-800);
    background: var(--stone-50);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(100deg, var(--emerald-800), var(--teal-700));
    color: var(--white);
    box-shadow: 0 12px 34px rgba(4, 120, 87, 0.28);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 18px;
}

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

.brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    transition: transform 0.25s ease;
}

.brand:hover .brand__mark {
    transform: scale(1.08);
}

.brand__text {
    white-space: nowrap;
    font-size: 20px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px;
    font-weight: 600;
}

.nav__link,
.nav a {
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav__link:hover,
.nav a:hover,
.nav__link.is-active {
    color: #d1fae5;
    opacity: 1;
}

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

.header-search input,
.mobile-search input {
    width: 230px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    outline: none;
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(209, 250, 229, 0.9);
}

.header-search input:focus,
.mobile-search input:focus {
    background: rgba(255, 255, 255, 0.24);
    box-shadow: 0 0 0 3px rgba(167, 243, 208, 0.38);
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--emerald-800);
    background: var(--white);
    cursor: pointer;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: var(--white);
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding: 16px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

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

.hero {
    position: relative;
    height: 620px;
    min-height: 520px;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.hero-slide__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide__shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 35%, rgba(16, 185, 129, 0.24), transparent 32%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.45) 46%, rgba(0, 0, 0, 0.16)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.08) 48%);
}

.hero-slide__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 86px;
    color: var(--white);
}

.hero-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 13px;
    color: #d1fae5;
    background: rgba(5, 150, 105, 0.84);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 16px 0 16px;
    color: inherit;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    width: min(740px, 100%);
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2.6vw, 22px);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.hero-meta span,
.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.hero-actions,
.detail-info .btn {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

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

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald-600), var(--teal-700));
    box-shadow: 0 16px 34px rgba(5, 150, 105, 0.32);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.btn-soft {
    color: #064e3b;
    background: #d1fae5;
}

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

.hero-dots button {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

.hero-dots button.is-active {
    width: 52px;
    background: #d1fae5;
}

.section {
    padding: 64px 0;
}

.section--raised {
    margin-top: -1px;
    background: var(--stone-50);
}

.section--panel {
    background: linear-gradient(180deg, var(--stone-100), var(--stone-50));
}

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

.section-heading--inline {
    width: 100%;
    margin-bottom: 20px;
}

.section-heading span {
    width: 9px;
    height: 34px;
    border-radius: 999px;
    background: var(--emerald-600);
}

.section-heading h2 {
    flex: 1;
    margin: 0;
    color: var(--gray-800);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.section-heading a,
.text-link {
    color: var(--emerald-700);
    font-weight: 800;
}

.horizontal-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(270px, 320px);
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 18px;
    scrollbar-width: thin;
}

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

.movie-grid--two {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-lg);
}

.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--slate-800);
}

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

.movie-card:hover .movie-card__poster img {
    transform: scale(1.08);
    opacity: 0.88;
}

.movie-card__year,
.movie-card__play {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.movie-card__year {
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--white);
    background: rgba(5, 150, 105, 0.92);
    font-size: 13px;
    font-weight: 800;
}

.movie-card__play {
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.46);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.movie-card__body {
    padding: 18px;
}

.movie-card__body h3 {
    margin: 0 0 8px;
    color: var(--gray-900);
    font-size: 19px;
    line-height: 1.3;
}

.movie-card__body h3 a:hover {
    color: var(--emerald-700);
}

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

.movie-card__meta,
.movie-card__tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-card__meta {
    margin-bottom: 12px;
    color: var(--gray-500);
    font-size: 13px;
}

.tag {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--emerald-800);
    background: #d1fae5;
    font-size: 12px;
    font-weight: 700;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 22px;
    color: var(--white);
    background: var(--slate-900);
    box-shadow: var(--shadow-md);
    isolation: isolate;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.35s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(6, 78, 59, 0.88), rgba(15, 23, 42, 0.46));
}

.category-card span,
.category-card strong,
.category-card em {
    display: block;
}

.category-card span {
    width: fit-content;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(16, 185, 129, 0.72);
    font-size: 13px;
    font-weight: 800;
}

.category-card strong {
    margin-top: 42px;
    font-size: 25px;
    line-height: 1.2;
}

.category-card em {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.84);
    font-style: normal;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 28px;
}

.split-layout--ranking {
    grid-template-columns: minmax(300px, 0.55fr) minmax(0, 1fr);
}

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

.rank-list__item {
    display: grid;
    grid-template-columns: auto 94px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border-radius: 18px;
    padding: 12px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.latest-list .rank-list__item {
    grid-template-columns: 112px minmax(0, 1fr);
}

.rank-list__item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.rank-list__item img {
    width: 94px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.latest-list .rank-list__item img {
    width: 112px;
}

.rank-list__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--white);
    background: var(--emerald-600);
    font-weight: 900;
}

.rank-list__text {
    min-width: 0;
}

.rank-list__text strong,
.rank-list__text em {
    display: block;
}

.rank-list__text strong {
    overflow: hidden;
    color: var(--gray-900);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-list__text em {
    color: var(--gray-500);
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 76px 0;
    color: var(--white);
    background:
        radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.24), transparent 28%),
        linear-gradient(120deg, var(--emerald-900), var(--slate-900));
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -55% 35%;
    height: 260px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.16);
    filter: blur(20px);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    color: var(--white);
}

.page-hero p {
    width: min(760px, 100%);
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.page-hero--compact {
    padding: 64px 0;
}

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

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

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.category-overview-card {
    display: grid;
    gap: 18px;
    border-radius: var(--radius-xl);
    padding: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.category-overview-card__images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.category-overview-card__images img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 23px;
}

.category-overview-card p {
    margin: 0 0 12px;
    color: var(--gray-600);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, 180px));
    gap: 14px;
    margin-bottom: 28px;
    border-radius: var(--radius-xl);
    padding: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 11px 14px;
    color: var(--gray-800);
    background: var(--white);
    outline: none;
}

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

.empty-state {
    width: min(var(--container), calc(100% - 32px));
    margin: 28px auto 0;
    border-radius: var(--radius-lg);
    padding: 24px;
    color: var(--gray-600);
    text-align: center;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-900);
}

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

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.68)),
        radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.24), transparent 34%);
}

.detail-hero__inner {
    position: relative;
    z-index: 1;
    padding: 48px 0 56px;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

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

.detail-info h1 {
    color: var(--white);
}

.detail-one-line {
    width: min(760px, 100%);
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

.detail-tags {
    margin-bottom: 26px;
}

.section--player {
    padding-bottom: 28px;
    background: var(--stone-100);
}

.player-card {
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.video-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #000;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.video-cover.is-hidden {
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
}

.video-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.64;
}

.play-button {
    position: relative;
    z-index: 2;
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(5, 150, 105, 0.92);
    box-shadow: 0 18px 45px rgba(5, 150, 105, 0.38);
    cursor: pointer;
    font-size: 30px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
    transform: scale(1.08);
    background: var(--emerald-500);
}

.player-title {
    padding: 24px;
}

.player-title h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.player-title p {
    margin: 0;
    color: var(--gray-600);
}

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

.content-card {
    border-radius: var(--radius-xl);
    padding: 28px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.content-card h2 {
    margin: 0 0 16px;
    color: var(--gray-900);
    font-size: 25px;
}

.content-card p {
    margin: 0 0 14px;
    color: var(--gray-700);
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.8fr 1fr 1fr;
    gap: 28px;
    padding: 46px 0;
}

.footer-brand {
    color: var(--white);
    margin-bottom: 14px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.site-footer p {
    margin: 0;
    color: #cbd5e1;
}

.footer-links {
    display: grid;
    gap: 9px;
}

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

.footer-links a:hover {
    color: #d1fae5;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    text-align: center;
    color: #94a3b8;
}

[hidden] {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
    }

    .split-layout,
    .split-layout--ranking,
    .content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

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

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

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

    .hero-slide__content {
        padding-bottom: 74px;
    }

    .hero-meta,
    .detail-meta {
        gap: 8px;
    }

    .section {
        padding: 46px 0;
    }

    .section-heading {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .horizontal-row {
        grid-auto-columns: minmax(250px, 86vw);
    }

    .rank-list__item,
    .latest-list .rank-list__item {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .rank-list__num {
        display: none;
    }

    .rank-list__item img,
    .latest-list .rank-list__item img {
        width: 78px;
        height: 54px;
    }

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

    .detail-poster {
        width: min(240px, 72vw);
    }

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

    .movie-grid,
    .movie-grid--two {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 16px;
    }

    .movie-card__body {
        padding: 14px;
    }

    .movie-card__body h3 {
        font-size: 17px;
    }

    .page-hero {
        padding: 52px 0;
    }

    .play-button {
        width: 66px;
        height: 66px;
        font-size: 24px;
    }
}
