.playground-shell {
  padding: 0;
}

.playground-panel {
  width: min(1300px, 96vw);
  height: min(880px, 92vh);
  background: #020202;
  border: 1px solid var(--panel-line);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 140px rgba(0, 0, 0, 1);
  position: relative;
}

.playground-head {
  padding: 16px 24px;
  border-bottom: 1px solid var(--panel-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #080808;
  z-index: 10;
}

.playground-meta h2 {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.playground-workspace {
  flex: 1;
  position: relative;
  background: 
    radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.playground-node {
  position: absolute;
  width: 340px;
  background: #080808;
  border: 1px solid var(--panel-line);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 5;
}

.node-header {
  padding: 12px 20px;
  background: #0c0c0c;
  border-bottom: 1px solid var(--panel-line);
  border-radius: 20px 20px 0 0;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: grab;
}

.node-header:active {
  cursor: grabbing;
}

.node-body {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.playground-node[data-node="response"] {
  width: 480px;
}

.canvas-node-bridge {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.bridge-svg {
  width: 100%;
  height: 100%;
}

#bridge-line,
.node-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 2.5;
  stroke-dasharray: 6 6;
  transition: stroke 300ms ease, stroke-width 300ms ease, filter 300ms ease;
}

.node-line.connected {
  stroke: var(--brand-spotify);
  stroke-width: 3;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 5px var(--brand-spotify));
  animation: line-pulse 2s ease-in-out infinite;
}

.node-line.error {
  stroke: var(--danger);
  stroke-width: 3;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 8px var(--danger));
}

.node-line.dragging {
  stroke: rgba(255, 255, 255, 0.4);
  stroke-dasharray: 4 4;
}

@keyframes line-pulse {
  0%, 100% { opacity: 0.8; stroke-width: 3; }
  50% { opacity: 1; stroke-width: 4; }
}

.node-socket {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #111;
  border: 2px solid var(--panel-line);
  border-radius: 50%;
  z-index: 10;
  cursor: crosshair;
  transition: all 200ms ease;
}

.node-socket:hover {
  background: #fff;
  border-color: #fff;
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.node-socket.connected {
  background: var(--brand-spotify);
  border-color: #fff;
  box-shadow: 0 0 10px var(--brand-spotify);
}

.node-socket.error {
  background: var(--danger);
  border-color: #fff;
  box-shadow: 0 0 10px var(--danger);
}

.node-socket.input {
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
}

.node-socket.output {
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes line-flow {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

.playground-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 160ms ease;
}

.playground-trigger i {
  font-size: 0.85rem;
  margin-top: -1px;
}

.playground-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  transform: translateY(-1px);
}

.param-field {
  display: grid;
  gap: 8px;
}

.param-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-line);
  background: #040404;
  color: var(--text-main);
  font-size: 0.88rem;
  font-family: var(--mono);
}

.url-preview-bar {
  padding: 14px;
  background: #040404;
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--brand-spotify);
  word-break: break-all;
}

.response-box {
  background: #040404;
  border: 1px solid var(--panel-line);
  border-radius: 16px;
  padding: 16px;
  max-height: 400px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.desktop-only {
  display: inline-flex;
}

@media (max-width: 1024px) {
  .desktop-only {
    display: none !important;
  }
}
