/* Starwind Loading Skeletons v1.0 */

/* Base skeleton animation */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Skeleton base class */
.skeleton {
  background: linear-gradient(90deg, #2d2d3a 25%, #3d3d4a 50%, #2d2d3a 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}

/* Skeleton variants */
.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-text-sm {
  height: 12px;
  margin-bottom: 6px;
}

.skeleton-text-lg {
  height: 24px;
  margin-bottom: 12px;
}

.skeleton-title {
  height: 32px;
  margin-bottom: 16px;
  width: 60%;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.skeleton-button {
  height: 44px;
  border-radius: 12px;
}

.skeleton-card {
  padding: 16px;
  border-radius: 16px;
  background: #1a1a24;
  border: 1px solid #2d2d3a;
}

.skeleton-monster {
  width: 100px;
  height: 100px;
  border-radius: 16px;
}

.skeleton-stat {
  height: 60px;
  border-radius: 12px;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #1a1a24;
  margin-bottom: 8px;
}

/* Initial app loading skeleton */
.app-skeleton {
  min-height: 100vh;
  background: #0f0f14;
  padding: 16px;
  font-family: system-ui, -apple-system, sans-serif;
}

.app-skeleton-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  margin-bottom: 24px;
}

.app-skeleton-logo {
  width: 120px;
  height: 32px;
}

.app-skeleton-wallet {
  width: 140px;
  height: 40px;
  border-radius: 20px;
}

.app-skeleton-hero {
  text-align: center;
  padding: 32px 0;
}

.app-skeleton-hero .skeleton-avatar-lg {
  margin: 0 auto 16px;
}

.app-skeleton-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.app-skeleton-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.app-skeleton-leaderboard {
  margin-top: 24px;
}

.app-skeleton-leaderboard-title {
  margin-bottom: 16px;
}

/* Leaderboard skeleton rows */
.skeleton-leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #1a1a24;
  border-radius: 12px;
  margin-bottom: 8px;
}

.skeleton-rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
}

.skeleton-player-info {
  flex: 1;
}

.skeleton-player-name {
  height: 16px;
  width: 120px;
  margin-bottom: 4px;
}

.skeleton-player-monster {
  height: 12px;
  width: 80px;
}

.skeleton-points {
  width: 60px;
  height: 20px;
  border-radius: 6px;
}

/* Battle history skeleton */
.skeleton-battle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #1a1a24;
  border-radius: 12px;
  margin-bottom: 8px;
}

.skeleton-battle-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skeleton-battle-type {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.skeleton-battle-text {
  width: 150px;
  height: 14px;
}

.skeleton-battle-damage {
  width: 50px;
  height: 24px;
  border-radius: 6px;
}

/* Monster grid skeleton */
.skeleton-monster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.skeleton-monster-card {
  aspect-ratio: 1;
  border-radius: 16px;
  background: #1a1a24;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.skeleton-monster-img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
}

.skeleton-monster-name {
  width: 50px;
  height: 14px;
}

/* Utility classes for width */
.w-full { width: 100%; }
.w-3\/4 { width: 75%; }
.w-1\/2 { width: 50%; }
.w-1\/3 { width: 33.333%; }
.w-1\/4 { width: 25%; }

/* Hide skeleton when app is loaded */
.app-loaded .app-skeleton {
  display: none;
}
