/* ── Glass Card ─────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ── Custom Scrollbar ──────────────────── */
.custom-scroll::-webkit-scrollbar { width: 4px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Phase Steps ───────────────────────── */
.phase-step {
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  transition: all 0.3s;
}
.phase-step.active {
  color: #a855f7;
  font-weight: 600;
}

/* ── Character Card ────────────────────── */
.char-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px;
  transition: all 0.2s;
}
.char-card:hover { border-color: rgba(124,58,237,0.2); }

.char-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.char-name-input {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  width: 80px;
}
.char-name-input::placeholder { color: rgba(255,255,255,0.2); }

.char-desc-input {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255,255,255,0.7);
  resize: none;
  font-family: inherit;
}
.char-desc-input:focus {
  outline: none;
  border-color: rgba(124,58,237,0.3);
}
.char-desc-input::placeholder { color: rgba(255,255,255,0.15); }

.voice-select {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  outline: none;
}
.voice-select:focus { border-color: rgba(124,58,237,0.3); }
.voice-select option { background: #1a1a2e; color: rgba(255,255,255,0.7); }

/* ── Shot Card ─────────────────────────── */
.shot-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 1rem;
  transition: all 0.2s ease;
}
.shot-card:hover { border-color: rgba(124,58,237,0.3); background: rgba(255,255,255,0.05); }
.shot-card.active { border-color: rgba(124,58,237,0.5); box-shadow: 0 0 20px rgba(124,58,237,0.1); }

/* ── Tags ──────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
}
.tag-camera { background: rgba(59,130,246,0.15); color: rgb(96,165,250); }
.tag-action { background: rgba(16,185,129,0.15); color: rgb(52,211,153); }
.tag-emotion { background: rgba(244,114,182,0.15); color: rgb(244,114,182); }
.tag-dialogue { background: rgba(251,191,36,0.15); color: rgb(251,191,36); }
.tag-seedance { background: rgba(14,165,233,0.15); color: rgb(56,189,248); }
.tag-t2v { background: rgba(107,114,128,0.15); color: rgba(156,163,175); }
.tag-scene { background: rgba(139,92,246,0.15); color: rgb(167,139,250); font-size: 10px; }

/* ── Buttons ───────────────────────────── */
.btn-generate {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-generate:hover { box-shadow: 0 4px 15px rgba(124,58,237,0.3); transform: translateY(-1px); }
.btn-generate:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Prompt Editor ─────────────────────── */
.prompt-editor {
  width: 100%;
  min-height: 60px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255,255,255,0.8);
  resize: vertical;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.prompt-editor:focus { outline: none; border-color: rgba(124,58,237,0.4); }

/* ── Shot Badge ─────────────────────────── */
.shot-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ── Loading Spinner ───────────────────── */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Recent Item ────────────────────────── */
.recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.2s;
}
.recent-item:hover { background: rgba(255,255,255,0.05); border-color: rgba(124,58,237,0.2); }
.recent-thumb {
  width: 40px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: rgba(255,255,255,0.2);
}

/* ── Animations ────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.animate-fadeInUp { animation: fadeInUp 0.3s ease-out forwards; }

/* ── Toast ─────────────────────────────── */
.toast {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  backdrop-filter: blur(20px);
  animation: slideIn 0.3s ease-out;
  max-width: 360px;
}
.toast-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: rgb(52,211,153); }
.toast-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: rgb(248,113,113); }
.toast-info { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3); color: rgb(96,165,250); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ── Portrait/Scene Management ─────────── */
.portrait-manage-card,
.scene-manage-card {
  position: relative;
}

.portrait-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}
.portrait-action-btn:hover {
  background: rgba(124,58,237,0.4);
  border-color: rgba(124,58,237,0.6);
}

.portrait-prompt-input {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 10px;
  line-height: 1.4;
  color: rgba(255,255,255,0.5);
  resize: none;
  font-family: inherit;
  margin-top: 4px;
}
.portrait-prompt-input:focus {
  outline: none;
  border-color: rgba(124,58,237,0.3);
}
.portrait-prompt-input::placeholder { color: rgba(255,255,255,0.15); }

/* ── Responsive ────────────────────────── */
@media (max-width: 1200px) { .grid-cols-12 { grid-template-columns: 1fr !important; } }
