:root {
    --green-900: #064e3b;
    --green-800: #065f46;
    --green-700: #047857;
    --green-600: #059669;
    --green-500: #10b981;
    --teal-600: #0d9488;
    --cyan-600: #0891b2;
    --yellow-400: #facc15;
    --orange-500: #f97316;
    --pink-500: #ec4899;
    --rose-600: #e11d48;
    --blue-600: #2563eb;
    --purple-600: #9333ea;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 24px 70px rgba(6, 78, 59, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--gray-800);
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 46%, #fefce8 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--green-800), var(--green-600), var(--teal-600));
    box-shadow: 0 10px 30px rgba(6, 95, 70, 0.25);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    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 {
    font-size: 32px;
    line-height: 1;
}

.brand-text {
    font-size: 21px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 15px;
    font-weight: 650;
}

.main-nav a {
    opacity: 0.94;
    transition: color 0.2s ease, opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    color: var(--yellow-400);
    opacity: 1;
    transform: translateY(-1px);
}

.nav-search {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.nav-search:hover {
    background: rgba(255, 255, 255, 0.28);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    border-radius: 99px;
    background: var(--white);
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(90deg, #059669, #10b981, #0d9488);
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 132px;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.76fr);
    align-items: center;
    gap: 54px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.38;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 24%, rgba(250, 204, 21, 0.22), transparent 30%), linear-gradient(90deg, rgba(6, 78, 59, 0.92), rgba(5, 150, 105, 0.68), rgba(15, 23, 42, 0.82));
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding-top: 30px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: #ecfdf5;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 7vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0;
    font-size: clamp(17px, 2.2vw, 24px);
    line-height: 1.8;
    color: #dcfce7;
}

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

.button-primary,
.button-secondary,
.button-light,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
    color: var(--gray-900);
    background: var(--yellow-400);
    box-shadow: 0 18px 38px rgba(250, 204, 21, 0.24);
}

.button-secondary {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.44);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.button-light {
    color: var(--green-800);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.button-ghost {
    color: var(--green-700);
    background: #ecfdf5;
}

.button-primary:hover,
.button-secondary:hover,
.button-light:hover,
.button-ghost:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-poster {
    position: relative;
    z-index: 2;
    width: min(100%, 380px);
    justify-self: end;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 36px 90px rgba(3, 7, 18, 0.38);
    background: rgba(255, 255, 255, 0.14);
}

.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 42%, rgba(3, 7, 18, 0.76));
}

.hero-poster-title {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 20px;
    z-index: 2;
}

.hero-poster-title strong {
    display: block;
    margin-bottom: 6px;
    font-size: 22px;
}

.hero-poster-title span {
    font-size: 14px;
    color: #d1fae5;
}

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

.hero-dots button {
    width: 28px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.active {
    background: var(--yellow-400);
}

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

.section {
    padding: 58px 0;
}

.section.compact-section {
    padding-top: 26px;
}

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

.section-heading > div {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 12px;
}

.section-icon {
    grid-row: span 2;
    font-size: 30px;
}

.section-heading h2 {
    margin: 0;
    color: var(--gray-800);
    font-size: clamp(26px, 3.2vw, 36px);
    line-height: 1.18;
}

.section-heading p {
    grid-column: 2;
    margin: 6px 0 0;
    color: var(--gray-500);
}

.section-link {
    flex: 0 0 auto;
    color: var(--green-700);
    font-weight: 800;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: -38px;
    position: relative;
    z-index: 4;
}

.stat-card {
    min-height: 140px;
    padding: 24px;
    border-radius: 24px;
    color: var(--white);
    box-shadow: var(--shadow-soft);
}

.stat-card:nth-child(1) {
    background: linear-gradient(135deg, var(--pink-500), var(--rose-600));
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, var(--blue-600), var(--cyan-600));
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, var(--orange-500), var(--yellow-400));
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, var(--green-600), var(--green-800));
}

.stat-card span {
    display: block;
    font-size: 34px;
}

.stat-card strong {
    display: block;
    margin: 12px 0 2px;
    font-size: 30px;
    line-height: 1;
}

.stat-card em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.82);
}

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

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

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

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #d1fae5;
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.72), transparent);
}

.score-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    color: var(--white);
    font-weight: 800;
    font-size: 13px;
}

.score-badge {
    right: 12px;
    padding: 6px 10px;
    background: rgba(5, 150, 105, 0.92);
}

.rank-badge {
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rose-600);
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
    color: var(--gray-500);
    font-size: 12px;
}

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

.movie-card h3 {
    margin: 0 0 10px;
    color: var(--gray-900);
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--green-600);
}

