/**
 * 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;
  }
}

/**
 * @description 封面结果容器和集数编辑器样式
 * @date 2026-02-14
 */

/* 封面结果容器 */
.cover-result-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

/* 封面图片突出显示 */
.cover-result-image {
  max-width: 100%;
  max-height: 600px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cover-result-image:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* 集数编辑器 */
.episode-editor {
  width: 100%;
  max-width: 500px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.episode-editor label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.episode-editor-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* 集数输入框 */
.episode-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  color: #1f2937;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.episode-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 确定按钮 - 黑色底白字 */
.btn-regenerate-episode {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: #000000;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn-regenerate-episode:hover {
  background: #1f2937;
  transform: translateY(-1px);
}

.btn-regenerate-episode:active {
  transform: translateY(0);
}

.btn-regenerate-episode:disabled {
  background: #6b7280;
  cursor: not-allowed;
  transform: none;
}

/* 提示文字 */
.episode-hint {
  margin-top: 12px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 600px) {
  .episode-editor-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-regenerate-episode {
    width: 100%;
  }
}

/**
 * @description 积分扣除确认弹窗 - 高级白+黑配色
 * @date 2026-02-14
 */

/* 弹窗遮罩层 */
.credits-confirm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.credits-confirm-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

/* 弹窗内容 */
.credits-confirm-content {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 400px;
  animation: creditsModalFadeIn 0.3s ease-out;
  z-index: 1;
}

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

/* 弹窗头部 */
.credits-confirm-header {
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid #e5e5e5;
}

.credits-confirm-title {
  font-size: 20px;
  font-weight: 600;
  color: #000000;
  margin: 0;
}

/* 弹窗主体 */
.credits-confirm-body {
  padding: 24px;
}

.credits-confirm-text {
  font-size: 15px;
  color: #333333;
  line-height: 1.6;
  margin: 0;
}

.credits-confirm-text strong {
  color: #000000;
  font-weight: 600;
}

/* 弹窗底部按钮 */
.credits-confirm-footer {
  padding: 16px 24px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-credits-cancel,
.btn-credits-confirm {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

/* 取消按钮 - 白底黑字 */
.btn-credits-cancel {
  background: #f5f5f5;
  color: #333333;
  border: 1px solid #d1d5db;
}

.btn-credits-cancel:hover {
  background: #e5e5e5;
  border-color: #999999;
}

/* 确认按钮 - 黑底白字 */
.btn-credits-confirm {
  background: #000000;
  color: #ffffff;
}

.btn-credits-confirm:hover {
  background: #333333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.btn-credits-confirm:active {
  transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 480px) {
  .credits-confirm-content {
    width: 95%;
  }

  .credits-confirm-footer {
    flex-direction: column-reverse;
  }

  .btn-credits-cancel,
  .btn-credits-confirm {
    width: 100%;
  }
}
