body {
  background: #fff;
  color: #222;
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  opacity: 1;
}
/* Desactivamos el tema oscuro para mantener la apariencia consistente */
@media (prefers-color-scheme: dark) {
  body {
    background: #fff; /* Mismo que tema claro */
    color: #222; /* Mismo que tema claro */
    opacity: 1;
  }
  .container {
    background: #fff; /* Mismo que tema claro */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Mismo que tema claro */
  }
  .link-btn {
    background: #6c5ce7; /* Mantenemos el color morado */
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  .admin-list li {
    background: #f5f5f5; /* Color claro para los elementos de la lista */
    color: #222; /* Color oscuro para el texto */
    border: 1px solid #ddd;
  }
  .enlace-details {
    background: #f0f0f0; /* Color claro para los detalles */
  }
  .btn-primary {
    background: #1e88e5;
    color: #fff !important;
    opacity: 1;
  }
  .btn-danger {
    background: #e53935;
    color: #fff !important;
    opacity: 1;
  }
  /* Aseguramos que los enlaces sean visibles */
  a {
    color: #0066cc;
  }
  /* Aseguramos que los textos en el panel admin sean visibles */
  .admin h2, .admin h3, .admin p, .admin label {
    color: #222;
  }
}
.container {
  max-width: 420px;
  margin: 0 auto;
  padding: 1.2rem 0.7rem 2rem 0.7rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
h1 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 1.1rem 0 1.2rem 0;
  letter-spacing: 0.01em;
  color: #222;
  opacity: 1;
}
.links-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 80%;
  margin: 0 auto;
}
.link-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #6c5ce7;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.2);
  height: 42px;
  max-width: 100%;
  box-sizing: border-box;
}

.link-btn::before {
  content: attr(data-text);
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.8rem;
  text-align: center;
}
.link-btn:hover, .link-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
  background: #5649c0;
}
.no-links {
  text-align: center;
  color: #888;
  margin-top: 2rem;
}
.admin h2 {
  margin-top: 2.5rem;
  font-size: 1.1rem;
  color: #1e88e5;
  opacity: 1;
  font-weight: 600;
}
.clave-form, .add-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 2rem;
}
.clave-form input, .add-form input {
  padding: 0.7rem;
  border-radius: 5px;
  border: 1px solid #cfd8dc;
  font-size: 1rem;
}
.clave-form button, .add-form button {
  padding: 0.8rem;
  background: #43a047;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.clave-form button:hover, .add-form button:hover {
  background: #388e3c;
}
.admin-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  width: 94%;
  max-width: 600px;
}
.admin-list li {
  background: #f0f4f8;
  margin-bottom: 0.7rem;
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
}
.admin-list li:hover {
  background-color: #f9f9f9;
}
.enlace-header {
  display: flex;
  align-items: center;
  padding: 0.7rem 0.8rem;
  cursor: default;
}
.enlace-titulo {
  flex: 1 1 auto;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
  padding-left: 5px;
  color: inherit;
  opacity: 1;
  font-weight: 500;
}
.toggle-details {
  margin-right: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}
.drag-handle {
  cursor: grab;
  padding: 0.5rem;
  color: #999;
}
.drag-handle:active {
  cursor: grabbing;
}
.enlace-details {
  background: #e8eef5;
  padding: 1rem;
  border-top: 1px solid #d0dae6;
}
.details-content p {
  margin: 0 1rem 1rem 1rem;
  max-width: 600px;
  font-size: 0.9rem;
  color: inherit;
  opacity: 1;
}
.update-btn {
  background: #1e88e5;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
  opacity: 1;
  font-weight: 500;
}
.update-btn:hover {
  background: #1565c0;
}
.expired-warning {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 14px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Separación del área de admin */
.admin-footer {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.logout-btn {
    background-color: #f44336;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
    display: inline-block;
    margin-top: 10px;
}

.logout-btn:hover {
    background-color: #d32f2f;
    text-decoration: none;
}
.instrucciones {
  font-size: 0.9rem;
  color: #666;
  margin: -0.5rem 1rem 1rem 1rem;
  font-style: italic;
  max-width: 600px;
}
.del-form {
  margin: 0 0 0 1rem;
}
.del-form button {
  background: #e53935;
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: 5px;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}
.del-form button:hover {
  background: #b71c1c;
}
.logo-top {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.7rem;
  width: 100%;
}
.logo-img {
  max-width: 90px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.top-channels {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  margin-bottom: 1.1rem;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.channel-btn {
  flex: 1 1 0;
  display: inline-block;
  background: #e3eafc;
  color: #1e88e5;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.7rem 0.2rem;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  border: none;
  transition: background 0.18s, color 0.18s;
  box-shadow: 0 1px 4px rgba(30,136,229,0.06);
}
.channel-btn.telegram {
  background: #e3eafc;
  color: #1e88e5;
}
.channel-btn.telegram:hover {
  background: #1e88e5;
  color: #fff;
}
.channel-btn.whatsapp {
  background: #e6f6ed;
  color: #43a047;
}
.channel-btn.whatsapp:hover {
  background: #43a047;
  color: #fff;
}
@media (max-width: 600px) {
  .container {
    padding: 0.7rem 0.05rem 1.2rem 0.05rem;
    margin-top: 0.4rem;
  }
  .logo-img {
    max-width: 60px;
  }
  h1 {
    font-size: 1.3rem;
    color: #222;
    opacity: 1;
    font-weight: 800;
  }
  .link-btn {
    font-size: 0.9rem;
    padding: 0.7rem 0.4rem;
    height: 42px;
  }
  .links-list {
    width: 92%;
  }
  .top-channels {
    flex-direction: column;
    gap: 0.5rem;
  }
}

