/* 全局变量 */
:root {
  --primary-color: #06b6d4;
  --secondary-color: #3b82f6;
  --bg-dark: #111827;
  --bg-light: #f9fafb;
  --text-dark: #1f2937;
  --text-light: #f9fafb;
  --border-dark: #374151;
  --border-light: #e5e7eb;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

body.light {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* 容器样式 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 应用主体容器 */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-dark);
  color: var(--text-light);
  margin-top: 60px;
}

/* 顶部导航样式 */
.header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-dark);
}

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

.header-tabs {
  display: flex;
  gap: 0.5rem;
}

.header-tab {
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background-color: #1f2937;
  color: #9ca3af;
}

.header-tab:hover {
  background-color: #374151;
}

.header-tab.active {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: white;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle,
.history-btn {
  padding: 0.5rem;
  border-radius: 50%;
  background-color: #1f2937;
  color: var(--text-light);
  cursor: pointer;
  transition: background-color 0.2s ease;
  border: none;
  font-size: 1rem;
}

.theme-toggle:hover,
.history-btn:hover {
  background-color: #374151;
}

/* 主要内容区域 */
.main-content {
  flex: 1;
  padding: 1rem 0;
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 搜索和筛选容器 */
.search-filter-container {
  margin-bottom: 1.5rem;
}

.search-filter-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .search-filter-row {
    flex-direction: row;
  }
}

.search-input-container {
  flex: 1;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background-color: #1f2937;
  border: 1px solid var(--border-dark);
  border-radius: 0.5rem;
  color: var(--text-light);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.category-select-container {
  position: relative;
}

.category-select {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 1rem;
  background-color: #1f2937;
  border: 1px solid var(--border-dark);
  border-radius: 0.5rem;
  color: var(--text-light);
  font-size: 0.875rem;
  outline: none;
  appearance: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .category-select {
    width: auto;
    padding-right: 2.5rem;
  }
}

.category-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.select-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

/* 主要网格布局 */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr 2fr;
  }
  
  .text-description-section {
    order: 1;
  }
  
  .upload-section {
    order: 2;
  }
}

/* 文字描述区域 */
.text-description-section,
.template-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 提示词区域 */
.prompt-section,
.background-section,
.negative-prompt-section,
.advanced-settings-section {
  background-color: #1f2937;
  border-radius: 0.75rem;
  padding: 1rem;
}

.prompt-section-header,
.advanced-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.prompt-section-title,
.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prompt-section-title h3,
.section-title h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
}

.required-mark {
  color: #ef4444;
}

