/* ローディング画面のスタイル */
.loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #F5F9F7 0%, #E8F3EE 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-wrapper.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
  animation: fadeIn 0.8s ease-in;
}

/* ロゴアニメーション */
.loader-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
  position: relative;
}

.loader-logo svg {
  width: 100%;
  height: 100%;
  animation: logoFloat 3s ease-in-out infinite;
}

.loader-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: logoFloat 3s ease-in-out infinite;
}

/* 葉のアニメーション */
.leaf-animation {
  position: absolute;
  width: 30px;
  height: 30px;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.leaf-1 {
  top: -20px;
  left: 20px;
  animation: leafFall 3s ease-in-out infinite;
}

.leaf-2 {
  top: -20px;
  right: 20px;
  animation: leafFall 3s ease-in-out infinite 0.5s;
}

.leaf-3 {
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  animation: leafFall 3s ease-in-out infinite 1s;
}

.leaf-4 {
  top: -20px;
  right: 50%;
  transform: translateX(50%);
  animation: leafFall 3s ease-in-out infinite 1.5s;
}

/* プログレスバー */
.loader-progress {
  width: 200px;
  height: 4px;
  background: rgba(46, 77, 68, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto 20px;
}

.loader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2E4D44 0%, #3D6B5E 100%);
  border-radius: 2px;
  animation: loadProgress 2s ease-in-out;
}

/* ローディングテキスト */
.loader-text {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  color: #2E4D44;
  letter-spacing: 2px;
  animation: pulse 1.5s ease-in-out infinite;
}

/* アニメーション定義 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes leafFall {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(100px) rotate(360deg);
  }
}

@keyframes loadProgress {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .loader-logo {
    width: 80px;
    height: 80px;
  }
  
  .loader-progress {
    width: 150px;
  }
  
  .loader-text {
    font-size: 12px;
  }
}