html,
body {
  margin: 0;
  padding: 0;
  font-family: "Source Sans 3", sans-serif;
  background-color: #f5f5f5;
}

.container {
  max-width: 375px;
  margin: 0 auto;
  border: 1 px solid gray;
}

.header {
  padding: 20px 15px;
  background-color: white;
  border-bottom: 4px solid #f5f5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 15px;
}

.logo {
  width: 130px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%; /* Makes it a circle */
}

/* POST STYLES */
.post {
  border-bottom: 16px solid #f5f5f5;
  background-color: white;
}

.post-header {
  display: flex;
  align-items: center;
  padding: 15px;
}

.avatar {
  width: 35px;
  border-radius: 50%;
  margin-right: 10px;
  border: 1px solid #c6c6c6;
}

.post-info {
  display: flex;
  flex-direction: column;
  font-size: 13px;
}

.username-bold,
.bold {
  font-weight: bold;
}

.location {
  font-size: 12px;
}

.post-image {
  width: 100%;
  display: block; /* Removes weird gap at bottom of images */
}

.post-bottom {
  padding: 15px 15px 8px 15px;
}

.icons {
  margin-bottom: 10px;
  gap: 15px;
}

.icon-btn {
  background-color: white;
  border: none;
}

.icon-btn img {
  width: 25px;
  cursor: pointer;
  transition: transform 0.1s; /* Smooth click effect */
}

.icon:hover {
  opacity: 0.7;
  transform: scale(1);
}

.likes {
  margin: 0 0 10px 0;
  font-size: 14px;
}

.caption {
  margin: 0;
  font-size: 14px;
}

/* LIKE ANIMATION SETUP */
/* 1. The Container needs relative positioning 
   so the heart stays inside IT, not the whole page */
.post-image-container {
  position: relative;
  cursor: pointer;
}

/* 2. The Floating Heart (Hidden by default) */
.overlay-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0); /* Centered and shrunk */
  width: 100px; /* Big size */
  opacity: 0;
  transition: all 0.2s;
  pointer-events: none; /* Crucial: lets clicks pass through to the image below */
  z-index: 10;
  filter: drop-shadow(
    0 0 10px rgba(254, 44, 44, 0.5)
  ); /* Adds a shadow so it pops */
}

/* 3. The Animation Class */
.overlay-heart.animate-like {
  animation: like-burst 0.8s ease-in-out;
}

/* 4. The Keyframes (The movement instructions) */
@keyframes like-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(2.5); /* Pop bigger */
  }
  30% {
    transform: translate(-50%, -50%) scale(1); /* Bounce back */
  }
  45% {
    transform: translate(-50%, -50%) scale(2.5);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0; /* Fade away */
    transform: translate(-50%, -50%) scale(0);
  }
}

@media (max-width: 425px) {
  .container {
    max-width: 100%;
  }
}
