:root {
    --emerald: #10b981;
    --emerald-dark: #059669;
    --teal: #0d9488;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 14px 38px rgba(15, 23, 42, 0.13);
    --shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.22);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--slate-900);
    background: var(--slate-50);
    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;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--slate-900);
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 10px 26px rgba(16, 185, 129, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--slate-700);
    font-weight: 650;
}

.desktop-nav a,
.nav-dropdown > button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown > button:hover,
.desktop-nav a.active {
    color: var(--emerald-dark);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    right: 0;
    top: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 8px;
    width: 320px;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-dropdown-panel a {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--slate-50);
}

.nav-dropdown-panel a:hover {
    background: #ecfdf5;
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--slate-100);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-button span {
    width: 22px;
    height: 2px;
    background: var(--slate-700);
    border-radius: 99px;
}

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

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-nav a {
    padding: 12px;
    border-radius: 12px;
    background: var(--slate-50);
    font-weight: 650;
    color: var(--slate-700);
}

.hero-carousel {
    position: relative;
    height: 610px;
    overflow: hidden;
    background: var(--slate-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 25% 35%, rgba(16, 185, 129, 0.32), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.2)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.1) 55%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 104px;
}

.hero-copy {
    width: min(720px, 100%);
    color: var(--white);
}

.eyebrow {
    margin: 0 0 12px;
    color: #6ee7b7;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.06;
    letter-spacing: -0.05em;
    font-weight: 900;
    text-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

.hero-description {
    max-width: 640px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.quick-links a,
.search-panel button,
.hero-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-panel button,
.hero-search button {
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 18px 34px rgba(16, 185, 129, 0.28);
    border: 0;
    cursor: pointer;
}

.primary-button:hover,
.search-panel button:hover,
.hero-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(16, 185, 129, 0.36);
}

.ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100% - 1180px) / 2));
    bottom: 46px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 26px;
    width: min(620px, calc(100% - 32px));
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
    transform: translateX(-50%);
}

.hero-search input,
.search-panel input,
.filter-toolbar input,
.filter-toolbar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 0 14px;
    color: var(--slate-900);
    background: var(--white);
    outline: none;
}

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

.intro-panel {
    position: relative;
    margin-top: -34px;
    z-index: 3;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.intro-panel h1 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.04em;
}

.intro-panel p {
    margin: 0 0 20px;
    color: var(--slate-600);
}

.quick-links a {
    color: var(--emerald-dark);
    background: #ecfdf5;
}

.page-stack {
    display: grid;
    gap: 52px;
    padding: 56px 0;
}

.content-section {
    display: grid;
    gap: 24px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.24);
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 2px 0 0;
    color: var(--slate-500);
}

.section-row-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.section-more {
    color: var(--emerald-dark);
    font-weight: 800;
}

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap,
.horizontal-poster {
    position: relative;
    overflow: hidden;
    background: var(--slate-200);
}

.poster-wrap {
    aspect-ratio: 3 / 4;
}

.poster-wrap img,
.horizontal-poster img,
.poster-card img,
.detail-heading img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.year-badge,
.card-rank {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--white);
    background: var(--emerald);
    font-size: 12px;
    font-weight: 800;
}

