body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(180deg, #1e1e2f, #282843);
  color: white;
  margin: 0;
  padding: 2rem;
  display: flex;
  justify-content: center;
}

#achievements-container {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.subtitle {
  color: #ccc;
  margin-bottom: 2rem;
}

#achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.achievement-card {
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.1);
  transition: transform 0.2s ease, background 0.3s ease;
  position: relative;
}

.achievement-card.unlocked {
  border-color: gold;
  background: rgba(255, 215, 0, 0.15);
}

.achievement-card.locked {
  opacity: 0.6;
  filter: grayscale(0.8);
}

.achievement-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.achievement-desc {
  font-size: 0.9rem;
  color: #ddd;
  margin-bottom: 1rem;
}

.reward {
  color: gold;
  font-weight: bold;
}

.action-button {
  background: #ffcc00;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  color: #000;
  font-weight: bold;
  margin-top: 2rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.action-button:hover {
  background: #ffdb4d;
}
/* Estilos para el botón de actualizaciones */
#updates-button {
  background-color: #ff9800; /* Color naranja para destacar */
  position: absolute; /* Cambiado a absolute para posicionarlo dentro del contenedor */
  top: 65px; /* Posición desde arriba, al lado del botón de mercado */
  right: 20px; /* Posición desde la derecha */
  z-index: 900; /* Asegurar que esté por encima de otros elementos */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Sombra para destacarlo */
  border-radius: 5px;
  padding: 10px 15px;
  color: white;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#updates-button i {
  margin-right: 5px;
}

#updates-button:hover {
  background-color: #e68a00;
  transform: scale(1.05); /* Efecto de crecimiento al pasar el mouse */
}

/* Ajuste responsivo para el botón de novedades */
@media (max-width: 768px) {
  #updates-button {
    position: fixed !important; /* Forzar posición fija en móviles */
    top: auto !important; /* Anular posición top */
    bottom: 20px !important; /* Colocarlo en la parte inferior */
    right: 20px !important;
    font-size: 0.9em;
    padding: 8px 12px;
    border-radius: 50%; /* Hacerlo circular como una campanita */
    width: 40px;
    height: 40px;
  }
  
  #updates-button i {
    margin-right: 0; /* Quitar margen del icono en móviles */
    font-size: 1.2em; /* Hacer el icono un poco más grande */
  }
  
  #updates-button span {
    display: none; /* Ocultar el texto "Novedades" en móviles */
  }
}

/* Estilos para el modal de actualizaciones */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: rgba(248, 249, 250, 0.95);
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 80%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideDown 0.4s;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.modal-header h3 {
  margin: 0;
  color: #333;
}

.close-modal {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: #333;
}

.update-item {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #ddd;
}

.update-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.update-version {
  font-weight: bold;
  color: #007bff;
  font-size: 1.1em;
}

.update-date {
  font-size: 0.85em;
  color: #6c757d;
  margin-bottom: 5px;
}

.update-description {
  margin-top: 5px;
  line-height: 1.4;
  color: #333;
}

.update-features {
  margin-top: 8px;
  padding-left: 20px;
  color: #333;
}

.update-features li {
  margin-bottom: 3px;
  line-height: 1.3;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

@keyframes slideDown {
  from {transform: translateY(-50px); opacity: 0;}
  to {transform: translateY(0); opacity: 1;}
}

/* Estilos responsivos para el modal */
@media (max-width: 768px) {
  .modal-content {
    width: 90%;
    margin: 15% auto;
    padding: 15px;
  }
}

/* Estilos para el botón flotante de novedades */
.floating-button {
  transition: all 0.3s ease;
  transform: scale(1);
}

.floating-button:hover {
  transform: scale(1.05);
}

/* Asegúrate de que el botón sea visible en dispositivos móviles */
@media (max-width: 768px) {
  .floating-button {
    top: auto !important;
    bottom: 20px !important;
    right: 20px !important;
    font-size: 0.9em;
    padding: 8px 12px;
  }
}
/* === POPUP DE LOGRO DESBLOQUEADO CON BOTÓN DE RECOMPENSA === */
.achievement-popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: linear-gradient(135deg, #ffd700, #ffb400);
  color: #000;
  padding: 18px 30px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  font-size: 1.1rem;
  font-weight: bold;
  z-index: 9999;
  opacity: 0;
  animation: popupIn 0.4s ease forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.achievement-popup i {
  font-size: 1.8rem;
}

.achievement-popup p {
  margin: 0;
  text-align: center;
  line-height: 1.4;
}

/* Botón de recompensa */
.claim-reward-btn {
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
  transition: all 0.2s ease;
}

.claim-reward-btn:hover {
  background: #45a049;
  transform: scale(1.05);
}

.claim-reward-btn:active {
  transform: scale(0.95);
}

/* Animación de entrada */
@keyframes popupIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.8);
    filter: blur(4px);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    filter: blur(0);
  }
}

