/* ============================================
   COLONIA VIVA SYSTEM - STYLES
   ============================================ */

/* Colony Mini Display - Completely redesigned for proper containment */
#colonyDisplayContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.colony-mini-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: help;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.15);
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}

.colony-mini-display:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.colony-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  font-size: 24px;
  line-height: 1;
}

.colony-state-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: 0.3px;
  line-height: 1.2;
  display: flex;
  align-items: center;
}

@keyframes pulse-soft {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

/* Weekly Chest Banner */
.weekly-chest-banner {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-left: 4px solid var(--accent-purple);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  animation: slideInDown 0.5s ease-out;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chest-banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chest-icon {
  font-size: 2rem;
  flex-shrink: 0;
  animation: bounce-gentle 2s ease-in-out infinite;
}

@keyframes bounce-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.chest-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.chest-text strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chest-text small {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.chest-banner-btn {
  background: var(--primary-gradient);
  border: none;
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  white-space: nowrap;
}

.chest-banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chest-banner-btn:active {
  transform: translateY(0);
}

/* Weekly Chest Modal */
.weekly-chest-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--glass-shadow);
  transform: scale(0.9);
  transition: transform var(--transition-base);
  position: relative;
}

.modal-overlay.active .weekly-chest-modal {
  transform: scale(1);
}

.chest-modal-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.chest-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.chest-visual-container {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 50%;
  padding: 1rem;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.chest-state-info {
  width: 100%;
}

.chest-state-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-purple);
  margin: 0 0 0.5rem 0;
}

.chest-state-info p {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.5;
}

.chest-description {
  width: 100%;
  padding: 1rem;
  background: rgba(102, 126, 234, 0.08);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-purple);
}

.chest-description p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Chest Reward Section */
.chest-reward-section {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.chest-reward-section h4 {
  color: var(--accent-purple);
  font-size: 1.125rem;
  margin: 0 0 1rem 0;
  font-weight: 700;
}

.reward-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.reward-emoji {
  font-size: 3rem;
  animation: rewardBounce 0.6s ease;
}

@keyframes rewardBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.reward-info {
  text-align: left;
}

.reward-name {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.reward-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.new-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.upgrade-badge {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: white;
}

.reward-copies {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.reward-hint {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0.5rem 0 0 0;
  font-style: italic;
}

/* Welcome Chest Message */
.welcome-chest-message {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(147, 51, 234, 0.1));
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1rem 0;
  text-align: center;
}

.welcome-chest-message p {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  font-weight: 500;
}

.chest-close-btn {
  margin-top: 0.5rem;
  background: var(--primary-gradient);
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chest-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .colony-mini-display {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }
  
  .colony-state-label {
    font-size: 0.8125rem;
  }
  
  .weekly-chest-banner {
    padding: 0.875rem 1rem;
  }
  
  .chest-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    text-align: center;
  }
  
  .chest-icon {
    font-size: 1.75rem;
  }
  
  .chest-banner-btn {
    width: 100%;
    justify-content: center;
  }
  
  .chest-modal-content {
    padding: 1.5rem;
    gap: 1.25rem;
  }
  
  .chest-modal-title {
    font-size: 1.25rem;
  }
  
  .chest-visual-container {
    width: 100px;
    height: 100px;
  }
}

/* Light Theme */
[data-theme="light"] .colony-mini-display {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.06), rgba(118, 75, 162, 0.06));
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}

[data-theme="light"] .colony-mini-display:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

[data-theme="light"] .weekly-chest-banner {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

[data-theme="light"] .weekly-chest-modal {
  background: white;
  border-color: #e2e8f0;
}

[data-theme="light"] .chest-visual-container {
  background: rgba(102, 126, 234, 0.08);
}

[data-theme="light"] .chest-description {
  background: rgba(102, 126, 234, 0.05);
  border-left-color: #667eea;
}
