/**
 * SVG图标基础样式
 */
.icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  color: currentColor;
  vertical-align: middle;
  fill: currentColor;
}

/* 图标大小变体 */
.icon-xs {
  width: 16px;
  height: 16px;
}

.icon-sm {
  width: 20px;
  height: 20px;
}

.icon-md {
  width: 24px;
  height: 24px;
}

.icon-lg {
  width: 32px;
  height: 32px;
}

.icon-xl {
  width: 48px;
  height: 48px;
}

/* 图标动画效果 */
.icon-spin {
  animation: icon-spin 2s linear infinite;
}

@keyframes icon-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.icon-pulse {
  animation: icon-pulse 1s ease-in-out infinite;
}

@keyframes icon-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.icon-shake {
  animation: icon-shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes icon-shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }
  
  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }

  30%, 50%, 70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%, 60% {
    transform: translate3d(4px, 0, 0);
  }
}

.icon-bounce {
  animation: icon-bounce 0.5s ease infinite alternate;
}

@keyframes icon-bounce {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-5px);
  }
}

/* 图标悬停效果 */
.icon-hover-pulse:hover {
  animation: icon-pulse 1s ease-in-out infinite;
}

.icon-hover-spin:hover {
  animation: icon-spin 2s linear infinite;
}

.icon-hover-shake:hover {
  animation: icon-shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

.icon-hover-bounce:hover {
  animation: icon-bounce 0.5s ease infinite alternate;
}

/* 图标颜色变体 */
.icon-primary {
  color: #3b82f6; /* 蓝色 */
}

.icon-success {
  color: #10b981; /* 绿色 */
}

.icon-danger {
  color: #ef4444; /* 红色 */
}

.icon-warning {
  color: #f59e0b; /* 橙色 */
}

.icon-info {
  color: #6366f1; /* 靛蓝色 */
}

/* 图标组合样式 */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 0.375rem;
  background-color: transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.icon-btn:active {
  transform: scale(0.95);
}

/* 带文本的图标 */
.icon-with-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-with-text .icon {
  flex-shrink: 0;
} 