* {
    box-sizing: border-box;
}

:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;
    --green-900: #14532d;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.09);
    --shadow-xl: 0 20px 45px rgba(15, 23, 42, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, var(--green-50), #ffffff 420px);
    color: var(--gray-900);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

main {
    min-height: 70vh;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--green-600), var(--green-500));
    box-shadow: 0 8px 24px rgba(22, 101, 52, 0.24);
}

.top-nav {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
    color: #ffffff;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    font-size: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: #dcfce7;
    transform: translateY(-1px);
}

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

.nav-search input {
    width: 210px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    outline: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.nav-search input::placeholder {
    color: rgba(240, 253, 244, 0.86);
}

.nav-search button,
.primary-button,
.ghost-button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
    padding: 9px 16px;
    color: var(--green-700);
    background: #ffffff;
}

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

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 24px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffffff;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.08;
    font-weight: 900;
    text-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags {
    margin-bottom: 18px;
}

.hero-tags span,
.detail-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 700;
}

.hero-tags span {
    padding: 5px 14px;
    background: var(--green-600);
    color: #ffffff;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0 0 32px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 26px;
}

.primary-button {
    color: #ffffff;
    background: var(--green-600);
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.32);
}

.primary-button:hover {
    background: var(--green-700);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

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

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

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

.stats-band {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 0;
    padding: 28px;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--green-600), var(--green-500));
    box-shadow: var(--shadow-md);
}

.stats-band div {
    text-align: center;
}

.stats-band strong {
    display: block;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
}

.stats-band span {
    display: block;
    margin-top: 8px;
    color: var(--green-100);
}

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

.content-section {
    padding: 54px 0 0;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding-top: 54px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.section-heading h2,
.sub-title {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 900;
}

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

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

.compact-grid {
    gap: 20px;
}

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

.movie-card:hover .movie-cover img,
.ranking-row:hover .ranking-cover img {
    transform: scale(1.06);
}

.play-mark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 44px;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    background: rgba(0, 0, 0, 0.3);
}

.cover-badge,
.cover-duration {
    position: absolute;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.cover-badge {
    top: 10px;
    left: 10px;
    background: var(--green-600);
}

.cover-duration {
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.72);
}

.movie-card-body {
    padding: 18px;
}

.movie-card-body h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-body h3 a:hover,
.ranking-info h2 a:hover {
    color: var(--green-600);
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--gray-500);
    font-size: 13px;
}

.tag-list {
    margin-top: 14px;
}

.tag-list span {
    padding: 3px 9px;
    color: var(--green-700);
    background: var(--green-100);
    font-size: 12px;
}

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

.category-tile,
.category-overview-card {
    display: block;
    padding: 24px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.category-tile strong,
.category-overview-main strong {
    display: block;
    color: var(--gray-900);
    font-size: 21px;
    font-weight: 900;
}

.category-tile span,
.category-overview-main span {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    color: var(--green-700);
    background: var(--green-100);
    font-size: 13px;
    font-weight: 800;
}

.category-tile p,
.category-overview-main p {
    margin: 14px 0 0;
    color: var(--gray-600);
}

.category-samples {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.category-samples a {
    color: var(--green-700);
    font-weight: 700;
}

.rank-panel {
    align-self: start;
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.rank-panel ol {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-200);
}

.rank-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.rank-number,
.ranking-position {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--green-600);
    font-weight: 900;
}

.rank-number {
    width: 32px;
    height: 32px;
    border-radius: 999px;
}

.rank-item a {
    font-weight: 800;
}

.rank-item span:not(.rank-number) {
    color: var(--gray-500);
    font-size: 13px;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(90deg, var(--green-600), var(--green-500));
}

.page-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.12;
    font-weight: 900;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--green-100);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    font-weight: 700;
}

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

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
    padding: 20px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    min-width: 240px;
    color: var(--gray-700);
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    outline: none;
    color: var(--gray-900);
    background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.filter-count {
    margin-left: auto;
    color: var(--gray-600);
    font-weight: 700;
}

.filter-count strong {
    color: var(--green-600);
}

.ranking-list {
    display: grid;
    gap: 16px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 52px 136px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.ranking-position {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

.ranking-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: var(--gray-100);
}

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

.ranking-info h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.ranking-info p {
    margin: 0 0 10px;
    color: var(--gray-600);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px);
    transform: scale(1.08);
    opacity: 0.52;
}

.detail-bg span {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.56));
}

.detail-hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: var(--gray-100);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.36);
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
    font-weight: 900;
}

.detail-copy p {
    max-width: 780px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

.detail-section {
    padding-top: 38px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow-xl);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.48));
    transition: opacity 0.2s ease;
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.player-button {
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--green-600);
    box-shadow: 0 18px 40px rgba(22, 163, 74, 0.38);
    cursor: pointer;
    font-size: 38px;
    line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-button:hover {
    transform: scale(1.08);
    background: var(--green-700);
}

.player-message {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 18px;
    margin: 0;
    padding: 12px 16px;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.65);
    text-align: center;
}

.detail-article {
    padding: 28px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.detail-article h2 {
    margin: 0 0 14px;
    color: var(--gray-900);
    font-size: 26px;
}

.detail-article p {
    margin: 0 0 22px;
    color: var(--gray-700);
    font-size: 17px;
}

.detail-tags span {
    padding: 6px 12px;
    color: var(--green-700);
    background: var(--green-100);
}

.sitemap-category-list,
.sitemap-movie-list {
    display: grid;
    gap: 12px;
    padding: 0;
    list-style: none;
}

.sitemap-category-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 16px 0 34px;
}

.sitemap-category-list a,
.sitemap-movie-list a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
    font-weight: 800;
}

.sitemap-category-list span,
.sitemap-movie-list span {
    color: var(--gray-500);
    font-weight: 600;
}

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

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

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

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.site-footer p,
.site-footer li {
    color: var(--green-100);
}

.site-footer ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-small {
    margin-top: 18px;
    font-size: 13px;
}

[data-movie-card].is-hidden {
    display: none;
}

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

    .split-section,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .rank-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 780px) {
    .top-nav {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        order: 4;
        padding: 14px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-search {
        flex-basis: 100%;
        order: 5;
        display: none;
        padding-bottom: 8px;
    }

    .nav-links.is-open + .nav-search,
    .top-nav:has(.nav-links.is-open) .nav-search {
        display: flex;
    }

    .nav-search input {
        flex: 1;
        width: auto;
    }

    .hero-carousel {
        height: 78vh;
        min-height: 560px;
    }

    .hero-layer {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.82));
    }

    .stats-band,
    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .sitemap-category-list,
    .sitemap-movie-list,
    .split-section,
    .footer-grid,
    .detail-layout,
    .ranking-row {
        grid-template-columns: 1fr;
    }

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

    .ranking-row {
        align-items: start;
    }

    .ranking-cover {
        width: 100%;
    }

    .filter-panel {
        align-items: stretch;
    }

    .filter-panel label,
    .filter-count {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }
}

@media (max-width: 520px) {
    .brand,
    .footer-brand {
        font-size: 19px;
    }

    .hero-content h1,
    .hero-content h2,
    .detail-copy h1 {
        font-size: 38px;
    }

    .hero-stats,
    .hero-actions,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-band {
        grid-template-columns: 1fr 1fr;
        padding: 22px;
    }

    .content-section,
    .split-section {
        padding-top: 38px;
    }

    .movie-card-body p {
        min-height: auto;
    }
}
