/* メインボタン */
.main-button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  /* overflow: hidden; */
}

.main-button:active {
  transform: translateY(0);
}

/* スクロール時の固定ボタン */
.main-button.fixed {
  position: fixed !important;
  bottom: 30px !important;
  right: 40px !important;
  z-index: 9999 !important;
  opacity: 1 !important;
  transform: translateX(0) !important;
  transition: all 0.3s ease !important;
}

/* 固定ボタンの登場アニメーション */
.main-button.fixed.show {
  animation: rollIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}


/* アニメーション */
@keyframes rollIn {
  0% {
      opacity: 0 !important;
      transform: translateX(100px) rotate(-180deg) scale(0.5) !important;
  }
  50% {
      opacity: 1 !important;
      transform: translateX(-10px) rotate(-90deg) scale(1.1) !important;
  }
  100% {
      opacity: 1 !important;
      transform: translateX(0) rotate(0deg) scale(1) !important;
  }
}

@keyframes rollOut {
  0% {
      opacity: 1 !important;
      transform: translateX(0) rotate(0deg) scale(1) !important;
  }
  50% {
      opacity: 0.5 !important;
      transform: translateX(-10px) rotate(90deg) scale(1.1) !important;
  }
  100% {
      opacity: 0 !important;
      transform: translateX(100px) rotate(180deg) scale(0.5) !important;
  }
}

/* ボタンが非表示になる時のアニメーション */
.main-button.fixed.hiding {
  animation: rollOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* 通常状態でのボタンの可視性を確保 */
.main-button:not(.fixed) {
  opacity: 1 !important;
  transform: none !important;
  position: relative !important;
}

@keyframes pulse {
  0%, 100% {
      transform: scale(1);
  }
  50% {
      transform: scale(1.05);
  }
}

.main-button.fixed.pulse {
  animation: pulse 2s infinite;
}


/* ヘッダーの透明度変更 */
/* .header.scrolled {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
  backdrop-filter: blur(10px);
} */

/* レスポンシブ対応 */
@media (max-width: 991px) {
  
  .main-button.fixed {
      bottom: 80px;
      right: 20px;
  }
  
}