/*
    Static movie site stylesheet.
    Visual system follows the uploaded app: emerald gradients, large Hero cover,
    rounded white cards, soft shadows, responsive grids, and hover elevation.
*/

:root {
    --emerald-950: #022c22;
    --emerald-900: #064e3b;
    --emerald-800: #065f46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --emerald-100: #d1fae5;
    --cyan-900: #164e63;
    --cyan-700: #0e7490;
    --blue-600: #2563eb;
    --amber-500: #f59e0b;
    --rose-500: #f43f5e;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.14);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
}

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: var(--white);
    background: linear-gradient(90deg, var(--emerald-800), var(--emerald-700), var(--cyan-700));
    box-shadow: 0 12px 30px rgba(6, 95, 70, 0.22);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--emerald-900);
    background: linear-gradient(135deg, #ecfdf5, #a7f3d0);
    box-shadow: inset 0 -4px 10px rgba(6, 95, 70, 0.16);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-text strong {
    font-size: 1.35rem;
    letter-spacing: 0.02em;
}

.brand-text small {
    margin-top: 4px;
    color: #bbf7d0;
    font-size: 0.78rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    position: relative;
    font-weight: 650;
    color: rgba(255, 255, 255, 0.88);
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 3px;
    border-radius: 999px;
    background: #bbf7d0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: var(--white);
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
}

.mobile-nav-link.is-active,
.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--white);
    background: var(--gray-950);
}

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

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

.hero-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(720px, 100%);
    padding: 68px 0;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 16px;
    border-radius: 999px;
    color: var(--white);
    background: var(--emerald-500);
    font-size: 0.88rem;
    font-weight: 750;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(2.45rem, 6vw, 4.75rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 22px 0 0;
    max-width: 660px;
    color: #e5e7eb;
    font-size: clamp(1.05rem, 2vw, 1.32rem);
    line-height: 1.75;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 30px;
}

.hero-meta span,
.info-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.9);
}

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

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

.button-primary {
    color: var(--white);
    background: var(--emerald-500);
    box-shadow: 0 14px 30px rgba(16, 185, 129, 0.28);
}

.button-primary:hover,
.button-light:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.button-secondary {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

.button-light {
    color: var(--emerald-800);
    background: var(--white);
}

.hero-mini-list {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 38px;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4, 92px);
    gap: 12px;
}

.hero-mini-list a {
    position: relative;
    overflow: hidden;
    height: 124px;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-mini-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.hero-mini-list a:hover img {
    transform: scale(1.08);
}

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

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

.stat-card {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.stat-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--emerald-600);
    font-size: 2.1rem;
}

.stat-card span {
    color: var(--gray-600);
}

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

.section-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    line-height: 1.12;
}

.section-heading p {
    margin: 0;
    color: var(--gray-600);
}

.section-icon {
    font-size: 2.35rem;
}

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    margin: 0;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--gray-200);
}

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

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

.poster-pill {
    position: absolute;
    top: 10px;
    right: 10px;
    max-width: calc(100% - 20px);
    padding: 4px 8px;
    border-radius: 8px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.7);
    font-size: 0.75rem;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.42);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.movie-card-body h3 {
    margin: 0;
    min-height: 2.7em;
    color: var(--gray-900);
    font-size: 0.96rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-card-body p {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.82rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta,
.meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--gray-500);
    font-size: 0.78rem;
}

.category-band {
    padding: 66px 0;
    color: var(--white);
    background: linear-gradient(90deg, var(--emerald-900), var(--emerald-800), var(--cyan-900));
}

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

.category-box,
.type-box {
    position: relative;
    overflow: hidden;
    min-height: 158px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.category-box:hover,
.type-box:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.18);
}

.category-emoji,
.type-emoji {
    display: block;
    margin-bottom: 12px;
    font-size: 2.2rem;
}

.category-box h3,
.type-box h3 {
    margin: 0 0 8px;
    font-size: 1.22rem;
}

.category-box p,
.type-box p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

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

.movie-card-horizontal {
    flex-direction: row;
    min-height: 190px;
}

.horizontal-cover {
    position: relative;
    flex: 0 0 150px;
    margin: 0;
    overflow: hidden;
    background: var(--gray-200);
}

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

.horizontal-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 20px;
}

.horizontal-content h3 {
    margin: 0;
    color: var(--gray-900);
    font-size: 1.15rem;
}

.horizontal-content p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 850;
}

