/* ============================================
   MASCOT SYSTEM - STYLES
   ============================================ */

/* Mascot Tab Content */
.mascot-tab-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
}

.mascot-header {
  text-align: center;
  margin-bottom: 2rem;
}

.mascot-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.mascot-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Mascot Preview */
.mascot-preview-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.mascot-preview {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 50%;
  border: 3px solid rgba(102, 126, 234, 0.2);
}

.mascot-body {
  font-size: 4rem;
  z-index: 2;
}

.mascot-item-head {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.5rem;
  z-index: 3;
}

.mascot-item-accessory {
  position: absolute;
  bottom: 15px;
  right: 15px;
  font-size: 2rem;
  z-index: 3;
}

.mascot-item-outfit {
  position: absolute;
  bottom: 35px;
  left: 15px;
  font-size: 1.8rem;
  z-index: 3;
}

.mascot-preview-small {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mascot-preview-small .mascot-body {
  font-size: 2rem;
}

.mascot-preview-small .mascot-item-head {
  font-size: 1.25rem;
  top: 5px;
}

.mascot-preview-small .mascot-item-accessory {
  font-size: 1rem;
  bottom: 8px;
  right: 8px;
}

.mascot-preview-small .mascot-item-outfit {
  font-size: 0.9rem;
  bottom: 18px;
  left: 8px;
}

/* Header Mini Display */
.mascot-header-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.mascot-header-mini:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: scale(1.1);
}

/* Equipped Slots */
.mascot-equipped {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.mascot-equipped h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.equipped-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.equipped-slot {
  background: rgba(102, 126, 234, 0.05);
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.slot-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.slot-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.item-emoji {
  font-size: 2rem;
}

.item-level {
  font-size: 0.875rem;
  color: var(--accent-purple);
}

.slot-empty {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  padding: 1rem 0;
}

/* Collection */
/* Mascot Collection - Collapsible */
.mascot-collection {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 0;
  background: var(--card-bg);
}

.mascot-collection summary {
  padding: 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.mascot-collection summary:hover {
  background: rgba(102, 126, 234, 0.1);
}

.mascot-collection summary::-webkit-details-marker {
  display: none;
}

.mascot-collection summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.2s ease;
  font-size: 0.875rem;
}

.mascot-collection[open] summary::before {
  transform: rotate(90deg);
}

.mascot-collection h4 {
  display: inline;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  pointer-events: none;
}

.mascot-collection h4 span {
  pointer-events: none;
}

.collection-content {
  padding: 1rem;
}

.collection-category {
  margin-bottom: 2rem;
}

.collection-category h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.collection-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.collection-item {
  position: relative;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.collection-item.owned {
  border-color: rgba(102, 126, 234, 0.3);
}

.collection-item.owned:hover {
  transform: translateY(-4px);
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.collection-item.equipped {
  border-color: var(--accent-purple);
  background: rgba(102, 126, 234, 0.1);
}

.collection-item.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Silver Shine Effect - single sparkle animation */
.collection-item.silver-shine {
  border-color: #c0c0c0;
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.1) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(192, 192, 192, 0.1) 100%);
  box-shadow: 0 0 8px rgba(192, 192, 192, 0.4), inset 0 0 8px rgba(255, 255, 255, 0.1);
  animation: silverShimmer 3s ease-in-out infinite;
}

.collection-item.silver-shine::before {
  content: '✨';
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 1.2rem;
  animation: sparkleFloat 2s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(192, 192, 192, 0.8));
}

/* Gold Shine Effect - double sparkle animation */
.collection-item.gold-shine {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 215, 0, 0.15) 100%);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.15);
  animation: goldShimmer 2.5s ease-in-out infinite;
}

.collection-item.gold-shine::before {
  content: '✨';
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 1.2rem;
  animation: sparkleFloat 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.9));
}

.collection-item.gold-shine::after {
  content: '✨';
  position: absolute;
  top: -4px;
  left: -8px;
  font-size: 1rem;
  animation: sparkleFloat 2s ease-in-out infinite 0.75s;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.9));
}

