:root {
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0d9488;
    --lime: #a3e635;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--gray-50), #ffffff 42%, var(--gray-50));
    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,
video {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.nav-bar {
    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 {
    font-size: 1.45rem;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark,
.footer-brand span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 10px 22px rgba(5, 150, 105, 0.28);
    font-size: 0.86rem;
}

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

.nav-link {
    color: var(--gray-700);
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--emerald);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    color: var(--gray-700);
    background: white;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--gray-200);
    padding: 12px 16px 18px;
    background: white;
}

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

.mobile-link {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--gray-700);
    font-weight: 650;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: white;
    background: var(--gray-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.78) 42%, rgba(5, 150, 105, 0.32)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 180px;
    background: linear-gradient(0deg, rgba(249, 250, 251, 1), rgba(249, 250, 251, 0));
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.62fr);
    align-items: center;
    gap: 56px;
    padding: 72px 0 104px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 13px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #dcfce7;
    background: rgba(5, 150, 105, 0.2);
    backdrop-filter: blur(10px);
    font-size: 0.92rem;
    font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(2.45rem, 6vw, 4.7rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy p {
    margin: 0 0 26px;
    max-width: 650px;
    color: #e5e7eb;
    font-size: 1.08rem;
}

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

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

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 16px 32px rgba(5, 150, 105, 0.28);
}

.btn-secondary {
    color: var(--gray-900);
    background: white;
    box-shadow: var(--soft-shadow);
}

.btn-ghost {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(360px, 100%);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
    transform: rotate(1.2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #d1fae5, #f3f4f6);
}

.hero-poster span {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 12px 14px;
    border-radius: 18px;
    color: white;
    background: rgba(17, 24, 39, 0.76);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

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

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

.hero-dots button.active {
    width: 34px;
    background: white;
}

.section {
    padding: 64px 0;
}

.section-tight {
    padding: 36px 0;
}

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

.section-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--emerald);
    font-size: 0.92rem;
    font-weight: 800;
}

.section-title {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(1.85rem, 4vw, 2.7rem);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.section-desc {
    margin: 8px 0 0;
    max-width: 760px;
    color: var(--gray-600);
}

.search-band {
    margin-top: -42px;
    position: relative;
    z-index: 8;
}

.search-panel {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, minmax(140px, 0.38fr));
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(5, 150, 105, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

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

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius-2xl);
    color: var(--gray-900);
    background: white;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(5, 150, 105, 0.25);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #d1fae5, #f3f4f6);
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge,
.poster-score {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(17, 24, 39, 0.78);
    backdrop-filter: blur(8px);
}

.poster-badge {
    left: 10px;
    top: 10px;
}

.poster-score {
    right: 10px;
    bottom: 10px;
    color: #fef3c7;
}

.movie-card-body {
    display: grid;
    gap: 9px;
    padding: 16px;
}

.movie-title {
    color: var(--gray-900);
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.35;
}

.movie-desc {
    color: var(--gray-600);
    font-size: 0.92rem;
}

.movie-meta {
    color: var(--gray-500);
    font-size: 0.82rem;
}

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

.tag-row span,
.detail-tags span,
.hero-tags span {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--emerald-dark);
    background: #d1fae5;
    font-size: 0.76rem;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    min-height: 188px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 22px;
    border-radius: var(--radius-2xl);
    color: white;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: var(--soft-shadow);
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #047857, #65a30d);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -40px;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.category-card strong {
    position: relative;
    z-index: 1;
    font-size: 1.36rem;
}

.category-card p,
.category-card span {
    position: relative;
    z-index: 1;
    margin: 8px 0 0;
    color: #ecfdf5;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.65fr);
    gap: 26px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 74px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 18px;
    background: white;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(3px);
    border-color: rgba(5, 150, 105, 0.32);
}

.rank-no {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    font-weight: 900;
}

.rank-item img {
    width: 74px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--gray-100);
}

.rank-copy {
    display: grid;
    min-width: 0;
}

.rank-copy strong {
    color: var(--gray-900);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-copy em {
    color: var(--gray-500);
    font-style: normal;
    font-size: 0.88rem;
}

.rank-score {
    color: #d97706;
    font-weight: 900;
}

.page-hero {
    padding: 62px 0;
    color: white;
    background: radial-gradient(circle at 20% 20%, rgba(163, 230, 53, 0.22), transparent 28%), linear-gradient(135deg, var(--emerald), var(--teal));
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: #ecfdf5;
    font-size: 1.05rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 24px 0;
    color: var(--gray-500);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: var(--emerald-dark);
    font-weight: 750;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.62fr);
    gap: 28px;
    align-items: start;
    padding-bottom: 58px;
}

.player-card,
.detail-card,
.content-card {
    overflow: hidden;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-2xl);
    background: white;
    box-shadow: var(--soft-shadow);
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    background: var(--gray-900);
}

.player-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.38), rgba(5, 150, 105, 0.22));
}

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

.play-orb {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 18px 45px rgba(5, 150, 105, 0.4);
    font-size: 2rem;
    transform: translateZ(0);
}

.player-caption,
.detail-card,
.content-card {
    padding: 22px;
}

.player-caption h1 {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: -0.035em;
}

.player-caption p,
.content-card p,
.detail-card p {
    color: var(--gray-600);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: var(--gray-100);
}

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

.detail-meta {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.detail-meta strong {
    color: var(--gray-900);
}

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

.article-stack {
    display: grid;
    gap: 22px;
}

.content-card h2,
.detail-card h2 {
    margin: 0 0 12px;
    font-size: 1.35rem;
}

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

.no-results {
    display: none;
    padding: 28px;
    border-radius: 18px;
    text-align: center;
    color: var(--gray-600);
    background: white;
    box-shadow: var(--soft-shadow);
}

.no-results.show {
    display: block;
}

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

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

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

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

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

    .hero-slider,
    .hero-inner {
        min-height: auto;
    }

    .hero-inner {
        padding: 54px 0 96px;
    }

    .hero-poster {
        justify-self: start;
        width: min(280px, 72vw);
    }

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

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

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

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

    .brand {
        font-size: 1.16rem;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 2.35rem;
    }

    .movie-grid,
    .movie-grid.six,
    .related-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 36px 58px 1fr;
    }

    .rank-score {
        display: none;
    }

    .rank-item img {
        width: 58px;
        height: 76px;
    }
}