.examples-btn {
  font-size: 0.75rem;
  color: var(--primary-color);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.examples-btn:hover {
  color: #0891b2;
}

.prompt-formula {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

.prompt-input-container {
  position: relative;
}

.prompt-input {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 0.5rem;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
}

.prompt-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.vocabulary-btn {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.5rem;
  background-color: #374151;
  border: none;
  border-radius: 0.25rem;
  color: #d1d5db;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: background-color 0.2s ease;
}

.vocabulary-btn:hover {
  background-color: #4b5563;
}

.prompt-length,
.negative-prompt-length {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  font-size: 0.75rem;
  color: #6b7280;
}

/* 背景参考图区域 */
.background-upload-area {
  border: 1px dashed var(--border-dark);
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.background-upload-area:hover {
  border-color: var(--primary-color);
}

.upload-title {
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.upload-subtitle {
  font-size: 0.75rem;
  color: #9ca3af;
}

.background-preview {
  margin-top: 0.75rem;
  position: relative;
}

.background-image {
  width: 100%;
  max-height: 200px;
  border-radius: 0.5rem;
  object-fit: contain;
}

.remove-image-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem;
  border-radius: 50%;
  background-color: rgba(17, 24, 39, 0.7);
  border: none;
  color: var(--text-light);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.remove-image-btn:hover {
  background-color: #1f2937;
}

/* 反向提示词区域 */
.negative-prompt-hint {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

.negative-prompt-container {
  position: relative;
}

.negative-prompt-input {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 0.5rem;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
}

.negative-prompt-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

/* 高级设置区域 */
.toggle-advanced-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s ease;
}

.toggle-advanced-btn:hover {
  color: #d1d5db;
}

.setting-item {
  margin-bottom: 1rem;
}

.setting-item:last-child {
  margin-bottom: 0;
}

.setting-label {
  display: block;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.setting-select-container {
  position: relative;
}

.setting-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 0.5rem;
  color: var(--text-light);
  font-size: 0.75rem;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.setting-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.setting-select-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.75rem;
  pointer-events: none;
}

/* 生成按钮 */
.generate-btn {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: 9999px;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.2s ease;
}

.generate-btn:hover {
  opacity: 0.9;
}

.credit-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
}

/* 模板选择区域 */
.section-main-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.random-template-btn {
  aspect-ratio: 1;
  border-radius: 0.5rem;
  background: linear-gradient(to bottom right, var(--primary-color), var(--secondary-color));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.random-template-btn:hover {
  opacity: 0.9;
}

.random-text {
  font-size: 0.75rem;
  color: white;
}

/* 上传区域 */
.upload-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-area {
  border: 2px dashed var(--border-dark);
  border-radius: 0.75rem;
  padding: 2rem;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.upload-area:hover {
  border-color: #4b5563;
}

.upload-placeholder {
  text-align: center;
}

.upload-icon {
  width: 4rem;
  height: 4rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.upload-text {
  color: #d1d5db;
  margin-bottom: 0.5rem;
}

.upload-subtext {
  font-size: 0.75rem;
  color: #6b7280;
}

.uploading-indicator {
  text-align: center;
}

.uploading-spinner {
  width: 4rem;
  height: 4rem;
  border: 4px solid transparent;
  border-top-color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  border-radius: 50%;
  margin-bottom: 1rem;
  animation: spin 1s linear infinite;
}

.uploading-text {
  color: #d1d5db;
}

.uploaded-image-container {
  position: relative;
  width: 100%;
  max-width: 28rem;
}

.uploaded-image {
  width: 100%;
  max-height: 400px;
  border-radius: 0.5rem;
  object-fit: contain;
}

/* 操作流程指示 */
.workflow-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}

.workflow-step {
  text-align: center;
}

.workflow-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: #374151;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
}

.workflow-icon-active {
  background-color: var(--primary-color);
}

.workflow-text {
  font-size: 0.75rem;
  color: var(--text-light);
}

.workflow-arrow {
  color: #6b7280;
}

/* 页脚样式 */
.footer {
  padding: 1rem;
  border-top: 1px solid #1f2937;
  text-align: center;
}

.footer p {
  font-size: 0.75rem;
  color: #6b7280;
}

/* 历史记录面板 */
.history-panel {
  position: fixed;
  top: 75px;
  right: 0;
  width: 100%;
  max-width: 800px;
  /* max-width: 3xl; */
  height: 100%;
  background-color: var(--bg-dark);
  border-left: 1px solid var(--border-dark);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.history-header {
  padding: 1rem;
  border-bottom: 1px solid #1f2937;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background-color: var(--bg-dark);
  z-index: 10;
}

.history-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-light);
}

.close-history-btn {
  padding: 0.5rem;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.close-history-btn:hover {
  background-color: #1f2937;
}

.history-search-container {
  padding: 1rem;
  border-bottom: 1px solid #1f2937;
  background-color: rgba(31, 41, 55, 0.5);
}

.history-search-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .history-search-row {
    flex-direction: row;
    align-items: center;
  }
}

.history-search-input-container {
  flex: 1;
  position: relative;
}

.history-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 0.5rem;
  color: var(--text-light);
  font-size: 0.75rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.history-search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.history-search-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.history-search-actions {
  display: flex;
  gap: 0.5rem;
}

.history-search-btn,
.history-reset-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.history-search-btn {
  background-color: var(--primary-color);
  color: white;
}

.history-search-btn:hover {
  background-color: #0891b2;
}

.history-reset-btn {
  background-color: #374151;
  color: white;
  border: 1px solid #4b5563;
}

.history-reset-btn:hover {
  background-color: #4b5563;
}

.date-range-container {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
}

.date-range-icon {
  color: #9ca3af;
  margin-right: 0.5rem;
}

.date-range-text {
  font-size: 0.75rem;
  color: #d1d5db;
}

.batch-actions {
  padding: 1rem;
  border-bottom: 1px solid #1f2937;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.batch-selection {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.select-all-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.select-all-checkbox {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  border: 1px solid #4b5563;
  background-color: var(--bg-dark);
  color: var(--primary-color);
}

.batch-buttons {
  display: flex;
  gap: 0.5rem;
}

.batch-download-btn,
.batch-delete-btn {
  font-size: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

.batch-download-btn {
  color: #9ca3af;
}

.batch-download-btn:hover {
  color: #d1d5db;
}

.batch-delete-btn {
  color: #f87171;
}

.batch-delete-btn:hover {
  color: #fca5a5;
}

.history-count {
  font-size: 0.75rem;
  color: #9ca3af;
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.history-item {
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.3s ease-out;
}

.history-item-header {
  margin-bottom: 0.5rem;
}

.history-item-checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.history-item-checkbox-container .history-select {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  border: 1px solid #4b5563;
  background-color: var(--bg-dark);
  color: var(--primary-color);
}

.history-item-id {
  font-size: 0.75rem;
  color: #d1d5db;
}

.history-item-time {
  font-size: 0.625rem;
  color: #6b7280;
  margin-left: 0.5rem;
}

.history-item-content {
  position: relative;
  border: 1px solid #1f2937;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.history-item-content:hover {
  border-color: #374151;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.history-item-image {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.history-item-actions {
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.history-action-btn {
  padding: 0.5rem;
  border-radius: 50%;
  background-color: rgba(17, 24, 39, 0.7);
  border: none;
  color: var(--text-light);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.history-action-btn:hover {
  background-color: #1f2937;
}

.history-action-btn.delete-btn:hover {
  background-color: rgba(239, 68, 68, 0.7);
}

/* 截图工具提示 */
.screenshot-tooltip {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 0.75rem;
  width: 16rem;
  z-index: 50;
  animation: slideInRight 0.3s ease-out;
}

.screenshot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.screenshot-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.screenshot-title span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
}

.close-screenshot-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-screenshot-btn:hover {
  color: #d1d5db;
}

.screenshot-message,
.screenshot-info {
  font-size: 0.625rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

.mark-share-btn {
  width: 100%;
  padding: 0.5rem;
  background-color: #1f2937;
  border: none;
  border-radius: 0.5rem;
  color: var(--text-light);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mark-share-btn:hover {
  background-color: #374151;
}

/* 对话框基础样式 */
.dialog-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.dialog {
  width: 90%;
  max-width: 400px;
  background-color: #111827;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease-out;
}

/* 提示词库对话框样式 */
.vocabulary-dialog {
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background-color: #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
}

/* 对话框头部 */
.dialog-header {
  padding: 16px 20px;
  border-bottom: 1px solid #374151;
  position: relative;
}

/* 提示词库头部特殊样式 */
.vocabulary-dialog-header {
  padding: 20px;background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
  border-bottom: 1px solid #393e46;
  position: relative;
}

/* 关闭按钮 */
.close-btn {
  position: absolute;
  top: 2px;
  right: 12px;
  background: none;
  border: none;
  color: #d1d5db;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

/* 提示词库关闭按钮特殊样式 */
.vocabulary-close-btn {
  top: 15px;
  right: 15px;
  /* color: #ffffff;
  font-size: 18px; */
  border-radius: 50%;
  height: 25px;
  width: 25px;
  position: absolute;
}

.close-btn:hover,
/* .vocabulary-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
} */

/* 对话框内容 */
.dialog-content {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

/* 提示词库内容区域 */
.vocabulary-dialog-content {
  flex: 1;
  overflow-y: auto;
}

/* 公式说明 */
.formula {
  color: #9ca3af;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}

/* 标题样式 */
.dialog-title {
  color: #06b6d4;
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 16px;
}

/* 提示词库标题特殊样式 */
.vocabulary-dialog-title {
  color: #ffffff;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

/* 示例列表 */
.examples-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 示例项 */
.example-item {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 12px 16px;
  color: #f3f4f6;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.example-item:hover {
  background-color: rgba(0, 0, 0, 0.4);
  border-color: #06b6d4;
  transform: translateX(4px);
}

/* 搜索框 */
.vocabulary-search-container {
  margin-bottom: 20px;
  position: relative;
}

.vocabulary-search-input {
  width: 100%;
  padding: 10px 15px 10px 40px;
  background-color: #16213e;
  border: 1px solid #393e46;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.vocabulary-search-input:focus {
  border-color: #3498db;
}

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

/* 分类标签 */
.categories {
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
  white-space: nowrap;
}

.categories::-webkit-scrollbar {
  height: 6px;
}

.categories::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.categories::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, 0.5);
  border-radius: 3px;
}

.category-tab {
  display: inline-block;
  padding: 8px 20px;
  margin-right: 10px;
  background-color: transparent;
  border: 1px solid #393e46;
  border-radius: 20px;
  color: #c9d6df;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.category-tab.active {
  background-color: #3498db;
  border-color: #3498db;
  color: white;
}

.category-tab:hover:not(.active) {
  border-color: #3498db;
  color: #3498db;
}

/* 提示词网格 */
.prompt-tags {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.prompt-tag {
  padding: 8px 12px;
  background-color: rgba(52, 152, 219, 0.2);
  border: 1px solid rgba(52, 152, 219, 0.5);
  border-radius: 16px;
  color: #c9d6df;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.prompt-tag:hover {
  background-color: rgba(52, 152, 219, 0.3);
  transform: translateY(-2px);
}

.prompt-tag.selected {
  background-color: rgba(52, 152, 219, 0.4);
  border-color: #3498db;
  color: #3498db;
}

.prompt-tag .en-text {
  display: block;
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}

/* 底部按钮 */
.vocabulary-dialog-footer {
  padding: 20px;
  background-color: #16213e;
  border-top: 1px solid #393e46;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clear-btn,
.add-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.clear-btn {
  background-color: transparent;
  color: #c9d6df;
  border: 1px solid #393e46;
}

.clear-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #c9d6df;
}

.add-btn {
  background-color: #3498db;
  color: white;
}

.add-btn:hover {
  background-color: #2980b9;
  transform: translateY(-1px);
}

/* 提示样式 */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 2000;
  animation: fadeOut 3s forwards;
}

/* 动画效果 */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 新添加的模板项样式 */
.template-item {
  aspect-ratio: 1;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.template-item-default {
  border-color: transparent;
}

.template-item-default:hover {
  border-color: #4b5563;
}

.template-item-selected {
  border-color: #06b6d4;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.template-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-name {
  padding: 0.25rem;
  background-color: #1f2937;
  color: #e5e7eb;
  font-size: 0.75rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 新添加的头部标签样式 */
.header-tab {
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background-color: #1f2937;
  color: #9ca3af;
}

.header-tab:hover {
  background-color: #374151;
}

.header-tab-active {
  background: linear-gradient(to right, #06b6d4, #3b82f6);
  color: white;
}

/* 新添加的Toast提示样式 */
.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 50;
  max-width: 20rem;
  font-size: 0.875rem;
}

.toast-success {
  background-color: #16a34a;
  color: white;
}

.toast-error {
  background-color: #dc2626;
  color: white;
}

.toast-warning {
  background-color: #ea580c;
  color: white;
}

.toast-info {
  background-color: #2563eb;
  color: white;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

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

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 114, 128, 0.7);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .vocabulary-dialog {
    width: 95%;
    max-height: 95vh;
  }
  
  .prompt-tags {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .history-panel {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .screenshot-tooltip {
    width: calc(100% - 2rem);
    left: 1rem;
    right: 1rem;
    top: 1rem;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .workflow-arrow.hidden.sm-block {
    display: none;
  }
  
  .workflow-arrow.block.sm-hidden {
    display: block;
  }
}