/* Animación de salida (cuando se recoge la recompensa) */
@keyframes popupOut {
  0% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.9);
  }
}

/* Variaciones visuales según rareza */
.popup-common {
  background: linear-gradient(135deg, #ddd, #aaa);
  box-shadow: 0 0 15px rgba(200, 200, 200, 0.6);
}
.popup-uncommon {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: #fff;
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
}
.popup-rare {
  background: linear-gradient(135deg, #2196f3, #1565c0);
  color: #fff;
  box-shadow: 0 0 15px rgba(33, 150, 243, 0.6);
}
.popup-epic {
  background: linear-gradient(135deg, #9c27b0, #6a1b9a);
  color: #fff;
  box-shadow: 0 0 15px rgba(156, 39, 176, 0.6);
}
.popup-legendary {
  background: linear-gradient(135deg, #ff9800, #ef6c00);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 152, 0, 0.7);
}
.popup-ultralegendary {
  background: linear-gradient(135deg, #ff4081, #d500f9);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 64, 129, 0.7);
}

/* 🎮 Estilo moderno para contador de monedas */
.coin-display {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 25px auto 40px;
  padding: 10px 20px;
  border-radius: 50px;
  background: linear-gradient(145deg, #3a2f0b, #1f1a05);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.5),
    inset 0 2px 3px rgba(255, 255, 255, 0.2),
    0 0 15px rgba(255, 215, 0, 0.3);
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: #fff8dc;
  letter-spacing: 1px;
  animation: pulseGlow 2.5s infinite ease-in-out;
  cursor: default;
}

/* Icono de la moneda */
.coin-display i {
  font-size: 1.8rem;
  color: #ffd700;
  text-shadow:
    0 0 10px #ffd700,
    0 0 20px #ffea00,
    0 0 40px rgba(255, 255, 0, 0.4);
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
  animation: coinSpin 3s linear infinite;
}

/* Texto de cantidad */
.coin-display span {
  color: #fff8dc;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Efecto cuando suben las monedas */
.coin-balance-animate {
  transform: scale(1.3);
  color: #fff;
}

/* ✨ Animación de resplandor */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow:
      0 4px 10px rgba(0, 0, 0, 0.5),
      inset 0 2px 3px rgba(255, 255, 255, 0.2),
      0 0 10px rgba(255, 215, 0, 0.2);
  }
  50% {
    box-shadow:
      0 4px 10px rgba(0, 0, 0, 0.5),
      inset 0 2px 3px rgba(255, 255, 255, 0.25),
      0 0 20px rgba(255, 215, 0, 0.6);
  }
}

/* 🔄 Pequeña rotación continua en el icono */
@keyframes coinSpin {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
  100% { transform: rotateY(360deg); }
}

/* === BARRA DE PROGRESO PARA LOGROS === */
.achievement-progress {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

/* Contenedor de la barra */
.progress-bar {
  height: 10px;                      /* discreto, no cambia la caja */
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
  position: relative;
}

/* Relleno que crece */
.progress-fill {
  height: 100%;
  width: 0%;
  transition: width 650ms cubic-bezier(.2,.9,.2,1);
  background: linear-gradient(90deg, rgba(255,215,0,0.98), rgba(255,180,0,0.95));
  box-shadow: 0 6px 14px rgba(255,200,0,0.12);
  border-radius: 999px;
}

/* Cuando el logro está bloqueado, atenua el color del fill */
.achievement-card.locked .progress-fill {
  filter: grayscale(0.6) brightness(0.85);
  opacity: 0.9;
}

/* Cuando está desbloqueado, el fill tiene un glow más pronunciado */
.achievement-card.unlocked .progress-fill {
  box-shadow: 0 8px 22px rgba(255,200,0,0.28);
  background: linear-gradient(90deg, #ffd94d, #ffb400);
}

/* Texto pequeño al lado/derecha con contador */
.progress-text {
  font-size: 0.85rem;
  color: #e6e6e6;
  text-align: right;
  letter-spacing: 0.2px;
}

/* Sutil sombra interior que indica "porcentaje no cumplido" (opcional visual) */
.progress-bar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 10%;
  pointer-events: none;
  background: linear-gradient(to right, rgba(0,0,0,0.06), transparent);
}

/* Efecto de resplandor de progreso */



