/* ローディング画面 - GIF版（テキスト重ね表示） */
#page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #ffffff 0%, #fdf7fd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 500px;
}

/* GIF画像 */
.loader-image {
  position: relative;
  width: 100%;
  max-width: 150px;
  height: auto;
  opacity: 0.7;
  object-fit: contain;
  z-index: 1;
}

/* Loading...テキスト（GIFの上に重ねる） */
.loader-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(100, 100, 100);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  z-index: 100;
  animation: pulse 1.5s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes pulse {
  0%, 100% { 
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.98);
  }
  50% { 
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ドットアニメーション */
.loader-text::after {
  content: '';
  animation: dots 1.5s steps(4) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .loader-content {
    max-width: 90%;
    padding: 0 2rem;
  }
  
  .loader-image {
    max-width: 300px;
  }
  
  .loader-text {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .loader-image {
    max-width: 250px;
  }
  
  .loader-text {
    font-size: 1.2rem;
  }
}