/* Sprite.css */
.sprite-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
}

.sprite-item-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  position: relative;
}

.sprite-item {
  background-image: url("../../images/platform-logo.png");
  background-repeat: no-repeat;
  transition: transform 0.3s ease;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Manually adding styles for each sprite */
.sprite-kylin {
  width: 60px;
  height: 65px;
  background-position: 0px 0px;
}
.sprite-neokylin {
  width: 58px;
  height: 65px;
  background-position: -60px 0px;
}
.sprite-uos {
  width: 104px;
  height: 65px;
  background-position: -118px 0px;
}
.sprite-linx {
  width: 96px;
  height: 65px;
  background-position: -222px 0px;
}
.sprite-windows {
  width: 48px;
  height: 65px;
  background-position: -318px 0px;
}
.sprite-ubuntu {
  width: 44px;
  height: 65px;
  background-position: -366px 0px;
}
.sprite-debian {
  width: 44px;
  height: 65px;
  background-position: -410px 0px;
}
.sprite-feiteng {
  width: 144px;
  height: 65px;
  background-position: -454px 0px;
}
.sprite-longxin {
  width: 100px;
  height: 65px;
  background-position: -598px 0px;
}
.sprite-kunpeng {
  width: 102px;
  height: 65px;
  background-position: -698px 0px;
}
.sprite-shenwei {
  width: 40px;
  height: 65px;
  background-position: -800px 0px;
}
.sprite-zhaoxin {
  width: 44px;
  height: 65px;
  background-position: -840px 0px;
}
.sprite-haiguang {
  width: 50px;
  height: 65px;
  background-position: -884px 0px;
}
.sprite-intel {
  width: 56px;
  height: 65px;
  background-position: -934px 0px;
}
.sprite-amd {
  width: 110px;
  height: 65px;
  background-position: -990px 0px;
}
.sprite-arm {
  width: 86px;
  height: 65px;
  background-position: -1100px 0px;
}

.sprite-item-container:hover .sprite-item {
  transform: scale(1.2);
}

.sprite-caption {
  display: none;
  position: absolute; /* Change to absolute positioning */
  top: -12px; /* Adjust this value as needed to position the caption below the sprite */
  left: 50%;
  transform: translateX(-50%); /* Center the caption */
  transition: opacity 0.3s ease;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 1rem; /* You can now increase this value without affecting the layout */
  padding: 1px 8px;
  border-radius: 4px;
  white-space: nowrap; /* Prevents the text from wrapping */
}

.sprite-item-container:hover .sprite-caption {
  display: block;
}

/* ================ 移动端响应式 (1200px以下) ================ */
@media (max-width: 1199px) {
  .sprite-container {
    gap: 3px;
    padding: 0 20px;
    justify-content: center;
  }

  .sprite-item-container {
    margin: 1px;
  }

  /* 调整移动端图标尺寸 - 比之前稍大 */
  .sprite-item {
    transform: scale(0.9);
  }

  .sprite-item-container:hover .sprite-item {
    transform: scale(1.0);
  }

  /* 移动端隐藏caption，避免布局混乱 */
  .sprite-caption {
    display: none !important;
  }
}
