@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/ibmplexmono/v20/-F63fjptAgt5VM-kVkqdyU8n5ig.ttf) format('truetype');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJ8lc.ttf) format('truetype');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/spacegrotesk/v22/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7oUUsj.ttf) format('truetype');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/spacegrotesk/v22/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7aUUsj.ttf) format('truetype');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/spacegrotesk/v22/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj42Vksj.ttf) format('truetype');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/spacegrotesk/v22/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj4PVksj.ttf) format('truetype');
}
/* glass logic abstraction */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #09090b;
  color: #fafafa;
  margin: 0;
  padding: 2.25rem 1.25rem;
  font-family: 'Space Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
}
/*app layout--- */
.app-layout {
  display: flex;
  gap: 24px;
  max-width: 1240px;
  width: 100%;
  justify-content: center;
  align-items: flex-start;
}
.workspace {
  display: flex;
  flex-direction: column;
  width: min(100%, 600px);
  min-width: 0;
}
/* floating glass canvas -*/
canvas {
  background-color: #141419;
  border: solid #2a2a31;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 18px 46px -22px rgba(0, 0, 0, 0.75);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  width: 100%;
  max-width: 600px;
  height: auto;
  aspect-ratio: 1 / 1;
}
/*toolbar layout*/
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
  width: 100%;
  /*match canvas width */
  justify-content: flex-start;
  animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.toolbar .group {
  background: rgba(20, 20, 25, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #2a2a31;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 18px 46px -22px rgba(0, 0, 0, 0.75);
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 4px;
  background: linear-gradient(180deg, rgba(26, 26, 33, 0.85), rgba(15, 15, 20, 0.92));
  /*dark inset*/
  padding: 4px;
  border-radius: 8px;
  white-space: nowrap;
}
.mode-hint {
  background: rgba(20, 20, 25, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #2a2a31;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 18px 46px -22px rgba(0, 0, 0, 0.75);
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: -8px;
  margin-bottom: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.12);
  color: #d8b4fe;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.mode-hint.show {
  opacity: 1;
}
.btn {
  border-radius: 7px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  cursor: pointer;
  /*override basecoat for active toolbar btn*/
}
.btn.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}
.btn.icon-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.05);
}
.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.96);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.45);
}
.btn.active {
  background-color: rgba(255, 255, 255, 0.075);
  color: #fafafa;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 18px -12px rgba(255, 255, 255, 0.45);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
/*status indicator*/
.status {
  background: rgba(20, 20, 25, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #2a2a31;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 18px 46px -22px rgba(0, 0, 0, 0.75);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 20px;
}
.status .pulse-dot {
  position: relative;
  z-index: 2;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 8px currentColor;
  transition: background-color 0.3s;
}
.status.online .pulse-dot {
  background-color: #10b981;
}
.status.online .pulse-ring {
  animation: subtle-pulse 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
.status .pulse-ring {
  position: absolute;
  left: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}
.p-ind {
  font-size: 12px;
  color: #a3a3b0;
  margin: 0;
  font-weight: 500;
}
@keyframes subtle-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(3.5);
    opacity: 0;
  }
}
/* primary action(start) */
.btn-primary {
  background: linear-gradient(180deg, #f8fafc, #e7edf4);
  color: #0b0b10;
  font-weight: 600;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #ffffff, #e8edf5);
  color: #09090b;
  box-shadow: 0 10px 22px -14px rgba(255, 255, 255, 0.8);
}
/*destructive action(stop) */
.btn-destructive {
  background-color: rgba(220, 38, 38, 0.1);
  /*red*/
  color: #ef4444;
  border: 1px solid rgba(220, 38, 38, 0.2);
}
.btn-destructive:hover {
  background-color: rgba(220, 38, 38, 0.2);
  color: #f87171;
  border-color: rgba(220, 38, 38, 0.3);
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.15);
}
/*sidebar and block editor--- */
.sidebar {
  background: rgba(20, 20, 25, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #2a2a31;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 18px 46px -22px rgba(0, 0, 0, 0.75);
  position: relative;
  overflow: hidden;
  width: min(100%, 420px);
  min-width: 320px;
  /* match toolbar(54px height est) + canvas(aspect 1:1) */
  height: calc(600px + 54px + 20px);
  max-height: calc(100vh - 4.5rem);
  padding: 20px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  /* sidebar content jump fix */
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  animation-delay: 0.1s;
}
.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: #2a2a31;
  border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: #3a3a44;
}
.sidebar .sidebar-section {
  margin-bottom: 24px;
  border-bottom: 1px solid #2a2a31;
  padding-bottom: 20px;
}
.sidebar .sidebar-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.sidebar h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar h3 span {
  color: #a3a3b0;
  font-weight: 400;
  font-size: 12px;
}
.mono-text {
  font-family: 'IBM Plex Mono', monospace;
  color: #b1b1bf;
  font-size: 13px;
  background: #0a0a0f;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #2a2a31;
  line-height: 1.5;
}
.mono-text + .mono-text {
  margin-top: 8px;
}
/*input styling */
.input-row {
  display: flex;
  gap: 8px;
}
.input-group {
  background: rgba(20, 20, 25, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #2a2a31;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 18px 46px -22px rgba(0, 0, 0, 0.75);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  background-color: rgba(21, 21, 27, 0.86);
  border-radius: 6px;
  padding: 6px 10px;
  flex: 1;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.input-group:hover {
  border-color: #3a3a44;
}
.input-group:focus-within {
  border-color: #22d3ee;
  background: rgba(24, 24, 30, 0.96);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}
.input-group label {
  color: #a3a3b0;
  font-size: 11px;
  margin-right: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.input-group .input {
  background: transparent;
  border: none;
  color: #fafafa;
  width: 100%;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  outline: none;
  padding: 0;
  box-shadow: none;
}
.muted {
  opacity: 0.3;
  pointer-events: none;
}
/*dyn wp blocks */
.path-block {
  background: rgba(20, 20, 25, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #2a2a31;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 18px 46px -22px rgba(0, 0, 0, 0.75);
  position: relative;
  overflow: hidden;
  padding: 12px;
  margin-bottom: 12px;
  border-left: 3px solid #22d3ee;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: grab;
}
.path-block:hover {
  transform: translateX(4px);
  background: rgba(34, 34, 42, 0.9);
  border-color: #3a3a44;
}
.path-block:active {
  cursor: grabbing;
}
.path-block.delay-block {
  border-left-color: #f59e0b;
  /* amber */
}
.path-block.dragging {
  opacity: 0.4;
  border: 1px dashed #a3a3b0;
  transform: scale(0.96);
}
.path-block .path-block-header {
  font-size: 12px;
  color: #fafafa;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}
.btn-icon {
  background: transparent;
  border: none;
  color: #a3a3b0;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  transition: color 0.2s;
}
.btn-icon.icon-btn {
  min-width: 22px;
  min-height: 22px;
}
.btn-icon:hover {
  color: #ef4444;
  /* red */
}
/*animations*/
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
select {
  appearance: none;
  -webkit-appearance: none;
}
/*custom glass dropdown*/
.custom-select {
  appearance: none;
  background-color: transparent;
  border: none;
  color: #22d3ee;
  width: 100%;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0px center;
  background-size: 14px;
  padding-right: 20px;
  color-scheme: dark;
}
.custom-select:focus {
  color: #fafafa;
}
.custom-select option {
  background-color: #18181b;
  color: #fafafa;
  padding: 8px;
}
@media (max-width: 1100px) {
  .app-layout {
    flex-direction: column;
    align-items: center;
  }
  .workspace,
  .sidebar {
    width: min(100%, 600px);
  }
  .sidebar {
    min-width: 0;
    height: auto;
    max-height: none;
  }
}
