/**
 * トップに戻るボタン用スタイル
 * 他のページでも使用できる独立したスタイルシート
 */

.page-top-link {
  position: fixed;
  top: 400px; /* 表の横、上部に近い位置 */
  right: 150px; /* 表の右横に配置 */
  width: 50px;
  height: 50px;
  background-color: #4A90E2; /* 水色 */
  color: white;
  border-radius: 50%; /* 円形にする */
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  z-index: 9998; /* 翻訳ボタンより少し下に */
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease-in-out;
  transform: translateY(20px);
}

/* 画面幅が狭い場合の調整 */
@media (max-width: 1280px) {
  .page-top-link {
    right: 20px; /* 通常の右寄せに */
    top: auto;
    bottom: 100px; /* 翻訳ボタンの上に */
  }
}

.page-top-link.show {
  opacity: 0.9; /* よりはっきり見えるように */
  visibility: visible;
  transform: translateY(0);
}

.page-top-link i {
  font-size: 20px;
}

.page-top-link:hover {
  background-color: #357ABD; /* 少し暗めの水色 */
  opacity: 1;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

/* 異なるテーマ向けのカスタマイズオプション */
.page-top-link.blue-theme {
  background-color: #4A90E2; /* 青系テーマ */
}

.page-top-link.blue-theme:hover {
  background-color: #357ABD; /* 青系テーマのホバー色 */
}

.page-top-link.green-theme {
  background-color: #107c10; /* 緑系テーマ */
}

.page-top-link.green-theme:hover {
  background-color: #0b5e0b; /* 緑系テーマのホバー色 */
}

/* モバイル向け調整 */
@media (max-width: 768px) {
  .page-top-link {
    width: 45px;
    height: 45px;
    top: auto; /* モバイルではtopを無効化 */
    bottom: 90px; /* モバイルでも翻訳ボタンの上に */
    right: 20px; /* モバイルでは右寄せ */
  }
  
  .page-top-link i {
    font-size: 18px;
  }
}
