/* 人工智能专家矩阵 — 设计稿 51:6996 */

/* 本页占满视口，便于底部卡片按剩余高度拉伸 */
body:has(.experts-main) .root {
  height: 100dvh;
  min-height: 100dvh;
}

body:has(.experts-main) .main.experts-main {
  overflow: hidden;
}

.experts-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 40px;
  padding-bottom: clamp(8px, 1.2vh, 20px);
}

/* —— Hero：主区高度约 55% —— */
.experts-hero {
  flex: 11 1 0;
  min-height: 0;
  width: 1200px;
  min-width: 1200px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
}

.experts-hero__panel {
  --hero-pad: 32px;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  align-items: stretch;
  gap: clamp(20px, 2.2vw, 40px);
  padding: var(--hero-pad);
  border-radius: 24px;
  border: 1px solid rgba(27, 78, 255, 0.1);
  /* 最外层彩色底 */
  background: linear-gradient(118deg, #d5d1ff 0%, #f7f9ff 42%, #dceefc 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 48px rgba(27, 78, 255, 0.1);
  overflow: hidden;
  isolation: isolate;
}

/* 外层光晕（整卡铺开） */
.experts-hero__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 52% 70% at 86% 38%, rgba(95, 3, 255, 0.14) 0%, transparent 62%),
    radial-gradient(ellipse 48% 60% at 72% 78%, rgba(27, 78, 255, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 44% 55% at 16% 82%, rgba(91, 140, 255, 0.12) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.experts-hero__panel::after {
  content: none;
}

/* 第二层白色底：与最外层四周留白间距，整面拉通 */
.experts-hero__surface {
  position: absolute;
  inset: var(--hero-pad);
  z-index: 1;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.68) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 12px 32px rgba(27, 78, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  overflow: hidden;
}

/* 蒙层效果：随白色底整面拉通 */
.experts-hero__surface::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 42%),
    radial-gradient(ellipse 50% 65% at 88% 40%, rgba(95, 3, 255, 0.08) 0%, transparent 65%),
    radial-gradient(ellipse 42% 55% at 12% 85%, rgba(27, 78, 255, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

.experts-hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  align-self: center;
  gap: clamp(28px, 3vw, 40px);
  min-width: 0;
  padding: clamp(28px, 3.2vw, 48px) clamp(24px, 2.8vw, 40px);
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-align: left;
}

.experts-hero__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  max-width: 640px;
}

.experts-hero__title {
  margin: 0;
  font-size: clamp(22px, 1.8vw, 28px);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: #1f2329;
}

.experts-hero__lead {
  margin: 0;
  max-width: 36em;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.65;
  color: #606266;
}

.experts-hero__scope {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 640px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(27, 78, 255, 0.08);
  background: rgba(255, 255, 255, 0.55);
  text-align: left;
}

.experts-hero__scope-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 22px;
  color: var(--color-primary);
}

.experts-hero__scope-text {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: #606266;
}

.experts-hero__art {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  align-self: end;
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  line-height: 0;
}

.experts-hero__art::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(72%, 320px);
  height: 18%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(27, 78, 255, 0.18) 0%, transparent 72%);
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}

.experts-hero__art img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 560px);
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom center;
  vertical-align: bottom;
  filter: drop-shadow(0 18px 28px rgba(27, 78, 255, 0.14));
}

/* —— 底部区域（场景轴 + 专家卡）：主区高度约 45% —— */
.experts-lower {
  flex: 9 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 12px);
  width: 100%;
  max-width: 1800px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* —— 场景简介（时间轴） —— */
.experts-scenes {
  --scene-active: var(--color-primary);
  --scene-idle: #5b8cff;
  --scene-idle-line: rgba(91, 140, 255, 0.28);
  --scene-text: #606266;

  flex: 0 0 auto;
  width: 100%;
  min-width: 1200px;
  max-width: 1800px;
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.experts-scenes__list {
  list-style: none;
  margin: 0;
  padding: 8px 4px 4px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
}

.experts-scene-item {
  position: relative;
  min-width: 0;
}

.experts-scene-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(50% + 10px);
  right: calc(-50% + 10px);
  top: 44px;
  height: 2px;
  background: var(--scene-idle-line);
  pointer-events: none;
  z-index: 0;
}

.experts-scene {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  background: transparent;
  border: 0;
  text-align: center;
  cursor: pointer;
}

.experts-scene:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: 8px;
}

.experts-scene__name {
  min-height: 24px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #333;
  white-space: nowrap;
  transition: color var(--duration) var(--ease-out);
}

.experts-scene.is-active .experts-scene__name {
  color: var(--scene-active);
  font-size: 16px;
  font-weight: 700;
}

