/* 自定义字体和全局样式 */
body {
  font-family: "Inter", "Source Han Sans CN", "Microsoft YaHei", sans-serif;
  background-color: #f8f9fa;
  color: #333333;
}

/* 弹窗样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 0;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 10px 24px 10px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 0 24px 20px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* 搜索框优化 */
.search-input {
  padding: 12px 16px;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  outline: none;
}

.search-input:focus {
  border-color: #4070f4;
  box-shadow: 0 0 0 2px rgba(64, 112, 244, 0.1);
}

/* 卡片hover效果 */
.chemical-card {
  transition: all 0.3s ease;
  border: 1px solid #f1f3f4;
}

.chemical-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* 危险标识样式 */
.dangerous-badge {
  background-color: #fde8e8;
  color: #d94230;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
}

/* 危险图标样式 - 仅显示图标 */
.dangerous-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #d94230;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dangerous-icon:hover {
  background-color: #fbd5d5;
  transform: scale(1.1);
}

/* 危险提示工具提示 */
.dangerous-tooltip {
  position: absolute;
  top: -40px;
  right: 0;
  background-color: #d94130cc;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dangerous-tooltip::after {
  content: "";
  position: absolute;
  bottom: -4px;
  right: 8px;
  width: 8px;
  height: 8px;
  background-color: #d94130cc;
  transform: rotate(45deg);
}

.dangerous-icon:hover .dangerous-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 图标样式优化 */
.icon-linear {
  stroke-width: 1.5px;
}

/* 化学式等宽字体 */
.chemical-formula {
  font-family: "Monaco", "Menlo", "Consolas", monospace;
  font-size: 14px;
}

/* 次要文字样式 */
.secondary-text {
  color: #666666;
  font-size: 12px;
}

/* 按钮样式优化 */
.btn-blue {
  background-color: #4070f4;
  transition: background-color 0.2s ease;
}

.btn-blue:hover {
  background-color: #3050d4;
}

.btn-green {
  background-color: #42b983;
  transition: background-color 0.2s ease;
}

.btn-green:hover {
  background-color: #359974;
}

/* 禁用按钮样式 */
.btn-disabled {
  background-color: #cccccc;
  color: #999999;
  cursor: not-allowed;
}

.btn-disabled:hover {
  background-color: #cccccc;
}

/* 统计卡片样式 */
.stat-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

/* 设置菜单样式 */
.settings-menu {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 0px solid #e5e7eb;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.settings-menu:not(.hidden) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.settings-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 12px;
  width: 12px;
  height: 12px;
  background: white;
  border-left: 1px solid #e5e7eb;
  border-top: 1px solid #e5e7eb;
  transform: rotate(45deg);
}

/* 齿轮按钮样式 */
.settings-gear-btn {
  background-color: transparent;
  border: none;
  outline: none;
  cursor: pointer;
}

.settings-gear-btn:hover {
  /* background-color: #f1f3f4; */
  transform: scale(1.1) rotate(90deg);
}

.settings-gear-btn:hover i {
  color: #666666;
}

.settings-gear-btn i {
  font-size: 18px;
  transition: all 0.3s ease;
}

.backtoTOP-btn:hover {
  /* background-color: #f1f3f4; */
  transform: scale(1.2);
}