/* skeleton.css - スケルトンローダーとアニメーション用CSS */

/* スケルトンアニメーション */
@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    opacity: 0.6;
  }
}

/* スケルトンプレースホルダー */
.skeleton-placeholder {
  animation: pulse 1.5s infinite;
}

.skeleton {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  height: 60px;
  margin-bottom: 8px;
}

/* ローディングインジケーター */
.card-loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

.loading-dots {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  margin: 0 4px;
  background: #5e9cff;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.loading-text {
  font-size: 0.85em;
  color: #888;
}

.error-text {
  color: #ff6b6b;
  font-size: 0.85em;
}

/* フェードインアニメーション */
.card-detailed-content {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card-detailed-content.fadeIn {
  opacity: 1;
}

/* フレックスレイアウト */
.card-detailed-content {
  display: flex;
  align-items: flex-start;
  gap: 1.5em;
}

/* マッチカードのスケルトンローダー */
.match-card-skeleton {
  background: #2a2a3a;
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 1em;
  display: flex;
  height: 120px;
  position: relative;
  animation: pulse 1.5s infinite;
}

.match-card-skeleton::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #444;
  border-radius: 8px 0 0 8px;
}

.match-card-skeleton-content {
  display: flex;
  gap: 1em;
  width: 100%;
  align-items: center;
}

.skeleton-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.skeleton-rect {
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.skeleton-text {
  width: 80px;
}

.skeleton-kda {
  width: 100px;
}

.skeleton-items {
  width: 200px;
}

.skeleton-teams {
  flex: 1;
}

.skeleton-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

/* サモナーカード用スケルトン */
.card-loading-skeleton {
  display: flex;
  align-items: flex-start;
  gap: 1.5em;
}

/* モバイル用レスポンシブ修正 - サモナーカード向け */
@media (max-width: 768px) {
  .card-detailed-content {
    flex-direction: column !important;
    width: 100%;
    align-items: stretch;
  }
  
  .champion-summary {
    width: 100%;
    margin-left: 0;
    min-width: auto;
    align-self: center;
  }
  
  .champion-detail {
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .champion-detail {
    width: 100%;
  }
  
  .champion-stats-text {
    width: calc(100% - 45px);
    overflow: hidden;
  }
  
  .champion-name-record {
    flex-wrap: wrap;
  }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .card-loading-skeleton {
    flex-direction: column;
    gap: 1em;
  }
  
  .match-card-skeleton {
    padding: 0.8em;
    height: 100px;
  }
  
  .skeleton-items, 
  .skeleton-teams {
    display: none;
  }
}