:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --emerald: #059669;
    --emerald-dark: #047857;
    --blue: #2563eb;
    --dark: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f1f5f9 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--blue));
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.24);
}

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

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 15px;
    color: #334155;
    transition: 0.2s ease;
}

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

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #0f172a;
}

.mobile-nav {
    display: none;
    padding: 0 20px 16px;
    border-top: 1px solid var(--line);
}

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

.hero-slider {
    position: relative;
    min-height: 560px;
    height: 72vh;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: -32px;
    background-image: var(--hero-image);
    background-position: center;
    background-size: cover;
    filter: blur(22px) brightness(0.48);
    transform: scale(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.24));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    height: 100%;
    margin: 0 auto;
    padding: 72px 20px 96px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 56px;
    align-items: center;
}

.hero-text {
    max-width: 740px;
}

.eyebrow,
.hero-kicker {
    margin: 0 0 12px;
    color: var(--emerald);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-kicker {
    color: #a7f3d0;
}

.hero-text h1 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-text h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.08;
}

.hero-desc {
    margin: 0;
    color: #dbeafe;
    font-size: 20px;
    line-height: 1.8;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #065f46;
    background: #d1fae5;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: var(--emerald);
    box-shadow: 0 18px 34px rgba(5, 150, 105, 0.30);
}

.primary-button:hover {
    background: var(--emerald-dark);
    transform: translateY(-2px);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.ghost-button.dark {
    color: #0f172a;
    border-color: #cbd5e1;
    background: #ffffff;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 30px;
    line-height: 1;
    backdrop-filter: blur(14px);
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: 0.25s ease;
}

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

.home-search,
.content-section,
.page-main,
.detail-main {
    max-width: 1240px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.home-search {
    margin-top: -42px;
    position: relative;
    z-index: 12;
}

.home-search-inner,
.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1.15fr);
    gap: 22px;
    align-items: center;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-search h2,
.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.16;
    letter-spacing: -0.04em;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
}

.search-box.large {
    min-height: 60px;
}

.search-box span {
    color: var(--emerald);
    font-size: 24px;
    line-height: 1;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-size: 16px;
}

.content-section {
    padding-top: 78px;
}

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

.section-heading p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

.movie-card {
    min-width: 0;
}

.poster-link,
.compact-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #e2e8f0;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.90);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    transform: translate(-50%, -50%) scale(0.76);
    opacity: 0;
    transition: 0.25s ease;
}

.poster-link:hover .poster-wrap img,
.compact-link:hover img {
    transform: scale(1.06);
}

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

.card-body {
    padding: 14px 4px 0;
}

.card-body h3,
.compact-content h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.38;
    transition: color 0.2s ease;
}

.poster-link:hover h3,
.compact-link:hover h3,
.rank-row-link:hover strong {
    color: var(--emerald);
}

.card-body p,
.compact-content p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 24px;
    padding: 24px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: var(--shadow);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.86)), var(--category-image);
    background-size: cover;
    background-position: center;
    transition: transform 0.35s ease;
}

.category-card:hover::before {
    transform: scale(1.06);
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 10px 0 0;
    color: #dbeafe;
    line-height: 1.65;
}

.ranking-section {
    max-width: 980px;
}

.ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.ranking-list a {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
    transition: 0.2s ease;
}