.page-hero {
    padding: 64px 0;
    color: var(--white);
    background: linear-gradient(90deg, var(--emerald-900), var(--emerald-700), var(--cyan-700));
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #ccfbf1;
    font-size: 1.05rem;
    line-height: 1.75;
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 26px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.search-input,
.filter-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    padding: 0 16px;
    color: var(--gray-800);
    background: var(--gray-50);
    outline: none;
}

.search-input:focus,
.filter-select:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.13);
}

.count-label {
    color: var(--gray-600);
    white-space: nowrap;
}

.pill-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.pill-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--gray-700);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: color 0.2s ease, background 0.2s ease;
}

.pill-link:hover,
.pill-link.is-active {
    color: var(--white);
    background: var(--emerald-600);
}

.empty-state {
    display: none;
    padding: 54px 20px;
    border-radius: var(--radius-lg);
    color: var(--gray-600);
    background: var(--white);
    box-shadow: var(--shadow-md);
    text-align: center;
}

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

.player-section {
    padding: 24px 0;
    background: #000000;
}

.video-shell {
    position: relative;
    overflow: hidden;
    max-width: 980px;
    margin: 0 auto;
    border-radius: var(--radius-md);
    background: #000000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.video-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-start-button {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(16, 185, 129, 0.92);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.32);
    transform: translate(-50%, -50%);
}

.video-shell.is-playing .video-start-button {
    display: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
    gap: 28px;
    padding: 38px 0 64px;
}

.panel {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.detail-main {
    padding: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--gray-500);
    font-size: 0.9rem;
}

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

.detail-title {
    margin: 0 0 18px;
    color: var(--gray-900);
    font-size: clamp(1.85rem, 4vw, 3rem);
    line-height: 1.12;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.detail-meta span,
.tag-link {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--emerald-700);
    background: var(--emerald-100);
    font-size: 0.9rem;
}

.detail-block {
    margin-top: 28px;
}

.detail-block h2,
.sidebar h2 {
    margin: 0 0 14px;
    color: var(--gray-900);
    font-size: 1.25rem;
}

.detail-block p {
    margin: 0 0 14px;
    color: var(--gray-700);
    line-height: 1.85;
}

.info-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.info-table div {
    padding: 14px;
    border-radius: 12px;
    background: var(--gray-50);
}

.info-table span {
    display: block;
    margin-bottom: 4px;
    color: var(--gray-500);
    font-size: 0.85rem;
}

.info-table strong {
    color: var(--gray-900);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-link {
    color: var(--gray-700);
    background: var(--gray-100);
}

.tag-link:hover {
    color: var(--emerald-700);
    background: var(--emerald-100);
}

.sidebar {
    align-self: start;
    padding: 20px;
}

.small-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.small-card:hover {
    background: var(--gray-50);
}

.small-card img {
    flex: 0 0 72px;
    width: 72px;
    height: 96px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--gray-200);
}

.small-card span {
    display: grid;
    align-content: center;
    gap: 8px;
    min-width: 0;
}

.small-card strong {
    color: var(--gray-900);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.small-card em {
    color: var(--gray-500);
    font-style: normal;
    font-size: 0.82rem;
}

.related-section {
    padding-bottom: 64px;
}

.site-footer {
    color: #d1fae5;
    background: linear-gradient(90deg, var(--emerald-950), var(--emerald-900));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--white);
    font-size: 1.45rem;
    font-weight: 850;
}

.site-footer p {
    max-width: 560px;
    margin: 0;
    line-height: 1.8;
}

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

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 9px 0;
    color: #a7f3d0;
}

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

.footer-bottom {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

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

    .hero-mini-list {
        display: none;
    }

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

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

    .mobile-menu-button {
        display: inline-block;
    }

    .hero {
        min-height: 540px;
    }

    .stats-grid,
    .category-grid,
    .type-grid,
    .feature-list,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .toolbar {
        grid-template-columns: 1fr;
    }

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

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

    .brand-text strong {
        font-size: 1.1rem;
    }

    .hero {
        min-height: 520px;
    }

    .hero-content {
        padding: 48px 0;
    }

    .stats-grid,
    .category-grid,
    .type-grid,
    .feature-list,
    .footer-grid,
    .info-table {
        grid-template-columns: 1fr;
    }

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

    .movie-card-horizontal {
        min-height: 154px;
    }

    .horizontal-cover {
        flex-basis: 112px;
    }

    .horizontal-content {
        padding: 14px;
    }

    .horizontal-content p {
        -webkit-line-clamp: 1;
    }

    .video-start-button {
        min-height: 50px;
        padding: 0 18px;
    }
}
