:root {
    --green-900: #064e3b;
    --green-800: #065f46;
    --green-700: #047857;
    --green-600: #059669;
    --green-500: #10b981;
    --emerald-400: #34d399;
    --emerald-100: #d1fae5;
    --mint: #f0fdf4;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.14);
    --shadow-strong: 0 25px 65px rgba(5, 95, 70, 0.24);
    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--slate-800);
    background: var(--mint);
    line-height: 1.7;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--green-700), var(--green-500), var(--emerald-400));
    color: var(--white);
    box-shadow: 0 12px 28px rgba(6, 78, 59, 0.24);
}

.header-inner {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--green-700);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 22px rgba(255, 255, 255, 0.18);
}

.brand strong {
    display: block;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.brand em {
    display: block;
    font-size: 12px;
    color: var(--emerald-100);
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    white-space: nowrap;
}

.main-nav a {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover,
.main-nav .is-active {
    color: var(--white);
    opacity: 1;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 4px;
    backdrop-filter: blur(12px);
}

.header-search input {
    width: 210px;
    border: 0;
    outline: 0;
    padding: 9px 12px;
    color: var(--white);
    background: transparent;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.header-search button,
.mobile-search button,
.big-search button,
.quick-filter button {
    border: 0;
    color: var(--green-800);
    background: var(--white);
    border-radius: 999px;
    padding: 9px 16px;
    cursor: pointer;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 8px 12px;
}

.mobile-panel {
    display: none;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.mobile-panel nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
}

.mobile-search {
    display: flex;
    gap: 8px;
}

.mobile-search input,
.big-search input,
.quick-filter input {
    flex: 1;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 13px 16px;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    color: var(--white);
    overflow: hidden;
    background: linear-gradient(135deg, var(--green-800), var(--green-500));
}

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

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.hero-slide > img {
    height: 100%;
    min-height: 620px;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-shade,
.detail-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 30%, rgba(16, 185, 129, 0.45), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(6, 95, 70, 0.72), rgba(15, 23, 42, 0.32));
}

.hero-content {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: max(24px, calc((100vw - var(--container)) / 2));
    width: min(760px, calc(100% - 48px));
    transform: translateY(-50%);
}

.eyebrow,
.page-hero span,
.section-title span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green-600);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content .eyebrow {
    color: var(--emerald-100);
}

.hero-content h1 {
    margin: 18px 0 8px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.16;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: var(--green-800);
    background: var(--white);
    box-shadow: 0 12px 28px rgba(255, 255, 255, 0.2);
}

.btn.ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn.glass {
    color: var(--white);
    background: rgba(16, 185, 129, 0.24);
    border: 1px solid rgba(209, 250, 229, 0.28);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 34px;
    border-radius: 999px;
    background: var(--white);
}

.hero-wave {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 120px;
}

.hero-wave path {
    fill: var(--mint);
}

.quick-filter {
    position: relative;
    z-index: 6;
    width: min(980px, calc(100% - 32px));
    margin: -46px auto 20px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-strong);
}

.quick-filter form,
.big-search {
    display: flex;
    gap: 12px;
    align-items: center;
}

.quick-filter label {
    flex: 0 0 auto;
    color: var(--green-700);
    font-weight: 900;
}

.quick-filter input,
.big-search input {
    background: var(--slate-100);
}

.quick-filter button,
.big-search button {
    color: var(--white);
    background: var(--green-600);
}

.section-block {
    padding: 58px 0;
}

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

.section-title h2 {
    margin: 4px 0 0;
    color: var(--slate-900);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-title a,
.text-link {
    color: var(--green-700);
    font-weight: 800;
}

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

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

.category-tile,
.category-overview-card,
.content-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.category-tile {
    min-height: 170px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--green-500), var(--emerald-400));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.category-tile:hover::before {
    opacity: 1;
}

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

.category-tile span {
    color: var(--slate-900);
    font-size: 20px;
    font-weight: 900;
}

.category-tile strong {
    margin: 8px 0;
    color: var(--green-700);
}

.category-tile em {
    color: var(--slate-500);
    font-style: normal;
    font-size: 14px;
}

.category-tile:hover span,
.category-tile:hover strong,
.category-tile:hover em {
    color: var(--white);
}

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

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

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

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--green-700), var(--emerald-400));
}

.movie-card.large .poster-link {
    aspect-ratio: 16 / 9;
}

.poster-link img,
.rank-cover img,
.detail-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: auto 0 0;
    height: 50%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), transparent);
}

.poster-year {
    position: absolute;
    right: 12px;
    bottom: 12px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
}

.movie-info {
    padding: 17px;
}

.category-pill {
    display: inline-flex;
    width: fit-content;
    color: var(--green-700);
    background: var(--emerald-100);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 800;
}

