/* SVG图标库 - 样式文件 */

/* 基础样式重置 */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: #f5f7fa;
  color: #303133;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  transition: all 0.25s ease;
}

/* Tailwind工具类 */
.transition-basic {
  transition: all 0.25s ease;
}

.content-auto {
  content-visibility: auto;
}



.icon-display-container:hover {
  border-color: #409eff;
  background-color: rgb(64 158 255 / 0.05);
}

.icon-display-container.icon-selected {
  border-color: #409eff;
  background-color: rgba(64, 158, 255, 0.05);
}

/* 预览区域的样式定义 */
.icon-svg-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  transition: all 0.2s ease;
}

.icon-svg-wrapper svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: all 0.2s ease;
  object-fit: contain;
  /* 确保SVG内容保持比例 */
  max-width: 100%;
  max-height: 100%;
}

/* 详情页预览容器样式 */
.detail-preview-container {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

/* 确保modalIconPreview始终保持正方形比例 */
#modalIconPreview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.2s ease;
}

/* 优化大尺寸图标的显示 */
#modalIconPreview .icon-svg-element {
  flex-shrink: 0;
  /* 防止图标被压缩 */
}

/* 当选择大尺寸时的特殊样式 */
.size-option[data-size="512"]:checked+.icon-size-preview {
  border-color: #409eff;
  background-color: rgba(64, 158, 255, 0.1);
}

/* 尺寸警告提示样式已迁移到HTML中的Tailwind CSS类 */

/* 脉冲动画效果 */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.animate-pulse {
  animation: pulse 2s infinite;
}