.movie-card p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.6;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--green-700);
    background: #ecfdf5;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    min-height: 158px;
    padding: 22px;
    border-radius: 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--green-600), var(--teal-600));
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:nth-child(4n + 1) {
    background: linear-gradient(135deg, var(--blue-600), var(--cyan-600));
}

.category-tile:nth-child(4n + 2) {
    background: linear-gradient(135deg, var(--pink-500), var(--rose-600));
}

.category-tile:nth-child(4n + 3) {
    background: linear-gradient(135deg, var(--orange-500), var(--yellow-400));
}

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

.category-icon {
    display: block;
    margin-bottom: 12px;
    font-size: 36px;
}

.category-tile strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.category-tile em {
    display: block;
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    font-style: normal;
    line-height: 1.6;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 58px 96px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.ranking-no {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--rose-600), var(--orange-500));
    font-weight: 900;
}

.ranking-item img {
    width: 96px;
    height: 66px;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-item h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.ranking-item p {
    margin: 0;
    color: var(--gray-500);
    font-size: 13px;
    line-height: 1.5;
}

.page-hero {
    color: var(--white);
    background: linear-gradient(90deg, var(--green-700), var(--green-500), var(--teal-600));
    padding: 62px 0;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 52px);
}

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

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

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

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

.detail-card,
.side-card,
.search-panel,
.content-card {
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.detail-card {
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: var(--gray-950);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--gray-950);
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--white);
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.12), rgba(3, 7, 18, 0.82));
    cursor: pointer;
    z-index: 2;
}

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

.play-button {
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: var(--gray-950);
    background: var(--yellow-400);
    box-shadow: 0 24px 60px rgba(250, 204, 21, 0.28);
    font-size: 34px;
    cursor: pointer;
}

.video-error {
    display: none;
    padding: 14px 18px;
    color: #fee2e2;
    background: #7f1d1d;
    font-weight: 700;
}

.video-error.visible {
    display: block;
}

.detail-body {
    padding: 28px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--green-700);
    background: #ecfdf5;
    font-size: 13px;
    font-weight: 800;
}

.detail-body h2 {
    margin: 30px 0 12px;
    font-size: 24px;
}

.detail-body p {
    margin: 0 0 14px;
    color: var(--gray-700);
    font-size: 16px;
    line-height: 1.9;
}

.review-box {
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f0fdf4, #fefce8);
}

.side-card {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.side-card h2,
.content-card h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

.related-link {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.related-link:hover {
    background: #f9fafb;
}

.related-link img {
    width: 94px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.related-link strong {
    display: block;
    margin-bottom: 6px;
    color: var(--gray-900);
    font-size: 14px;
    line-height: 1.35;
}

.related-link span {
    color: var(--gray-500);
    font-size: 12px;
}

.search-panel {
    padding: 24px;
    margin-bottom: 28px;
}

.search-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 14px;
}

.search-line input,
.search-line select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    outline: none;
    font: inherit;
    background: var(--white);
}

.search-line input:focus,
.search-line select:focus {
    border-color: var(--green-500);
}

.search-status {
    margin-top: 14px;
    color: var(--gray-500);
    font-weight: 700;
}

.content-card {
    padding: 26px;
}

.text-columns {
    columns: 2 320px;
    column-gap: 36px;
    color: var(--gray-700);
    line-height: 1.9;
}

.site-footer {
    margin-top: 64px;
    color: #d1fae5;
    background: linear-gradient(90deg, var(--green-900), var(--green-800));
}

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 28px;
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
    gap: 34px;
}

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

.footer-shell p {
    max-width: 520px;
    margin: 12px 0 0;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
}

.footer-links a:hover {
    color: var(--yellow-400);
}

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    color: rgba(209, 250, 229, 0.82);
    font-size: 13px;
}

@media (max-width: 980px) {
    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border-radius: 0 0 18px 18px;
        background: var(--green-800);
        box-shadow: var(--shadow-soft);
    }

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

    .main-nav a {
        padding: 13px 12px;
        border-radius: 12px;
    }

    .hero {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 36px 0 92px;
        text-align: center;
    }

    .hero-copy {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }

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

    .stats-grid,
    .movie-grid,
    .category-grid,
    .ranking-list,
    .detail-layout,
    .footer-shell {
        grid-template-columns: 1fr 1fr;
    }

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

    .side-card {
        position: static;
    }
}

@media (max-width: 640px) {
    .brand-text {
        font-size: 18px;
    }

    .hero {
        min-height: 760px;
    }

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

    .stats-grid,
    .movie-grid,
    .category-grid,
    .ranking-list,
    .footer-shell,
    .search-line {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 46px 82px 1fr;
        gap: 10px;
    }

    .ranking-item img {
        width: 82px;
        height: 58px;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .detail-body {
        padding: 22px;
    }
}
