/* AI 视频短剧制作 · patch-ai-drama.css */
#screen-ai-drama.active {
  display: flex !important;
  flex-direction: column;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: linear-gradient(165deg, #0f172a 0%, #1e1b4b 45%, #0f172a 100%);
}

#screen-ai-drama .sub-bar {
  flex: 0 0 auto;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(167, 139, 250, 0.35);
}

#screen-ai-drama .sub-title {
  background: linear-gradient(90deg, #c4b5fd, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

.ai-drama-page {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(16px + env(safe-area-inset-bottom, 0px));
}

.ai-drama-hero {
  margin: 0 0 14px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(236, 72, 153, 0.12));
  border: 1px solid rgba(167, 139, 250, 0.28);
}

.ai-drama-hero h2 {
  margin: 0 0 6px;
  font-size: 1.12rem;
  color: #ede9fe;
}

.ai-drama-hero p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(221, 214, 254, 0.88);
}

.ai-drama-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.ai-drama-step-dot {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(196, 181, 253, 0.5);
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(167, 139, 250, 0.2);
}

.ai-drama-step-dot.is-on {
  color: #e9d5ff;
  border-bottom-color: #a78bfa;
  font-weight: 700;
}

.ai-drama-step {
  display: none;
}

.ai-drama-step.is-active {
  display: block;
}

.ai-drama-field label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #ddd6fe;
}

.ai-drama-field textarea,
.ai-drama-field input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(15, 23, 42, 0.75);
  color: #f5f3ff;
  padding: 10px 12px;
  font-size: 0.96rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.ai-drama-field textarea {
  min-height: 88px;
  resize: vertical;
}

.ai-drama-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.ai-drama-pill {
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(30, 27, 75, 0.65);
  color: #e9d5ff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.84rem;
  cursor: pointer;
}

.ai-drama-pill--sm {
  padding: 6px 11px;
  font-size: 0.8rem;
}

.ai-drama-pill.is-active {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}

.ai-drama-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.btn-ai-drama {
  flex: 1 1 auto;
  min-width: 140px;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
}

.btn-ai-drama:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-ai-drama--ghost {
  background: rgba(30, 27, 75, 0.8);
  border: 1px solid rgba(167, 139, 250, 0.4);
  box-shadow: none;
}

.ai-drama-status {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: #c4b5fd;
}

.ai-drama-status--load { color: #fcd34d; }
.ai-drama-status--ok { color: #6ee7b7; }
.ai-drama-status--err { color: #fca5a5; }

.ai-drama-result-head {
  margin-bottom: 12px;
}

.ai-drama-result-head h3 {
  margin: 0 0 4px;
  font-size: 1.08rem;
  color: #f5f3ff;
}

.ai-drama-result-head p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(221, 214, 254, 0.85);
}

.ai-drama-meta {
  font-size: 0.78rem;
  color: rgba(196, 181, 253, 0.75);
  margin-top: 6px;
}

.ai-drama-scene {
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(167, 139, 250, 0.22);
}

.ai-drama-scene header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: #a78bfa;
  font-weight: 800;
}

.ai-drama-scene p {
  margin: 0 0 6px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #ede9fe;
}

.ai-drama-scene-note {
  font-size: 0.78rem !important;
  color: rgba(196, 181, 253, 0.7) !important;
}

.ai-drama-render-bar {
  margin-top: 12px;
  height: 8px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.2);
  overflow: hidden;
}

.ai-drama-render-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  transition: width 0.35s ease;
}

.ai-drama-render-text {
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: #c4b5fd;
}

.ai-drama-preview {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 18px calc(28px + env(safe-area-inset-bottom, 0px));
}

.ai-drama-preview[hidden] {
  display: none !important;
}

.ai-drama-preview-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  padding: 20px;
  background: radial-gradient(circle at 50% 30%, rgba(124, 58, 237, 0.35), transparent 70%);
}

.ai-drama-preview-dialogue {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.55;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  margin-bottom: 12px;
}

.ai-drama-preview-prog {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 10px;
}

.ai-drama-preview-close {
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 0.9rem;
}

.menu-row--aidrama {
  border-color: rgba(167, 139, 250, 0.45) !important;
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.35), rgba(30, 27, 75, 0.55)) !important;
}

.menu-row--aidrama .menu-row-title {
  color: #e9d5ff !important;
}
