body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #333;
}

.subheader {
    background: linear-gradient(135deg, #4a6bdf 0%, #3a5bce 100%);
    padding: 40px 15px; /* Padding lateral ajustado para móvil */
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    max-width: 1160px; /* Máximo ancho en desktop */
    width: 100%; /* Ancho total en móvil */
    margin: 0 auto;
    box-sizing: border-box;
    border-radius: 0 0 15px 15px;
    position: relative;
    overflow: hidden;
}

.subheader::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.6;
  z-index: 0;
}

.subheader h1 {
  margin: 0;
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 0px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}

.header-description {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 30px;
  max-width: 700px;
  line-height: 1.7;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

#search-input {
  padding: 15px 25px 15px 50px;
  border: none;
  border-radius: 50px;
  width: 350px;
  font-size: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.95);
  position: relative;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 15px center;
  background-size: 20px;
}

#search-input:focus {
  outline: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  width: 380px;
  background-color: white;
}

#add-project-section {
  padding: 25px;
  background-color: #fff;
  margin: 25px auto;
  max-width: 600px;
  box-shadow: 0px 5px 15px rgba(0,0,0,0.1);
  border-radius: 12px;
}

#add-project-section input[type="text"],
#add-project-section textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border 0.3s ease;
}

#add-project-section input[type="text"]:focus,
#add-project-section textarea:focus {
  outline: none;
  border-color: #4a6bdf;
  box-shadow: 0 0 0 2px rgba(74, 107, 223, 0.2);
}

#add-project-section button {
  padding: 12px 25px;
  font-size: 16px;
  border: none;
  background-color: #4a6bdf;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

#add-project-section button:hover {
  background-color: #3a5bce;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#add-project-section button:disabled {
  background-color: #9ca8db;
  cursor: not-allowed;
  transform: none;
}

#projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
  padding: 30px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.project-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0px 5px 15px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  border: 1px solid #eef1f8;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0px 10px 20px rgba(0,0,0,0.12);
}

.project-thumbnail {
  width: 100%;
  height: 220px;
  background-color: #f0f2f5;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-thumbnail img,
.project-thumbnail svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.5s ease;
}

.project-card:hover .project-thumbnail img {
  transform: scale(1.05);
}

.project-info {
  padding: 20px;
  flex-grow: 1;
}

.project-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #2d3748;
}

.project-description {
  font-size: 15px;
  margin: 12px 0 0 0;
  color: #718096;
  line-height: 1.5;
}

.project-footer {
  padding: 12px 20px;
  border-top: 1px solid #eef1f8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-url {
  color: #4a6bdf;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.project-url:hover {
  text-decoration: underline;
}

.like-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #e74c3c;
  font-size: 16px;
  gap: 5px;
  transition: all 0.3s ease;
  padding: 5px 10px;
  border-radius: 50px;
}

.like-btn.liked {
  transform: scale(1.2);
}

.like-btn .heart-icon {
  width: 22px;
  height: 22px;
  fill: #e0e0e0;
  transition: all 0.3s ease;
}

.like-btn:hover .heart-icon,
.liked .heart-icon {
  fill: #e74c3c;
}

.like-btn:hover {
  background-color: rgba(231, 76, 60, 0.1);
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transform: translateY(20px);
  animation: modal-appear 0.3s forwards;
}

@keyframes modal-appear {
  to { transform: translateY(0); }
}

.modal-content h2 {
  margin-top: 0;
  color: #2d3748;
  font-size: 24px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
}

.auth-header h2::after {
  display: none;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: #a0aec0;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #2d3748;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #4a5568;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background-color: #f8fafc;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4a6bdf;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(74, 107, 223, 0.2);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-description {
  font-size: 13px;
  color: #718096;
  margin-top: 6px;
}

.thumbnail-preview {
  width: 100%;
  height: 220px;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f2f5;
  border: 2px dashed #cbd5e0;
  transition: all 0.3s ease;
}

.thumbnail-preview.loading {
  border-color: #4a6bdf;
  background-color: rgba(74, 107, 223, 0.05);
}

