:root {
    --green-900: #052e25;
    --green-800: #065f46;
    --green-700: #047857;
    --green-600: #059669;
    --green-500: #10b981;
    --green-100: #d1fae5;
    --yellow: #fde047;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f0fdf4;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

* {
    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(--ink);
    background: #f8fafc;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--green-800), var(--green-600), #059669);
    box-shadow: 0 10px 30px rgba(4, 120, 87, 0.24);
}

.nav-wrap {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 26px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--green-800);
    background: #fff;
    box-shadow: inset 0 -4px 12px rgba(16, 185, 129, 0.25);
}

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

.desktop-nav {
    display: flex;
    gap: 24px;
    margin-left: auto;
}

.nav-link {
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ecfdf5;
}

.nav-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-search input,
.large-search input,
.filter-panel input,
.filter-panel select {
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 11px 16px;
    color: #fff;
    background: rgba(6, 95, 70, 0.72);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.nav-search input::placeholder,
.mobile-search input::placeholder,
.large-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.nav-search button,
.mobile-search button,
.large-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--green-800);
    font-weight: 800;
    background: #fff;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 4px;
    background: #fff;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.mobile-panel-inner {
    display: grid;
    gap: 12px;
    padding: 16px 0 20px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    color: #fff;
    background: var(--green-900);
}

.hero-slider,
.hero-slide {
    min-height: 640px;
}

.hero-slide {
    display: none;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    display: flex;
    animation: fadeIn 0.55s ease both;
}

.hero-slide::after,
.page-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image: radial-gradient(circle at 20% 30%, rgba(253, 224, 71, 0.6), transparent 24%), radial-gradient(circle at 75% 15%, rgba(16, 185, 129, 0.8), transparent 28%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100% - 40px));
    margin-left: max(24px, calc((100vw - 1180px) / 2));
    padding: 70px 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--green-100);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--green-700);
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
    margin: 0 0 20px;
    font-size: clamp(40px, 7vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-hero p {
    max-width: 760px;
    margin: 0 0 26px;
    font-size: clamp(17px, 2vw, 23px);
    color: rgba(255, 255, 255, 0.88);
}

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

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    color: #ecfdf5;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
}

.hero-actions,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    padding: 13px 24px;
    color: var(--green-800);
    background: #fff;
    box-shadow: 0 18px 35px rgba(255, 255, 255, 0.18);
}

.ghost-btn {
    padding: 11px 22px;
    color: #fff;
    background: rgba(6, 95, 70, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover {
    transform: translateY(-3px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 34px;
    background: rgba(5, 46, 37, 0.52);
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-control.prev {
    left: 20px;
}

.hero-control.next {
    right: 20px;
}

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

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

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

.section {
    padding: 72px 0;
}

.white-section {
    background: #fff;
}

.soft-section {
    background: linear-gradient(180deg, #fff, var(--soft));
}

.section-head {
    margin-bottom: 34px;
}

.center-head {
    text-align: center;
}

.center-head p {
    margin-left: auto;
    margin-right: auto;
}

.split-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head p {
    max-width: 760px;
    margin-top: 0;
    color: var(--muted);
}

.light-head h2,
.light-head p {
    color: #fff;
}

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

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

.category-tile {
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    border-radius: 24px;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, var(--green-600), var(--green-800));
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

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

.category-tile span {
    font-size: 20px;
    font-weight: 900;
}

.category-tile strong {
    margin: 8px 0;
    font-size: 15px;
}

.category-tile p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--green-900);
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.cover-tag,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.cover-tag {
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(5, 150, 105, 0.86);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.72);
}

.movie-info {
    padding: 18px;
}

.movie-info h3 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.25;
}

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

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

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

.meta-row span,
.detail-meta span {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--green-800);
    font-size: 12px;
    font-weight: 800;
    background: var(--green-100);
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 150px 1fr;
}

.movie-card-compact .movie-cover {
    aspect-ratio: auto;
    height: 100%;
    min-height: 150px;
}

.ranking-strip {
    color: #fff;
    background: radial-gradient(circle at 20% 10%, rgba(253, 224, 71, 0.22), transparent 28%), linear-gradient(135deg, var(--green-900), var(--green-700));
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--green-900), var(--green-700));
}

.page-hero .container {
    position: relative;
    z-index: 2;
    padding: 86px 0 78px;
}

.mini-hero .container,
.search-hero .container {
    padding-top: 74px;
    padding-bottom: 74px;
}

.breadcrumb {
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 220px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
    color: var(--ink);
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px var(--line);
}

.empty-state {
    display: none;
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 20px;
    color: var(--muted);
    background: #f8fafc;
    text-align: center;
}

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

.category-overview {
    display: grid;
    gap: 44px;
}

.category-overview-block {
    padding: 28px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

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

.category-overview-head h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

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

.large-search {
    display: grid;
    grid-template-columns: 1fr auto;
    width: min(760px, 100%);
    gap: 10px;
    margin-top: 28px;
}

.large-search input {
    color: #fff;
    background: rgba(6, 95, 70, 0.55);
}

.detail-hero {
    min-height: 610px;
    background-size: cover;
    background-position: center;
}

.detail-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 46px;
    padding: 78px 0;
}

.detail-copy p {
    max-width: 720px;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--green-800);
    font-size: 30px;
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%);
}

.player-section {
    padding: 56px 0;
    background: #07130f;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.35);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.64));
    cursor: pointer;
}

.player-overlay.is-hidden {
    display: none;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--green-800);
    font-size: 34px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(255, 255, 255, 0.2);
}

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

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

.detail-article,
.detail-side {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.detail-article {
    padding: 34px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 18px;
    font-size: 26px;
}

.detail-article p {
    margin: 0 0 28px;
    color: #334155;
    font-size: 17px;
}

.detail-side {
    padding: 26px;
    position: sticky;
    top: 92px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px 14px;
    margin: 0;
}

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

.detail-side dd {
    margin: 0;
    font-weight: 800;
}

.detail-side a {
    color: var(--green-700);
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #1f2937, #0f172a);
}

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

.footer-brand .brand-mark {
    color: #fff;
    background: var(--green-600);
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

.site-footer p {
    max-width: 480px;
    color: #cbd5e1;
}

.footer-links {
    display: grid;
    gap: 9px;
}

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

.footer-links a:hover {
    color: var(--green-100);
}

.footer-bottom {
    padding: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
    color: #94a3b8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .category-grid,
    .overview-grid,
    .four-cols {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero-control {
        display: none;
    }

    .category-grid,
    .overview-grid,
    .three-cols,
    .four-cols,
    .rank-list,
    .footer-grid,
    .detail-layout,
    .detail-hero-grid {
        grid-template-columns: 1fr;
    }

    .split-head,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .detail-side {
        position: static;
    }
}

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

    .brand-name {
        font-size: 18px;
    }

    .hero-content {
        margin-left: 18px;
        width: calc(100% - 36px);
    }

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

    .movie-card-compact {
        grid-template-columns: 110px 1fr;
    }

    .movie-card-compact .movie-cover {
        min-height: 132px;
    }

    .movie-info {
        padding: 14px;
    }

    .movie-info h3 {
        font-size: 17px;
    }

    .movie-info p {
        min-height: auto;
    }

    .section {
        padding: 54px 0;
    }

    .detail-article {
        padding: 24px;
    }
}
