.playground-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 700px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg);
}
.playground-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.playground-toolbar .version {
  font-size: 12px;
  color: var(--color-text-muted);
  background: var(--color-bg);
  padding: 2px 8px;
  border-radius: 4px;
}
.playground-toolbar .actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.playground-toolbar button {
  background: var(--color-surface-hover);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.playground-toolbar button:hover { background: var(--color-border); }
.playground-toolbar button.primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.playground-toolbar button.primary:hover { opacity: 0.9; }
.playground-panels {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.playground-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.playground-panel + .playground-panel {
  border-top: none;
}
.playground-resize-handle {
  height: 6px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  cursor: row-resize;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.playground-resize-handle::after {
  content: '';
  width: 40px;
  height: 2px;
  background: var(--color-text-muted);
  border-radius: 1px;
  opacity: 0.4;
}
.playground-resize-handle:hover::after,
.playground-resize-handle.dragging::after {
  opacity: 0.8;
}
.playground-resize-handle:hover,
.playground-resize-handle.dragging {
  background: var(--color-surface-hover);
}
.playground-panel-header {
  background: var(--color-surface);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.playground-panel-header .tag {
  font-size: 10px;
  background: var(--color-bg);
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: none;
  letter-spacing: 0;
}
.playground-tabs {
  display: flex;
  gap: 0;
}
.playground-tabs button {
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: 8px 14px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.playground-tabs button.active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}
.playground-editor {
  flex: 1;
  overflow: hidden;
}
.playground-output {
  flex: 1;
  overflow: auto;
}
.playground-output iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}
.playground-output pre {
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--color-text);
  margin: 0;
}
.playground-diagnostics {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  max-height: 120px;
  overflow-y: auto;
  font-size: 12px;
  flex-shrink: 0;
}
.playground-diagnostics:empty { display: none; }
.playground-diag {
  padding: 4px 14px;
  font-family: var(--font-mono);
}
.playground-diag.warning { color: #f0c040; }
.playground-diag.error { color: #f85149; }
.playground-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: var(--color-text-muted);
  font-size: 14px;
}
@media (max-width: 768px) {
  .playground-container { height: calc(100vh - 150px); }
}
