* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #059669;
    --brand-2: #0d9488;
    --brand-dark: #064e3b;
    --deep: #020617;
    --shadow: 0 18px 50px rgba(15, 23, 42, .12);
    --soft-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .08);
}

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

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

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 10px 20px rgba(5, 150, 105, .28);
}

.brand-text {
    display: grid;
    line-height: 1.18;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: .02em;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text em {
    font-style: normal;
    font-size: 12px;
    color: var(--muted);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 700;
    color: #334155;
}

.desktop-nav a,
.mobile-nav a {
    transition: color .2s ease, transform .2s ease;
}

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #ecfdf5;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: var(--brand-dark);
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    flex-direction: column;
    gap: 12px;
    font-weight: 700;
}

.mobile-nav.open {
    display: flex;
}

.hero-section {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: var(--deep);
}

.hero-slider {
    position: relative;
    min-height: 650px;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    filter: saturate(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 20%, rgba(16, 185, 129, .34), transparent 28%), linear-gradient(0deg, rgba(2, 6, 23, .65), transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    gap: 56px;
    align-items: center;
    color: #fff;
}

.hero-copy h1 {
    margin: 16px 0 18px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -.04em;
}

.hero-copy p {
    max-width: 760px;
    margin: 0;
    font-size: clamp(17px, 2vw, 22px);
    color: rgba(255, 255, 255, .82);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);
    color: #d1fae5;
    font-weight: 800;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 28px;
}

.hero-tags span,
.detail-tags span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(16, 185, 129, .14);
    border: 1px solid rgba(16, 185, 129, .26);
    color: #d1fae5;
    font-size: 14px;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 900;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 14px 30px rgba(5, 150, 105, .35);
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);
}

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

.hero-poster {
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
    transform: rotate(2deg);
}

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

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    cursor: pointer;
}

.hero-dot.active {
    width: 34px;
    background: #34d399;
}

.search-band,
.content-section,
.split-section,
.player-section,
.detail-text {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.search-band {
    margin-top: -44px;
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 440px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-band h2,
.search-band p {
    margin: 0;
}

.search-band h2 {
    font-size: 28px;
}

.search-band p {
    color: var(--muted);
}

.search-box {
    display: flex;
    align-items: center;
    min-height: 52px;
    border-radius: 16px;
    padding: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 14px;
    font: inherit;
    color: var(--ink);
}

.search-box span {
    min-width: 76px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 900;
}

.search-box.compact {
    max-width: 560px;
    margin-top: 24px;
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .18);
}

.search-box.compact input {
    color: #fff;
}

.search-box.compact input::placeholder {
    color: rgba(255, 255, 255, .72);
}

.content-section {
    padding: 72px 0 0;
}

.nested-section {
    width: auto;
    padding-top: 0;
}

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

.section-title span,
.rank-head span,
.inner-hero span {
    color: var(--brand);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.section-title h2,
.rank-head h2,
.detail-text h2 {
    margin: 5px 0 0;
    font-size: clamp(26px, 4vw, 40px);
    letter-spacing: -.03em;
}

.section-title p,
.rank-head a {
    max-width: 500px;
    color: var(--muted);
    margin: 0;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--soft-shadow);
    transition: transform .22s ease, box-shadow .22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b, #0f172a);
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .68), transparent 48%);
    opacity: .75;
}

.year-badge,
.play-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.year-badge {
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, .45);
}

.play-badge {
    left: 12px;
    bottom: 12px;
    background: rgba(5, 150, 105, .84);
}

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

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

.movie-card-body p {
    height: 54px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    overflow: hidden;
}

.meta-line {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-line span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #ecfdf5;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    padding: 22px;
    border-radius: 24px;
    overflow: hidden;
    color: #fff;
    background: #064e3b;
    box-shadow: var(--soft-shadow);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .36;
    transition: transform .5s ease;
}

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

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, .88), rgba(6, 78, 59, .4));
}

.category-tile span,
.category-tile em {
    position: relative;
    z-index: 2;
    display: block;
}

.category-tile span {
    margin-top: 92px;
    font-size: 24px;
    font-weight: 950;
}

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

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    padding: 72px 0;
}

