* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: #2c3e50;
}

form {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

input, select {
  flex: 1;
  padding: 0.8rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: #2ca0cc;
}

input:invalid, select:invalid {
  border-color: #e74c3c;
}

button {
  padding: 0.8rem 1.5rem;
  background: #2ca0cc;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

button:hover {
  background: #47128e;
}

button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.category-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}

.filter-btn {
  background: #f0f0f0;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.filter-btn:hover {
  background: #e0e0e0;
}

.filter-btn.active {
  background: #2ca0cc;
  color: white;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.tech-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  position: relative;
}

.tech-card:hover {
  transform: translateY(-5px);
}

.tech-card img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.tech-card a {
  color: #2ca0cc;
  text-decoration: none;
  font-size: 0.9rem;
  word-break: break-all;
}

.tech-card a:hover {
  text-decoration: underline;
}

.tech-card .category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #f0f0f0;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  color: #666;
}

.delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tech-card:hover .delete-btn {
  opacity: 1;
}

.delete-btn:hover {
  background: #c0392b;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.secondary-btn {
  background: #2ecc71;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
}

.secondary-btn:hover {
  background: #27ae60;
}

.stack-container {
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stack-container h1 {
  margin-bottom: 2rem;
  color: #2c3e50;
}

/* Asegurarse de que los modales aparezcan sobre el sidebar */
.modal {
  z-index: 1100;
}

/* Ajustar el grid para el nuevo layout */
.grid-container {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* Ajustar los botones para que coincidan con el estilo del dashboard */
.secondary-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.secondary-btn:hover {
  background: #2980b9;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.modal h2 {
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.categories-list {
  margin: 1rem 0;
  max-height: 300px;
  overflow-y: auto;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid #e0e0e0;
  margin-bottom: 0.5rem;
  border-radius: 8px;
}

.category-item .actions {
  display: flex;
  gap: 0.5rem;
  margin: 0;
}

.edit-btn {
  background: #f39c12;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}

.edit-btn:hover {
  background: #d68910;
}

.input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.input-group input {
  flex: 1;
}

.tech-card .edit-btn {
  position: absolute;
  top: 10px;
  right: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tech-card:hover .edit-btn {
  opacity: 1;
}

.close-modal {
  margin-top: 1rem;
  width: 100%;
  background: #95a5a6;
}

.close-modal:hover {
  background: #7f8c8d;
}

#clearCacheBtn {
  background-color: #e74c3c;
  margin-left: 0.5rem;
}

#clearCacheBtn:hover {
  background-color: #c0392b;
}
/* Añadir al final del archivo */
.error {
  background-color: #fee;
  border-left: 4px solid #e74c3c;
  padding: 1rem;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

.stack-container {
  padding: 20px;
}

.stack-container h1 {
  margin-bottom: 2rem;
  color: #2c3e50;
}

/* Asegurarse de que los modales aparezcan sobre el sidebar */
.modal {
  z-index: 1100;
}

/* Ajustar el grid para el nuevo layout */
.grid-container {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* Ajustar los botones para que coincidan con el estilo del dashboard */
.secondary-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.secondary-btn:hover {
  background: #2980b9;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.modal h2 {
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.categories-list {
  margin: 1rem 0;
  max-height: 300px;
  overflow-y: auto;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid #e0e0e0;
  margin-bottom: 0.5rem;
  border-radius: 8px;
}

.category-item .actions {
  display: flex;
  gap: 0.5rem;
  margin: 0;
}

.edit-btn {
  background: #f39c12;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}

.edit-btn:hover {
  background: #d68910;
}

.input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.input-group input {
  flex: 1;
}

.tech-card .edit-btn {
  position: absolute;
  top: 10px;
  right: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tech-card:hover .edit-btn {
  opacity: 1;
}

.close-modal {
  margin-top: 1rem;
  width: 100%;
  background: #95a5a6;
}

.close-modal:hover {
  background: #7f8c8d;
}

#clearCacheBtn {
  background-color: #e74c3c;
  margin-left: 0.5rem;
}

#clearCacheBtn:hover {
  background-color: #c0392b;
}
/* Añadir al final del archivo */
.error {
  background-color: #fee;
  border-left: 4px solid #e74c3c;
  padding: 1rem;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

.content {
  margin-top: 2rem;
}