:root {
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0d9488;
    --orange: #f97316;
    --text: #111827;
    --muted: #6b7280;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 38%, #f7fdfb 100%);
}

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

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

button,
input {
    font: inherit;
}

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

.nav-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.footer-logo {
    font-size: 26px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--emerald), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 34px;
    color: #374151;
    font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--emerald);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
    background: #f3f4f6;
    color: var(--emerald);
    transform: translateY(-1px);
}

.menu-btn {
    display: none;
}

.top-search {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

.top-search.is-open {
    display: block;
}

.top-search input,
.hero-search input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 14px 16px;
    outline: none;
    color: #111827;
    background: #ffffff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.hero-search input:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.14);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 16px 18px;
    background: #ffffff;
}

.mobile-nav a {
    display: block;
    padding: 12px 16px;
    border-radius: 14px;
    color: #374151;
    font-weight: 650;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: #ecfdf5;
}

.hero-carousel {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 45%, rgba(0, 0, 0, 0.24) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    top: 50%;
    transform: translateY(-52%);
    max-width: 680px;
    color: #ffffff;
    padding-right: 24px;
}

.hero-kicker,
.kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.18);
    color: #a7f3d0;
    border: 1px solid rgba(167, 243, 208, 0.24);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.kicker {
    background: #ecfdf5;
    color: var(--emerald-dark);
    border-color: #d1fae5;
}

.hero-content h1,
.page-hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-content p,
.page-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 20px;
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tag-row span {
    color: #047857;
    background: #ecfdf5;
}

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

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

.primary-btn {
    background: var(--emerald);
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(5, 150, 105, 0.32);
}

