/**
 * 样式文件
 * 仅包含 @tailwind 指令和极少量全局基础样式
 */

@tailwind base;
@tailwind components;
@tailwind utilities;

/* 全局基础样式 */
body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell',
    sans-serif;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 富文本编辑器样式 */
.ql-editor {
  min-height: 200px;
}

/* Quill工具栏容器样式 */
.ql-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
}

.ql-toolbar .ql-formats {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.ql-toolbar .ql-ai-polish {
  margin-left: 8px;
}

/* 标题区域样式 */
.title-placeholder {
  color: #9ca3af; /* gray-400 */
  font-style: italic;
}

/* 分隔线样式 */
.title-separator {
  border-top: 1px solid #e5e7eb; /* gray-200 */
  margin: 10px 0;
}

/* 正文区域样式 */
.content-placeholder {
  color: #9ca3af; /* gray-400 */
  font-style: italic;
}

/* AI润色按钮样式 */
.ql-toolbar .ql-ai-polish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: #1d4ed8; /* blue-700 */
  border: none;
  background: #dbeafe; /* blue-100 */
  border-radius: 4px;
  min-width: 80px; /* 确保按钮有足够的宽度显示图标和文字 */
  text-align: center;
  white-space: nowrap;
  transition: all 0.2s ease-in-out;
}

.ql-toolbar .ql-ai-polish:hover {
  background-color: #bfdbfe; /* blue-200 */
  color: #1e40af; /* blue-800 */
}

.ql-toolbar .ql-ai-polish.ql-active {
  background-color: #93c5fd; /* blue-300 */
  color: #1e3a8a; /* blue-900 */
}

/* 文件上传区域样式 */
.file-upload-area.dragover {
  border-color: #3b82f6 !important;
  background-color: #eff6ff !important;
}

/* 动画效果 */
.transition-all {
  transition: all 0.3s ease;
}

/* 模态框动画 */
.modal-enter {
  animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
