/* MathU shape selector — circular shape buttons in the top-left header. */

.mathu-shapes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 60vw;
  pointer-events: auto;
}

.mathu-shape {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(247, 245, 239, 0.7);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease,
              background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.mathu-shape svg {
  width: 22px;
  height: 22px;
  display: block;
}

.mathu-shape:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

/* Selected shape: highlighted ring + brand glow */
.mathu-shape.is-active {
  color: #030305;
  background: linear-gradient(135deg, #8f6dff, #ffbf3c);
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85),
              0 0 22px rgba(143, 109, 255, 0.5);
}

.mathu-shape.is-active:hover {
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .mathu-shape { width: 34px; height: 34px; }
  .mathu-shape svg { width: 18px; height: 18px; }
  .mathu-shapes { gap: 6px; max-width: 68vw; }
}