/* Shine animations */
@keyframes silverShimmer {
  0%, 100% { box-shadow: 0 0 8px rgba(192, 192, 192, 0.4), inset 0 0 8px rgba(255, 255, 255, 0.1); }
  50% { box-shadow: 0 0 15px rgba(192, 192, 192, 0.6), inset 0 0 12px rgba(255, 255, 255, 0.2); }
}

@keyframes goldShimmer {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.15); }
  50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.7), inset 0 0 15px rgba(255, 255, 255, 0.25); }
}

@keyframes sparkleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-4px) scale(1.2); opacity: 0.8; }
}

/* Silver/Gold effect for emoji in equipped slots */
.item-emoji.silver-shine {
  filter: drop-shadow(0 0 4px rgba(192, 192, 192, 0.8));
  animation: emojiShine 3s ease-in-out infinite;
}

.item-emoji.gold-shine {
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.9));
  animation: emojiShine 2s ease-in-out infinite;
}

@keyframes emojiShine {
  0%, 100% { filter: drop-shadow(0 0 4px currentColor); transform: scale(1); }
  50% { filter: drop-shadow(0 0 8px currentColor); transform: scale(1.05); }
}

.collection-item .item-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.collection-item .item-level {
  font-size: 0.75rem;
  color: var(--accent-purple);
  margin-bottom: 0.25rem;
}

.collection-item .item-copies {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.item-locked {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
}

.equipped-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: var(--accent-purple);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Info Box */
.mascot-info {
  background: rgba(102, 126, 234, 0.08);
  border-left: 3px solid var(--accent-purple);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 2rem;
}

.mascot-info p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mascot-tab-content {
    padding: 1rem;
  }
  
  .mascot-preview {
    width: 120px;
    height: 120px;
  }
  
  .mascot-body {
    font-size: 3rem;
  }
  
  .mascot-item-head {
    font-size: 2rem;
  }
  
  .mascot-item-accessory {
    font-size: 1.5rem;
  }
  
  .equipped-slots {
    grid-template-columns: 1fr 1fr;
  }
  
  .collection-items {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
  }
  
  .collection-item .item-emoji {
    font-size: 2rem;
  }
}

/* Light Theme */
[data-theme="light"] .mascot-preview {
  background: rgba(102, 126, 234, 0.08);
  border-color: rgba(102, 126, 234, 0.3);
}

[data-theme="light"] .equipped-slot {
  background: rgba(102, 126, 234, 0.08);
  border-color: rgba(102, 126, 234, 0.3);
}

[data-theme="light"] .collection-item.equipped {
  background: rgba(102, 126, 234, 0.15);
}

[data-theme="light"] .mascot-info {
  background: rgba(102, 126, 234, 0.1);
}

/* Guide Expandable Section */
.mascot-guide-wrapper,
.mascot-guide {
  margin-top: 2rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
}

.mascot-guide-header,
.mascot-guide summary {
  cursor: pointer;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent-purple);
  background: rgba(102, 126, 234, 0.05);
  user-select: none;
  list-style: none;
  transition: background 0.2s ease;
}

.mascot-guide-header:hover,
.mascot-guide summary:hover {
  background: rgba(102, 126, 234, 0.1);
}

.mascot-guide summary::-webkit-details-marker {
  display: none;
}

.mascot-guide summary::before {
  content: '▶';
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  display: inline-block;
  margin-right: 0.5rem;
}

.mascot-guide[open] summary::before {
  transform: rotate(90deg);
}

.mascot-guide summary span {
  pointer-events: none;
}

.mascot-guide .guide-content {
  padding: 1.5rem;
  border-top: 1px solid rgba(102, 126, 234, 0.1);
  background: var(--bg-secondary);
}

.mascot-guide .guide-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem 0;
}

.mascot-guide .guide-content h4:first-child {
  margin-top: 0;
}