.primary-btn:hover {
    transform: translateY(-2px) scale(1.02);
    background: var(--emerald-dark);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 38px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 3;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.hero-dots {
    display: flex;
    gap: 9px;
}

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

.hero-dot.is-active {
    width: 28px;
    background: #ffffff;
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 108px;
    transform: translateX(-50%);
    z-index: 4;
    width: min(720px, calc(100vw - 48px));
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-search input {
    border-radius: 16px;
    border: 0;
}

.hero-search button {
    border: 0;
    border-radius: 16px;
    padding: 0 26px;
    color: #ffffff;
    background: var(--emerald);
    font-weight: 850;
    cursor: pointer;
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px;
}

.white-section {
    background: #ffffff;
}

.soft-section {
    max-width: none;
    background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.soft-section > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.section-heading {
    position: relative;
    margin-bottom: 34px;
}

.section-heading h2 {
    margin: 14px 0 8px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.section-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-link {
    position: absolute;
    right: 0;
    bottom: 8px;
    color: var(--emerald);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

.movie-card {
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(5, 150, 105, 0.28);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e5e7eb;
}

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

.movie-card:hover .poster-link img,
.category-card:hover img,
.mini-card:hover img {
    transform: scale(1.06);
}

.play-mark,
.rank-badge {
    position: absolute;
    z-index: 2;
}

.play-mark {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.92);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.22);
}

.rank-badge {
    left: 12px;
    top: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), #ef4444);
    font-size: 12px;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

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

.movie-card p {
    margin: 0;
    min-height: 48px;
    color: var(--muted);
    line-height: 1.62;
    font-size: 14px;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    border-radius: var(--radius);
    overflow: hidden;
    color: #ffffff;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.72));
    z-index: -1;
}

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

.category-card span,
.category-card strong {
    position: absolute;
    left: 24px;
}

.category-card span {
    bottom: 58px;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.category-card strong {
    bottom: 28px;
    color: #d1fae5;
}

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

.ranking-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

.sticky-panel {
    position: sticky;
    top: 104px;
}

.panel-head span {
    color: var(--orange);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.panel-head h2 {
    margin: 8px 0 20px;
    font-size: 30px;
    letter-spacing: -0.05em;
}

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

.mini-card {
    display: grid;
    grid-template-columns: auto 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-panel .mini-card {
    grid-template-columns: auto 52px minmax(0, 1fr);
    margin-bottom: 12px;
}

.mini-card:hover {
    transform: translateX(4px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
}

.mini-card img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.mini-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.mini-card em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.mini-rank {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    font-weight: 900;
    font-size: 12px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.filter-chip {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 10px 18px;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
    font-weight: 750;
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

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

.page-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.48), transparent 34%),
        linear-gradient(135deg, #111827 0%, #064e3b 100%);
    padding: 80px max(24px, calc((100vw - 1280px) / 2 + 24px));
}

.compact-hero h1,
.ranking-hero h1 {
    max-width: 880px;
    font-size: clamp(40px, 6vw, 72px);
}

.compact-hero p,
.ranking-hero p {
    max-width: 760px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) scale(1.04);
    opacity: 0.7;
}

.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.3));
}

.detail-wrap {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 92px 24px 72px;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 20px;
}

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

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

.detail-info h1 {
    margin: 0 0 20px;
    font-size: clamp(40px, 6vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.detail-line {
    max-width: 820px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 20px;
    line-height: 1.75;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 8px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 750;
}

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

.detail-section {
    padding-top: 56px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-card video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    display: block;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-card.is-playing .play-layer {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.big-play {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--emerald);
    box-shadow: 0 20px 45px rgba(5, 150, 105, 0.36);
    font-size: 36px;
    text-indent: 5px;
}

.play-layer strong {
    font-size: 20px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    margin-top: 38px;
}

.detail-content article,
.detail-side {
    padding: 28px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.06);
}

.detail-content h2,
.detail-side h3 {
    margin: 0 0 16px;
    font-size: 26px;
    letter-spacing: -0.04em;
}

.detail-content p {
    margin: 0 0 24px;
    color: #374151;
    line-height: 1.9;
    font-size: 17px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px 16px;
    margin: 0;
}

.detail-side dt {
    color: var(--muted);
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
    color: #111827;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 36px;
}

.pager a {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    font-weight: 800;
}

.pager a:hover,
.pager a.is-current {
    color: #ffffff;
    border-color: var(--emerald);
    background: var(--emerald);
}

.empty-state {
    display: none;
    padding: 26px;
    border-radius: 18px;
    background: #f9fafb;
    border: 1px dashed #cbd5e1;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #f9fafb, #eef2f7);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 34px;
}

.footer-grid p {
    color: var(--muted);
    line-height: 1.8;
}

.footer-grid h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-grid ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.footer-grid a:hover {
    color: var(--emerald);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 34px;
    color: var(--muted);
    border-top: 1px solid rgba(229, 231, 235, 0.9);
}

@media (max-width: 1180px) {
    .all-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .sticky-panel {
        position: static;
    }
}

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

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

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

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

    .hero-content {
        top: 45%;
        left: 24px;
        right: 24px;
        max-width: none;
    }

    .hero-search {
        grid-template-columns: 1fr;
        bottom: 100px;
    }

    .hero-search button {
        min-height: 48px;
    }

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

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

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

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

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

@media (max-width: 560px) {
    .nav-wrap {
        padding: 15px 16px;
    }

    .logo,
    .footer-logo {
        font-size: 22px;
    }

    .content-section {
        padding: 48px 16px;
    }

    .page-hero {
        min-height: 300px;
        padding: 58px 16px;
    }

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

    .hero-content {
        top: 42%;
        padding-right: 0;
    }

    .hero-content p,
    .page-hero p,
    .detail-line {
        font-size: 16px;
    }

    .hero-actions {
        gap: 10px;
    }

    .primary-btn,
    .ghost-btn {
        min-height: 48px;
        padding: 0 20px;
    }

    .all-grid,
    .featured-grid,
    .category-grid,
    .mini-card-grid {
        grid-template-columns: 1fr;
    }

    .movie-card p {
        min-height: 0;
    }

    .detail-wrap {
        padding: 56px 16px 44px;
    }

    .detail-meta span {
        font-size: 13px;
    }

    .player-card {
        border-radius: 18px;
    }

    .big-play {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        padding: 38px 16px;
    }
}
