diff --git a/.idea/.idea.BABA_YAGA/.idea/workspace.xml b/.idea/.idea.BABA_YAGA/.idea/workspace.xml
index c693cb3f..ab54459d 100644
--- a/.idea/.idea.BABA_YAGA/.idea/workspace.xml
+++ b/.idea/.idea.BABA_YAGA/.idea/workspace.xml
@@ -7,7 +7,186 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Assets/Baba_yaga/UI/BaseUIController.cs b/Assets/Baba_yaga/UI/BaseUIController.cs
deleted file mode 100644
index c63b7957..00000000
--- a/Assets/Baba_yaga/UI/BaseUIController.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using UnityEngine;
-using UnityEngine.UIElements;
-using PrimeTween;
-using System.Threading.Tasks;
-using DG.Tweening;
-using Tween = PrimeTween.Tween;
-using Ease = PrimeTween.Ease;
-
-namespace Baba_yaga.UI
-{
- public abstract class BaseUIController : ScriptableObject
- {
- protected VisualElement root;
- protected UIManager uiManager;
-
- public VisualElement Root => root; // Thêm thuộc tính này
-
- public virtual void Initialize(VisualElement uxmlRoot, UIManager manager)
- {
- root = uxmlRoot;
- uiManager = manager;
-
- // Đảm bảo ban đầu ẩn hết
- Hide();
-
- // Tự động gán âm thanh phản hồi cho các UI elements
- UIAudioHelper.BindFeedback(root);
- }
-
- public virtual void Show()
- {
- if (root != null)
- {
- root.style.display = DisplayStyle.Flex;
- root.style.opacity = 1;
- }
- }
-
- public virtual void Hide()
- {
- if (root != null)
- {
- root.style.display = DisplayStyle.None;
- }
- }
-
- protected string GetLoc(string key)
- {
- if (LocalizationManager.Instance != null)
- return LocalizationManager.Instance.GetLocalizedString(key);
- return key;
- }
-
- public virtual void Update() { }
-
- /*public virtual async Task PlayTransitionIn()
- {
- if (root == null) return;
-
- Show();
- // Reset vị trí mặc định để tránh lỗi trôi màn hình
- root.style.translate = new StyleTranslate(new Translate(Length.Percent(100), 0));
-
- await Tween.Custom(100f, 0f, duration: 0.5f, ease: Ease.OutBack,
- onValueChange: val => root.style.translate = new StyleTranslate(new Translate(Length.Percent(val), 0)));
- }
-
- public virtual async Task PlayTransitionOut()
- {
- if (root == null) return;
-
- await Tween.Custom(0f, -100f, duration: 0.5f, ease: Ease.InBack,
- onValueChange: val => root.style.translate = new StyleTranslate(new Translate(Length.Percent(val), 0)));
-
- Hide();
- }*/
- }
-}
diff --git a/Assets/Baba_yaga/UI/BaseUIController.cs.meta b/Assets/Baba_yaga/UI/BaseUIController.cs.meta
deleted file mode 100644
index 349e027d..00000000
--- a/Assets/Baba_yaga/UI/BaseUIController.cs.meta
+++ /dev/null
@@ -1,2 +0,0 @@
-fileFormatVersion: 2
-guid: 872f8bfaee91588488a3393579135de9
\ No newline at end of file
diff --git a/Assets/Baba_yaga/UI/FirebaseConfig.cs b/Assets/Baba_yaga/UI/FirebaseConfig.cs
deleted file mode 100644
index 95f522aa..00000000
--- a/Assets/Baba_yaga/UI/FirebaseConfig.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using UnityEngine;
-
-namespace Baba_yaga.UI
-{
- [CreateAssetMenu(fileName = "FirebaseConfig", menuName = "BABA_YAGA/Configs/FirebaseConfig")]
- [UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.UI", sourceAssembly: "Opsive.UltimateCharacterController")]
- public class FirebaseConfig : ScriptableObject
- {
- public string baseUrl;
- }
-}
\ No newline at end of file
diff --git a/Assets/Baba_yaga/UI/FirebaseConfig.cs.meta b/Assets/Baba_yaga/UI/FirebaseConfig.cs.meta
deleted file mode 100644
index c5d06d5c..00000000
--- a/Assets/Baba_yaga/UI/FirebaseConfig.cs.meta
+++ /dev/null
@@ -1,2 +0,0 @@
-fileFormatVersion: 2
-guid: 0551a27408b84c040a2e009ae17debde
\ No newline at end of file
diff --git a/Assets/Baba_yaga/UI/FirebaseService.cs b/Assets/Baba_yaga/UI/FirebaseService.cs
deleted file mode 100644
index 8e29a80a..00000000
--- a/Assets/Baba_yaga/UI/FirebaseService.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-using System;
-using System.Collections;
-using System.Threading.Tasks;
-using UnityEngine;
-using UnityEngine.Networking;
-
-namespace Baba_yaga.UI
-{
- public static class FirebaseService
- {
- private static string _baseUrl;
-
- private static string BASE_URL
- {
- get
- {
- if (string.IsNullOrEmpty(_baseUrl))
- {
- // Nó sẽ tìm file tên "FirebaseConfig" trong bất kỳ folder "Resources" nào
- var config = Resources.Load("FirebaseConfig");
- if (config != null)
- {
- if (string.IsNullOrEmpty(config.baseUrl))
- {
- Debug.LogError("[FirebaseService] Base URL trong file FirebaseConfig đang trống!");
- return null;
- }
- _baseUrl = config.baseUrl.TrimEnd('/');
- }
- else
- {
- Debug.LogError("[FirebaseService] Không tìm thấy file 'FirebaseConfig' trong folder Resources! " +
- "Hãy đảm bảo bạn đã tạo file tại: Assets/.../Resources/FirebaseConfig");
- return null;
- }
- }
- return _baseUrl + "/users";
- }
- }
-
- public static async Task IsUsernameTaken(string username)
- {
- string url = $"{BASE_URL}/{username}.json";
- using (UnityWebRequest request = UnityWebRequest.Get(url))
- {
- var operation = request.SendWebRequest();
- while (!operation.isDone) await Task.Yield();
-
- if (request.result != UnityWebRequest.Result.Success) return false;
-
- // Nếu kết quả trả về không phải "null" nghĩa là user đã tồn tại
- return request.downloadHandler.text != "null";
- }
- }
-
- public static async Task GetPlayerData(string username)
- {
- string url = $"{BASE_URL}/{username}/elo.json";
- using (UnityWebRequest request = UnityWebRequest.Get(url))
- {
- var operation = request.SendWebRequest();
- while (!operation.isDone) await Task.Yield();
-
- if (request.result != UnityWebRequest.Result.Success || request.downloadHandler.text == "null")
- {
- return Baba_yaga.Game.PlayerEloData.Default;
- }
-
- return JsonUtility.FromJson(request.downloadHandler.text);
- }
- }
-
- public static async Task SavePlayerData(string username, Baba_yaga.Game.PlayerEloData data)
- {
- string url = $"{BASE_URL}/{username}/elo.json";
- string jsonData = JsonUtility.ToJson(data);
-
- using (UnityWebRequest request = UnityWebRequest.Put(url, jsonData))
- {
- var operation = request.SendWebRequest();
- while (!operation.isDone) await Task.Yield();
-
- return request.result == UnityWebRequest.Result.Success;
- }
- }
- }
-}
diff --git a/Assets/Baba_yaga/UI/FirebaseService.cs.meta b/Assets/Baba_yaga/UI/FirebaseService.cs.meta
deleted file mode 100644
index 0eceeca4..00000000
--- a/Assets/Baba_yaga/UI/FirebaseService.cs.meta
+++ /dev/null
@@ -1,2 +0,0 @@
-fileFormatVersion: 2
-guid: bf13e7d21e483574882c6b687a6ae19c
\ No newline at end of file
diff --git a/Assets/Baba_yaga/UI/FirebaseTest.cs b/Assets/Baba_yaga/UI/FirebaseTest.cs
deleted file mode 100644
index 4eb107fa..00000000
--- a/Assets/Baba_yaga/UI/FirebaseTest.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using UnityEngine;
-using Baba_yaga.UI;
-using System.Threading.Tasks;
-
-namespace Baba_yaga.UI
-{
- [UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.UI", sourceAssembly: "Opsive.UltimateCharacterController")]
- public class FirebaseTest : MonoBehaviour
- {
- [Header("Settings")]
- [SerializeField] private string testUsername = "TuanPlayer_01";
-
- async void Start()
- {
- Debug.Log("--- Firebase Test Started ---");
-
- // Bước 1: Kiểm tra xem username đã tồn tại chưa
- Debug.Log($"[Firebase] Đang kiểm tra username: {testUsername}...");
- bool isTaken = await FirebaseService.IsUsernameTaken(testUsername);
-
- if (isTaken)
- {
- Debug.Log($"[Firebase] Username '{testUsername}' đã tồn tại trên Database!");
- }
- else
- {
- Debug.Log($"[Firebase] Username '{testUsername}' còn trống. Tiến hành đăng ký...");
-
- // // Bước 2: Thử đăng ký user mới
- // bool success = await FirebaseService.RegisterUser(testUsername);
- //
- // if (success)
- // {
- // Debug.Log("[Firebase] Đăng ký thành công! Hãy kiểm tra trình duyệt (Firebase Console).");
- // }
- // else
- // {
- // Debug.LogError("[Firebase] Đăng ký thất bại. Kiểm tra link URL hoặc Internet.");
- // }
- }
-
- Debug.Log("--- Firebase Test Finished ---");
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/Baba_yaga/UI/FirebaseTest.cs.meta b/Assets/Baba_yaga/UI/FirebaseTest.cs.meta
deleted file mode 100644
index 3952495f..00000000
--- a/Assets/Baba_yaga/UI/FirebaseTest.cs.meta
+++ /dev/null
@@ -1,2 +0,0 @@
-fileFormatVersion: 2
-guid: db205c30e8f41d84fa79269745feaf84
\ No newline at end of file
diff --git a/Assets/Baba_yaga/UI/HUDController.cs b/Assets/Baba_yaga/UI/HUDController.cs
deleted file mode 100644
index 0ddf04b4..00000000
--- a/Assets/Baba_yaga/UI/HUDController.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-using UnityEngine;
-using UnityEngine.UIElements;
-using PrimeTween;
-using System.Threading.Tasks;
-using DG.Tweening;
-using Tween = PrimeTween.Tween;
-using Ease = PrimeTween.Ease;
-
-namespace Baba_yaga.UI
-{
- [UnityEngine.Scripting.APIUpdating.MovedFrom(true, sourceNamespace: "Hallucinate.UI", sourceAssembly: "Opsive.UltimateCharacterController")]
- public class HUDController : BaseUIController
- {
- private VisualElement _topLeft;
- private VisualElement _bottomLeft;
-
- private ProgressBar _healthBar;
- private ProgressBar _staminaBar;
-
- private float _lastActionTime;
- private const float FADE_TIMEOUT = 5.0f;
- private bool _isFaded = false;
-
- public override void Initialize(VisualElement uxmlRoot, UIManager manager)
- {
- base.Initialize(uxmlRoot, manager);
-
- _topLeft = root.Q("TopLeft");
- _bottomLeft = root.Q("BottomLeft");
- _healthBar = root.Q("HealthBar");
- _staminaBar = root.Q("StaminaBar");
-
- if (LocalizationManager.Instance != null)
- {
- LocalizationManager.Instance.OnLanguageChanged += ApplyLocalization;
- ApplyLocalization();
- }
-
- _lastActionTime = Time.time;
- }
-
- private void OnDestroy()
- {
- if (LocalizationManager.Instance != null)
- {
- LocalizationManager.Instance.OnLanguageChanged -= ApplyLocalization;
- }
- }
-
- private void ApplyLocalization()
- {
- if (LocalizationManager.Instance == null) return;
-
- root.Query