.ranking-list a:hover,
.rank-row-link:hover {
    border-color: #a7f3d0;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.rank-no,
.rank-large {
    color: var(--emerald);
    font-size: 22px;
    font-weight: 900;
}

.rank-title {
    min-width: 0;
    font-weight: 800;
}

.rank-meta {
    color: var(--muted);
    font-size: 14px;
}

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

.compact-link {
    display: flex;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.compact-link img {
    width: 112px;
    height: 112px;
    flex: 0 0 auto;
    border-radius: 14px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.compact-content {
    min-width: 0;
}

.compact-content span {
    display: inline-block;
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
}

.page-main {
    padding-top: 58px;
    padding-bottom: 82px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 48px;
    border-radius: 30px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.56), transparent 38%), linear-gradient(135deg, #0f172a, #064e3b);
    box-shadow: var(--shadow);
}

.page-hero p:not(.eyebrow) {
    max-width: 820px;
    margin: 14px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.small-hero {
    margin-bottom: 34px;
}

.narrow-actions {
    margin-top: 24px;
}

.filter-panel {
    grid-template-columns: minmax(260px, 1fr) auto;
    margin: 34px 0;
}

.filter-selects {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-selects select {
    min-width: 130px;
    min-height: 50px;
    padding: 0 38px 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #334155;
    background: #ffffff;
    outline: 0;
}

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

.overview-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: 0.2s ease;
}

.overview-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.overview-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 160px;
}

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

.overview-body {
    padding: 22px;
}

.overview-body h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.overview-body p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

.overview-body span {
    color: var(--emerald);
    font-weight: 800;
}

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

.rank-row-link {
    display: grid;
    grid-template-columns: 54px 78px minmax(0, 1fr) 60px;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
    transition: 0.2s ease;
}

.rank-row-link img {
    width: 78px;
    height: 96px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-info {
    display: grid;
    gap: 5px;
}

.rank-info strong {
    font-size: 18px;
}

.rank-info em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.55;
}

.rank-info small {
    color: #64748b;
}

.score-pill {
    justify-self: end;
    padding: 8px 12px;
    border-radius: 999px;
    color: #065f46;
    background: #d1fae5;
    font-weight: 900;
}

.detail-main {
    padding-top: 30px;
    padding-bottom: 88px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: #64748b;
    font-size: 14px;
}

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

.player-section {
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
}

.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.movie-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(5, 150, 105, 0.24), rgba(2, 6, 23, 0.58));
    cursor: pointer;
}

.video-player.is-playing .play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.96);
    box-shadow: 0 24px 54px rgba(5, 150, 105, 0.36);
    font-size: 34px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    margin-top: 34px;
}

.detail-poster img {
    width: 100%;
    border-radius: 24px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.detail-info {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    color: #475569;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    background: #f1f5f9;
}

.detail-info h2 {
    margin: 30px 0 12px;
    font-size: 22px;
}

.detail-info p {
    color: #334155;
    font-size: 16px;
    line-height: 1.9;
}

.detail-nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 28px;
}

.detail-nav-links a {
    padding: 14px;
    border-radius: 16px;
    color: #065f46;
    background: #ecfdf5;
    font-weight: 700;
}

.detail-related {
    padding-left: 0;
    padding-right: 0;
}

.empty-state {
    margin: 34px 0 0;
    padding: 28px;
    border-radius: 20px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
}

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

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 20px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-inner p {
    max-width: 580px;
    color: #94a3b8;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

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

.copyright {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 28px;
    color: #64748b;
}

[hidden] {
    display: none !important;
}

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

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

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

    .mobile-toggle {
        display: inline-flex;
    }

    .hero-slider {
        min-height: 720px;
        height: auto;
    }

    .hero-slide {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 46px;
        padding-bottom: 112px;
    }

    .hero-poster {
        max-width: 250px;
        transform: none;
    }

    .home-search-inner,
    .filter-panel,
    .section-heading,
    .footer-inner {
        grid-template-columns: 1fr;
        display: grid;
        align-items: stretch;
    }

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

    .rank-row-link {
        grid-template-columns: 44px 64px minmax(0, 1fr);
    }

    .score-pill {
        grid-column: 3;
        justify-self: start;
    }

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

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

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

@media (max-width: 560px) {
    .header-inner,
    .home-search,
    .content-section,
    .page-main,
    .detail-main {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    .hero-text h2 {
        font-size: 31px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .page-hero,
    .detail-info {
        padding: 24px;
        border-radius: 22px;
    }

    .movie-grid,
    .all-grid,
    .category-grid,
    .overview-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .compact-link {
        align-items: center;
    }

    .ranking-list a {
        grid-template-columns: 42px 1fr;
    }

    .rank-meta {
        grid-column: 2;
    }

    .filter-selects select {
        width: 100%;
    }
}
