/* Playground Layout */
.playground-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 12px;
  padding: 12px;
  height: 100%;
}

.playground-input {
  overflow-y: auto;
}

.playground-output {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.playground-output .output-content {
  flex: 1;
  overflow-y: auto;
}

/* Host entries */
.host-entry {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 8px;
  background: var(--bg-primary);
}

.host-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.remove-host-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}

.remove-host-btn:hover {
  color: var(--error);
}

.host-entry input,
.host-entry textarea {
  width: 100%;
  margin-bottom: 6px;
}

/* Output sections */
.output-section {
  margin-bottom: 20px;
}

.output-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Split pane for raw vs parsed */
.split-pane {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: 100%;
}

.split-pane .pane {
  overflow: auto;
}

.split-pane .pane h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  padding: 4px 0;
}

/* Parsed script display */
.parsed-scene {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  background: var(--bg-primary);
}

.parsed-scene h4 {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
}

.parsed-field {
  font-size: 12px;
  margin-bottom: 4px;
}

.parsed-field .label {
  color: var(--text-secondary);
  display: inline;
}

.parsed-field .value {
  color: var(--text-primary);
}

/* Image prompt list */
.image-prompt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.image-prompt-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--bg-primary);
}

.image-prompt-card h4 {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 6px;
}

.image-prompt-card pre {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Host mode toggle */
.host-mode-toggle {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.host-mode-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: all 0.15s;
}

.host-mode-btn.active {
  background: var(--accent);
  color: white;
}

/* Saved hosts list */
.saved-hosts-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saved-host-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 0;
}

.saved-host-option:hover {
  background: var(--bg-hover);
}

.saved-host-option.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.saved-host-option.disabled:hover {
  background: none;
}

.saved-host-option input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
}

.saved-host-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.saved-host-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.saved-host-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.saved-host-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.saved-host-info strong {
  font-size: 12px;
  color: var(--text-primary);
}

.saved-host-info span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Custom hosts divider */
.custom-hosts-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 8px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.custom-hosts-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Loading overlay */
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 14px;
}
