:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --emerald: #10b981;
    --emerald-2: #059669;
    --teal: #14b8a6;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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: #ffffff;
    background: linear-gradient(90deg, #1e293b, #0f172a);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #06251b;
    background: linear-gradient(135deg, #34d399, #14b8a6);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.35);
}

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

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

.brand-text small {
    margin-top: 3px;
    color: #cbd5e1;
    font-size: 0.76rem;
}

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

.nav-link,
.mobile-nav-link {
    color: #e2e8f0;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #34d399;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 99px;
}

.mobile-menu {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu.open {
    display: grid;
    gap: 12px;
}

.hero {
    position: relative;
    min-height: 640px;
    color: #ffffff;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.08);
}

.hero-bg::after,
.detail-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background: radial-gradient(circle at 24% 24%, rgba(16, 185, 129, 0.35), transparent 32%), linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.9));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    gap: 54px;
    align-items: center;
    min-height: 640px;
    padding: 80px 0 118px;
}

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

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #99f6e4;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

.hero-copy h1 {
    max-width: 820px;
    font-size: clamp(2.6rem, 6vw, 5.6rem);
}

.hero-copy h2 {
    margin-top: 18px;
    color: #d1fae5;
    font-size: clamp(1.6rem, 3.8vw, 3rem);
}

.hero-copy p {
    max-width: 680px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: clamp(1.02rem, 2vw, 1.28rem);
}

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

.hero-tags {
    margin: 24px 0 0;
}

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

.hero-tags span {
    padding: 8px 12px;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(167, 243, 208, 0.24);
}

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

.btn {
    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;
}

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

.btn-primary {
    color: #042f24;
    background: linear-gradient(135deg, #34d399, #2dd4bf);
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.32);
}

.btn-outline {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.hero-poster {
    position: relative;
    display: block;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
    background: #1e293b;
}

.hero-controls {
    position: absolute;
    right: 0;
    bottom: 40px;
    left: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 36px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

.hero-dot.active {
    background: #34d399;
}

.hero-arrows {
    display: flex;
    gap: 12px;
}

.hero-arrows button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
}

.search-band {
    position: relative;
    z-index: 6;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    margin-top: -42px;
    padding: 24px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-band strong {
    display: block;
    font-size: 1.2rem;
}

.search-band span {
    color: var(--muted);
}

.inline-search,
.filter-bar {
    display: flex;
    gap: 10px;
}

.inline-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--soft);
    border-radius: 14px;
    color: var(--text);
    background: #ffffff;
    outline: none;
}

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

