:root {
    --bg: #f8faf9;
    --surface: #ffffff;
    --surface-soft: #effdf6;
    --text: #10201b;
    --muted: #66756f;
    --line: #dce8e3;
    --brand: #059669;
    --brand-dark: #047857;
    --brand-soft: #d1fae5;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(220, 232, 227, 0.9);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), #10b981);
    box-shadow: 0 10px 28px rgba(5, 150, 105, 0.32);
}

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

.brand-text span {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

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

.nav-link {
    position: relative;
    color: #33443e;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.22s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -24px;
    height: 3px;
    border-radius: 999px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--brand);
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

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

.menu-button span {
    width: 20px;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background: var(--brand-dark);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: #33443e;
    font-weight: 700;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--brand-dark);
    background: var(--surface-soft);
}

main {
    min-height: 60vh;
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: #071b15;
}

.hero-track,
.hero-slide {
    min-height: 650px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-content {
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 88px 0 118px;
    color: #ffffff;
}

.hero-eyebrow,
.page-hero span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    color: #c7f9df;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-meta span,
.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #064e3b;
    background: #d1fae5;
    font-size: 13px;
    font-weight: 800;
}

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

.button-primary,
.button-secondary,
.movie-actions a,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.button-primary,
.movie-actions a {
    min-height: 46px;
    padding: 0 22px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), #10b981);
    box-shadow: 0 14px 28px rgba(5, 150, 105, 0.26);
}

.button-secondary {
    min-height: 46px;
    padding: 0 22px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.button-primary:hover,
.button-secondary:hover,
.movie-actions a:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: max(20px, calc((100vw - 1180px) / 2 - 72px));
}

.hero-next {
    right: max(20px, calc((100vw - 1180px) / 2 - 72px));
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    transition: width 0.22s ease, background 0.22s ease;
}

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

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

.tinted-section {
    width: min(1220px, calc(100% - 24px));
    margin-top: 72px;
    padding: 48px 20px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

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

.section-title h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.section-title p {
    max-width: 620px;
    margin: 8px 0 0;
    color: var(--muted);
}

.section-title > a,
.text-link {
    color: var(--brand-dark);
    font-weight: 900;
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

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

.movie-card.is-hidden {
    display: none;
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0b241c;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72));
}

.movie-year,
.rank-badge {
    position: absolute;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.movie-year {
    right: 12px;
}

.rank-badge {
    left: 12px;
    min-width: 34px;
    text-align: center;
    background: rgba(15, 23, 42, 0.82);
}

.movie-info {
    padding: 18px;
}

.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.movie-tags span,
.detail-tags span {
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    font-size: 12px;
    font-weight: 800;
}

.movie-info h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.movie-info h2 a:hover {
    color: var(--brand-dark);
}

.movie-meta {
    min-height: 24px;
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
}

.movie-line {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 18px;
    overflow: hidden;
    color: #52615c;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-actions {
    justify-content: space-between;
}

.movie-actions a {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
}

.movie-actions span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    border-radius: 22px;
    color: #ffffff;
    background: #0b241c;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.82));
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.45s ease;
}

.category-card:hover img {
    transform: scale(1.07);
}

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

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

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 34px;
}

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

.rank-item,
.compact-item {
    display: grid;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item {
    grid-template-columns: 34px 54px 1fr auto;
}

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

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

.rank-item span {
    color: var(--brand-dark);
    font-size: 20px;
    font-weight: 900;
}

.rank-item img,
.compact-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-item img {
    width: 58px;
    height: 78px;
}

.rank-item strong,
.compact-item strong {
    display: block;
    font-size: 15px;
}

.rank-item em,
.compact-item em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: 68px;
    border-radius: var(--radius-xl);
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.42), transparent 34%), linear-gradient(135deg, #052e22, #0f3b2d);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 22px 0 12px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.search-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.search-box {
    display: grid;
    gap: 8px;
}

.search-box span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.search-box input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-chip {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #33443e;
    background: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #ffffff;
    border-color: var(--brand);
    background: var(--brand);
}

.category-overview-list {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 24px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

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

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

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

.category-samples a {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    border-radius: 18px;
    background: #0b241c;
}

.category-samples img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.category-samples span {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 34px;
    padding: 34px;
    border-radius: var(--radius-xl);
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.45), transparent 32%), linear-gradient(135deg, #061a14, #0f3b2d);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.32);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 440px;
    object-fit: cover;
}

.detail-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

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

.detail-intro h1 {
    margin: 22px 0 14px;
    font-size: clamp(34px, 5vw, 66px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.detail-line {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    color: var(--brand-dark);
    background: #ffffff;
    font-size: 34px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
    font-size: 20px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-content article {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.detail-content h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.detail-content p {
    margin: 0;
    color: #44534e;
}

.related-grid .movie-card.is-compact .movie-line {
    min-height: 42px;
}

.site-footer {
    margin-top: 86px;
    color: #c8d7d1;
    background: #0b1512;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 34px;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
}

.site-footer p {
    max-width: 560px;
    color: #9aaba5;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 16px;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #c8d7d1;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #8fa19a;
    font-size: 14px;
}

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

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

    .hero-arrow {
        display: none;
    }
}

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

    .menu-button {
        display: flex;
    }

    .hero-carousel,
    .hero-track,
    .hero-slide,
    .hero-content {
        min-height: 560px;
    }

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

    .split-section,
    .category-overview-card,
    .detail-hero,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster img {
        min-height: auto;
    }

    .page-hero,
    .detail-hero {
        padding: 28px;
    }
}

@media (max-width: 560px) {
    .nav-shell {
        height: 64px;
    }

    .brand-text span {
        font-size: 18px;
    }

    .hero-carousel,
    .hero-track,
    .hero-slide,
    .hero-content {
        min-height: 520px;
    }

    .hero-content {
        padding: 58px 0 92px;
    }

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

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

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

    .rank-item {
        grid-template-columns: 30px 50px 1fr;
    }

    .rank-item em {
        display: none;
    }

    .page-hero {
        padding: 26px;
    }
}