.mascot-guide .guide-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.mascot-guide .guide-content ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
  list-style: none;
}

.mascot-guide .guide-content ul li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
  position: relative;
}

.mascot-guide .guide-content ul li::before {
  content: '•';
  position: absolute;
  left: -0.75rem;
  color: var(--accent-purple);
  font-weight: bold;
}

.mascot-guide .guide-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

[data-theme="light"] .mascot-guide {
  border-color: rgba(102, 126, 234, 0.3);
}

[data-theme="light"] .mascot-guide summary {
  background: rgba(102, 126, 234, 0.08);
}

[data-theme="light"] .mascot-guide summary:hover {
  background: rgba(102, 126, 234, 0.15);
}

[data-theme="light"] .mascot-guide .guide-content {
  background: rgba(102, 126, 234, 0.03);
}
/* ============================================
   WEEKLY CHEST STATUS SECTION
   ============================================ */

.weekly-chest-section {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.weekly-chest-section h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1rem 0 0.5rem 0;
}

.weekly-chest-section p {
  color: var(--text-secondary);
  margin: 0.5rem 0;
}

.chest-icon-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chest-icon {
  font-size: 5rem;
  position: relative;
  z-index: 2;
}

.chest-lock {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 2.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.checkmark {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 2rem;
}

/* Chest States */
.chest-pending {
  border: 2px solid rgba(255, 193, 7, 0.3);
}

.chest-available {
  border: 2px solid rgba(76, 175, 80, 0.5);
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(102, 126, 234, 0.15) 100%);
}

.chest-claimed {
  border: 2px solid rgba(156, 156, 156, 0.3);
  opacity: 0.8;
}

/* Animations */
.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-bounce {
  animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Pulse Rings */
.chest-pulse-container {
  position: relative;
  display: inline-block;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border: 3px solid rgba(255, 193, 7, 0.6);
  border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
}

.pulse-ring.delay-1 {
  animation-delay: 0.5s;
}

.pulse-ring.delay-2 {
  animation-delay: 1s;
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Glow Effect */
.chest-glow-container {
  position: relative;
  display: inline-block;
}

.glow-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(76, 175, 80, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* Sparkles */
.sparkles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sparkles span {
  position: absolute;
  font-size: 1.5rem;
  animation: sparkle 3s ease-in-out infinite;
}

.sparkles span:nth-child(1) {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.sparkles span:nth-child(2) {
  top: 20%;
  right: 15%;
  animation-delay: 0.5s;
}

.sparkles span:nth-child(3) {
  bottom: 20%;
  left: 20%;
  animation-delay: 1s;
}

.sparkles span:nth-child(4) {
  bottom: 15%;
  right: 10%;
  animation-delay: 1.5s;
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(180deg);
  }
}

/* Chest Timer */
.chest-timer {
  font-size: 1.1rem;
  margin: 1rem 0;
}

.chest-timer strong {
  color: var(--primary);
  font-size: 1.3rem;
}

.chest-ready {
  background: linear-gradient(135deg, #4CAF50 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbow 3s ease-in-out infinite;
}

@keyframes rainbow {
  0%, 100% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(20deg);
  }
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  max-width: 300px;
  height: 8px;
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
  margin: 1rem auto;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Chest Preview */
.chest-preview {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  display: inline-block;
}

.reward-preview {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 1.5rem;
}

.reward-preview span:first-child {
  font-size: 2.5rem;
}

.rarity-common {
  color: #9E9E9E;
  font-weight: 600;
  font-size: 0.875rem;
}

.rarity-rare {
  color: #2196F3;
  font-weight: 600;
  font-size: 0.875rem;
}

.rarity-epic {
  color: #9C27B0;
  font-weight: 600;
  font-size: 0.875rem;
}

.chest-hint {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

/* Equipped Badge Tooltip */
.equipped-badge {
  cursor: pointer;
}

.equipped-badge:hover::after {
  content: 'Click to unequip';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 10;
}