.movie-info h3,
.rank-card h3 {
    margin: 10px 0 8px;
    color: var(--slate-900);
    line-height: 1.35;
}

.movie-info h3 a:hover,
.rank-card h3 a:hover,
.category-overview-card a:hover {
    color: var(--green-600);
}

.movie-info p,
.rank-card p,
.category-overview-card p,
.content-card p {
    margin: 0;
    color: var(--slate-600);
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags a {
    color: var(--slate-600);
    background: var(--slate-100);
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 12px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    color: var(--slate-500);
    font-size: 13px;
}

.hot-zone {
    padding: 66px 0;
    color: var(--white);
    background:
        radial-gradient(circle at 18% 12%, rgba(52, 211, 153, 0.4), transparent 25%),
        linear-gradient(135deg, var(--slate-900), var(--green-800));
}

.hot-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 28px;
}

.hot-zone .movie-card,
.hot-zone .rank-card {
    color: var(--slate-800);
}

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

.rank-card {
    display: grid;
    grid-template-columns: auto 122px 1fr;
    gap: 15px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--white);
    background: linear-gradient(135deg, var(--green-600), var(--emerald-400));
    border-radius: 14px;
    font-weight: 900;
}

.rank-cover {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: var(--green-600);
}

.full-rank-list .rank-card {
    grid-template-columns: auto 160px 1fr;
}

.channel-strip {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 52px;
}

.section-title.slim {
    margin-bottom: 18px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 80% 20%, rgba(52, 211, 153, 0.28), transparent 24%),
        linear-gradient(135deg, var(--green-800), var(--green-500));
}

.page-hero .container {
    padding: 72px 0;
}

.page-hero span {
    color: var(--emerald-100);
}

.page-hero h1 {
    max-width: 820px;
    margin: 10px 0 12px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.1;
}

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

.compact-actions {
    margin-top: 22px;
}

.overview-grid {
    grid-template-columns: repeat(2, 1fr);
}

.category-overview-card {
    padding: 26px;
}

.category-title-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.category-title-link h2 {
    margin: 0;
}

.category-title-link strong {
    color: var(--green-700);
    background: var(--emerald-100);
    border-radius: 999px;
    padding: 6px 12px;
}

.category-overview-card ul {
    margin: 18px 0;
    padding-left: 20px;
    color: var(--slate-600);
}

.big-search {
    max-width: 800px;
    margin-top: 26px;
}

.detail-hero {
    min-height: 600px;
    background: var(--slate-900);
}

.detail-bg {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) scale(1.05);
    opacity: 0.36;
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding: 34px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.82);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 36px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-lg);
    aspect-ratio: 3 / 4;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.detail-copy h1 {
    margin: 12px 0 16px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.08;
}

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

.detail-tags a {
    color: var(--white);
    background: rgba(255, 255, 255, 0.17);
}

.detail-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.detail-facts li {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.detail-facts span {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.detail-facts strong {
    display: block;
    color: var(--white);
}

.player-section {
    padding-bottom: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--slate-950);
    box-shadow: var(--shadow-strong);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: var(--slate-950);
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: var(--white);
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.2), rgba(6, 95, 70, 0.34));
    border: 0;
    cursor: pointer;
}

.play-cover span {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    color: var(--green-700);
    background: var(--white);
    border-radius: 50%;
    font-size: 28px;
    box-shadow: 0 14px 34px rgba(255, 255, 255, 0.28);
}

.play-cover strong {
    font-size: 18px;
}

.player-shell.is-playing .play-cover {
    display: none;
}

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

.content-card {
    padding: 26px;
}

.content-card:first-child {
    grid-column: 1 / -1;
}

.content-card h2 {
    margin: 0 0 12px;
    color: var(--slate-900);
}

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

.footer-grid {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px;
}

.footer-brand {
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 14px;
}

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

.site-footer p {
    margin: 0;
    color: var(--slate-200);
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

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

@media (max-width: 1080px) {
    .main-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

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

    .detail-poster {
        width: min(300px, 100%);
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 68px;
    }

    .brand strong {
        font-size: 20px;
    }

    .brand em {
        display: none;
    }

    .hero-carousel,
    .hero-slide > img {
        min-height: 620px;
    }

    .hero-content {
        top: 46%;
    }

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

    .quick-filter form,
    .big-search {
        flex-direction: column;
        align-items: stretch;
    }

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

    .movie-grid,
    .compact-grid,
    .category-grid,
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .rank-card,
    .full-rank-list .rank-card {
        grid-template-columns: 80px 1fr;
    }

    .rank-card .rank-num {
        grid-column: 1 / -1;
    }

    .rank-cover {
        aspect-ratio: 3 / 4;
    }

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

    .content-card:first-child {
        grid-column: auto;
    }
}

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

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

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}