.card-rank {
    left: 10px;
    right: auto;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.hover-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 42px;
    background: rgba(2, 6, 23, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .hover-play {
    opacity: 1;
}

.card-body {
    padding: 14px;
}

.card-body h3,
.horizontal-info h3 {
    margin: 0 0 7px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-meta-line,
.card-summary,
.horizontal-info p {
    margin: 0;
    color: var(--slate-500);
    font-size: 13px;
}

.card-summary {
    margin-top: 8px;
    color: var(--slate-600);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: stretch;
}

.horizontal-poster {
    min-height: 100px;
}

.horizontal-info {
    padding: 14px 16px;
}

.horizontal-info p:last-child {
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.inner-hero,
.detail-hero {
    padding: 70px 0;
    color: var(--white);
    background:
        radial-gradient(circle at 16% 10%, rgba(16, 185, 129, 0.28), transparent 32%),
        linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.inner-hero h1,
.detail-heading h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.inner-hero p,
.detail-heading p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #6ee7b7;
}

.categories-grid-section,
.toolbar-section {
    padding: 50px 0;
}

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

.category-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.category-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
    color: var(--slate-900);
    font-size: 24px;
    font-weight: 900;
}

.category-card-title b {
    padding: 7px 12px;
    color: var(--emerald-dark);
    border-radius: 999px;
    background: #ecfdf5;
    font-size: 14px;
}

.category-card p {
    color: var(--slate-600);
    margin: 0 0 18px;
}

.category-card ul,
.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-card li + li {
    border-top: 1px solid var(--slate-100);
}

.category-card li a {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 0;
    color: var(--slate-700);
}

.category-card li a:hover {
    color: var(--emerald-dark);
}

.filter-toolbar,
.search-panel {
    display: flex;
    gap: 12px;
    padding: 14px;
    margin-bottom: 28px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.filter-toolbar select {
    max-width: 180px;
}

.search-panel {
    width: min(720px, 100%);
    margin-top: 24px;
    margin-bottom: 0;
}

.search-panel input {
    flex: 1;
}

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

.detail-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 36px;
    align-items: end;
}

.detail-heading img {
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

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

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.video-player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.main-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.38)),
        radial-gradient(circle at center, rgba(16, 185, 129, 0.28), transparent 38%);
    cursor: pointer;
    z-index: 3;
}

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

.large-play {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 22px 48px rgba(16, 185, 129, 0.42);
    font-size: 34px;
    padding-left: 4px;
}

.player-title {
    font-size: 20px;
    font-weight: 900;
}

.player-message {
    min-height: 20px;
    color: rgba(255, 255, 255, 0.78);
}

.detail-card {
    padding: 26px;
}

.detail-card h2,
.side-card h2,
.story-block h2 {
    margin: 0 0 16px;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.chip-block {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.chip-block b {
    color: var(--slate-500);
}

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

.chips span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #047857;
    background: #d1fae5;
    font-weight: 700;
    font-size: 14px;
}

.chips.muted span {
    color: var(--slate-700);
    background: var(--slate-100);
}

.story-block {
    padding-top: 24px;
    border-top: 1px solid var(--slate-200);
}

.story-block + .story-block {
    margin-top: 24px;
}

.story-block p {
    margin: 0;
    color: var(--slate-700);
    font-size: 17px;
    line-height: 1.9;
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 22px;
}

.side-card {
    padding: 20px;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    margin-bottom: 16px;
}

.poster-card p {
    margin: 0;
    color: var(--slate-500);
}

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

.side-related-list .movie-card.horizontal {
    grid-template-columns: 106px minmax(0, 1fr);
    box-shadow: none;
    border: 1px solid var(--slate-100);
}

.side-related-list .horizontal-info p:last-child {
    display: none;
}

.more-section {
    padding-bottom: 60px;
}

.site-footer {
    color: var(--slate-300);
    background: var(--slate-900);
}

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

.footer-brand .site-logo {
    color: var(--white);
    margin-bottom: 14px;
}

.footer-brand p {
    max-width: 560px;
    color: var(--slate-300);
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.site-footer li + li {
    margin-top: 8px;
}

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

.footer-bottom {
    padding: 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: var(--slate-300);
}

.is-hidden-by-filter {
    display: none !important;
}

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

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

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

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

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

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        padding-bottom: 124px;
    }

    .hero-search {
        flex-direction: column;
    }

    .hero-dots {
        right: 20px;
        bottom: 112px;
    }

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

    .rank-grid,
    .category-overview-grid,
    .footer-grid,
    .detail-heading,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .detail-heading img {
        width: 180px;
    }

    .filter-toolbar,
    .search-panel,
    .section-row-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-toolbar select {
        max-width: none;
    }
}

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

    .site-logo {
        font-size: 19px;
    }

    .logo-mark {
        width: 38px;
        height: 38px;
    }

    .hero-carousel {
        height: 530px;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 34px;
    }

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

    .movie-card.horizontal {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .horizontal-info p:last-child {
        -webkit-line-clamp: 1;
    }

    .page-stack {
        padding: 38px 0;
        gap: 38px;
    }

    .inner-hero,
    .detail-hero {
        padding: 48px 0;
    }

    .detail-card,
    .side-card {
        padding: 18px;
    }
}