.experts-scene__node {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 5px solid var(--scene-idle);
  box-shadow: 0 2px 8px rgba(91, 140, 255, 0.28);
  transition:
    border-color var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out),
    transform var(--duration) var(--ease-out);
}

.experts-scene.is-active .experts-scene__node {
  border-color: var(--scene-active);
  box-shadow: 0 2px 10px rgba(27, 78, 255, 0.35);
}

.experts-scene:hover .experts-scene__node {
  transform: scale(1.08);
}

.experts-scene__text {
  width: 100%;
  max-width: none;
  font-size: 14px;
  line-height: 22px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* —— Cards：6 卡同行；默认窄 / 选中宽（约 1 : 2.2）；高度随底部 45% 区域拉伸 —— */
.experts-grid {
  display: flex;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  width: 100%;
  min-width: 1200px;
  max-width: 1800px;
  min-height: 0;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  gap: clamp(12px, 1.1vw, 18px);
  align-items: stretch;
}

.expert-card {
  --card-pad-x: clamp(10px, 0.9vw, 14px);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: clamp(12px, 1.6vh, 20px) var(--card-pad-x) clamp(10px, 1.4vh, 16px);
  border-radius: 20px;
  border: 1px solid rgba(27, 78, 255, 0.08);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(91, 140, 255, 0.14) 0%, rgba(255, 255, 255, 0) 22%),
    linear-gradient(155deg, #f4f2ff 0%, #ffffff 46%, #eef7ff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 8px 24px rgba(27, 78, 255, 0.06);
  transition:
    flex-grow 280ms var(--ease-out),
    transform 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    background 220ms var(--ease-out);
}

.expert-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(27, 78, 255, 0) 0%, rgba(27, 78, 255, 0.35) 50%, rgba(95, 3, 255, 0) 100%);
  opacity: 0;
  transition: opacity 220ms var(--ease-out);
  z-index: 1;
  pointer-events: none;
}

.expert-card:hover {
  transform: translateY(-6px);
  border-color: rgba(27, 78, 255, 0.18);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 14px 32px rgba(27, 78, 255, 0.12);
}

.expert-card:hover::before {
  opacity: 0.7;
}

.expert-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* 选中态：加宽并展开内容，仍与其余 5 卡同一行 */
.expert-card.is-selected {
  --card-pad-x: clamp(16px, 1.4vw, 24px);
  flex: 2.2 1 0;
  cursor: default;
  border-color: rgba(27, 78, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(45, 122, 255, 0.22) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(128deg, #ebe8ff 0%, #ffffff 48%, #e8f4ff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 0 0 1px rgba(27, 78, 255, 0.06),
    0 16px 40px rgba(27, 78, 255, 0.14);
  padding: 18px var(--card-pad-x) 18px;
}

.expert-card.is-selected::before {
  opacity: 1;
  height: 4px;
  background: linear-gradient(90deg, #1b4eff 0%, #5f03ff 55%, #5b8cff 100%);
}

.expert-card.is-selected:hover {
  transform: none;
}

.expert-card__body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.4vh, 14px);
  width: 100%;
  height: 100%;
  min-height: 0;
  text-align: center;
}

.expert-card.is-selected .expert-card__body {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(12px, 1.4vw, 22px);
  text-align: left;
}

.expert-card__avatar {
  position: relative;
  width: clamp(64px, 9.5vh, 104px);
  height: clamp(96px, 14vh, 156px);
  flex-shrink: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: 2px;
  transition: width 220ms var(--ease-out), height 220ms var(--ease-out);
}

.expert-card.is-selected .expert-card__avatar {
  width: clamp(88px, 12vh, 138px);
  height: clamp(128px, 18vh, 200px);
  margin-top: 0;
  flex-shrink: 0;
}

.expert-card__glow {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 92%;
  aspect-ratio: 1;
  max-width: 128px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.95) 0%, rgba(232, 226, 255, 0.9) 45%, rgba(214, 230, 255, 0.55) 70%, transparent 78%);
  box-shadow: 0 8px 20px rgba(91, 140, 255, 0.18);
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 220ms var(--ease-out);
}

.expert-card.is-selected .expert-card__glow {
  max-width: 148px;
  box-shadow: 0 10px 28px rgba(27, 78, 255, 0.22);
  opacity: 1;
}

.expert-card:hover:not(.is-selected) .expert-card__glow {
  opacity: 1;
}

.expert-card__avatar img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 10px 14px rgba(27, 78, 255, 0.12));
  opacity: 0.7;
  transition:
    transform 220ms var(--ease-out),
    opacity 220ms var(--ease-out);
}

