/* ============================================
   Agent Skills Marketplace Banner - 深度 1:1 复刻
   参考: https://modelscope.cn/skills
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: #f0f1f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* =====================
   Banner 容器
   ===================== */
.banner {
  position: relative;
  width: 100%;
  max-width: 860px;
  height: 260px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #ece4ff 0%, #e6dffa 25%, #ebe4ff 50%, #eee9ff 75%, #f2eeff 100%);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.03);
}

/* 网格背景 - 淡紫色细线，稀疏对齐 */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(150, 130, 210, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 130, 210, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

.banner-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 28px 32px 24px 32px;
}

/* =====================
   标题 - 大号深色粗体
   ===================== */
.marketplace-title {
  font-size: 26px;
  font-weight: 700;
  color: #1d2129;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  line-height: 1.3;
  font-family: 'Inter', 'PingFang SC', -apple-system, sans-serif;
}

/* 闪烁字符 - 淡灰色 */
.cursor-text {
  color: #a0a3b1;
  font-weight: 400;
  font-size: 26px;
  margin-left: 4px;
}

/* =====================
   轮播区域
   ===================== */
.carousel-area {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}

/* =====================
   固定展开卡片区
   ===================== */
.active-card-zone {
  flex-shrink: 0;
  width: 380px;
  height: 130px;
  position: relative;
  z-index: 2;
}

.active-card {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  /* 原版深色卡片背景 */
  background: linear-gradient(135deg, #1e1b4b 0%, #2d2a5e 40%, #3b3670 70%, #4a4580 100%);
  border-radius: 20px;
  padding: 24px 28px;
  position: relative;
  cursor: pointer;
  overflow: visible;
  /* 右上角圆弧缺口 - 挖洞半径 30px，比按钮(24px半径)大 6px，产生白色间隙 */
  -webkit-mask-image: radial-gradient(circle 30px at calc(100% + 1px) -1px, transparent 29px, black 30px);
  mask-image: radial-gradient(circle 30px at calc(100% + 1px) -1px, transparent 29px, black 30px);
}

/* =====================
   卡片内部 - 图标
   ===================== */
.active-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  overflow: hidden;
  transition: opacity 0.35s ease;
}

.active-card .card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.active-card .card-icon svg {
  width: 100%;
  height: 100%;
}

/* =====================
   卡片内部 - 文字
   ===================== */
.active-card .card-info {
  margin-left: 16px;
  flex: 1;
  min-width: 0;
  transition: opacity 0.35s ease;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  white-space: nowrap;
  letter-spacing: 0;
}

.card-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  letter-spacing: 0;
}

/* =====================
   箭头按钮 - 深色圆形
   嵌入右上角缺口
   ===================== */
.card-arrow {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 50px;
  height: 50px;
  /* 原版按钮 - 默认紫色 */
  background: linear-gradient(135deg, #6558d3 0%, #7c6fd8 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  z-index: 5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.card-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 原版 hover 效果：hover 卡片区域时箭头变为青色/teal */
.active-card-zone:hover .card-arrow {
  background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
  box-shadow: 0 3px 12px rgba(6, 182, 212, 0.3);
}

/* 内容切换淡入淡出 */
.active-card.fading .card-icon,
.active-card.fading .card-info {
  opacity: 0;
}

/* =====================
   右侧排队图标区
   ===================== */
.queue-zone {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 130px;
  display: flex;
  align-items: center;
}

/* 右侧渐隐遮罩 - 匹配 banner 背景色 */
.queue-zone::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: linear-gradient(90deg, rgba(238, 233, 255, 0), #eee9ff);
  pointer-events: none;
  z-index: 3;
}

.queue-track {
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================
   排队图标卡片 - 白色圆角
   ===================== */
.queue-icon {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  border: 1px solid rgba(200, 195, 230, 0.25);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 原版右侧图标无 hover 视觉效果，仅 cursor: pointer */

.queue-icon .icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
}

.queue-icon .icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.queue-icon .icon-wrap svg {
  width: 100%;
  height: 100%;
}

/* 滑入动画 - 第一个图标被"吸入"展开区 */
.queue-icon.absorbing {
  transform: translateX(-16px) scale(0.85);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================
   响应式
   ===================== */
@media (max-width: 768px) {
  .banner {
    height: auto;
    min-height: 220px;
  }
  .banner-content {
    padding: 20px;
  }
  .marketplace-title {
    font-size: 20px;
  }
  .active-card-zone {
    width: 260px;
    height: 100px;
  }
  .queue-icon {
    width: 90px;
    height: 90px;
  }
  .queue-icon .icon-wrap {
    width: 52px;
    height: 52px;
  }
}
