:root {
    --green-900: #064e3b;
    --green-800: #065f46;
    --green-700: #047857;
    --green-600: #059669;
    --green-500: #10b981;
    --emerald-50: #ecfdf5;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --text: #1f2937;
    --muted: #64748b;
    --line: #dbe5e8;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #eefcf5 42%, #f8fafc 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(90deg, var(--green-900), var(--green-700));
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(5, 95, 70, 0.3);
}

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

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

.brand-icon,
.footer-brand span {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

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

.nav-link,
.mobile-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.mobile-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 24px;
    width: 44px;
    height: 42px;
}

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

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.hero-slider {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    background: var(--slate-950);
}

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

.hero-slide.is-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) contrast(1.02);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 22%, rgba(16, 185, 129, 0.42), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(6, 78, 59, 0.82) 42%, rgba(2, 6, 23, 0.36) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.1));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 660px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: center;
    gap: 54px;
    padding: 70px 0 96px;
    color: #ffffff;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 8px 0 12px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy h3 {
    margin: 0 0 16px;
    font-size: clamp(22px, 3vw, 36px);
    color: #bbf7d0;
}

.hero-copy p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 17px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--green-600);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.detail-copy .eyebrow {
    color: #a7f3d0;
}

.hero-tags,
.detail-chips,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-chips span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.hero-actions,
.detail-actions,
.static-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: all 0.22s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(5, 150, 105, 0.32);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px rgba(5, 150, 105, 0.42);
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.ghost-btn.dark {
    background: #ffffff;
    color: var(--green-800);
    box-shadow: inset 0 0 0 1px rgba(5, 95, 70, 0.16);
}

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

.ghost-btn.dark:hover {
    background: var(--emerald-50);
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(390px, 100%);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 38px 80px rgba(0, 0, 0, 0.44);
    transform: rotate(1deg);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 54%, rgba(2, 6, 23, 0.72));
}

.hero-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.92);
    color: #ffffff;
    font-size: 26px;
    box-shadow: 0 18px 40px rgba(5, 150, 105, 0.42);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

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

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 28px;
    backdrop-filter: blur(10px);
}

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

.hero-dot {
    width: 32px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
    background: var(--green-500);
}

.section {
    padding: 70px 0;
}

.section-soft {
    background: rgba(236, 253, 245, 0.74);
}

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

.section-head.compact {
    margin-bottom: 18px;
}

.section-head h2,
.page-hero h1,
.detail-copy h1,
.content-panel h2 {
    margin: 0;
    color: var(--slate-900);
    line-height: 1.12;
}

.section-head h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.text-link {
    color: var(--green-700);
    font-weight: 900;
}

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

.category-tile {
    min-height: 144px;
    padding: 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, var(--emerald-50));
    box-shadow: var(--shadow);
    border: 1px solid rgba(5, 150, 105, 0.12);
    transition: all 0.22s ease;
}

.category-tile.large {
    min-height: 180px;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(5, 150, 105, 0.32);
}

.category-tile span {
    display: block;
    color: var(--green-800);
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 10px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
    border: 1px solid rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.17);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--slate-900);
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.42));
    opacity: 0;
    transition: opacity 0.22s ease;
}

.movie-card:hover .poster-wrap::after {
    opacity: 1;
}

.duration,
.rank-mark {
    position: absolute;
    z-index: 3;
    right: 10px;
    bottom: 10px;
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(2, 6, 23, 0.78);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.rank-mark {
    left: 10px;
    right: auto;
    background: var(--green-600);
}

.play-badge {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%) scale(0.86);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.92);
    color: #ffffff;
    opacity: 0;
    transition: all 0.22s ease;
}

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

.card-body {
    padding: 16px;
}

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

.card-body h3 a:hover {
    color: var(--green-700);
}

.card-body p {
    min-height: 50px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.card-meta {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.card-meta span {
    border-radius: 999px;
    padding: 3px 8px;
    background: var(--slate-100);
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 104px 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.09);
}

.ranking-cover {
    border-radius: 14px;
    overflow: hidden;
}

.ranking-cover img {
    width: 104px;
    height: 72px;
    object-fit: cover;
}

.ranking-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
    color: #ffffff;
    font-weight: 900;
}

.ranking-main h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.ranking-main p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.score-pill {
    min-width: 54px;
    border-radius: 999px;
    padding: 8px 10px;
    background: #fef3c7;
    color: #92400e;
    text-align: center;
    font-weight: 900;
}

.page-hero {
    padding: 74px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 0%, rgba(16, 185, 129, 0.35), transparent 30%),
        linear-gradient(135deg, var(--slate-950), var(--green-800));
}

.page-hero h1 {
    color: #ffffff;
    margin-bottom: 14px;
    font-size: clamp(34px, 5vw, 58px);
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--slate-900);
    background: #f8fafc;
    font: inherit;
}

.filter-panel input:focus,
.filter-panel select:focus {
    outline: 3px solid rgba(16, 185, 129, 0.18);
    border-color: var(--green-500);
}

.empty-state {
    margin: 0 0 22px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    color: var(--muted);
    box-shadow: var(--shadow);
}

.detail-hero {
    padding: 40px 0 76px;
    color: #ffffff;
    background:
        radial-gradient(circle at 72% 20%, rgba(16, 185, 129, 0.28), transparent 34%),
        linear-gradient(135deg, var(--slate-950), var(--green-900));
}

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

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

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

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-copy h1 {
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
}

.lead {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.62));
}

.play-overlay span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
    color: #ffffff;
    font-size: 34px;
    box-shadow: 0 22px 50px rgba(16, 185, 129, 0.36);
}

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

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

.content-panel {
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.content-panel p {
    margin: 14px 0 0;
    color: #475569;
}

.static-panel {
    max-width: 860px;
}

.site-footer {
    padding-top: 56px;
    background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
    color: #cbd5e1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 34px;
    padding-bottom: 40px;
}

.footer-brand {
    color: #ffffff;
    margin-bottom: 14px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 16px;
}

.site-footer p {
    margin: 0;
    max-width: 420px;
}

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

.site-footer a:hover {
    color: #86efac;
}

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

[hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .compact-ranking {
        grid-template-columns: 1fr;
    }
}

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

    .mobile-toggle {
        display: grid;
        place-items: center;
    }

    .hero-slider,
    .hero-content {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
    }

    .hero-slide.is-active {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 54px 0 100px;
    }

    .hero-poster {
        justify-self: start;
        width: min(310px, 100%);
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

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

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

    .brand {
        font-size: 15px;
    }

    .hero-copy h1,
    .hero-copy h2,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

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

    .ranking-item {
        grid-template-columns: 84px 34px minmax(0, 1fr);
    }

    .ranking-cover img {
        width: 84px;
        height: 62px;
    }

    .score-pill {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .play-overlay span {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
