:root {
    --green-50: #ecfdf5;
    --green-100: #d1fae5;
    --green-500: #10b981;
    --green-600: #059669;
    --green-700: #047857;
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 14px 32px rgba(15, 23, 42, 0.14);
    --shadow-lg: 0 26px 60px rgba(15, 23, 42, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: var(--gray-50);
    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 {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(135deg, var(--green-600), #0f766e 54%, var(--cyan-500));
    box-shadow: 0 10px 28px rgba(4, 120, 87, 0.22);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 22px;
}

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--green-600);
    background: var(--white);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

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

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

.nav-link,
.mobile-nav-link {
    opacity: 0.92;
    font-weight: 650;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--green-100);
    opacity: 1;
}

.top-search {
    position: relative;
    width: 280px;
}

.top-search input,
.mobile-search input,
.page-search input,
.filter-bar input {
    width: 100%;
    border: 1px solid transparent;
    color: var(--gray-900);
    background: var(--white);
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.top-search input {
    height: 40px;
    padding: 0 46px 0 18px;
    border-radius: 999px;
}

.top-search input:focus,
.mobile-search input:focus,
.page-search input:focus,
.filter-bar input:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

.top-search button {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    color: var(--gray-600);
    background: transparent;
    transform: translateY(-50%);
}

.mobile-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: transparent;
    font-size: 28px;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
}

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

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 16px;
}

.mobile-search input {
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
}

.mobile-search button,
.page-search button {
    border: 0;
    color: var(--white);
    background: var(--gray-900);
    border-radius: 12px;
    padding: 0 18px;
    font-weight: 700;
}

.mobile-panel nav {
    display: grid;
    gap: 10px;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: var(--gray-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
    transform: scale(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 76% 36%, rgba(34, 211, 238, 0.28), transparent 34%),
        linear-gradient(110deg, rgba(4, 120, 87, 0.92), rgba(17, 24, 39, 0.82) 52%, rgba(17, 24, 39, 0.46)),
        linear-gradient(0deg, rgba(249, 250, 251, 0.08), rgba(249, 250, 251, 0));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 52px;
    padding: 90px 0 104px;
    color: var(--white);
}

.hero-copy {
    max-width: 760px;
    animation: fadeUp 0.75s ease both;
}

.eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: var(--green-100);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(42px, 7vw, 84px);
    text-shadow: 0 16px 46px rgba(0, 0, 0, 0.32);
}

.hero-desc {
    max-width: 680px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(18px, 2.2vw, 24px);
}

.hero-tags,
.tag-row,
.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    padding: 0 26px;
    font-weight: 850;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: var(--green-700);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-2px);
}

.hero-card {
    position: relative;
    align-self: stretch;
    min-height: 470px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.hero-card span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    padding: 14px 16px;
    color: var(--white);
    background: rgba(17, 24, 39, 0.68);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: 30px;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--white);
}

.section {
    padding: 78px 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.section-head h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.18;
}

.section-head a {
    color: var(--green-600);
    font-weight: 800;
}

.center-head {
    justify-content: center;
    text-align: center;
}

.light h2,
.light a {
    color: var(--white);
}

.section-kicker {
    color: var(--green-600);
}

.soft-section {
    background: linear-gradient(135deg, var(--green-50), #ecfeff);
}

.dark-section {
    color: var(--white);
    background: var(--gray-900);
}

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

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

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

.movie-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-7px);
    box-shadow: var(--shadow-md);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gray-200);
}

.movie-card.compact .card-poster {
    aspect-ratio: 3 / 4;
}

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

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

.card-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--green-700);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 9px;
    color: var(--white);
    background: var(--green-600);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 18px;
}

.card-body h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.card-meta {
    margin: 0 0 10px;
    color: var(--gray-500);
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--gray-700);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row span {
    color: var(--green-700);
    background: var(--green-50);
}

.tag-row.wide span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
}

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

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

