:root {
    --green-950: #052e16;
    --green-900: #064e3b;
    --green-800: #065f46;
    --green-700: #047857;
    --green-600: #059669;
    --green-500: #10b981;
    --green-100: #dcfce7;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

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

body.menu-open {
    overflow: hidden;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(90deg, var(--green-950), var(--green-800), var(--green-600));
    color: var(--white);
    box-shadow: 0 16px 35px rgba(6, 95, 70, 0.26);
}

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

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

.brand {
    font-size: 22px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 700;
}

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

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #bbf7d0;
    opacity: 1;
}

.desktop-nav a:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(5, 46, 22, 0.98);
}

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

.mobile-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
}

.mobile-category-row a {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 46px;
    padding: 92px max(32px, calc((100vw - 1180px) / 2)) 86px;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(6px) saturate(1.08);
    transform: scale(1.06);
    opacity: 0.45;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 30%, rgba(16, 185, 129, 0.28), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(6, 78, 59, 0.78) 54%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 12px;
    color: var(--green-500);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(42px, 8vw, 82px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 690px;
    margin: 24px 0 0;
    color: #d1fae5;
    font-size: 18px;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #bbf7d0;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

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

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

.primary-button,
.home-search button {
    color: var(--white);
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
    box-shadow: 0 18px 35px rgba(5, 150, 105, 0.34);
}

.ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

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

.hero-poster {
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

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

.hero-controls button {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-controls button.active {
    width: 58px;
    background: var(--green-500);
}

.intro-search,
.section-block {
    padding: 64px 0;
}

.intro-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    gap: 32px;
    align-items: center;
}

.intro-search h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2,
.player-title h2 {
    margin: 0;
    color: var(--slate-900);
    font-weight: 950;
    letter-spacing: -0.035em;
}

.intro-search h2,
.section-heading h2 {
    font-size: clamp(30px, 4.8vw, 46px);
}

.intro-search p,
.page-hero p,
.category-card p,
.detail-info p,
.detail-content p,
.player-title p,
.site-footer p {
    color: var(--slate-600);
    line-height: 1.85;
}

.home-search,
.filter-panel {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 999px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid #dbe7df;
    border-radius: 999px;
    color: var(--slate-800);
    background: #f8fafc;
    outline: none;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

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

.section-heading a {
    color: var(--green-700);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.12);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--green-900), var(--slate-900));
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.36s ease, opacity 0.36s ease;
}

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

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

.duration {
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.76);
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    left: 12px;
    top: 12px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-weight: 950;
}

.play-dot {
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(16, 185, 129, 0.86);
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-body {
    padding: 18px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 800;
}

.movie-body h3 {
    margin: 0 0 10px;
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 950;
}

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

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

.tag-row span {
    color: var(--green-800);
    background: var(--green-100);
}

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

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

.category-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.category-thumbs {
    display: grid;
    grid-template-columns: 1.2fr 0.85fr 0.85fr;
    gap: 8px;
    height: 158px;
}

.category-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

.category-thumbs img:first-child {
    grid-row: span 2;
}

.category-card h3 {
    margin: 0 0 8px;
    color: var(--slate-900);
    font-size: 22px;
    font-weight: 950;
}

.ranking-band {
    background:
        radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.24), transparent 34%),
        linear-gradient(135deg, var(--slate-950), var(--green-950));
}

.page-hero {
    padding: 86px 0 70px;
    color: var(--white);
    background:
        radial-gradient(circle at 72% 20%, rgba(187, 247, 208, 0.24), transparent 28%),
        linear-gradient(135deg, var(--green-950), var(--green-700));
}

.page-hero h1 {
    max-width: 850px;
    color: var(--white);
    font-size: clamp(38px, 6vw, 64px);
}

.page-hero p {
    max-width: 760px;
    color: #dcfce7;
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 20px;
    color: #bbf7d0;
    font-size: 14px;
    font-weight: 800;
}

.filter-panel {
    align-items: end;
    margin-bottom: 28px;
    border-radius: 28px;
}

.filter-panel label {
    display: grid;
    flex: 1;
    gap: 8px;
    color: var(--slate-600);
    font-size: 13px;
    font-weight: 900;
}

.empty-state {
    display: none;
    padding: 36px;
    border-radius: var(--radius);
    color: var(--slate-600);
    background: var(--white);
    text-align: center;
    box-shadow: var(--shadow);
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 76px 0;
    background: var(--slate-950);
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(8px) saturate(1.12);
    transform: scale(1.08);
    opacity: 0.42;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(6, 78, 59, 0.76));
}

.detail-head {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

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

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

.detail-info h1 {
    color: var(--white);
    font-size: clamp(38px, 6vw, 72px);
}

.detail-info p {
    max-width: 780px;
    color: #dcfce7;
    font-size: 18px;
}

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

.detail-meta span {
    padding: 8px 13px;
    border-radius: 999px;
    color: #dcfce7;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
}

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

.detail-layout {
    display: grid;
    gap: 28px;
    padding: 58px 0 10px;
}

.player-card,
.detail-content {
    overflow: hidden;
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.video-box {
    position: relative;
    background: #000;
}

.video-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.52));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.45);
    font-size: 34px;
    text-indent: 5px;
}

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

.player-title,
.detail-content {
    padding: 28px;
}

.player-title h2,
.detail-content h2 {
    font-size: 30px;
}

.detail-content p {
    margin: 18px 0 0;
    color: var(--slate-700);
    font-size: 17px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    padding: 52px 0;
}

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

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

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

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

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

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

    .hero-slide {
        grid-template-columns: 1fr 280px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 80px;
        padding-bottom: 90px;
    }

    .hero-poster {
        width: min(240px, 72vw);
        justify-self: start;
    }

    .intro-search,
    .detail-head,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-panel,
    .home-search {
        flex-direction: column;
        align-items: stretch;
        border-radius: 24px;
    }

    .detail-poster {
        width: min(260px, 80vw);
    }
}

@media (max-width: 560px) {
    .site-shell {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 18px;
    }

    .hero-content h1,
    .detail-info h1,
    .page-hero h1 {
        font-size: 38px;
    }

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

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

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

    .category-thumbs {
        height: 140px;
    }
}
