body {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.morphing-gallery {
  padding: 2rem;
  text-align: center;
}

.morphing-gallery-title {
  font-size: 3rem;
  font-weight: 300;
  color: white;
  text-align: center;
  margin-bottom: 3rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.morphing-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.morph-item {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.morph-item:hover {
  transform: translateY(-8px) scale(1.02);
}

.shape {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  margin-bottom: 1rem;
  position: relative;
}

.morph-label {
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.shape-circle-to-square {
  width: 60px;
  height: 60px;
  background: #ff6b6b;
  border-radius: 50%;
  animation: circle-to-square 3s ease-in-out infinite alternate;
}

@keyframes circle-to-square {
  0% {
    border-radius: 50%;
    transform: rotate(0deg);
  }
  100% {
    border-radius: 0%;
    transform: rotate(180deg);
  }
}
.shape-triangle-to-circle {
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 52px solid #4ecdc4;
  animation: triangle-to-circle 4s ease-in-out infinite;
}

@keyframes triangle-to-circle {
  0%, 100% {
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 52px solid #4ecdc4;
    border-radius: 0;
    transform: rotate(0deg);
  }
  50% {
    border-left: 30px solid #4ecdc4;
    border-right: 30px solid #4ecdc4;
    border-bottom: 30px solid #4ecdc4;
    border-radius: 50%;
    transform: rotate(360deg);
  }
}
.shape-heart-beat {
  width: 60px;
  height: 60px;
  background: #ff6b6b;
  position: relative;
  transform: rotate(-45deg);
  animation: heart-beat 1.5s ease-in-out infinite;
}

.shape-heart-beat::before,
.shape-heart-beat::after {
  content: "";
  width: 60px;
  height: 60px;
  background: #ff6b6b;
  border-radius: 50%;
  position: absolute;
}

.shape-heart-beat::before {
  top: -30px;
  left: 0;
}

.shape-heart-beat::after {
  top: 0;
  left: 30px;
}

@keyframes heart-beat {
  0%, 100% {
    transform: rotate(-45deg) scale(1);
  }
  50% {
    transform: rotate(-45deg) scale(1.2);
  }
}
.shape-star-morph {
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 20px solid #45b7d1;
  position: relative;
  animation: star-morph 3s ease-in-out infinite;
}

.shape-star-morph::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 8px;
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-top: 20px solid #45b7d1;
}

@keyframes star-morph {
  0%, 100% {
    transform: rotate(0deg) scale(1);
    filter: hue-rotate(0deg);
  }
  25% {
    transform: rotate(72deg) scale(1.2);
    filter: hue-rotate(90deg);
  }
  50% {
    transform: rotate(144deg) scale(0.8);
    filter: hue-rotate(180deg);
  }
  75% {
    transform: rotate(216deg) scale(1.1);
    filter: hue-rotate(270deg);
  }
}
.shape-liquid-blob {
  width: 80px;
  height: 80px;
}

.blob {
  width: 100%;
  height: 100%;
  background: #96ceb4;
  border-radius: 50%;
  animation: liquid-blob 4s ease-in-out infinite;
}

@keyframes liquid-blob {
  0%, 100% {
    border-radius: 50% 50% 50% 50%;
    transform: rotate(0deg);
  }
  25% {
    border-radius: 60% 40% 30% 70%;
    transform: rotate(90deg);
  }
  50% {
    border-radius: 30% 70% 70% 30%;
    transform: rotate(180deg);
  }
  75% {
    border-radius: 40% 60% 50% 50%;
    transform: rotate(270deg);
  }
}
.shape-infinity {
  width: 80px;
  height: 40px;
}

.infinity-path {
  width: 100%;
  height: 100%;
  border: 4px solid #ff6b6b;
  border-radius: 40px 40px 0 0;
  position: relative;
  animation: infinity-morph 3s ease-in-out infinite;
}

.infinity-path::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid #ff6b6b;
  border-radius: 0 0 40px 40px;
  top: -4px;
  left: -4px;
  transform: rotate(180deg);
}

@keyframes infinity-morph {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
}
.shape-wave-morph {
  width: 80px;
  height: 40px;
}

.wave {
  width: 100%;
  height: 4px;
  background: #4ecdc4;
  position: relative;
  animation: wave-motion 2s ease-in-out infinite;
}

.wave::before,
.wave::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 4px;
  background: #4ecdc4;
}

.wave::before {
  top: -12px;
  animation: wave-motion 2s ease-in-out infinite 0.3s;
}

.wave::after {
  top: 12px;
  animation: wave-motion 2s ease-in-out infinite 0.6s;
}

@keyframes wave-motion {
  0%, 100% {
    transform: translateX(0) scaleX(1);
    border-radius: 0;
  }
  50% {
    transform: translateX(10px) scaleX(1.2);
    border-radius: 10px;
  }
}
.shape-hexagon-rotate {
  width: 60px;
  height: 60px;
  background: #45b7d1;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: hexagon-transform 4s ease-in-out infinite;
}

@keyframes hexagon-transform {
  0%, 100% {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transform: rotate(0deg) scale(1);
  }
  25% {
    clip-path: polygon(50% 0%, 90% 20%, 90% 80%, 50% 100%, 10% 80%, 10% 20%);
    transform: rotate(90deg) scale(1.1);
  }
  50% {
    clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
    transform: rotate(180deg) scale(0.9);
  }
  75% {
    clip-path: polygon(50% 0%, 90% 20%, 90% 80%, 50% 100%, 10% 80%, 10% 20%);
    transform: rotate(270deg) scale(1.1);
  }
}
.back-link {
  margin-top: 3rem;
}

.back-link a {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.8rem 2rem;
  border: 2px solid white;
  border-radius: 25px;
  transition: all 0.3s ease;
  display: inline-block;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
}

.back-link a:hover {
  background: white;
  color: #ff6b6b;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .morphing-gallery-title {
    font-size: 2rem;
  }
  .morphing-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .shape {
    height: 80px;
  }
}