.rank-item {
    position: relative;
    display: grid;
    grid-template-columns: 46px 82px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 16px;
    overflow: hidden;
    color: var(--white);
    background: rgba(31, 41, 55, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-list .rank-item {
    color: var(--gray-900);
    background: var(--white);
    border-color: var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.rank-item:hover {
    transform: translateY(-4px);
    background: var(--gray-800);
}

.ranking-list .rank-item:hover {
    background: var(--green-50);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--white);
    background: linear-gradient(135deg, #eab308, #f97316);
    border-radius: 999px;
    font-weight: 900;
    box-shadow: var(--shadow-sm);
}

.rank-poster img {
    width: 82px;
    height: 82px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-item h2 {
    margin: 0 0 4px;
    overflow: hidden;
    font-size: 16px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-item p {
    margin: 0 0 6px;
    color: var(--gray-500);
    font-size: 13px;
}

.rank-grid .rank-item p {
    color: #d1d5db;
}

.rank-item span {
    color: var(--green-600);
    font-size: 13px;
    font-weight: 800;
}

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

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

.category-tile {
    display: grid;
    min-height: 160px;
    align-content: end;
    padding: 24px;
    color: var(--white);
    background:
        radial-gradient(circle at 85% 12%, rgba(34, 211, 238, 0.38), transparent 30%),
        linear-gradient(135deg, var(--green-500), #0d9488);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: var(--shadow-md);
}

.category-tile span {
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    font-style: normal;
}

.page-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 72% 26%, rgba(34, 211, 238, 0.34), transparent 30%),
        linear-gradient(135deg, var(--green-600), #0f766e 58%, var(--gray-900));
    padding: 84px 0 74px;
}

.page-hero h1 {
    max-width: 820px;
    font-size: clamp(38px, 6vw, 68px);
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.category-page-hero {
    padding-bottom: 44px;
}

.pill-row {
    margin-top: 26px;
}

.pill {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.pill.active,
.pill:hover {
    color: var(--green-700);
    background: var(--white);
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
    padding: 18px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.filter-bar input {
    max-width: 420px;
    height: 46px;
    padding: 0 16px;
    border-color: var(--gray-200);
    border-radius: 999px;
}

.filter-bar span {
    color: var(--green-600);
    font-weight: 800;
}

.empty-state {
    display: none;
    padding: 38px;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    text-align: center;
}

.empty-state.show {
    display: block;
}

.page-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    max-width: 720px;
    margin-top: 30px;
}

.page-search input {
    height: 52px;
    padding: 0 18px;
    border-radius: 999px;
}

.detail-top {
    color: var(--white);
    background:
        radial-gradient(circle at 78% 16%, rgba(34, 211, 238, 0.24), transparent 28%),
        linear-gradient(135deg, var(--gray-900), #064e3b 64%, #0f766e);
    padding: 32px 0 76px;
}

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

.breadcrumb a:hover {
    color: var(--green-100);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 34px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.movie-video,
.player-cover,
.player-cover img,
.player-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    z-index: 1;
    object-fit: contain;
    background: #020617;
}

.player-cover {
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    overflow: hidden;
    background: transparent;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .player-cover,
.player-shell.is-ready .player-cover.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-cover img {
    object-fit: cover;
    filter: brightness(0.74) saturate(1.08);
}

.player-shade {
    background:
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.16), transparent 28%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.1));
}

.play-round {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    color: var(--green-700);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
    font-size: 34px;
    transform: translateX(2px);
}

.detail-info {
    display: grid;
    grid-template-columns: 154px minmax(0, 1fr);
    gap: 22px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
}

.detail-poster {
    width: 154px;
    height: 216px;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: var(--shadow-md);
}

.detail-info h1 {
    font-size: clamp(30px, 4vw, 46px);
}

.detail-one-line {
    margin: 16px 0 18px;
    color: rgba(255, 255, 255, 0.86);
}

.meta-list {
    display: grid;
    gap: 8px;
    margin: 0 0 18px;
}

.meta-list div {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
}

.meta-list dt {
    color: rgba(255, 255, 255, 0.58);
}

.meta-list dd {
    margin: 0;
}

.detail-play {
    margin-top: 20px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
}

.text-panel {
    padding: 30px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.text-panel h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.text-panel p {
    margin: 0;
    color: var(--gray-700);
    font-size: 16px;
}

.site-footer {
    color: #d1d5db;
    background: var(--gray-900);
    padding: 56px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    color: var(--white);
    font-size: 22px;
}

.site-footer p {
    max-width: 460px;
    margin: 16px 0 0;
    color: #9ca3af;
}

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

.site-footer a:not(.footer-logo) {
    display: block;
    margin-bottom: 10px;
    color: #d1d5db;
}

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

.footer-bottom {
    margin-top: 42px;
    padding: 20px 16px;
    color: #9ca3af;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .top-search {
        width: 220px;
    }

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

    .hero-card {
        display: none;
    }

    .movie-grid,
    .featured-grid,
    .poster-grid,
    .search-grid,
    .category-movie-grid,
    .rank-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .mobile-toggle {
        display: block;
    }

    .hero {
        min-height: 590px;
    }

    .hero-content {
        padding: 78px 0 96px;
    }

    .hero-arrow {
        display: none;
    }

    .section {
        padding: 56px 0;
    }

    .section-head,
    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-bar input {
        max-width: none;
    }

    .movie-grid,
    .featured-grid,
    .poster-grid,
    .search-grid,
    .category-movie-grid,
    .rank-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: 180px;
        height: 252px;
    }
}

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

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

    .hero h1 {
        font-size: 40px;
    }

    .hero-desc,
    .page-hero p {
        font-size: 16px;
    }

    .hero-actions,
    .page-search {
        grid-template-columns: 1fr;
    }

    .primary-button,
    .ghost-button,
    .page-search button {
        width: 100%;
    }

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

    .rank-item {
        grid-template-columns: 38px 70px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

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

    .text-panel {
        padding: 22px;
    }
}
