@import url('https://fonts.googleapis.com/css2?family=Anton&family=Archivo+Black&family=Mr+Dafoe&display=swap');

.gfg-page-head { padding-top: 14px; padding-bottom: 8px; }
.gfg-page-head h1 { margin: 4px 0 6px; font-size: clamp(1.55rem, 2.8vw, 2.25rem); line-height: 1.12; }
.gfg-page-head .lede { margin: 0; font-size: 0.96rem; max-width: 82ch; opacity: 0.88; }
.gfg-tool-wrap { margin-bottom: 18px; }

.gfg-studio {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(310px, 0.92fr);
  gap: 16px;
  background: linear-gradient(165deg, rgba(16, 19, 28, 0.96), rgba(9, 11, 17, 0.98));
  border: 1px solid rgba(219, 53, 187, 0.32);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
@media (max-width: 960px) {
  .gfg-studio { grid-template-columns: 1fr; padding: 12px; }
}

.gfg-stage-col { display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.gfg-mode-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.gfg-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  color: #d8deea; font-size: 0.8rem; font-weight: 700;
  cursor: pointer; transition: all 0.16s ease;
}
.gfg-pill:hover { border-color: rgba(219, 53, 187, 0.6); color: #fff; }
.gfg-pill.is-active {
  background: linear-gradient(90deg, #3D5FCD 0%, #DB35BB 55%, #FF954C 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 0 18px rgba(219, 53, 187, 0.42);
}

.gfg-canvas-wrap {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  max-height: 520px; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex; align-items: center; justify-content: center;
  background: #090b10;
}
.gfg-canvas-wrap.is-checker {
  background-color: #111520;
  background-image:
    linear-gradient(45deg, #1a2030 25%, transparent 25%),
    linear-gradient(-45deg, #1a2030 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1a2030 75%),
    linear-gradient(-45deg, transparent 75%, #1a2030 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}
.gfg-canvas {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  display: block; object-fit: contain;
}
.gfg-canvas-hud {
  position: absolute; left: 10px; right: 10px; bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  pointer-events: none; flex-wrap: wrap;
}
.gfg-dim-badge, .gfg-swatch-strip {
  background: rgba(8, 10, 16, 0.82); backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 6px;
  padding: 3px 8px; font-size: 0.72rem; color: #cfd6e6;
  display: inline-flex; align-items: center; gap: 5px;
}
.gfg-swatch-strip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.gfg-swatch-strip code { font-size: 0.7rem; color: #ffb5e8; }

.gfg-action-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gfg-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06); color: #f1f5fb;
  font-size: 0.84rem; font-weight: 700; cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}
.gfg-btn:hover { border-color: rgba(255, 255, 255, 0.36); background: rgba(255, 255, 255, 0.11); }
.gfg-btn:active { transform: translateY(1px); }
.gfg-btn-primary {
  background: linear-gradient(92deg, #3D5FCD 0%, #DB35BB 52%, #FF954C 100%);
  border-color: rgba(255, 149, 76, 0.55); color: #fff;
  box-shadow: 0 6px 20px rgba(219, 53, 187, 0.35);
}
.gfg-btn-cyan {
  border-color: rgba(0, 240, 255, 0.45);
  background: rgba(0, 240, 255, 0.11); color: #8ff8ff;
}
.gfg-toast { font-size: 0.78rem; font-weight: 700; color: #5ef2b4; min-height: 1.1em; }

.gfg-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gfg-ex-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: #8c95a6; font-weight: 700; }
.gfg-chip {
  padding: 4px 9px; border-radius: 6px; font-size: 0.76rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.11);
  color: #cbd3e1; cursor: pointer;
}
.gfg-chip:hover { border-color: #DB35BB; color: #fff; }

.gfg-ctrl-col {
  display: flex; flex-direction: column; gap: 11px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px; padding: 13px;
}
.gfg-field { display: flex; flex-direction: column; gap: 5px; }
.gfg-label-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gfg-field label { font-size: 0.78rem; font-weight: 700; color: #dbe2ef; }
.gfg-field label small { font-weight: 400; color: #8c95a6; }
.gfg-inline-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem !important; color: #b7c1d4 !important; cursor: pointer; }
.gfg-textarea, .gfg-input, .gfg-select {
  width: 100%; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 9, 15, 0.85); color: #fff;
  padding: 8px 10px; font-size: 0.88rem; font-family: inherit;
}
.gfg-textarea { resize: vertical; min-height: 68px; line-height: 1.25; font-weight: 700; }
.gfg-textarea:focus, .gfg-input:focus, .gfg-select:focus {
  outline: none; border-color: #DB35BB; box-shadow: 0 0 0 2px rgba(219, 53, 187, 0.25);
}
.gfg-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
@media (max-width: 520px) { .gfg-grid-2 { grid-template-columns: 1fr; } }

.gfg-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.gfg-chk {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.77rem; color: #d5dceb; cursor: pointer;
}

.gfg-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; }
@media (max-width: 520px) { .gfg-sliders { grid-template-columns: 1fr; } }
.gfg-slider-row { display: flex; flex-direction: column; gap: 3px; }
.gfg-slider-head { display: flex; justify-content: space-between; font-size: 0.74rem; color: #b7c1d4; }
.gfg-slider-head output { color: #ff954c; font-weight: 700; font-variant-numeric: tabular-nums; }
.gfg-slider-row input[type="range"] { width: 100%; accent-color: #DB35BB; cursor: pointer; }

.gfg-color-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 9px; display: flex; flex-direction: column; gap: 6px;
}
.gfg-color-title { font-size: 0.74rem; font-weight: 700; color: #9aa4b8; text-transform: uppercase; letter-spacing: 0.05em; }
.gfg-color-inputs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gfg-color-inputs label {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px; padding: 3px 7px; font-size: 0.72rem; font-family: monospace; color: #e2e8f0; cursor: pointer;
}
.gfg-color-inputs input[type="color"] { width: 20px; height: 20px; border: 0; padding: 0; background: none; cursor: pointer; }
.gfg-reset-btn {
  margin-left: auto; padding: 4px 10px; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18); background: transparent;
  color: #cbd3e1; font-size: 0.74rem; font-weight: 700; cursor: pointer;
}
.gfg-reset-btn:hover { border-color: #ff954c; color: #fff; }
