#yae-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
  font-family: sans-serif;
}

/* スピナー用 */
.yae-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ccc;
  border-top: 6px solid #333;
  border-radius: 50%;
  animation: yae-spin 1s linear infinite;
}

@keyframes yae-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* プログレスバー用 */
.yae-progress-container {
  width: 80%;
  height: 10px;
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 20px;
}
.yae-progress-bar {
  width: 0%;
  height: 100%;
  background: #333;
  transition: width 0.2s ease;
}
.yae-percentage {
  font-size: 24px;
  color: #333;
}

/* ===== ドットアニメーション用 ===== */
.yae-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  height: 100px;

  /* ▼ カスタム変数に対応（デフォルト指定付き） */
  --dot-color: #333;
  --dot-size: 14px;
}

.yae-dots .dot {
  width: var(--dot-size);
  height: var(--dot-size);
  background-color: var(--dot-color);
  border-radius: 50%;
  animation: yae-dot-bounce 1s infinite ease-in-out;
}

.yae-dots .dot:nth-child(1) {
  animation-delay: 0s;
}
.yae-dots .dot:nth-child(2) {
  animation-delay: 0.2s;
}
.yae-dots .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes yae-dot-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  40% {
    transform: translateY(-12px);
    opacity: 1;
  }
}

/* ===== ロゴアニメーション用 ===== */
.yae-logo {
  animation: yae-logo-fade 1.5s ease-in-out infinite;
  display: block;
  margin: 0 auto;
  opacity: 0.8;
}

@keyframes yae-logo-fade {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* ロゴ未設定時のプレースホルダー */
.yae-logo-placeholder {
  font-size: 20px;
  color: #666;
  opacity: 0.5;
  text-align: center;
  padding: 40px 0;
  font-family: sans-serif;
}

/* ===== スライドオーバーレイ用（基本） ===== */
.yae-slide-overlay {
  position: fixed;
  top: 0;
  left: -100%; /* デフォルトは100% */
  width: 100%;
  height: 100%;
  background-color: var(--overlay-color, #111111);
  pointer-events: none;
  z-index: 9999;
  transition: left 0.5s ease-in-out;
}

/* ▼ オーバーレイ斜めモード（.diagonal クラスが付与されたとき） */
.yae-slide-overlay.diagonal {
  left: -150%;
  width: 150%;
  clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
}

/* スライドイン時 */
.yae-slide-overlay.active {
  left: 0;
}

/* ▼ グラデーションローディング */
.yae-gradient-loader {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: linear-gradient(
    -45deg,
    var(--gradient-color-1, #0073aa),
    var(--gradient-color-2, #43a047)
  );
  background-size: 200% 200%;
  animation: yae-gradient-animation 3s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

/* フェードアウト時に使用 */
.yae-gradient-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* グラデーションの動き */
@keyframes yae-gradient-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
