/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 25% 25%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(251, 191, 36, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

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

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%,
  20%,
  53%,
  80%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  40%,
  43% {
    transform: translate3d(0, -15px, 0);
  }
  70% {
    transform: translate3d(0, -7px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes wiggle {
  0%,
  7%,
  14%,
  21%,
  28%,
  35%,
  42%,
  49%,
  56%,
  63%,
  70%,
  77%,
  84%,
  91%,
  98%,
  100% {
    transform: rotate(0deg);
  }
  3.5%,
  10.5%,
  17.5%,
  24.5%,
  31.5%,
  38.5%,
  45.5%,
  52.5%,
  59.5%,
  66.5%,
  73.5%,
  80.5%,
  87.5%,
  94.5% {
    transform: rotate(2deg);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.8);
  }
}

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

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.3);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.3);
  }
  70% {
    transform: scale(1);
  }
}

@keyframes likeCounter {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
    color: #ef4444;
  }
  100% {
    transform: scale(1);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease-out;
}
.animate-slideUp {
  animation: slideUp 0.6s ease-out;
}
.animate-slideDown {
  animation: slideDown 0.6s ease-out;
}
.animate-bounce {
  animation: bounce 2s infinite;
}
.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}
.animate-float {
  animation: float 3s ease-in-out infinite;
}
.animate-wiggle {
  animation: wiggle 1s ease-in-out infinite;
}
.animate-glow {
  animation: glow 2s ease-in-out infinite;
}
.animate-spin {
  animation: spin 2s linear infinite;
}
.animate-heartBeat {
  animation: heartBeat 1.3s ease-in-out infinite;
}
.animate-likeCounter {
  animation: likeCounter 0.6s ease-out;
}

/* Live Features */
.live-notifications {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  max-width: 300px;
}

.notification {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  font-size: 0.875rem;
  font-weight: 600;
  animation: slideDown 0.5s ease-out;
  cursor: pointer;
  transition: all 0.3s ease;
}

.notification:hover {
  transform: translateX(-5px);
}

.notification.removing {
  animation: fadeIn 0.3s ease-out reverse;
}

.notification.sync {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.notification.database {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.notification.like-update {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Database Controls */
.database-controls {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 9999;
}

.db-status {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.db-dot {
  width: 8px;
  height: 8px;
  background: #fbbf24;
  border-radius: 50%;
}

.db-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.db-btn:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.live-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: #ef4444;
  font-weight: 700;
  font-size: 0.875rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
}

/* Floating Elements */
.floating-flan {
  position: fixed;
  font-size: 2rem;
  pointer-events: none;
  z-index: 1;
  animation: float 4s ease-in-out infinite;
  opacity: 0.7;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.5s ease-out;
}

.modal-content {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 500px;
  width: 90%;
  margin: 1rem;
  border: 4px solid #f59e0b;
  position: relative;
}

.modal-large {
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 1rem;
  text-align: center;
}

.modal-text {
  color: #a16207;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.terms-content {
  color: #a16207;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.terms-content p {
  margin-bottom: 1rem;
}

.terms-content ul {
  margin: 0.5rem 0 1rem 1.5rem;
}

.terms-content li {
  margin-bottom: 0.5rem;
}

.terms-footer {
  text-align: center;
  font-weight: 700;
  font-size: 1.125rem;
  margin-top: 2rem;
  animation: bounce 2s infinite;
}

/* Button Styles */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #eab308 0%, #f59e0b 100%);
  color: #92400e;
}

.btn-secondary {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: white;
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, #d97706 0%, #eab308 50%, #d97706 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 2rem 0;
}

.main-title {
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 900;
  text-align: center;
  color: #92400e;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
  text-align: center;
  color: #a16207;
  margin-top: 0.5rem;
  font-size: 1.125rem;
  font-weight: 500;
}

/* Navigation Styles */
.navigation {
  background: linear-gradient(135deg, #f59e0b 0%, #eab308 100%);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 140px;
  z-index: 90;
  padding: 1rem 0;
}

.nav-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.nav-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fef3c7;
  color: #a16207;
  font-size: 0.875rem;
}

.nav-btn:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  background: #fde68a;
}

.nav-btn.active {
  background: #92400e;
  color: #fef3c7;
  animation: pulse 2s ease-in-out infinite;
}

/* Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
  border-radius: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 3px solid #eab308;
}

.stat-item {
  text-align: center;
  color: #92400e;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Gallery Section */
.gallery-section {
  padding: 3rem 0;
}

.gallery-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #92400e;
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 1rem 0;
}

.gallery-item {
  background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border: 4px solid #f59e0b;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.gallery-item:hover {
  transform: translateY(-10px) rotate(1deg) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  animation: glow 1s ease-in-out;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.1) saturate(1.2);
}