.inline-search button,
.filter-bar button {
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: var(--emerald-2);
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

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

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

.section-head h2 {
    margin: 0 0 4px;
    color: #1e293b;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    line-height: 1.1;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.section-link,
.text-link {
    color: var(--emerald-2);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

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

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

.year-badge,
.type-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.78rem;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
}

.year-badge {
    top: 10px;
    right: 10px;
}

.type-badge {
    right: 10px;
    bottom: 10px;
    background: rgba(5, 150, 105, 0.88);
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 34px;
    color: #042f24;
    background: #34d399;
}

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

.movie-title {
    display: -webkit-box;
    min-height: 2.6em;
    overflow: hidden;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-desc {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 10px 0 10px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    color: #64748b;
    font-size: 0.82rem;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    color: #047857;
    background: #d1fae5;
    font-size: 0.75rem;
}

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

.is-large .movie-title {
    font-size: 1.2rem;
}

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

.category-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 22px;
    overflow: hidden;
    border-radius: 22px;
    color: #ffffff;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.18);
}

.category-card span {
    color: #99f6e4;
    font-weight: 900;
    font-size: 1.25rem;
}

.category-card strong {
    font-size: 0.94rem;
    line-height: 1.5;
}

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

.page-main {
    min-height: 70vh;
}

.page-hero {
    position: relative;
    margin-top: 34px;
    padding: 56px;
    overflow: hidden;
    border-radius: 32px;
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b, #065f46);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 860px;
    font-size: clamp(2rem, 5vw, 4.4rem);
}

.page-hero p {
    max-width: 720px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 1.08rem;
}

.compact-hero {
    background: radial-gradient(circle at 22% 24%, rgba(16, 185, 129, 0.34), transparent 30%), linear-gradient(135deg, #0f172a, #1e293b 52%, #064e3b);
}

.category-hero {
    background: radial-gradient(circle at 75% 15%, rgba(45, 212, 191, 0.34), transparent 26%), linear-gradient(135deg, #1e293b, #065f46);
}

.ranking-hero {
    background: radial-gradient(circle at 72% 12%, rgba(251, 191, 36, 0.26), transparent 24%), linear-gradient(135deg, #111827, #334155 55%, #065f46);
}

.filter-bar {
    flex-wrap: wrap;
    margin-top: 28px;
}

.filter-bar input {
    flex: 1 1 320px;
}

.filter-bar select {
    flex: 0 1 180px;
}

.empty-state {
    display: none;
    margin: 28px 0 0;
    padding: 22px;
    border: 1px dashed var(--soft);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
}

.empty-state.show {
    display: block;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    align-items: center;
    padding: 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.category-thumb-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-thumb-stack img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 1.4rem;
}

.category-overview-card p {
    margin: 0 0 16px;
    color: var(--muted);
}

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

.top-rank-card {
    min-height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 26px;
    border-radius: 26px;
    color: #ffffff;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

.top-rank-card span {
    width: max-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #042f24;
    background: #34d399;
    font-weight: 900;
}

.top-rank-card strong {
    font-size: 1.6rem;
    line-height: 1.2;
}

.top-rank-card em {
    margin-top: 8px;
    color: #d1fae5;
    font-style: normal;
}

.detail-main {
    background: #f8fafc;
}

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

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 38px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 30px;
    color: #cbd5e1;
    font-weight: 700;
}

.breadcrumb a {
    color: #99f6e4;
}

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

.detail-cover {
    margin: 0;
    padding: 10px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    background: #1e293b;
}

.detail-copy h1 {
    max-width: 920px;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.detail-one-line {
    max-width: 880px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 1.16rem;
}

.detail-meta {
    margin-top: 22px;
}

.detail-meta span {
    padding: 7px 12px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-tags {
    margin-bottom: 28px;
}

.player-section {
    padding-top: 54px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
}

.player-card video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    text-align: center;
}

.player-card.is-playing .play-layer {
    display: none;
}

.play-button {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    padding-left: 6px;
    border-radius: 50%;
    color: #042f24;
    background: linear-gradient(135deg, #34d399, #2dd4bf);
    box-shadow: 0 24px 52px rgba(16, 185, 129, 0.38);
    font-size: 2rem;
}

.play-layer strong {
    max-width: min(680px, 88%);
    font-size: clamp(1.3rem, 3vw, 2.3rem);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding-top: 42px;
}

.detail-article,
.detail-side {
    padding: 30px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    color: #1e293b;
    font-size: 1.45rem;
}

.detail-article p {
    margin: 0 0 24px;
    color: #334155;
    font-size: 1.04rem;
}

.detail-side dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.detail-side div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    font-weight: 800;
}

.site-footer {
    margin-top: 70px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 38px;
    padding: 46px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: #94a3b8;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    text-align: center;
}

.hidden-card {
    display: none !important;
}

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

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

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 58px;
    }

    .hero-poster {
        width: min(260px, 72vw);
        transform: none;
    }

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

    .inline-search,
    .filter-bar {
        flex-direction: column;
    }

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

    .category-grid,
    .category-overview-grid,
    .top-rank-grid {
        grid-template-columns: 1fr;
    }

    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 38px 24px;
        border-radius: 24px;
    }

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

    .detail-cover {
        width: min(300px, 76vw);
    }
}

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

    .header-inner {
        min-height: 64px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .brand-text small {
        display: none;
    }

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

    .hero-controls {
        bottom: 22px;
    }

    .hero-arrows {
        display: none;
    }

    .search-band {
        margin-top: -28px;
        padding: 18px;
    }

    .movie-grid,
    .large-grid,
    .ranking-grid {
        grid-template-columns: 1fr;
    }

    .movie-card {
        display: grid;
        grid-template-columns: 118px 1fr;
    }

    .poster-link img {
        height: 100%;
        min-height: 176px;
    }

    .is-large {
        display: block;
    }

    .detail-side div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}
