/* Rewards System Styles */

/* Banner Preview */
.banner-preview {
  width: 100%;
  height: 60px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

/* Profile Border Preview */
.border-preview {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  background: var(--bg-secondary);
  font-size: 24px;
}

.border-preview .border-icon {
  font-size: 32px;
}

/* Reward Selection Grid */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.reward-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.reward-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.reward-card.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.reward-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.reward-card .reward-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.reward-card .reward-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.reward-card .reward-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Locked overlay */
.reward-card.locked::after {
  content: '🔒';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
}

/* Profile with border */
.profile-avatar {
  position: relative;
  display: inline-block;
}

.profile-avatar img {
  border-radius: 50%;
  display: block;
}

/* Glow animation for legendary borders */
@keyframes glow {
  from {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.9), inset 0 0 30px rgba(255, 215, 0, 0.4);
  }
  to {
    box-shadow: 0 0 60px rgba(255, 215, 0, 1), inset 0 0 40px rgba(255, 215, 0, 0.6);
  }
}

/* Pattern overlays */
.pattern-checkered::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.1) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.1) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.1) 75%);
  background-size: 20px 20px;
  opacity: 0.3;
}

.pattern-stars::before {
  content: '✦';
  position: absolute;
  color: rgba(255, 255, 255, 0.3);
  font-size: 20px;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* Reward unlock notification */
.reward-unlock {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--bg-card);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
  z-index: 2000;
  animation: unlockPop 0.5s ease-out forwards;
}

@keyframes unlockPop {
  0% { transform: translate(-50%, -50%) scale(0); }
  70% { transform: translate(-50%, -50%) scale(1.1); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.reward-unlock .unlock-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.reward-unlock .unlock-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  margin-bottom: 8px;
}

.reward-unlock .unlock-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .rewards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .banner-preview {
    height: 80px;
  }
  
  .banner-preview .banner-icon {
    font-size: 32px;
  }
}

/* ============================================
   REWARD ANIMATIONS
   ============================================ */

@keyframes diamondPulse {
  0%, 100% { 
    box-shadow: 0 0 40px rgba(185, 242, 255, 0.8), 0 0 80px rgba(0, 206, 209, 0.4);
    filter: brightness(1);
  }
  50% { 
    box-shadow: 0 0 60px rgba(185, 242, 255, 1), 0 0 120px rgba(0, 206, 209, 0.6);
    filter: brightness(1.2);
  }
}

@keyframes rainbowShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes flameFlicker {
  0% { 
    box-shadow: 0 0 50px rgba(255, 107, 53, 1), 0 0 100px rgba(255, 107, 53, 0.5);
    filter: brightness(1);
  }
  100% { 
    box-shadow: 0 0 70px rgba(255, 107, 53, 1), 0 0 140px rgba(255, 107, 53, 0.7);
    filter: brightness(1.3);
  }
}

@keyframes royalGlow {
  0% { 
    box-shadow: 0 0 60px rgba(255, 215, 0, 1), 0 0 120px rgba(255, 215, 0, 0.5);
    filter: brightness(1);
  }
  100% { 
    box-shadow: 0 0 80px rgba(255, 215, 0, 1), 0 0 160px rgba(255, 215, 0, 0.7);
    filter: brightness(1.3);
  }
}

/* Reward preview styling */
.reward-preview {
  transition: all 0.3s ease;
}

.reward-preview:hover {
  transform: scale(1.05);
}

/* Locked reward styling */
.reward-locked {
  opacity: 0.5;
  filter: grayscale(0.8);
  transition: all 0.3s ease;
}

.reward-locked:hover {
  opacity: 0.7;
  filter: grayscale(0.5);
}

/* Unlocked reward glow */
.reward-unlocked {
  animation: unlockPulse 0.6s ease-out;
}

@keyframes unlockPulse {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