.rank-panel {
    align-self: start;
    position: sticky;
    top: 96px;
    padding: 24px;
    border-radius: 26px;
    background: #0f172a;
    color: #fff;
    box-shadow: var(--shadow);
}

.rank-head {
    margin-bottom: 18px;
}

.rank-head h2 {
    color: #fff;
    font-size: 28px;
}

.rank-head a {
    color: #a7f3d0;
    font-weight: 800;
}

.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.rank-item a {
    display: grid;
    grid-template-columns: 30px 54px 1fr;
    gap: 12px;
    align-items: center;
}

.rank-num {
    color: #34d399;
    font-weight: 950;
    font-size: 18px;
}

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

.rank-text {
    display: grid;
    gap: 2px;
}

.rank-text strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-text em {
    font-style: normal;
    color: #94a3b8;
    font-size: 12px;
}

.inner-hero {
    color: #fff;
    padding: 92px max(16px, calc((100% - 1200px) / 2)) 74px;
    background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, .42), transparent 26%), linear-gradient(135deg, #020617, #064e3b 58%, #0f766e);
}

.inner-hero h1 {
    margin: 10px 0 10px;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    align-items: center;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.category-cover img {
    width: 180px;
    height: 240px;
    object-fit: cover;
    border-radius: 18px;
}

.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.category-overview-card p {
    margin: 0 0 16px;
    color: var(--muted);
}

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

.mini-links a {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: #ecfdf5;
    font-size: 13px;
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: #020617;
    color: #fff;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.08);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 0%, transparent 50%);
}

.detail-layout {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 42px;
    align-items: center;
    min-height: 560px;
    padding: 60px 0;
}

.detail-poster img {
    width: 300px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}

.breadcrumbs {
    display: flex;
    gap: 10px;
    color: #a7f3d0;
    font-weight: 800;
}

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.detail-one-line {
    max-width: 800px;
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 20px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0;
}

.detail-meta div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .13);
}

.detail-meta dt {
    color: #a7f3d0;
    font-size: 12px;
    font-weight: 900;
}

.detail-meta dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.player-section {
    padding: 70px 0 0;
}

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

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    color: #fff;
    background: radial-gradient(circle, rgba(5, 150, 105, .35), rgba(2, 6, 23, .68));
    cursor: pointer;
    transition: opacity .22s ease, visibility .22s ease;
}

.play-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 20px 50px rgba(5, 150, 105, .35);
    position: relative;
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 35px;
    top: 27px;
    border-left: 24px solid #fff;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
}

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

.detail-text {
    padding-top: 50px;
    max-width: 960px;
}

.detail-text h2 {
    font-size: 30px;
}

.detail-text p {
    color: #334155;
    font-size: 18px;
    margin-top: 10px;
}

.site-footer {
    margin-top: 84px;
    background: #111827;
    color: #e5e7eb;
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
}

.footer-grid h2,
.footer-grid h3 {
    color: #34d399;
    margin: 0 0 14px;
}

.footer-grid p {
    max-width: 540px;
    color: #cbd5e1;
    margin: 0;
}

.footer-grid a {
    display: block;
    color: #cbd5e1;
    margin: 8px 0;
}

.footer-grid a:hover {
    color: #34d399;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid rgba(148, 163, 184, .22);
    color: #94a3b8;
    font-size: 14px;
}

.movie-card.is-hidden {
    display: none;
}

@media (max-width: 1024px) {
    .hero-content,
    .detail-layout,
    .split-section {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

    .rank-panel {
        position: static;
    }
}

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

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

    .brand-text em {
        display: none;
    }

    .hero-section,
    .hero-slider,
    .hero-content {
        min-height: 580px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .search-band {
        grid-template-columns: 1fr;
        margin-top: -22px;
    }

    .section-title {
        display: block;
    }

    .movie-grid,
    .wide-grid,
    .category-grid,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .category-cover img,
    .detail-poster img {
        width: 100%;
    }

    .detail-layout {
        padding: 34px 0;
    }

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

@media (max-width: 520px) {
    .movie-grid,
    .wide-grid,
    .category-grid,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .detail-info h1,
    .inner-hero h1 {
        font-size: 38px;
    }

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