.custom-home-hero,
.custom-home-section {
  margin-bottom: 1.5rem;
}

/* 首页 AI 工具控制台（Bento） */
.ai-console {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(168px, auto));
  gap: 1rem;
  margin: 0 0 1.75rem;
}

.ai-console__hero,
.ai-console-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(102, 118, 255, 0.16);
  border-radius: 24px;
  box-shadow: 0 16px 42px rgba(30, 45, 116, 0.08);
}

.ai-console__hero {
  grid-row: span 2;
  padding: 2rem;
  background:
    radial-gradient(circle at 88% 10%, rgba(98, 218, 255, 0.55), transparent 25%),
    radial-gradient(circle at 25% 115%, rgba(150, 104, 255, 0.5), transparent 38%),
    linear-gradient(140deg, #101a42 0%, #254de0 56%, #6d83ff 100%);
  color: #fff;
}

.ai-console__hero::after {
  position: absolute;
  right: -70px;
  bottom: -80px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(255, 255, 255, 0.06), 0 0 0 64px rgba(255, 255, 255, 0.04);
  content: '';
}

.ai-console__badge,
.ai-console-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.ai-console__badge {
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.ai-console__title {
  position: relative;
  z-index: 1;
  margin: 1.25rem 0 0.85rem;
  color: #fff;
  font-size: clamp(2.1rem, 3.8vw, 3.3rem);
  line-height: 1.08;
}

.ai-console__desc {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.75;
}

.ai-console__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.ai-console__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 0.9rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ai-console__button:hover,
.ai-console-card:hover {
  transform: translateY(-3px);
}

.ai-console__button--primary {
  background: #fff;
  color: #1c3ab4;
}

.ai-console__button--secondary {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(13, 21, 72, 0.22);
  color: #fff;
}

.ai-console__metrics {
  position: absolute;
  right: 1.5rem;
  bottom: 1.35rem;
  left: 1.5rem;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.ai-console__metric {
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(10, 18, 69, 0.18);
  backdrop-filter: blur(8px);
}

.ai-console__metric strong,
.ai-console__metric span {
  display: block;
}

.ai-console__metric strong {
  font-size: 1rem;
}

.ai-console__metric span {
  margin-top: 0.18rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
}

.ai-console-card {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-height: 168px;
  padding: 1.35rem;
  color: #16203f;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-console-card:hover {
  box-shadow: 0 20px 46px rgba(30, 45, 116, 0.16);
}

.ai-console-card__icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  font-size: 1.1rem;
}

.ai-console-card__content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.ai-console-card__eyebrow {
  color: #647194;
}

.ai-console-card h2 {
  margin: 0.45rem 0;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1.35;
}

.ai-console-card p {
  margin: 0;
  color: #687593;
  font-size: 0.9rem;
  line-height: 1.6;
}

.ai-console-card__arrow {
  position: absolute;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 2;
  color: currentColor;
  opacity: 0.68;
}

.ai-console-card--api {
  background: linear-gradient(145deg, #f4f0ff 0%, #e8e6ff 100%);
  color: #5039b7;
}

.ai-console-card--api .ai-console-card__icon {
  background: #684cff;
  color: #fff;
}

.ai-console-card--opensource {
  background: linear-gradient(145deg, #edf9ff 0%, #dcf2ff 100%);
  color: #126086;
}

.ai-console-card--opensource .ai-console-card__icon {
  background: #247ba5;
  color: #fff;
}

.ai-console-card--nav {
  background: linear-gradient(145deg, #fff8df 0%, #ffedb1 100%);
  color: #985d00;
}

.ai-console-card--nav .ai-console-card__icon {
  background: #f49b19;
  color: #fff;
}

.ai-console-card--latest {
  color: #fff;
  isolation: isolate;
}

.ai-console-card__latest-cover,
.ai-console-card__latest-shade {
  position: absolute;
  inset: 0;
}

.ai-console-card__latest-cover {
  z-index: -2;
  background: #1f2a50 center / cover no-repeat;
  transition: transform 0.35s ease;
}

.ai-console-card--latest:hover .ai-console-card__latest-cover {
  transform: scale(1.06);
}

.ai-console-card__latest-shade {
  z-index: -1;
  background: linear-gradient(135deg, rgba(15, 22, 58, 0.86), rgba(22, 35, 90, 0.38));
}

.ai-console-card--latest .ai-console-card__eyebrow,
.ai-console-card--latest p {
  color: rgba(255, 255, 255, 0.76);
}

.custom-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  gap: 1rem;
}

.custom-home-hero__main,
.custom-home-hero__side,
.custom-feature-card,
.custom-topic-card {
  border: 1px solid rgba(91, 108, 255, 0.14);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(40, 52, 122, 0.08);
}

.custom-home-hero__main {
  padding: 2rem;
  background:
    radial-gradient(circle at top left, rgba(255, 190, 92, 0.35), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #2444d9 55%, #7aa2ff 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
}

.custom-home-hero__main::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(6px);
}

.custom-home-hero__eyebrow,
.custom-home-section__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.custom-home-hero__title {
  margin: 1rem 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  color: #fff;
}

.custom-home-hero__desc {
  max-width: 42rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.8;
}

.custom-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.custom-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 138px;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.custom-home-btn:hover {
  transform: translateY(-2px);
}

.custom-home-btn--primary {
  background: #fff;
  color: #1d35b5;
  box-shadow: 0 12px 30px rgba(12, 23, 77, 0.2);
}

.custom-home-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.custom-home-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.custom-home-stat {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

.custom-home-stat__num {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
}

.custom-home-stat__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
}

.custom-home-hero__side {
  padding: 1.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 255, 0.96)),
    linear-gradient(135deg, #ffd89b, #19547b);
}

.custom-home-sidecard__label {
  display: inline-flex;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(91, 108, 255, 0.08);
  color: #3751db;
  font-size: 0.78rem;
  font-weight: 700;
}

.custom-home-sidecard__title {
  margin: 1rem 0 0.7rem;
  font-size: 1.4rem;
  color: #15204a;
  font-weight: 800;
}

.custom-home-sidecard__list {
  margin: 0;
  padding-left: 1.1rem;
  color: #425171;
  line-height: 1.9;
}

.custom-home-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.custom-home-section__eyebrow {
  background: rgba(91, 108, 255, 0.08);
  color: #3751db;
}

.custom-home-section__title {
  margin: 0.45rem 0 0;
  font-size: 1.6rem;
  color: #12203d;
}

.custom-home-section__link,
.custom-topic-card__more {
  color: #3751db;
  font-weight: 700;
  text-decoration: none;
}

.custom-feature-grid,
.custom-topic-grid {
  display: grid;
  gap: 1rem;
}

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

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

.custom-feature-card {
  padding: 1.2rem;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.98));
}

.custom-feature-card__meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: #5f6f94;
  font-size: 0.82rem;
}

