
/* Diticoms Performance Styles */
.animate-in { animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.slide-in-from-bottom {
  animation: slideInBottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInBottom {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* Tối ưu hóa cực hạn cho thiết bị di động */
* {
  -webkit-tap-highlight-color: transparent;
  outline: none !important;
}

input, textarea, select {
  font-size: 16px !important; /* Ngăn iOS tự động zoom gây lag layout */
  text-rendering: optimizeSpeed !important;
  transform: translateZ(0); /* Ép buộc tăng tốc phần cứng */
}

/* Vô hiệu hóa backdrop-blur vì nó gây lag cực nặng khi gõ phím trên WebView */
.backdrop-blur-xl, .backdrop-blur-md, .backdrop-blur-sm {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background-color: rgba(255, 255, 255, 0.98) !important;
}

/* Tối ưu hóa trạng thái Focus */
input:focus, textarea:focus {
  transition: none !important; /* Loại bỏ transition để phản hồi tức thì */
  border-color: #2563eb !important;
  background-color: #ffffff !important;
}

/* Giảm thiểu animation khi bàn phím đang mở */
body.keyboard-open .animate-pulse,
body.keyboard-open .animate-bounce {
  animation: none !important;
}

@media (max-width: 640px) {
  .safe-area-padding {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}
