/**
 * File: client/css/components/cover-creation.css
 * 封面制作样式
 * 作用: 定义封面制作功能的UI样式
 * @date 2025-12-01
 */

/* 封面制作区域 */
.cover-creation-section {
  margin-top: 30px;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.cover-creation-section .section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #000000;
}

/* 封面尺寸选择 */
.cover-size-selector {
  margin-bottom: 20px;
}

.cover-size-selector > label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 10px;
}

.size-btn-group {
  display: flex;
  gap: 12px;
}

.size-btn {
  flex: 1;
  max-width: 200px;
  padding: 12px 20px;
  background: #ffffff;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s ease;
}

.size-btn:hover {
  border-color: #000000;
  color: #000000;
}

.size-btn.active {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}

/* 绘画提示词区域 */
.cover-prompt-section {
  margin-bottom: 20px;
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.prompt-header > label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.cover-prompt-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #1f2937;
  background: #ffffff;
  resize: vertical;
  min-height: 100px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cover-prompt-input:focus {
  outline: none;
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* 匹配到的角色 */
.matched-characters {
  margin-top: 12px;
}

.matched-characters > label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 8px;
}

.character-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  padding: 8px;
  background: #ffffff;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
}

.character-tags .placeholder-text {
  color: #9ca3af;
  font-size: 13px;
}

.character-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #000000;
  color: #ffffff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.character-tag img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.character-tag .no-image {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* 封面文案 */
.cover-text-section {
  margin-bottom: 20px;
}

.cover-text-section > label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 10px;
}

.cover-text-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cover-text-input:focus {
  outline: none;
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* 生成封面按钮 */
.cover-generate-actions {
  margin-bottom: 20px;
}

.cover-generate-actions .btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

/* 封面预览区域 */
.cover-preview-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.cover-preview-section > label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.cover-preview-container {
  display: flex;
  justify-content: center;
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.cover-preview-container img {
  max-width: 100%;
  max-height: 500px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 封面加载状态 */
.cover-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.cover-loading .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f0f0f0;
  border-top-color: #000000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.cover-loading p {
  margin-top: 16px;
  color: #6b7280;
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .cover-creation-section {
    padding: 16px;
  }

  .size-btn-group {
    flex-direction: column;
  }

  .size-btn {
    max-width: 100%;
  }

  .prompt-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