.custom-feature-card__title,
.custom-topic-card__title {
  margin: 0.9rem 0 0.55rem;
  color: #12203d;
  font-size: 1.18rem;
  line-height: 1.5;
}

.custom-feature-card__desc,
.custom-topic-card__desc {
  margin: 0;
  color: #56657f;
  line-height: 1.8;
}

.custom-topic-card {
  padding: 1.2rem;
}

.custom-topic-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.custom-topic-card__posts {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.custom-topic-post {
  display: block;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: #f5f7ff;
  color: #20304c;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.custom-topic-post:hover,
.custom-feature-card:hover {
  transform: translateY(-2px);
}

.custom-topic-post:hover {
  background: #ebefff;
}

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

  .ai-console__hero {
    grid-row: span 1;
    grid-column: span 2;
    min-height: 340px;
  }

  .custom-home-hero,
  .custom-feature-grid,
  .custom-topic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ai-console {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 0.8rem;
  }

  .ai-console__hero {
    grid-column: auto;
    min-height: 390px;
    padding: 1.35rem;
  }

  .ai-console-card {
    min-height: 148px;
    padding: 1.15rem;
    border-radius: 20px;
  }

  .ai-console__metrics {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
  }

  .ai-console__metric {
    padding: 0.6rem;
  }

  .custom-home-hero__main,
  .custom-home-hero__side,
  .custom-feature-card,
  .custom-topic-card {
    border-radius: 20px;
  }

  .custom-home-hero__main,
  .custom-home-hero__side {
    padding: 1.25rem;
  }

  .custom-home-hero__stats {
    grid-template-columns: 1fr;
  }

  .custom-home-section__head,
  .custom-topic-card__top {
    display: block;
  }

  .custom-home-section__link,
  .custom-topic-card__more {
    display: inline-block;
    margin-top: 0.65rem;
  }
}
