/* ローディングアニメーション用CSS */
.loading-modal {
  text-align: center;
  padding: 2rem;
}

.loading-modal h2 {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #333;
}

.loading-modal p {
  margin-top: 1.5rem;
  color: #666;
  font-size: 0.9rem;
}

/* アニメーションコンテナ */
.shape-animation-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

/* 図形の共通スタイル */
.shape {
  position: absolute;
  width: 40px;
  height: 40px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 円 */
.shape-circle {
  background: #8B5A3C; /* チョコレートブラウン */
  border-radius: 50%;
  top: 140px;
  left: 10px;
  animation: shape-move-circle 3s infinite ease-in-out;
}

/* 三角形 */
.shape-triangle {
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 35px solid #A0826D; /* ミルクチョコレート */
  background: transparent;
  top: 140px;
  left: 150px;
  animation: shape-move-triangle 3s infinite ease-in-out;
}

/* 四角形 */
.shape-square {
  background: #D4A574; /* キャラメルブラウン */
  top: 20px;
  left: 80px;
  animation: shape-move-square 3s infinite ease-in-out;
}

/* 円のアニメーション: 左下 → 上 → 右下 → 左下 */
@keyframes shape-move-circle {
  /* 1回目の移動: 左下 → 上 (0-33.33%) */
  0% {
    top: 140px;
    left: 10px;
    transform: scale(1);
  }
  8.33% {
    top: 140px;
    left: 10px;
    transform: scale(0.5);
  }
  33.33% {
    top: 20px;
    left: 80px;
    transform: scale(0.5);
  }
  /* 2回目の移動: 上 → 右下 (33.33-66.66%) */
  41.66% {
    top: 20px;
    left: 80px;
    transform: scale(1);
  }
  50% {
    top: 20px;
    left: 80px;
    transform: scale(0.5);
  }
  66.66% {
    top: 140px;
    left: 150px;
    transform: scale(0.5);
  }
  /* 3回目の移動: 右下 → 左下 (66.66-100%) */
  75% {
    top: 140px;
    left: 150px;
    transform: scale(1);
  }
  83.33% {
    top: 140px;
    left: 150px;
    transform: scale(0.5);
  }
  100% {
    top: 140px;
    left: 10px;
    transform: scale(1);
  }
}

/* 三角形のアニメーション: 右下 → 左下 → 上 → 右下 */
@keyframes shape-move-triangle {
  /* 1回目の移動: 右下 → 左下 (0-33.33%) */
  0% {
    top: 140px;
    left: 150px;
    transform: scale(1);
  }
  8.33% {
    top: 140px;
    left: 150px;
    transform: scale(0.5);
  }
  33.33% {
    top: 140px;
    left: 10px;
    transform: scale(0.5);
  }
  /* 2回目の移動: 左下 → 上 (33.33-66.66%) */
  41.66% {
    top: 140px;
    left: 10px;
    transform: scale(1);
  }
  50% {
    top: 140px;
    left: 10px;
    transform: scale(0.5);
  }
  66.66% {
    top: 20px;
    left: 80px;
    transform: scale(0.5);
  }
  /* 3回目の移動: 上 → 右下 (66.66-100%) */
  75% {
    top: 20px;
    left: 80px;
    transform: scale(1);
  }
  83.33% {
    top: 20px;
    left: 80px;
    transform: scale(0.5);
  }
  100% {
    top: 140px;
    left: 150px;
    transform: scale(1);
  }
}

/* 四角形のアニメーション: 上 → 右下 → 左下 → 上 */
@keyframes shape-move-square {
  /* 1回目の移動: 上 → 右下 (0-33.33%) */
  0% {
    top: 20px;
    left: 80px;
    transform: scale(1);
  }
  8.33% {
    top: 20px;
    left: 80px;
    transform: scale(0.5);
  }
  33.33% {
    top: 140px;
    left: 150px;
    transform: scale(0.5);
  }
  /* 2回目の移動: 右下 → 左下 (33.33-66.66%) */
  41.66% {
    top: 140px;
    left: 150px;
    transform: scale(1);
  }
  50% {
    top: 140px;
    left: 150px;
    transform: scale(0.5);
  }
  66.66% {
    top: 140px;
    left: 10px;
    transform: scale(0.5);
  }
  /* 3回目の移動: 左下 → 上 (66.66-100%) */
  75% {
    top: 140px;
    left: 10px;
    transform: scale(1);
  }
  83.33% {
    top: 140px;
    left: 10px;
    transform: scale(0.5);
  }
  100% {
    top: 20px;
    left: 80px;
    transform: scale(1);
  }
}