.thumbnail-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.btn-add-project {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #4a6bdf 0%, #3a5bce 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-add-project:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(74, 107, 223, 0.4);
}

.btn-add-project:active {
  transform: translateY(0);
}

.btn-add-project:disabled {
  background: linear-gradient(135deg, #9ca8db 0%, #8794cf 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.loading-indicator {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px;
  margin: 40px auto;
  max-width: 1200px;
  width: 100%;
  color: #718096;
}

.empty-state svg {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 22px;
  color: #2d3748;
  margin-bottom: 10px;
}

/* Add pagination styles */
.pagination {
  display: flex;
  justify-content: center;
  margin: 30px 0 50px 0;
  gap: 8px;
  align-items: center;
}

.pagination button {
  padding: 8px 16px;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 40px;
}

.pagination button.active {
  background-color: #4a6bdf;
  color: white;
  border-color: #4a6bdf;
  font-weight: 600;
}

.pagination button:hover:not(.active):not(.disabled) {
  background-color: #f0f2f5;
}

.pagination button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination .ellipsis {
  margin: 0 4px;
  color: #718096;
}

.pagination .prev-btn,
.pagination .next-btn {
  font-weight: bold;
}

#pagination-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Floating button for opening modal */
.floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #4a6bdf;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(74, 107, 223, 0.4);
  transition: all 0.3s ease;
  z-index: 1100;
}

.floating-btn:hover {
  transform: scale(1.1) rotate(90deg);
  background-color: #3a5bce;
  box-shadow: 0 8px 20px rgba(74, 107, 223, 0.5);
}

/* Añade estos estilos a tu archivo style.css */

/* Estilo para botón de like cuando no hay sesión */
.not-logged .like-btn {
  opacity: 0.7;
  cursor: pointer;
  position: relative;
}

.not-logged .like-btn::after {
  content: '🔒';
  font-size: 10px;
  position: absolute;
  bottom: -5px;
  right: -5px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Tooltip para mostrar un mensaje al pasar el mouse por encima */
.not-logged .like-btn:hover::before {
  content: 'Inicia sesión para dar like';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  margin-bottom: 5px;
  z-index: 100;
}

/* Añadir estos estilos a tu archivo style.css */

/* Estilos para el modal de autenticación */
.auth-modal-content {
  max-width: 500px;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}

/* Mejora del fondo del header */
.auth-header {
  background: linear-gradient(135deg, #2c4da7 0%, #1a3580 100%);
  color: white;
  padding: 30px 25px;
  text-align: center;
  position: relative;
  border-radius: 12px 12px 0 0;
}

.auth-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.6;
  z-index: 0;
}

/* Mejora del contraste en el header del modal */
.auth-header h2 {
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  font-weight: 700;
  font-size: 28px;
  margin: 0;
  position: relative;
  z-index: 1;
}

.auth-logo {
  width: 140px; /* Ajusta según el tamaño de tu logo */
  height: auto;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.auth-content {
  padding: 25px;
}

.auth-content p {
  font-size: 16px;
  line-height: 1.6;
  color: #4b5563;
  margin-top: 0;
}

.auth-benefits {
  margin: 25px 0;
}

.benefit-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.benefit-item svg {
  flex-shrink: 0;
  margin-right: 12px;
}

.benefit-item span {
  font-size: 15px;
  color: #374151;
}

.auth-buttons {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.auth-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.login-btn {
  background-color: #4a6bdf;
  color: white;
  box-shadow: 0 2px 5px rgba(74, 107, 223, 0.3);
}

.login-btn:hover {
  background-color: #3a5bce;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(74, 107, 223, 0.4);
}

.register-btn {
  background-color: white;
  color: #4a6bdf;
  border: 2px solid #e5e7eb;
}

.register-btn:hover {
  border-color: #4a6bdf;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 600px) {
  .auth-buttons {
    flex-direction: column;
  }

  .auth-btn {
    width: 100%;
  }
}