.icon-name-label {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  word-break: break-all;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* 分组标签样式 */
.group-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  border-radius: 20px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

.group-linear {
  background-color: #409eff;
  color: white;
}

.group-filled {
  background-color: #67c23a;
  color: white;
}

.group-delicate {
  background-color: #e6a23c;
  color: white;
}

.group-handdrawn {
  background-color: #f56c6c;
  color: white;
}

.group-flat {
  background-color: #909399;
  color: white;
}

.group-minimal {
  background-color: #606266;
  color: white;
}

.group-other {
  background-color: #909399;
  color: white;
}

/* 选择标记样式 */
.selection-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #409eff;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* 顶部导航样式 */
header {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo-icon {
  position: relative;
  z-index: 10;
  font-size: 24px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-glow {
  position: absolute;
  inset: 0;
  background: rgba(64, 158, 255, 0.2);
  border-radius: 50%;
  filter: blur(8px);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.4;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.7;
  }
}

.header-title {
  font-size: 20px;
  font-weight: bold;
  margin-left: 8px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

@media (min-width: 768px) {
  .header-controls {
    width: auto;
  }
}

/* 搜索框样式 */
.search-container {
  position: relative;
  flex-grow: 1;
  max-width: 300px;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 40px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: #409eff;
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 16px;
}

/* 按钮样式 */
.btn {
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  background: #f9fafb;
  border-color: #409eff;
}

.btn-primary {
  background: #409eff;
  color: white;
  border-color: #409eff;
}

.btn-primary:hover {
  background: #3b82f6;
}

.btn-secondary {
  background: #67c23a;
  color: white;
  border-color: #67c23a;
}

.btn-secondary:hover {
  background: #5cb85c;
}

.btn-group {
  display: flex;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
}

.btn-group .btn {
  border: none;
  border-radius: 0;
  border-right: 1px solid #e5e7eb;
}

.btn-group .btn:last-child {
  border-right: none;
}

/* 统计和操作区样式 */
.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  padding: 0 20px;
}

.stats-text {
  font-size: 14px;
  color: #6b7280;
}

.stats-number {
  color: #409eff;
  font-weight: 500;
}

.controls-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 筛选器样式 */
.filter-select {
  background: white;
  border: 1px solid #e5e7eb;
  padding: 6px 32px 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  transition: all 0.2s ease;
}

.filter-select:hover {
  background-color: #f9fafb;
  border-color: #409eff;
}

.filter-select:focus {
  outline: none;
  border-color: #409eff;
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
}

/* 提示信息样式 */
.info-tip {
  background: #e3f2fd;
  border-left: 4px solid #409eff;
  padding: 16px;
  margin-bottom: 24px;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
}

.info-tip.mobile-only {
  display: block;
}

.info-tip.desktop-only {
  display: none;
}

@media (min-width: 768px) {
  .info-tip.mobile-only {
    display: none;
  }

  .info-tip.desktop-only {
    display: block;
  }
}

.kbd {
  display: inline-block;
  padding: 2px 6px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  font-size: 12px;
  font-family: monospace;
}

/* 加载状态样式 */
.loading-container {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #409eff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: #6b7280;
  font-size: 14px;
}

/* 加载更多样式 */
.load-more-container {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.load-more-spinner {
  width: 24px;
  height: 24px;
  border: 4px solid #409eff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 8px;
}

.load-more-text {
  font-size: 14px;
  color: #6b7280;
}

.load-more-end {
  font-size: 14px;
  color: #9ca3af;
  font-style: italic;
}

/* 模态框样式 - 核心样式保留，其他样式使用Tailwind CSS */
.modal-overlay {
  transition: all 0.2s ease;
}

.modal-content {
  transition: transform 0.2s ease;
}

/* 提示框样式 */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(40px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: white;
}

.toast.success {
  background: #67c23a;
}

.toast.error {
  background: #f56c6c;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* 模态框相关样式 */
.color-picker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  transition: all 0.2s ease;
}

.color-picker:hover {
  border-color: #409eff;
}

.color-option {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.color-option:hover {
  transform: scale(1.1);
}

.size-option {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  text-align: center;
}

.size-option:hover {
  border-color: #409eff;
  background: rgba(64, 158, 255, 0.05);
}

/* JavaScript依赖的类定义 - 这些类名被JS代码使用，必须保留 */

/* 尺寸选项相关 */
.size-option {
  /* 基础样式已在HTML中通过Tailwind类实现 */
  /* 选中效果现在直接通过JS添加Tailwind工具类实现 */
  /* 不再使用自定义的选中类，完全通过Tailwind工具类实现选中状态 */
}

/* 图标显示容器 - 被JS用来选择和操作图标 */
.icon-display-container {
  /* 基础样式已在HTML中通过Tailwind类实现 */
}

/* 模态框图标预览 - 被JS用来渲染和操作SVG */
.detail-icon-wrapper,
.detail-icon-container {
  /* 基础样式已在HTML中通过Tailwind类实现 */
}

/* 路径颜色选择器弹出层 - 被JS用来显示和操作路径颜色 */
.path-color-picker-popup {
  /* 基础样式已在HTML中通过Tailwind类实现 */
}

/* 自定义颜色选择器 - 被JS用来创建和操作颜色选择器 */
.custom-color-picker {
  /* 基础样式已在HTML中通过Tailwind类实现 */
}

/* 详情页预览容器 - 基础样式已在HTML中通过Tailwind类实现 */
/* 仅保留这个空类以避免选择器错误，但样式已在HTML中通过Tailwind实现 */
.detail-preview-container {}

.detail-icon-container {
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-icon-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 路径选择高亮样式 */
.selected-path {
  outline: 2px solid #409eff !important;
  outline-offset: 1px;
  cursor: pointer;
}

.path-hover {
  outline: 1px solid #409eff !important;
  outline-offset: 0px;
  cursor: pointer;
  transition: outline 0.2s ease;
}

/* 确保详情页图标容器有足够空间显示outline */
.detail-icon-wrapper {
  padding: 8px !important;
}

/* 图片复制按钮样式 - 已直接内嵌到HTML中 */

/* 用于图片转换的临时容器 */
.temp-conversion-container {
  position: absolute;
  top: -1000px;
  left: -1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 隐藏滚动条但保留滚动功能 */
#svgCode {
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

#svgCode::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

/* 自定义颜色选择器样式 - 已直接内嵌到HTML中 */

/* 随机路径颜色按钮样式 - 已直接内嵌到HTML中 */

/* 隐藏类 */
.hidden {
  display: none !important;
}

/* 分组标签样式 - 已直接内嵌到HTML中 */

/* 图标选中状态 - 已直接内嵌到HTML中 */

/* 颜色选择器样式 - 已直接内嵌到HTML中 */

/* 尺寸选择器样式 - 已直接内嵌到HTML中 */

/* 复选框样式 - 已直接内嵌到HTML中 */

/* Logo动画效果 - 已直接内嵌到HTML中 */
.logo-icon {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.4;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.7;
  }
}

/* 加载更多样式 - 已直接内嵌到HTML中 */

.detail-icon-wrapper {
  min-height: 200px;
}

.detail-icon-container {
  width: 160px;
  height: 160px;
}

/* 移除详情页图标容器的特殊样式覆盖，使用原始的icon-svg-wrapper样式 */

.preview-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
}

.preview-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .detail-preview-container {
    @apply p-4;
    min-height: 220px;
  }

  .detail-icon-wrapper {
    @apply p-3;
    min-height: 140px;
  }

  .detail-icon-container {
    width: 100px;
    height: 100px;
  }

  .preview-controls {
    font-size: 0.75rem;
  }


  .group-badge {
    font-size: 0.75rem;
    padding-left: 0.375rem;
    padding-right: 0.375rem;
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
    font-size: 10px;
  }
}

/* 路径选择高亮样式 */
.selected-path {
  outline: 2px solid #409eff !important;
  outline-offset: 2px;
}

.path-hover {
  outline: 1px solid #409eff !important;
  outline-offset: 1px;
}

/* 图片复制按钮样式 */


/* 用于图片转换的临时容器 */
.temp-conversion-container {
  position: absolute;
  top: -1000px;
  left: -1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .icon-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  /* .icon-display-container {
    width: 140px;
    height: 140px;
    padding: 12px;
  } */

  .icon-font-wrapper {
    width: 60px;
    height: 60px;
  }

  .icon-font-element {
    font-size: 36px;
  }

  .header-container {
    padding: 12px 16px;
  }

  .stats-container {
    padding: 0 16px;
  }
}

/* 路径选中状态样式 */
/* .path-selected {
  outline: 1px dashed #f56c6c !important;
  outline-offset: 2px !important;
  animation: pathPulse 2s infinite;
} */

@keyframes pathPulse {

  0%,
  100% {
    outline-color: #f56c6c;
  }

  50% {
    outline-color: #ff8a8a;
  }
}


/* 路径2颜色选择器样式 */
.path2-color-option {
  transition: all 0.2s ease;
  position: relative;
}

.path2-color-option:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.path2-color-option.selected {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px #409eff;
}

.path2-color-option.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* 路径颜色选择器弹窗样式 - 只保留动画效果 */
.path-color-picker-popup {
  animation: fadeInScale 0.2s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 打印样式 */
@media print {

  .header-controls,
  .stats-container,
  .modal-overlay,
  .toast {
    display: none !important;
  }

  .icon-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }
}


code[class*=language-],
pre[class*=language-] {
  font-size: 10px !important;
}