@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

.form-container {
  background: linear-gradient(to bottom, #ffffff 0%, #f8fff9 100%);
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

/* Grid de fondo al estilo Tailwind */
.grid-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      rgba(17, 128, 54, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(17, 128, 54, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Circuitos decorativos animados */
.circuit-decoration {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.circuit-node {
  position: absolute;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #118036, #15a043);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(17, 128, 54, 0.4);
  animation: pulse-glow 3s ease-in-out infinite;
}

.circuit-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(17, 128, 54, 0.2),
    rgba(17, 128, 54, 0.4),
    rgba(17, 128, 54, 0.2),
    transparent
  );
  animation: flow-energy 4s linear infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(17, 128, 54, 0.4);
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 0 30px rgba(17, 128, 54, 0.8);
  }
}

@keyframes flow-energy {
  0% {
    opacity: 0;
    background-position: -200% center;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    background-position: 200% center;
  }
}

.container {
  position: relative;
  z-index: 1;
}

/* Gradiente de texto premium */
.gradient-text {
  background: linear-gradient(135deg, #118036 0%, #15a043 50%, #1bc550 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

/* Card con borde gradiente animado */
.gradient-border-card {
  position: relative;
  background: white;
  border-radius: 32px;
  padding: 2px;
  box-shadow: 0 20px 60px -15px rgba(17, 128, 54, 0.15);
}

.gradient-border-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px;
  padding: 2px;
  background: linear-gradient(
    135deg,
    #118036,
    #15a043,
    #1bc550,
    #15a043,
    #118036
  );
  background-size: 300% 300%;
  /* -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); */
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: gradient-rotate 3s linear infinite;
}

@keyframes gradient-rotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.form-inner {
  background: white;
  border-radius: 30px;
  position: relative;
  z-index: 1;
}

/* Input con estilo Tailwind mejorado */
.input-premium {
  background: white;
  border: 1.5px solid #e5e7eb;
  color: #1f2937;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.input-premium:hover {
  border-color: #15a043;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.input-premium:focus {
  background: white;
  border-color: #118036;
  box-shadow: 0 0 0 3px rgba(17, 128, 54, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  outline: none;
}

.input-premium::placeholder {
  color: #9ca3af;
}

/* Label flotante mejorado */
.input-group {
  position: relative;
}

.floating-label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 15px;
  font-weight: 500;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  padding: 0 6px;
}

.input-premium:focus + .floating-label,
.input-premium:not(:placeholder-shown) + .floating-label {
  top: 0;
  font-size: 12px;
  color: #118036;
  font-weight: 600;
}

/* Botón premium con efectos */
.btn-premium {
  background: linear-gradient(135deg, #118036 0%, #15a043 100%);
  box-shadow: 0 4px 6px -1px rgba(17, 128, 54, 0.25),
    0 2px 4px -1px rgba(17, 128, 54, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-premium::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(17, 128, 54, 0.35),
    0 4px 6px -2px rgba(17, 128, 54, 0.2);
}

.btn-premium:hover::before {
  left: 100%;
}

.btn-premium:active {
  transform: translateY(0);
}

/* Info cards con glassmorphism sutil */
.info-card-glass {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(248, 255, 249, 0.95) 100%
  );
  backdrop-filter: blur(10px);
  border: 1px solid rgba(17, 128, 54, 0.1);
  box-shadow: 0 4px 6px -1px rgba(17, 128, 54, 0.08),
    0 2px 4px -1px rgba(17, 128, 54, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card-glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(17, 128, 54, 0.12),
    0 4px 8px -2px rgba(17, 128, 54, 0.08);
  border-color: rgba(17, 128, 54, 0.3);
}

.icon-wrapper {
  background: linear-gradient(135deg, #118036, #15a043);
  box-shadow: 0 4px 12px rgba(17, 128, 54, 0.25);
  transition: all 0.3s ease;
}

.info-card-glass:hover .icon-wrapper {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 16px rgba(17, 128, 54, 0.35);
}

/* Select mejorado */
.select-premium {
  background: white
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23118036' d='M8 11L3 6h10z'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  background-size: 16px;
  appearance: none;
}

/* Checkbox premium */
.checkbox-premium {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.checkbox-premium:hover {
  border-color: #15a043;
}

.checkbox-premium:checked {
  background: linear-gradient(135deg, #118036, #15a043);
  border-color: #118036;
  box-shadow: 0 0 0 3px rgba(17, 128, 54, 0.12);
}

.checkbox-premium:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
}

/* Badge decorativo */
.badge-premium {
  background: linear-gradient(
    135deg,
    rgba(17, 128, 54, 0.1),
    rgba(17, 128, 54, 0.15)
  );
  border: 1px solid rgba(17, 128, 54, 0.2);
  color: #118036;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(17, 128, 54, 0.08);
}

/* Success message */
.success-box {
  background: linear-gradient(
    135deg,
    rgba(17, 128, 54, 0.08) 0%,
    rgba(17, 128, 54, 0.12) 100%
  );
  border: 2px solid rgba(17, 128, 54, 0.3);
  box-shadow: 0 8px 16px -4px rgba(17, 128, 54, 0.15);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-icon {
  background: linear-gradient(135deg, #118036, #15a043);
  box-shadow: 0 4px 12px rgba(17, 128, 54, 0.3);
}

/* Spinner mejorado */
.spinner-ring {
  border: 3px solid rgba(17, 128, 54, 0.1);
  border-top: 3px solid #15a043;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Decoración de línea */
.decorative-line {
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(17, 128, 54, 0.3),
    rgba(17, 128, 54, 0.6),
    rgba(17, 128, 54, 0.3),
    transparent
  );
  box-shadow: 0 2px 8px rgba(17, 128, 54, 0.3);
}

/* Char counter mejorado */
.char-counter {
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.char-counter.warning {
  color: #f59e0b;
}
.char-counter.danger {
  color: #ef4444;
}

/* Animación de entrada */
.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
