/* ==================== アニメーション ==================== */

/* フェードイン */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* スライドアップ */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* スケールイン */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* バウンスイン */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* シマー（プログレスバー用） */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* スピン（ローディング用） */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ローディングスケルトン */
@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* パルス（ステータスインジケーター用） */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* リップルエフェクト用（ボタン内で使用） */
@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* ローディングスピナー */
.spinner {
  border: 4px solid rgba(3, 23, 44, 0.1);
  border-left-color: #03172c;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* ローディングコンテナ */
.loading-container,
.loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.loading-container {
  padding: 60px 20px;
}

.loading {
  font-size: 16px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  border: 1px solid #dcd8d3;
  margin: 20px 0;
}

.loading-container .loading-text,
.loading .spinner {
  margin-top: 15px;
}

.loading-container .loading-text {
  font-size: 16px;
  font-weight: 500;
}

.loading .spinner {
  margin-bottom: 15px;
  margin-top: 0;
}

/* グラフローディングオーバーレイ */
.graph-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  z-index: 1000;
}

.graph-loading-overlay.hidden {
  display: none;
}

.graph-loading-overlay p {
  color: #03172c;
  font-weight: 600;
  font-size: 16px;
  margin: 0;
}

/* ==================== アニメーション削減設定 ==================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
