
.luffy-container {
  position: absolute;
  width: 200px;
  height: 200px;
  z-index: 1;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.luffy-container:hover {
  opacity: 1;
}

/* Support both object tag and direct SVG */
.luffy-container svg,
.luffy-container object,
.luffy-hat-svg {
  width: 100%;
  height: 100%;
}

/* Target the SVG group class */
.luffy-hat {
  transform-origin: center;
  animation: floatHat 3s ease-in-out infinite;
}

@keyframes floatHat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(5px, -5px) rotate(2deg); }
  50% { transform: translate(0, -8px) rotate(0deg); }
  75% { transform: translate(-5px, -5px) rotate(-2deg); }
}

/* Desktop (default) */
@media screen and (min-width: 1200px) {
  .luffy-container {
    right: 610px;
    top: 250px;
  }
}

/* Large tablets and small desktops */
@media screen and (max-width: 1199px) {
  .luffy-container {
    right: 40%;
    top: 200px;
    width: 180px;
    height: 180px;
  }
}

/* Tablets */
@media screen and (max-width: 768px) {
  .luffy-container {
    right: 35%;
    top: 180px;
    width: 150px;
    height: 150px;
  }
}

/* Large phones */
@media screen and (max-width: 576px) {
  .luffy-container {
    right: 30%;
    top: 150px;
    width: 120px;
    height: 120px;
  }
}

/* Small phones */
@media screen and (max-width: 480px) {
  .luffy-container {
    position: relative;
    right: auto;
    top: auto;
    width: 100px;
    height: 100px;
    margin: 20px auto;
    display: block; /* Ensures it takes up proper space in the flow */
  }
}