.expert-card.is-selected .expert-card__avatar img {
  opacity: 1;
}

.expert-card:hover:not(.is-selected) .expert-card__avatar img {
  transform: translateY(-2px);
  opacity: 1;
}

.expert-card__info {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.expert-card.is-selected .expert-card__info {
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding-right: 2px;
}

.expert-card__name {
  margin: 0;
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: #1f2329;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.expert-card.is-selected .expert-card__name {
  font-size: clamp(17px, 1.3vw, 22px);
  line-height: 1.3;
  -webkit-line-clamp: 2;
}

.expert-card__desc {
  margin: 0;
  font-size: clamp(11px, 0.9vw, 13px);
  line-height: 1.55;
  color: #8a9099;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.expert-card.is-selected .expert-card__desc {
  font-size: clamp(12px, 1vw, 14px);
  color: #606266;
  -webkit-line-clamp: 2;
  max-width: 28em;
}

.expert-card__actions {
  display: none;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.expert-card.is-selected .expert-card__actions {
  display: flex;
}

.expert-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 clamp(14px, 1.2vw, 22px);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    opacity 180ms var(--ease-out),
    filter 180ms var(--ease-out);
}

.expert-btn:hover {
  transform: translateY(-1px);
}

.expert-btn:active {
  transform: translateY(1px);
}

.expert-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.expert-btn--primary {
  color: #ffffff;
  background: linear-gradient(114deg, #1b4eff 40%, #5f03ff 100%);
  border: 1px solid transparent;
  box-shadow: 0 6px 14px rgba(27, 78, 255, 0.22);
}

.expert-btn--primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 8px 18px rgba(27, 78, 255, 0.32);
}

.expert-btn--ghost {
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(27, 78, 255, 0.18);
  backdrop-filter: blur(6px);
}

.expert-btn--ghost:hover {
  background: #ffffff;
  border-color: rgba(27, 78, 255, 0.32);
  box-shadow: 0 4px 12px rgba(27, 78, 255, 0.1);
}

/* 窄屏：选中卡占满一行，避免挤扁 */

/* 小分辨率笔记本 */
@media (max-height: 820px) {
  .expert-card.is-selected .expert-card__actions {
    margin-top: 6px;
  }

  .expert-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }
}

@media (max-height: 700px) {
  .experts-hero__copy {
    gap: 16px;
    padding: 18px 16px;
  }

  .experts-hero__scope {
    display: none;
  }

  .experts-grid {
    min-height: 0;
    flex: 1 1 auto;
  }
}

@media (max-width: 1440px) {
  .experts-main {
    padding-bottom: clamp(12px, 1.6vh, 20px);
  }

  .experts-hero__panel {
    --hero-pad: 32px;
    gap: 14px;
    border-radius: 20px;
  }

  .experts-hero__surface {
    border-radius: 16px;
  }

  .experts-hero__copy {
    gap: 22px;
    padding: 22px 18px;
    margin-bottom: 14px;
  }

  .experts-hero__scope {
    padding: 14px 14px 14px 18px;
  }

  .experts-hero__title {
    font-size: 20px;
    line-height: 1.35;
  }

  .experts-grid {
    gap: 12px;
  }

  .expert-card {
    border-radius: 16px;
  }
}

@media (max-width: 1199px) {
  .experts-hero,
  .experts-scenes,
  .experts-grid {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  body:has(.experts-main) .root {
    height: auto;
    min-height: 100dvh;
  }

  body:has(.experts-main) .main.experts-main {
    overflow: auto;
  }

  .experts-hero,
  .experts-lower {
    flex: 0 0 auto;
  }

  .experts-grid {
    flex-wrap: wrap;
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
  }

  .expert-card {
    flex: 1 1 calc(50% - 8px);
    width: auto;
    height: auto;
    min-height: clamp(240px, 36vh, 300px);
  }

  .expert-card.is-selected {
    flex: 1 1 100%;
  }

  .experts-scenes {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .experts-scenes__list {
    min-width: 640px;
  }
}

@media (max-width: 760px) {
  .experts-hero__panel {
    grid-template-columns: 1fr;
  }

  .experts-hero__art {
    order: -1;
    min-height: 180px;
  }

  .experts-hero__art img {
    width: min(100%, 360px);
  }

  .expert-card.is-selected .expert-card__body {
    flex-direction: column;
    text-align: center;
  }

  .expert-card.is-selected .expert-card__info {
    align-items: center;
  }

  .expert-card.is-selected .expert-card__actions {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .expert-card,
  .expert-card.is-selected {
    flex: 1 1 100%;
  }
}


