/* GLSL Shader Lab */

.glsl-lab {
  margin: 2rem auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.glsl-lab__header {
  padding: 1rem 1rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.glsl-lab__title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--color-text-primary, #fff);
}

.glsl-lab__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.65));
}

.glsl-lab__canvas {
  width: 100%;
  height: 360px;
  display: block;
  background: #020206;
}

.glsl-lab__controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.glsl-lab__group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.glsl-lab__group--slider {
  min-width: 0;
}

.glsl-lab__label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.glsl-lab__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.4));
}

.glsl-lab__value {
  font-family: var(--font-mono, "SF Mono", Monaco, monospace);
  font-size: 0.72rem;
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.65));
}

.glsl-lab__select {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-primary, #fff);
  font-size: 0.9rem;
  padding: 0.45rem 0.55rem;
}

.glsl-lab__select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
}

.glsl-lab__slider {
  width: 100%;
  accent-color: #fff;
}

.glsl-lab__actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  justify-content: flex-start;
}

.glsl-lab__btn {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.glsl-lab__btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.glsl-lab__btn--ghost {
  background: transparent;
}

.glsl-lab__footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem 1rem;
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.4));
  font-family: var(--font-mono, "SF Mono", Monaco, monospace);
  font-size: 0.72rem;
}

.glsl-lab__fallback {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 1.25rem;
  background: #05050a;
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.65));
}

.glsl-lab__fallback p {
  margin: 0;
}

@media (max-width: 800px) {
  .glsl-lab__canvas {
    height: 280px;
  }

  .glsl-lab__controls {
    grid-template-columns: 1fr;
    padding: 0.9rem;
  }

  .glsl-lab__actions {
    justify-content: stretch;
  }

  .glsl-lab__btn {
    width: 100%;
  }

  .glsl-lab__footer {
    flex-direction: column;
    gap: 0.35rem;
  }
}

