/* Persona 5スタイル ローディング画面 */
.persona5-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #1a1a1a 0%, #000000 100%);
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.persona5-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.persona5-loader.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.loader-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(230, 0, 51, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 51, 51, 0.1) 0%, transparent 50%);
  animation: backgroundPulse 3s ease-in-out infinite alternate;
}

.loader-content {
  position: relative;
  text-align: center;
  color: #ffffff;
  z-index: 1;
}

.loader-phantom {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 30px;
  animation: phantomFloat 2s ease-in-out infinite;
}

.phantom-mask {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 40px;
  background: linear-gradient(135deg, #ff3333, #e60033);
  border-radius: 50px 50px 20px 20px;
  box-shadow: 0 0 20px rgba(255, 51, 51, 0.5);
  animation: maskGlow 2s ease-in-out infinite;
}

.phantom-body {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: linear-gradient(180deg, #333333, #1a1a1a);
  border-radius: 50px;
  opacity: 0.8;
}

.loader-text {
  margin-bottom: 30px;
}

.loading-message {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  letter-spacing: 2px;
  animation: textPulse 2s ease-in-out infinite;
}

.loading-dots {
  display: inline-block;
  margin-left: 10px;
}

.loading-dots span {
  display: inline-block;
  animation: dotBounce 1.5s ease-in-out infinite;
  color: #ff3333;
  font-size: 24px;
  font-weight: bold;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

.progress-container {
  width: 300px;
  margin: 0 auto;
  position: relative;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff3333, #e60033, #ff3333);
  background-size: 200% 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
  animation: progressGlow 2s ease-in-out infinite;
}

.progress-percentage {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: #cccccc;
  letter-spacing: 1px;
}

/* アニメーション */
@keyframes backgroundPulse {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes phantomFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes maskGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 51, 51, 0.5); }
  50% { box-shadow: 0 0 30px rgba(255, 51, 51, 0.8); }
}

@keyframes textPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-10px); }
}

@keyframes progressGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .loading-message {
    font-size: 20px;
  }
  
  .loader-phantom {
    width: 60px;
    height: 60px;
  }
  
  .phantom-mask {
    width: 45px;
    height: 30px;
  }
  
  .phantom-body {
    width: 40px;
    height: 40px;
  }
  
  .progress-container {
    width: 250px;
  }
}

@media (max-width: 480px) {
  .loading-message {
    font-size: 18px;
  }
  
  .progress-container {
    width: 200px;
  }
}