/* components/chenghao-tag/chenghao-tag.wxss */

/* ========== 根容器 ========== */
.tag-root {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 4rpx;
    overflow: hidden;
    flex-shrink: 0;
    margin: 4rpx;
    box-sizing: border-box;
  }

  /* 身份装饰 / 自定义色：圆角标 */
  .tag-root.tag-pill {
    border-radius: 20rpx;
    clip-path: none;
    box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.12);
  }

  .tag-pill .tag-text {
    padding: 0;
    text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.25);
  }
  
  /* ========== 背景图 ========== */
  .tag-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    border-radius: inherit;
  }
  
  /* ========== 文字层 ========== */
  .tag-text {
    position: relative;
    z-index: 2;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.5);
    padding: 0 10rpx;
  }
  
  /* ========== 多边形形状 ========== */
  .tag-root.liubianxing {
    clip-path: polygon(12% 0%, 88% 0%, 100% 50%, 88% 100%, 12% 100%, 0% 50%);
  }
  .tag-root.lingxing {
    clip-path: polygon(50% 0%, 85% 12%, 100% 50%, 85% 88%, 50% 100%, 15% 88%, 0% 50%, 15% 12%);
  }
  .tag-root.wujiaoxing {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  }
  .tag-root.dunpai {
    clip-path: polygon(18% 0%, 82% 0%, 100% 18%, 95% 50%, 100% 82%, 82% 100%, 18% 100%, 0% 82%, 5% 50%, 0% 18%);
  }
  .tag-root.jiantou {
    clip-path: polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%, 12% 50%);
  }
  
  /* ========== 动画 ========== */
  /* 流光扫描 */
  .tag-root.shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: skewX(-20deg);
    animation: shine-anim 2s infinite;
    z-index: 1;
    pointer-events: none;
  }
  @keyframes shine-anim {
    0% { left: -100%; }
    100% { left: 200%; }
  }
  
  /* 呼吸光晕 */
  .tag-root.pulse {
    animation: pulse-anim 1.5s ease-in-out infinite;
  }
  @keyframes pulse-anim {
    0%, 100% { filter: brightness(1); transform: scale(1); }
    50% { filter: brightness(1.2); transform: scale(1.04); }
  }
  
  /* 外发光闪烁 */
  .tag-root.glow {
    animation: glow-anim 2s ease-in-out infinite;
  }
  @keyframes glow-anim {
    0%, 100% { box-shadow: 0 0 8rpx rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 20rpx rgba(255, 215, 0, 0.8), 0 0 40rpx rgba(255, 215, 0, 0.4); }
  }

  /* 身份标签闪光 */
  .tag-root.pill-flash::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    animation: shine-anim 2.2s infinite;
    z-index: 1;
    pointer-events: none;
  }