:root {
    --emerald: #10b981;
    --emerald-dark: #059669;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--emerald), #34d399);
    color: #ffffff;
    font-size: 15px;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.34);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 700;
    transition: all 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover {
    color: var(--emerald-dark);
    background: #ecfdf5;
}

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

.nav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--emerald-dark);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    gap: 8px;
    flex-wrap: wrap;
}

.mobile-nav.is-open {
    display: flex;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.2s ease;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.68) 42%, rgba(0, 0, 0, 0.12)), linear-gradient(0deg, rgba(2, 6, 23, 0.56), transparent 46%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(720px, calc(100% - 48px));
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    color: #ffffff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
    border: 1px solid rgba(167, 243, 208, 0.22);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 24px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.hero p {
    margin: 22px 0 0;
    max-width: 680px;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.86);
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.movie-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 800;
}

.hero .hero-tags span,
.detail-copy .hero-tags span {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 900;
    transition: all 0.2s ease;
}

.btn.primary {
    background: linear-gradient(135deg, var(--emerald), #34d399);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.34);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(16, 185, 129, 0.42);
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn.ghost.light {
    background: #ffffff;
    color: var(--emerald-dark);
}

.btn.ghost.dark {
    background: #ecfdf5;
    color: var(--emerald-dark);
    border: 1px solid #bbf7d0;
}

.btn.text {
    color: #a7f3d0;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: all 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #34d399;
}

.quick-cats {
    position: relative;
    z-index: 5;
    margin-top: -36px;
    padding: 0 24px;
}

.quick-cats-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.quick-cats a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 18px;
    background: #f8fafc;
    color: #111827;
    font-weight: 900;
    transition: all 0.2s ease;
}

.quick-cats a:hover {
    background: #ecfdf5;
    color: var(--emerald-dark);
    transform: translateY(-2px);
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px 0;
}

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

.section-title span,
.page-hero span,
.player-heading span {
    display: inline-flex;
    color: var(--emerald-dark);
    font-weight: 950;
    letter-spacing: 0.08em;
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.section-title h2,
.page-hero h1,
.player-heading h2,
.detail-text h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.045em;
    font-weight: 950;
}

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

.inline-search {
    margin-bottom: 24px;
}

.inline-search input {
    width: min(620px, 100%);
    height: 54px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    padding: 0 22px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

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

.sticky-search {
    position: sticky;
    top: 84px;
    z-index: 20;
    padding: 12px 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(10px);
}

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

.movie-grid.dense {
    gap: 18px;
}

.movie-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: all 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

.poster-link img,
.detail-poster img,
.rank-cover img,
.category-covers img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img,
.rank-card:hover .rank-cover img,
.category-card:hover .category-covers img {
    transform: scale(1.06);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 46%, rgba(0, 0, 0, 0.76));
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.86);
    width: 58px;
    height: 58px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: var(--emerald-dark);
    opacity: 0;
    transition: all 0.2s ease;
    font-size: 20px;
}

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

.card-year {
    position: absolute;
    right: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.62);
    color: #ffffff;
    font-weight: 900;
    font-size: 12px;
}

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

.movie-card h3,
.rank-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 950;
}

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

.movie-card p,
.rank-card p,
.category-card p,
.page-hero p,
.detail-copy .lead,
.detail-text p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.movie-card p {
    min-height: 50px;
    margin: 0 0 14px;
    font-size: 14px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.card-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f3f4f6;
    padding: 5px 9px;
}

.split-section {
    display: block;
}

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

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

.rank-card {
    position: relative;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 22px;
    padding: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: all 0.2s ease;
}

.rank-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
}

.rank-cover {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
}

.rank-no {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-weight: 950;
    z-index: 2;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.26);
}

.rank-no.small {
    font-size: 12px;
}

.rank-info {
    min-width: 0;
}

.page-hero {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.26), transparent 34%), linear-gradient(135deg, #f8fafc, #ffffff);
    border-bottom: 1px solid #e5e7eb;
}

.page-hero.small {
    min-height: 310px;
}

.page-hero > div {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 58px 24px;
}

.page-hero p {
    max-width: 760px;
    font-size: 18px;
    margin: 16px 0 0;
}

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

.category-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 22px;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.category-covers a {
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 25px;
    font-weight: 950;
}

.category-card > span {
    display: inline-flex;
    margin-top: 12px;
    color: var(--emerald-dark);
    font-weight: 950;
}

.detail-hero {
    position: relative;
    min-height: 580px;
    display: flex;
    align-items: center;
    background-image: var(--detail-image);
    background-size: cover;
    background-position: center;
    color: #ffffff;
}

.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.32)), linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 58%);
    backdrop-filter: blur(1px);
}

.detail-inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 70px 24px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
    background: #111827;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 20px;
    font-weight: 800;
}

.breadcrumb a:hover {
    color: #a7f3d0;
}

.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.055em;
    font-weight: 950;
}

.detail-copy .lead {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 20px;
    margin: 20px 0;
}

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.player-section {
    max-width: 1120px;
    margin: 0 auto;
    padding: 58px 24px 0;
}

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

.player-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.28);
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.22), rgba(0, 0, 0, 0.62));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    color: var(--emerald-dark);
    font-size: 34px;
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.26);
}

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

.detail-text {
    max-width: 960px;
}

.detail-text h2 {
    font-size: 30px;
    margin-top: 22px;
}

.detail-text p {
    font-size: 18px;
    margin: 12px 0 0;
}

.site-footer {
    max-width: 1280px;
    margin: 78px auto 0;
    padding: 34px 24px 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid #e5e7eb;
}

.site-footer strong {
    font-size: 20px;
}

.site-footer p {
    margin: 6px 0 0;
}

.site-footer a {
    color: var(--emerald-dark);
    font-weight: 900;
}

[data-filter-card].is-hidden {
    display: none;
}

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

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

    .rank-list,
    .rank-list.compact {
        grid-template-columns: 1fr;
    }
}

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

    .nav-toggle {
        display: flex;
    }

    .hero {
        min-height: 76vh;
    }

    .hero-content {
        width: calc(100% - 40px);
        margin: 0 20px;
    }

    .hero-actions,
    .player-heading,
    .section-title,
    .site-footer {
        align-items: stretch;
        flex-direction: column;
    }

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

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

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

@media (max-width: 560px) {
    .nav-wrap {
        padding: 0 16px;
    }

    .brand {
        font-size: 18px;
    }

    .hero h1,
    .detail-copy h1 {
        font-size: 42px;
    }

    .quick-cats-inner,
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .content-section,
    .player-section,
    .page-hero > div,
    .detail-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .rank-card {
        grid-template-columns: 78px minmax(0, 1fr);
    }
}
