/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* 头部样式 */
.header {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #f0c38e;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.subtitle {
  font-size: 1.1rem;
  color: #a9b3c1;
  max-width: 800px;
  margin: 0 auto;
}

/* 步骤指示器 */
.steps {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-bottom: 40px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 100px;
  right: 100px;
  height: 2px;
  background: linear-gradient(90deg, #f0c38e 0%, #f1a661 100%);
  z-index: 1;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.step-text {
  font-size: 0.9rem;
  color: #a9b3c1;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: #f0c38e;
  color: #16213e;
}

.step.active .step-text {
  color: #f0c38e;
  font-weight: bold;
}

/* 步骤内容 */
.step-content {
  display: none;
}

.step-content.active {
  display: block;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 30px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #f0c38e;
  display: flex;
  align-items: center;
  gap: 10px;
}

.script-tip {
  font-size: 0.9rem;
  color: #a9b3c1;
  font-weight: normal;
  margin-left: 10px;
}

/* 按钮样式 */
.btn {
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-btn {
  background: linear-gradient(90deg, #f0c38e 0%, #f1a661 100%);
  color: #16213e;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(241, 166, 97, 0.3);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-group {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 20px;
}

.mt-30 {
  margin-top: 30px !important;
}

/* 脚本控制区 */
.script-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

/* 输入框样式 */
#idea-input {
  width: 100%;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1rem;
  resize: none;
  margin-bottom: 20px;
}

#idea-input::placeholder {
  color: #a9b3c1;
}

.hint {
  color: #a9b3c1;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

/* 选题列表 */
.topics-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.topic-item {
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
}

.topic-item:hover {
  border-color: #f0c38e;
  background: rgba(240, 195, 142, 0.1);
  transform: translateY(-2px);
}

.topic-item.selected {
  border-color: #f0c38e;
  background: rgba(240, 195, 142, 0.2);
}

/* 分镜脚本样式（核心优化） */
.script-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.shot-card {
  padding: 25px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #f0c38e;
  transition: all 0.3s ease;
}

.shot-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.shot-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shot-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0c38e;
  color: #16213e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  margin-right: 15px;
}

.shot-title {
  font-size: 1.4rem;
  color: #f0c38e;
}

.shot-section {
  margin-bottom: 18px;
}

.shot-section:last-child {
  margin-bottom: 0;
}

.shot-section h4 {
  font-size: 1rem;
  color: #a9b3c1;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shot-section h4 i {
  color: #f0c38e;
}

.shot-content {
  padding: 12px 15px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
}

/* 人物设定样式 */
.character-setting .shot-content {
  color: #f5d7b0;
}

/* 提示词样式 */
.prompt-content {
  color: #e0e0e0;
}

/* 旁白样式 */
.narration .shot-content {
  color: #f0c38e;
  font-style: italic;
  background: rgba(240, 195, 142, 0.08);
  border-color: rgba(240, 195, 142, 0.2);
  padding: 15px;
}

/* 复制/下载按钮样式 */
.copy-btn, .download-shot-btn {
  margin-top: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
}

.copy-btn:hover, .download-shot-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* 弹窗样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #16213e;
  border-radius: 12px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.error-icon {
  font-size: 2.5rem;
  color: #ff6b6b;
  margin-bottom: 15px;
}

.success-icon {
  font-size: 2.5rem;
  color: #4ecdc4;
  margin-bottom: 15px;
}

/* 加载动画 */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 0;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-top: 5px solid #f0c38e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }

  .steps {
    gap: 30px;
  }

  .steps::before {
    left: 50px;
    right: 50px;
  }

  .topics-list {
    grid-template-columns: 1fr;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .script-controls {
    flex-direction: column;
  }

  .shot-card {
    padding: 18px;
  }
}