// 添加模态框样式
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: var(--radius);
  max-width: 900px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
}

.cat-desc {
  color: var(--text-light);
  margin-bottom: 20px;
}

.no-results {
  text-align: center;
  color: var(--text-light);
  padding: 40px;
}

/* 工具页面样式 */
.tool-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.tool-actions .btn {
  display: flex;
  align-items: center;
  gap: 5px;
}

.copy-btn {
  position: relative;
}

.copy-success {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #4caf50;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
}

.copy-success.show {
  opacity: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    padding: 15px;
  }
  
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* 工具特定样式 */
.result-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 15px;
}

.result-comparison > div {
  background: var(--secondary-color);
  border-radius: 4px;
  padding: 15px;
}

.result-comparison h4 {
  margin-bottom: 10px;
  color: var(--text-color);
}

.highlight {
  background: #fff3cd;
  padding: 2px 4px;
  border-radius: 2px;
}

.error {
  color: #dc3545;
}

.success {
  color: #28a745;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
