:root {
  --toolbar-height: 80px;
  --addbutton-size: 60px;
  --addbutton-color: 156, 86%, 33%;
  --curve-width: 128px;

  /* Inner shadow */
  --shadow-offset: 0;
  --shadow-blur: 20px;
  --shadow-spread: -5px;
  --shadow-color: rgba(255, 255, 255, 0.7);

  /* Painted glass */
  --tint-color: 255, 255, 255;
  --tint-opacity: 0.4;

  /* Background frost */
  --frost-blur: 2px;

  /* SVG noise/distortion */
  --noise-frequency: 0.008;
  --distortion-strength: 77;

  /* Outer shadow blur */
  --outer-shadow-blur: 24px;
}


.toolbar {
  position: fixed;
  left: 0px;
  bottom: 0px;
  width: 400px;
  margin: auto;
  left: 0;
  right: 0;
  height: var(--toolbar-height);
  clip-path: path("M0 0C34 0 32 34 64 34C96 34 94.0002 0 128 0V128H0V0Z");
  background: rgba(255, 255, 255, 0.5);
  background-clip: border-area;
  background: linear-gradient(45deg, #f0b343, #f0ca43);
  filter: drop-shadow(0px -1px 0px #cfb8e5) drop-shadow(0px 0px 0px #9a4ee7) drop-shadow(-2px -2px 1px #3c3762) drop-shadow(4px 1px 1px #3c3762);
  transition: all 1s ease;
}


.toolbar:hover {
  clip-path: path("M0 0C34 0 32 0 64 0C96 0 94.0002 0 128 0V128H0V0Z");

}


.glass {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 152px;
  margin: auto;
  overflow: hidden;
  border: 0;
  outline: 0;
  backdrop-filter: url(#glass);
}






/* developed © Maxuiux */

:root {
  --lg-bg-color: rgba(255, 255, 255, 0.15);
  --lg-highlight: rgba(255, 255, 255, 0.75);
  --lg-text: #ffffff;
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: url("https://raw.githubusercontent.com/maxuiux/codepen/refs/heads/main/images/macbook/macOS-Tahoe-26-Light.png");
  background-size: 110%;
  background-repeat: repeat-x;
  animation: moveBackground 5s ease-in-out infinite alternate;
  position: relative;

  @media(max-width:1110px) {
    background-size: cover;
  }
}

@keyframes moveBackground {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 100% 0;
  }
}

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 42px;
}

.glass-card {
  position: relative;
  width: 320px;
  height: 220px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.25),
    0 0 40px rgba(255, 255, 255, 0.05);
  background: transparent;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.glass-card:hover {
  scale: 1.2;
}

.glass-filter {
  position: absolute;
  inset: 0;
  z-index: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  filter: url(#liquid-lens);
  /* isolation: isolate; */
}

.glass-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--lg-bg-color);
}

.glass-specular {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow:
    inset 1px 1px 0 var(--lg-highlight),
    inset 0 0 5px var(--lg-highlight);
}

.glass-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lg-text);
  font-size: 1.4rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.subscribe {
  display: block;
  position: absolute;
  top: 5%;
  right: 5%;
  z-index: 9999;
  text-decoration: none;
  border-radius: 100px;
  scale: 1;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.25),
    0 0 40px rgba(255, 255, 255, 0.05);
}

.subscribe.active {
  opacity: 1;
}

.subscribe:hover {
  scale: 1.1;
}

.subscribe::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  filter: url(#liquid-lens);
}

.subscribe::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow:
    inset 1px 1px 0 var(--lg-highlight),
    inset 0 0 5px var(--lg-highlight);
  border-radius: 100px;
}

.subscribe__wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 14px;
  position: relative;
}

.subscribe__icon svg {
  width: 38px;
  height: 38px;
}

.subscribe__text {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

/* developed © Maxuiux */


#gradient-canvas {
  margin: 0;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  background: lightgrey;
  --gradient-color-1: #ef008f;
  --gradient-color-2: #f0ca43;
  --gradient-color-3: #7038ff;
  --gradient-color-4: #3c3762;
}



