:root {
  /* Paleta de colores inspirada en Genshin */
  --primary: #3a8fb7;
  --primary-glow: rgba(58, 143, 183, 0.4);
  --surface: #0f3460;
  --text: #e0e0e0;
  --text-light: #ffffff;
  --border: #2a2a3a;
  --success: #4caf50;
  --warning: #ffc107;
  --danger: #f44336;
  --nav-bg-color: #1a1a2e;
}

/* Layout principal */
.main-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Sección superior - MODIFICADA para ser más compacta */
.top-section {
  width: 100%;
  padding: 0.5rem 0.5rem; /* Reducido de 1rem */
  background: rgba(30, 30, 50, 0.7);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.top-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.;
  flex-wrap: wrap;
  gap: 0.;
}

.top-title {
  color: var(--text-light);
  margin: 0;
  font-size: 2rem; /* Tamaño ajustado */
  text-shadow: 0 0 6px var(--primary-glow);
  line-height: 1.2; /* Reduce espacio inferior */

}

.top-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.top-stats {
  display: flex;
  gap: 0.; /* Reducido de  */
  justify-content: center;
  flex-wrap: wrap;
}

.stat-box {
  display: flex;
  align-items: center;
  gap: 0.3rem; /* Reducido de 0.5rem */
  background: rgba(40, 40, 60, 0.8);
  padding: 0.3rem 0.8rem; /* Reducido */
  border-radius: 6px;
  min-width: 160px; /* Reducido de 180px */
  justify-content: center;
}

.stat-label {
  color: var(--text);
  font-weight: 500;
  font-size: 1rem; /* Tamaño ajustado */
}

.stat-value {
  color: var(--text-light);
  font-weight: 600;
  font-size: 1rem; /* Tamaño ajustado */
}

.version-select {
  padding: 0. 0.; /* Reducido */
  background: rgba(40, 40, 60, 0.8);
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem; /* Tamaño ajustado */
  cursor: pointer;
  transition: all 0.3s;
  min-width: 160px; /* Reducido de 180px */

}

.version-select:hover {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Contenedor principal */
.app-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar de categorías */
.categories-sidebar {
  width: 25rem;
  min-width: 25rem;
  max-width: 25rem;
  flex: none;
  overflow-y: auto;
  padding: 1rem;
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 1rem;
  line-height: 1.0;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #2a2a3a;
}

.category-icon {
  height: 40px;
}

.category-name {
  font-weight: 500;
  flex-grow: 1;
}

.achievement-count {
  font-size: 1rem;
  opacity: 0.85;
}

/* Área de logros */
.achievements-main {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.achievement-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

#achievements-container {
  font-size: 1rem;
  line-height: 1.0;
}

/* Cards de logros */
.achievement-card {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  border-radius: 12px;
  background: rgba(40, 40, 60, 0.5);
}

.achievement-category-badge {
  display: flex;
  justify-content: center;
  align-items: center;
}

.achievement-category-badge img {
  width: 20px;
  height: 20px;
}

.achievement-info h3 {
  margin: 0.5rem 0 0.5rem;
  color: var(--text-light);
  font-size: 1rem;
}

.achievement-info p {
  margin: 0 0 0.1rem;
  color: var(--text);
}

.achievement-meta {
  display: flex;
  align-items: flex-start;
  margin-top: 0.1rem;
  gap: 0.05rem;
}

.version-badge,
.reward-badge {
  font-size: 1rem;
}

.version-badge {
  background: linear-gradient(135deg, rgba(58, 143, 183, 0.3) 0%, rgba(58, 143, 183, 0.1) 100%);
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transform: scale(0.6);
}

.reward-badge {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.3) 0%, rgba(255, 193, 7, 0.1) 100%);
  color: var(--warning);
  padding: 0.4rem 0.8rem;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  transform: scale(0.6);
}

.reward-badge img {
  width: 15px;
  height: 15px;
}

/* Checkbox personalizado */
.check-toggle {
  position: relative;
  display: inline-block;
  width: 1rem;   /* puedes ajustar el tamaño */
  height: 1rem;
  align-self: center;
}

.check-toggle input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  border: 0.13em solid var(--border);
  border-radius: 0.2em;
  transition: all 0.3s;
}

.check-toggle:hover .checkmark {
  border-color: var(--primary);
}

.check-toggle input:checked ~ .checkmark {
  background-color: var(--success);
  border-color: var(--success);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.check-toggle input:checked ~ .checkmark:after {
  display: block;
}

.check-toggle .checkmark:after {
  left: 50%;
  top: 50%;
  width: 20%;   /* proporcional al cuadrado */
  height: 40%;  /* proporcional al cuadrado */
  transform: translate(-50%, -50%) rotate(45deg);
  border: solid white;
  border-width: 0 0.15rem 0.15rem 0;
}

/* Scrollbar */
.scrollable {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

.scrollable::-webkit-scrollbar {
  width: 6px;
}

.scrollable::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .categories-sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: 250px;
  }

  .top-header {
    flex-direction: column;
    align-items: stretch;
  }

  .top-filters {
    justify-content: center;
  }

  .version-select {
    width: 100%;
  }

  /* Ajustes adicionales para móviles */
  .top-section {
    padding: 0.4rem 0.2rem;
  }

  .stat-box {
    min-width: 140px;
    padding: 0.2rem 0.6rem;
  }
}

/* Botón Marcar todos */
.mark-all-btn {
  padding: 8px 6px;
  background: linear-gradient(135deg, var(--primary) 0%, #2a6e8a 100%);
  color: var(--text-light);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.5rem;
  transition: all 0.3s ease;
  margin-left: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 5px;
}

.mark-all-btn:hover {
  background: linear-gradient(135deg, #2a6e8a 0%, var(--primary) 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.mark-all-btn:active {
  transform: translateY(1px);
}

.achievement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

