.profile-container {
  perspective: 1000px;
  width: 300px;  /* Changed to make it taller than wide */
  height: 400px;
  margin: 0 auto;
  cursor: pointer;
}

.profile-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.profile-container.flipped .profile-card {
  transform: rotateY(180deg);
}

.profile-front, .profile-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 150px / 200px;  /* Changed to create oval shape */
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-front {
  background: white;
}

.profile-back {
  background: linear-gradient(135deg, rgba(250,172,224,0.95) 0%, rgba(0,238,247,0.95) 100%);
  transform: rotateY(180deg);
  padding: 20px;
  text-align: center;
  overflow: auto;
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 150px / 200px;  /* Match container's border radius */
  object-fit: cover;
  border: 3px solid rgba(250,172,224,0.4);
}

.profile-text {
  color: rgb(0, 0, 128);
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px;
}

@keyframes rotateArrow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.profile-container::before {
  content: '↻';
  position: absolute;
  font-size: 24px;
  color: rgb(202, 45, 81);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  top: 10px;
  right: 10px;
  z-index: 2;
  animation: rotateArrow 3s linear infinite;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.profile-container:hover::before {
  animation-duration: 1.5s;
}
