/* Digital Human Live Streaming Styles */

.dhl-root { padding: 0; }

/* Intro / Hero card */
.dhl-intro {
  padding: 20px 20px 20px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
  margin-bottom: 16px;
}
.dhl-intro-title { margin: 0; font-size: 1.15rem; font-weight: 800; }
.dhl-intro-desc { color: rgba(255,255,255,0.85); font-size: 0.82rem; line-height: 1.4; margin: 4px 0 0; }
.dhl-intro-pills { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dhl-pill {
  padding: 4px 12px; border-radius: 20px; font-size: 0.72rem; font-weight: 600;
  background: rgba(255,255,255,0.2); color: #fff;
}

/* Tabs */
.dhl-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.dhl-tab {
  padding: 8px 20px; border: 1px solid #e2e8f0; border-radius: 8px;
  background: #fff; font-size: 0.88rem; cursor: pointer; transition: all 0.2s;
  flex: 1; text-align: center; font-weight: 600;
}
.dhl-tab:hover { border-color: #f59e0b; color: #f59e0b; }
.dhl-tab.active { background: #f59e0b; color: #fff; border-color: #f59e0b; }

/* Form card */
.dhl-form {
  background: #fff; border-radius: 12px; border: 1px solid #e2e8f0;
  padding: 14px; margin-bottom: 16px;
}
.dhl-form-label {
  display: block; font-size: 0.82rem; font-weight: 600; color: #475569;
  margin-bottom: 8px;
}

/* Selection cards (role / voice) */
.dhl-select-cards { display: flex; gap: 10px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.dhl-select-card {
  flex-shrink: 0; width: 80px; padding: 10px 8px; border: 2px solid #e2e8f0;
  border-radius: 12px; background: #fff; text-align: center; cursor: pointer;
  transition: all 0.2s;
}
.dhl-select-card:hover { border-color: #f59e0b; }
.dhl-select-card.selected { border-color: #f59e0b; background: #fffbeb; }
.dhl-select-avatar {
  width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 6px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-size: 0.9rem; font-weight: 800;
}
.dhl-select-name { font-size: 0.72rem; font-weight: 600; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Platform chips */
.dhl-platform-chips { display: flex; gap: 8px; margin-bottom: 12px; }
.dhl-platform-chip {
  flex: 1; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px;
  background: #fff; font-size: 0.82rem; cursor: pointer; transition: all 0.2s;
  text-align: center; font-weight: 600;
}
.dhl-platform-chip:hover { border-color: #f59e0b; color: #f59e0b; }
.dhl-platform-chip.active { background: #f59e0b; color: #fff; border-color: #f59e0b; }

/* Input */
.dhl-input {
  width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 10px;
  font-size: 0.9rem; background: #fff; box-sizing: border-box; margin-bottom: 12px;
}

/* Buttons */
.dhl-btn {
  width: 100%; padding: 12px; border-radius: 10px; font-size: 0.9rem;
  font-weight: 700; border: none; cursor: pointer; transition: all 0.2s;
}
.dhl-btn-start {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); color: #fff;
}
.dhl-btn-start:disabled { opacity: 0.5; cursor: not-allowed; }
.dhl-btn-stop {
  background: #fee2e2; color: #dc2626; border: 1px solid #fecaca;
  padding: 8px 16px; font-size: 0.82rem; font-weight: 600;
  border-radius: 8px; cursor: pointer; transition: all 0.2s;
}
.dhl-btn-stop:hover { background: #fecaca; }

/* Console */
.dhl-console { padding: 0; }

/* Status bar */
.dhl-status-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: 10px; background: #dcfce7; margin-bottom: 12px;
  font-size: 0.82rem; font-weight: 600; color: #166534;
}
.dhl-live-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #ef4444;
  animation: dhl-pulse 1.5s ease-in-out infinite;
}
@keyframes dhl-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.dhl-timer { font-family: monospace; font-size: 0.88rem; color: #166534; }
.dhl-status-platform {
  margin-left: auto; font-size: 0.72rem; color: #166534;
  background: rgba(255,255,255,0.6); padding: 2px 8px; border-radius: 10px;
}

/* Preview area */
.dhl-preview {
  width: 100%; aspect-ratio: 9/16; max-height: 250px;
  background: #000; border-radius: 12px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.dhl-preview video {
  width: 100%; height: 100%; object-fit: cover; border-radius: 12px;
}
.dhl-preview-placeholder {
  color: #64748b; font-size: 0.82rem; text-align: center;
}

/* Text area */
.dhl-text-area {
  width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 10px;
  font-size: 0.9rem; background: #fff; resize: vertical; min-height: 80px;
  box-sizing: border-box; font-family: inherit; margin-bottom: 12px;
}

/* Controls row */
.dhl-controls { display: flex; gap: 8px; margin-bottom: 16px; }
.dhl-controls .dhl-btn { flex: 1; padding: 10px; font-size: 0.82rem; }
.dhl-btn-send { background: #3b82f6; color: #fff; }
.dhl-btn-interrupt { background: #f97316; color: #fff; }
.dhl-btn-upload { background: #6b7280; color: #fff; }

/* Background strip */
.dhl-bg-strip {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px;
}
.dhl-bg-thumb {
  flex-shrink: 0; width: 80px; height: 80px; border-radius: 10px;
  border: 2px solid #e2e8f0; cursor: pointer; overflow: hidden;
  transition: all 0.2s; position: relative;
}
.dhl-bg-thumb:hover { border-color: #f59e0b; }
.dhl-bg-thumb.active { border-color: #f59e0b; box-shadow: 0 2px 8px rgba(245,158,11,0.3); }
.dhl-bg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dhl-bg-add {
  flex-shrink: 0; width: 80px; height: 80px; border-radius: 10px;
  border: 2px dashed #cbd5e1; cursor: pointer; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  transition: all 0.2s; color: #94a3b8; background: #f8fafc;
}
.dhl-bg-add:hover { border-color: #f59e0b; color: #f59e0b; }
.dhl-bg-add-icon { font-size: 1.3rem; margin-bottom: 2px; }
.dhl-bg-add-text { font-size: 0.65rem; font-weight: 600; }

/* History */
.dhl-history { margin-top: 4px; }
.dhl-history-title { font-size: 0.88rem; font-weight: 700; color: #334155; margin: 0 0 10px; }
.dhl-history-item {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  margin-bottom: 8px; transition: all 0.2s;
}
.dhl-history-info { flex: 1; min-width: 0; }
.dhl-history-role { font-weight: 700; font-size: 0.85rem; color: #334155; margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dhl-history-meta { font-size: 0.72rem; color: #94a3b8; display: flex; gap: 8px; flex-wrap: wrap; }
.dhl-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 0.7rem; font-weight: 600; flex-shrink: 0;
}
.dhl-badge.ended { background: #d1fae5; color: #065f46; }
.dhl-badge.failed { background: #fee2e2; color: #991b1b; }
.dhl-badge.live { background: #dbeafe; color: #1d4ed8; }

/* Message */
.dhl-message { margin-top: 8px; }