/* REMOVED: .gallery-item .overlay */
/* REMOVED: .overlay-text */

.gallery-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.action-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.action-btn:hover {
  transform: translateY(-2px) scale(1.1);
}

.btn-like {
  background: #ef4444;
  color: white;
  position: relative;
}

.btn-like:hover {
  animation: heartBeat 0.6s ease-in-out;
}

.btn-like.liked {
  background: #dc2626;
  animation: heartBeat 1.3s ease-in-out infinite;
}

.btn-like.updating {
  animation: likeCounter 0.6s ease-out;
}

.btn-ai {
  background: #3b82f6;
  color: white;
}

.btn-brainrot {
  background: #8b5cf6;
  color: white;
}

.btn-gore {
  background: #374151;
  color: white;
}

/* NEW: Enlarge button style */
.btn-enlarge {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%); /* Blue gradient */
  color: white;
  padding: 0.5rem 0.75rem; /* Slightly smaller padding */
  border-radius: 50%; /* Make it round */
  width: 40px; /* Fixed width */
  height: 40px; /* Fixed height */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem; /* Icon size */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-enlarge:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.trending-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse 2s infinite;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #92400e 0%, #a16207 100%);
  color: #fef3c7;
  padding: 3rem 0;
  margin-top: 4rem;
  text-align: center;
}

.footer-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer-subtitle {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.footer-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

/* Database Info Section */
.database-info {
  padding: 2rem 0;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.db-info-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 3px solid #e5e7eb;
}

.db-info-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #374151;
  margin-bottom: 1.5rem;
  text-align: center;
}

.db-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.db-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 1rem;
  border: 2px solid #f59e0b;
}

.db-stat-label {
  font-weight: 600;
  color: #92400e;
}

.db-stat-value {
  font-weight: 800;
  color: #a16207;
  font-family: "Courier New", monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #fef3c7;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #d97706, #f59e0b);
  border-radius: 10px;
  border: 2px solid #fef3c7;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #b45309, #d97706);
}

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

  .nav-buttons {
    flex-direction: column;
    align-items: center;
  }

  .nav-btn {
    width: 220px;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    padding: 1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }

  .footer-info {
    flex-direction: column;
    gap: 0.5rem;
  }

  .navigation {
    top: 120px;
  }

  .live-notifications {
    top: 10px;
    right: 10px;
    max-width: 250px;
  }

  .db-status {
    position: relative;
    top: auto;
    right: auto;
    margin: 1rem;
    align-self: flex-end;
  }

  .database-controls {
    position: relative;
    top: auto;
    right: auto;
    justify-content: center;
    margin: 1rem;
    flex-wrap: wrap;
  }

  .db-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .stats-bar {
    grid-template-columns: 1fr;
  }
}

/* Add styles for the community message section */
.community-message {
  margin-bottom: 3rem;
}

.message-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 3px solid #10b981;
  text-align: center;
}

.message-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 1rem;
}

.message-card p {
  color: #047857;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.growth-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.growth-stat {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  padding: 1rem;
  border-radius: 1rem;
  border: 2px solid #10b981;
}

.growth-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: #065f46;
  line-height: 1;
}

.growth-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #047857;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Update gallery item styles for fresh start */
.gallery-item .fresh-start {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse 2s infinite;
}

/* Style for 0 likes display */
.like-count.zero {
  color: #6b7280;
  font-style: italic;
}

.like-count.growing {
  color: #10b981;
  font-weight: 700;
}

/* Image Modal Specific Styles */
.image-modal-content {
  background: rgba(0, 0, 0, 0.8); /* Fondo oscuro para la imagen */
  padding: 0; /* Sin padding para que la imagen ocupe más espacio */
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  max-width: 90vw; /* Ancho máximo del 90% del viewport */
  max-height: 90vh; /* Alto máximo del 90% del viewport */
  width: auto; /* Ajustar al contenido */
  height: auto; /* Ajustar al contenido */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden; /* Para que la imagen no se salga del borde redondeado */
  border: none; /* Sin borde */
}

.image-modal-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* Asegura que la imagen se ajuste sin recortarse */
  border-radius: 1rem; /* Bordes redondeados para la imagen */
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 25px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001; /* Asegura que esté por encima de la imagen */
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease-in-out;
}

.close-btn:hover,
.close-btn:focus {
  color: #f59e0b;
  text-decoration: none;
  transform: scale(1.1);
}

/* Ajuste para el modal general para que el botón de cerrar no se solape */
.modal-content {
  padding: 2rem; /* Mantener el padding para los otros modales */
}

@media (max-width: 768px) {
  .close-btn {
    font-size: 30px;
    top: 10px;
    right: 15px;
  }
}
