:root {
    --green: #16a34a;
    --emerald: #047857;
    --teal: #0f766e;
    --yellow: #facc15;
    --dark: #111827;
    --muted: #6b7280;
    --light: #f9fafb;
    --card: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 20px 50px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--dark);
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 42%, #fefce8 100%);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #16a34a, #047857);
    box-shadow: 0 10px 28px rgba(6, 78, 59, 0.24);
}

.nav-wrap {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    font-size: 30px;
    line-height: 1;
}

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

.nav-links a,
.mobile-panel a {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
    color: var(--yellow);
}

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

.nav-cta:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.28);
}

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

.mobile-panel {
    display: none;
    padding: 10px 24px 18px;
    background: #065f46;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

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

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(90deg, #16a34a, #10b981, #0f766e);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-media {
    position: absolute;
    inset: 0;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 20%, rgba(250, 204, 21, 0.26), transparent 28%),
        linear-gradient(90deg, rgba(6, 78, 59, 0.93) 0%, rgba(6, 95, 70, 0.76) 45%, rgba(0, 0, 0, 0.42) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 560px;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 360px;
    align-items: center;
    gap: 42px;
    padding: 72px 0 92px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    max-width: 840px;
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
}

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

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #111827;
    background: var(--yellow);
    box-shadow: 0 16px 36px rgba(250, 204, 21, 0.26);
}

.btn-primary:hover {
    background: #fde047;
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
}

.hero-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
}

.hero-card img {
    width: 100%;
    height: 430px;
    object-fit: cover;
}

.hero-card-caption {
    padding: 18px;
}

.hero-card-caption strong {
    display: block;
    margin-bottom: 6px;
    font-size: 20px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--yellow);
}

.wave-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 96px;
    background: linear-gradient(0deg, #ffffff 0%, rgba(255, 255, 255, 0));
}

.section {
    padding: 56px 0;
}

.section.tight {
    padding-top: 28px;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--green);
    font-size: 14px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-desc,
.page-title p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

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

.stat-card {
    min-height: 136px;
    padding: 24px;
    border-radius: 24px;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.stat-card strong {
    display: block;
    margin: 4px 0;
    font-size: 34px;
    line-height: 1;
}

.stat-card span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.pink {
    background: linear-gradient(135deg, #ec4899, #e11d48);
}

.blue {
    background: linear-gradient(135deg, #3b82f6, #0891b2);
}

.orange {
    background: linear-gradient(135deg, #f97316, #d97706);
}

.green {
    background: linear-gradient(135deg, #22c55e, #047857);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: #86efac;
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #064e3b, #111827);
}

.poster.wide {
    aspect-ratio: 16 / 9;
}

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

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

.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    color: #065f46;
    background: #dcfce7;
    font-size: 12px;
    font-weight: 800;
}

.poster .badge {
    position: absolute;
    top: 12px;
    left: 12px;
}

.score {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #111827;
    background: #facc15;
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 17px;
}

.card-title {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 8px;
    overflow: hidden;
    color: #111827;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 850;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-title a:hover {
    color: var(--green);
}

.card-desc {
    display: -webkit-box;
    min-height: 68px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

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

.meta-row {
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 13px;
}

.tag {
    padding: 5px 9px;
    border-radius: 10px;
    color: #047857;
    background: #ecfdf5;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
    border: 1px solid #d1fae5;
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff, #ecfdf5);
    box-shadow: 0 12px 30px rgba(6, 95, 70, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.75;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 66px 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
}

.rank-num {
    color: #047857;
    font-size: 28px;
    font-weight: 950;
    text-align: center;
}

.rank-thumb {
    width: 92px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #064e3b;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h2,
.rank-info h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 900;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 220px 180px;
    gap: 14px;
    margin: 26px 0 34px;
    padding: 18px;
    border: 1px solid #d1fae5;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 30px rgba(6, 95, 70, 0.08);
    backdrop-filter: blur(14px);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    color: #111827;
    background: #ffffff;
    outline: 0;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.page-hero {
    padding: 70px 0 54px;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 10%, rgba(250, 204, 21, 0.24), transparent 30%),
        linear-gradient(90deg, #16a34a, #047857, #0f766e);
}

.page-title h1 {
    max-width: 900px;
}

.page-title p {
    color: #dcfce7;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #bbf7d0;
    font-size: 14px;
}

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

.detail-card,
.info-panel {
    border: 1px solid var(--border);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
}

.detail-card {
    overflow: hidden;
}

.video-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.54));
    cursor: pointer;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    color: #111827;
    background: #facc15;
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(250, 204, 21, 0.3);
    transition: transform 0.22s ease;
}

.play-overlay:hover span {
    transform: scale(1.08);
}

.detail-body {
    padding: 28px;
}

.detail-body h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-body h2,
.info-panel h2 {
    margin: 28px 0 12px;
    font-size: 24px;
    font-weight: 900;
}

.detail-body p {
    margin: 0 0 14px;
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

.info-panel {
    padding: 22px;
}

.info-poster {
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 22px;
    aspect-ratio: 2 / 3;
    background: #064e3b;
}

.info-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.info-list dt {
    color: #6b7280;
    font-weight: 800;
}

.info-list dd {
    margin: 0;
    color: #111827;
}

.footer {
    margin-top: 56px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937, #111827);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 28px;
}

.footer h2,
.footer h3 {
    margin: 0 0 14px;
    color: #facc15;
    font-size: 18px;
}

.footer p,
.footer li {
    margin: 0 0 8px;
    color: #9ca3af;
    line-height: 1.7;
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 30;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, #22c55e, #047857);
    box-shadow: 0 12px 24px rgba(6, 95, 70, 0.24);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeUp 0.85s ease both;
}

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

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

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

    .hero-card {
        display: none;
    }
}

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

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

    .hero,
    .hero-content {
        min-height: 520px;
    }

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

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

    .rank-item {
        grid-template-columns: 46px 76px minmax(0, 1fr);
    }

    .rank-item .btn {
        grid-column: 2 / -1;
        width: fit-content;
    }
}

@media (max-width: 560px) {
    .nav-wrap {
        padding: 0 16px;
    }

    .logo-text {
        font-size: 18px;
    }

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

    .hero-content {
        padding-top: 56px;
    }

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

    .stats-grid,
    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-body,
    .info-panel {
        padding: 20px;
    }

    .rank-item {
        grid-template-columns: 42px 70px minmax(0, 1fr);
        gap: 12px;
    }
}