body {
  font-family: sans-serif;
  font-weight: 300;
  background: url(https://raw.githubusercontent.com/lucasromerodb/liquid-glass-effect-macos/refs/heads/main/assets/flowers.jpg) center center;
  background-size: 400px;
  height: 100vh;
  -webkit-animation: moveBackground 60s linear infinite;
  animation: moveBackground 60s linear infinite;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.glassContainer {
  position: fixed;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 300px;
  height: 200px;
  border-radius: 30px;
}

.glassContainer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 30px;
  -webkit-box-shadow: inset 2px 2px 0px -2px rgba(255, 255, 255, 0.7), inset 0 0 3px 1px rgba(255, 255, 255, 0.7);
  box-shadow: inset 2px 2px 0px -2px rgba(255, 255, 255, 0.7), inset 0 0 3px 1px rgba(255, 255, 255, 0.7);
}

.glassContainer::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: 30px;
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  -webkit-filter: url(#container-glass);
  filter: url(#container-glass);
  overflow: hidden;
  isolation: isolate;
}

.glassBtn {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  cursor: pointer;
  width: 70px;
  height: 70px;
  padding: 15px;
  background: transparent;
  border-radius: 9999px;
  outline: none;
  border: none;
  z-index: 0;
}

.glassBtn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 9999px;
  -webkit-box-shadow: inset 2px 2px 0px -2px rgba(255, 255, 255, 0.7), inset 0 0 3px 1px rgba(255, 255, 255, 0.7);
  box-shadow: inset 2px 2px 0px -2px rgba(255, 255, 255, 0.7), inset 0 0 3px 1px rgba(255, 255, 255, 0.7);
  background-color: rgb(255 255 255 / 10%);
}

.glassBtn::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: 9999px;
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  -webkit-filter: url(#btn-glass);
  filter: url(#btn-glass);
  overflow: hidden;
  isolation: isolate;
}

.glassBtn svg {
  width: 100%;
  height: 100%;
  stroke: #fff;
}

@-webkit-keyframes moveBackground {
  from {
    background-position: 0% 0%;
  }

  to {
    background-position: 0% -1000%;
  }
}

@keyframes moveBackground {
  from {
    background-position: 0% 0%;
  }

  to {
    background-position: 0% -1000%;
  }
}



/* Liquid Glass CSS - WebGL Shader Replica */
.liquid-glass {
  position: relative;
  background: rgba(240, 249, 255, 0.1);
  backdrop-filter:
    blur(5px) saturate(1.25) contrast(1.09);
  -webkit-backdrop-filter:
    blur(5px) saturate(1.25) contrast(1.09);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  overflow: hidden;
}

/* Refraction distortion layer */
.liquid-glass::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse 140% 140% at 50% 50%,
      rgba(14, 165, 233, 0.4) 0%,
      transparent 70%);
  filter: blur(8px);
  animation: liquidRefract 8s ease-in-out infinite;
}

@keyframes liquidRefract {

  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(144deg) scale(1.2);
  }
}

/* WebGL Shader Parameters:
 * Refractive Index: 1.5 (eta: 0.667)
 * Distortion Strength: 0.04
 * Curvature: 0.8
 * Edge Sharpness: 0.3
 */


.glassDiv {
  position: absolute;
  width: 300px;
  height: 200px;
  border-radius: 28px;
  cursor: move;
  isolation: isolate;
  touch-action: none;
  /* enable pointer dragging on touch */
  box-shadow: 0px 6px var(--outer-shadow-blur) rgba(0, 0, 0, 0.2);
}

.glassDiv::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 28px;
  box-shadow:
    inset var(--shadow-offset) var(--shadow-offset) var(--shadow-blur) var(--shadow-spread) var(--shadow-color);
  background-color: rgba(var(--tint-color), var(--tint-opacity));
}

.glassDiv::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 28px;
  backdrop-filter: blur(var(--frost-blur));
  filter: url(#glass-distortion);
  isolation: isolate;
  -webkit-backdrop-filter: blur(var(--frost-blur));
  -webkit-filter: url("#glass-distortion");
}