/* Motion Library — ported from Cursor frontend (visual parity) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* 原生平滑滚动在长列表+视频页易显顿挫，交由系统默认滚动 */
  scroll-behavior: auto;
}

body.ml-body {
  margin: 0;
  min-height: 100%;
  background: var(--ml-bg, #121212);
  color: var(--ml-text, #f5f5f5);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.ml-site {
  min-height: 100vh;
  background: var(--ml-bg, #121212);
  color: var(--ml-text, #f5f5f5);
}

/* Parity */
.ml-parity {
  display: flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--ml-parity, #a855f7);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}
.ml-parity p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* Nav */
.ml-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: color-mix(in srgb, var(--ml-bg, #121212) 95%, transparent);
  backdrop-filter: blur(12px);
}
.ml-nav__inner {
  margin: 0 auto;
  display: flex;
  height: 56px;
  max-width: 1440px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .ml-nav__inner {
    padding: 0 24px;
  }
}
.ml-nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ml-nav__logo a {
  display: flex;
  align-items: center;
}
.ml-nav__logo img,
.ml-nav__logo .custom-logo {
  height: 32px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}
.ml-nav__links {
  display: none;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 768px) {
  .ml-nav__links {
    display: flex;
  }
}
.ml-nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ml-muted, #ababab);
  transition: color 0.15s ease;
}
.ml-nav__links a:hover {
  color: var(--ml-text, #f5f5f5);
}
.ml-nav__badge {
  margin-left: 6px;
  border-radius: 6px;
  background: linear-gradient(to bottom right, #a855f7, #f472b6, #fcd34d);
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  vertical-align: middle;
}
.ml-nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ml-nav__search {
  padding: 8px;
  color: var(--ml-muted, #ababab);
}
.ml-nav__search:hover {
  color: #fff;
}
.ml-btn-signup {
  display: inline-flex;
  height: 36px;
  align-items: center;
  border-radius: 16px;
  background: #f5f5f5;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  color: #121212;
}
.ml-btn-signup:hover {
  opacity: 0.9;
}

/* Search panel */
.ml-search-panel {
  display: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--ml-bg, #121212);
  padding: 12px 16px 16px;
}
.ml-search-panel.is-open {
  display: block;
}
.ml-search-panel input {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: block;
  border-radius: 999px;
  border: 1px solid var(--ml-border, #303030);
  background: var(--ml-surface, #202020);
  color: var(--ml-text, #f5f5f5);
  padding: 12px 20px;
  outline: none;
}

/* Hero */
.ml-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px 40px;
}
@media (min-width: 640px) {
  .ml-hero {
    padding-top: 64px;
  }
}
.ml-hero__badge {
  position: relative;
  display: inline-flex;
  margin-bottom: 8px;
  align-items: center;
}
.ml-hero__badge-text {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  background-image: radial-gradient(80.17% 109.2% at 44.373% 35.1526%, #d0b2ff 0%, #ffeed8 42.83%, #e8400d 88.38%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ml-hero h1 {
  margin: 0 0 12px;
  text-align: center;
  font-size: 38px;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--ml-text, #f5f5f5);
}
@media (min-width: 640px) {
  .ml-hero h1 {
    font-size: 48px;
  }
}
@media (min-width: 768px) {
  .ml-hero h1 {
    font-size: 56px;
    line-height: 46px;
    letter-spacing: -1.68px;
  }
}
.ml-hero h1 em {
  font-style: italic;
  font-weight: 900;
}
.ml-superpowers {
  position: relative;
  display: inline-block;
  margin-top: 4px;
}
.ml-superpowers__glow,
.ml-superpowers__text {
  background-image: linear-gradient(105deg, #ff7a18 0%, #ffb347 28%, #d0b2ff 62%, #9f7aea 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ml-superpowers-shift 6s ease-in-out infinite alternate;
}
.ml-superpowers__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: blur(14px);
  opacity: 0.55;
}
.ml-superpowers__text {
  position: relative;
}
@keyframes ml-superpowers-shift {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}
.ml-hero__sub {
  margin: 0 0 24px;
  max-width: 28rem;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ml-muted, #ababab);
}
.ml-hero__cta {
  display: inline-flex;
  height: 56px;
  align-items: center;
  border-radius: 999px;
  padding: 0 32px;
  font-size: 18px;
  font-weight: 600;
  color: #09090b;
  background-image: linear-gradient(to top, #cfdef6 20%, #fafafa 80%);
  box-shadow: 0 0 40px rgba(207, 222, 246, 0.25);
  transition: transform 0.2s ease;
}
.ml-hero__cta:hover {
  transform: scale(1.02);
}

/* Filters */
.ml-filters {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .ml-filters {
    padding: 0 24px;
  }
}
@media (min-width: 1024px) {
  .ml-filters {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.ml-filters__pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.ml-filters__pills::-webkit-scrollbar {
  display: none;
}
.ml-filter-pill {
  flex-shrink: 0;
  height: 32px;
  border-radius: 999px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.15s ease, background 0.15s ease;
}
.ml-filter-pill:hover {
  color: #fff;
}
.ml-filter-pill.is-active {
  height: 34px;
  background: var(--ml-surface, #202020);
  color: #fff;
}
.ml-filters__sort {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}
.ml-sort-btn {
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: var(--ml-surface, #202020);
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}
.ml-sort-btn select {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding-right: 4px;
}

/* Grid */
.ml-grid-wrap {
  width: 100%;
  padding: 0 16px 24px;
}
@media (min-width: 640px) {
  .ml-grid-wrap {
    padding: 0 24px 24px;
  }
}
.ml-grid {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.ml-grid__col {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}
.ml-empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--ml-muted, #ababab);
}
.ml-grid.is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.ml-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 28px 16px 8px;
}
.ml-load-more {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ml-text, #f5f5f5);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 12px 28px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.ml-load-more:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(159, 122, 234, 0.45);
  transform: translateY(-1px);
}
.ml-load-more:disabled {
  opacity: 0.55;
  cursor: wait;
}
.ml-load-more[hidden] {
  display: none;
}

/* Card */
.ml-card {
  margin-bottom: 12px;
  display: flex;
  cursor: pointer;
  flex-direction: column;
  overflow: visible;
  border-radius: 24px;
  outline: none;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.ml-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}
.ml-card:focus-visible {
  box-shadow: 0 0 0 2px var(--ml-accent, #9f7aea);
}
.ml-card__media {
  position: relative;
  margin-bottom: 12px;
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 12px;
  background-color: #1a1a1a;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  aspect-ratio: 4 / 3;
}
.ml-card__media--auto {
  aspect-ratio: auto;
}
.ml-card__media img,
.ml-card__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.ml-card__media--auto img {
  position: relative;
  height: auto;
}
/* 直播：首帧就绪后淡入，不再靠悬停切换封面 */
.ml-card__media video.ml-card__video {
  opacity: 0;
  transition: opacity 0.35s ease;
}
.ml-card__media video.ml-card__video.is-ready,
.ml-card.is-playing video.ml-card__video {
  opacity: 1;
}
.ml-card__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}
.ml-card__title {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ml-text, #f5f5f5);
}
.ml-card__cat {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.25;
  color: var(--ml-muted, #ababab);
}
.ml-card__icon {
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--ml-muted, #ababab);
}

/* Promo / CTA / Footer */
.ml-promo {
  margin-bottom: 12px;
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: #1a1a2e;
  padding: 24px;
  transition: transform 0.2s ease;
}
.ml-promo:hover {
  transform: scale(1.01);
}
.ml-promo h3 {
  margin: 16px 0 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}
.ml-promo p {
  margin: 8px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.ml-promo__btn {
  margin-top: 16px;
  display: inline-flex;
  height: 40px;
  align-items: center;
  border-radius: 999px;
  background: #fff;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  color: #121212;
}

.ml-cta {
  margin: 0 auto;
  display: flex;
  width: 100%;
  max-width: 56rem;
  flex-direction: column;
  align-items: center;
  padding: 64px 16px;
  text-align: center;
}
.ml-cta h2 {
  margin: 0;
  max-width: 42rem;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ml-text, #f5f5f5);
}
@media (min-width: 640px) {
  .ml-cta h2 {
    font-size: 40px;
  }
}
.ml-cta p {
  margin: 24px 0 0;
  max-width: 36rem;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ml-muted, #ababab);
}
.ml-cta__btn {
  margin-top: 32px;
  display: inline-flex;
  height: 48px;
  align-items: center;
  border-radius: 999px;
  background: #fff;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  color: #121212;
}

.ml-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px 96px;
  font-size: 14px;
  color: var(--ml-muted, #ababab);
}
.ml-footer a:hover {
  color: #fff;
}

/* Detail modal */
.ml-detail {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ml-bg, #121212);
  animation: ml-fade-in 0.2s ease;
}
@keyframes ml-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.ml-detail__close-wrap {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  padding: 16px;
}
.ml-detail__close {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
}
.ml-detail__close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.ml-detail__layout {
  margin: 0 auto;
  display: grid;
  max-width: 1400px;
  gap: 24px;
  padding: 8px 16px 64px;
}
@media (min-width: 1024px) {
  .ml-detail__layout {
    grid-template-columns: minmax(0, 1.4fr) 320px;
    padding-left: 24px;
    padding-right: 24px;
  }
}
.ml-detail__media {
  overflow: hidden;
  border-radius: 16px;
  background: #1a1a1a;
}
.ml-detail__media video,
.ml-detail__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
}
.ml-detail__aside {
  position: relative;
}
@media (min-width: 1024px) {
  .ml-detail__aside {
    position: sticky;
    top: 64px;
    align-self: start;
  }
}
.ml-detail__aside h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}
.ml-detail__aside .ml-cat {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--ml-muted, #ababab);
}
.ml-copy-btn {
  margin-top: 20px;
  display: flex;
  width: 100%;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  background: #f5f5f5;
  font-size: 15px;
  font-weight: 600;
  color: #121212;
}
.ml-copy-btn:hover {
  opacity: 0.9;
}
.ml-copy-btn.is-copied {
  background: #22c55e;
  color: #fff;
}
.ml-prompt-preview {
  margin-top: 16px;
  max-height: 12rem;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1a1a1a;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ml-muted, #ababab);
  white-space: pre-wrap;
}
.ml-related {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 640px) {
  .ml-related {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Single resource page */
.ml-single {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px 80px;
}
.ml-breadcrumb {
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ml-muted, #ababab);
}
.ml-breadcrumb a:hover {
  color: #fff;
}
.ml-single__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.ml-chip {
  border-radius: 999px;
  background: var(--ml-surface, #202020);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--ml-muted, #ababab);
}
.ml-body-lock {
  overflow: hidden;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
