.gap-1 {
    gap: 10px
}
.btn-secondary {
    opacity: 0.65 !important;
}

/* PET */
.pet-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 8px;
}

.pet-card {
  height: 100%;
  width: 100%;
  border-radius: 10px;
  padding: 15px;
  font-family: Arial, sans-serif;
  color: #333;
}

.pet-name {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    color: #b87333;
}

.pet-header {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 15px;
}

.rarity-icons {
  margin-top: 5px;
}

.star-icon {
  width: 24px;
  height: 24px;
  margin: 2px;
}

.level {
  margin-top: 10px;
  font-size: 1rem;
  color: #444;
}

.ur-label {
  background-color: #d62424;
  color: white;
  padding: 5px 10px;
  font-weight: bold;
  border-radius: 5px;
  font-size: 1.1rem;
}

.buttons {
  display: flex;
  justify-content: space-around;
  margin-bottom: 15px;
}

.basic-btn,
.advanced-btn,
.talent-btn {
  padding: 8px 15px;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  color: white;
}

.basic-btn {
  background-color: #b6a47d;
}

.advanced-btn {
  background-color: #ffcc66;
}

.talent-btn {
  background-color: #e87d2e;
}

.stats {
  margin-top: 15px;
  background-color: #fff8e1;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ddd;
}

.stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
}

.stat-icon {
  width: 30px;
  height: 30px;
  text-align: center;
  margin-right: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat span {
  flex: 1;
  text-align: left;
}

.stat strong {
  flex-shrink: 0;
  text-align: right;
}

.skills {
    margin-bottom: 15px;
}

.skill-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid #007bff;
  box-shadow: 0 0 10px 1px #17a2b89c;
  transition: box-shadow 0.3s ease-in-out;
}

.skill-icon:hover {
  box-shadow: 0 0 20px 8px rgba(209, 178, 124, 1);
}

.grayscale {
  filter: grayscale(100%);
}

.progress-bar {
  flex: 3;
  height: 20px;
  background-color: #818182 !important;
  border-radius: 5px;
  margin-left: 10px;
  position: relative;
  overflow: visible;
  box-sizing: border-box;
}

.progress {
  height: 100% !important;
  background-color: #007BFF !important;
  border-radius: 5px;
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  max-width: none;
  transition: width 0.5s ease-in-out;
  box-sizing: border-box;
}

.progress-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  z-index: 2;
  font-size: 12px;
  white-space: nowrap;
  font-weight: bold;
}

.rarity img {
  height: 70px;
  width: auto;
  border-radius: 50%;
}

.swal-pet-popup {
  background-image: url(https://wownow.life/images/vn_map.webp);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 20px;
  border-radius: 10px;
  position: relative;
}

.swal-pet-popup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

.swal-confirm-pet {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.swal-pet-male-image {
  position: absolute;
  bottom: 0;
  right: 20px;
  max-width: 47%;
  height: auto;
}

.swal-pet-female-image {
  position: absolute;
  bottom: 0;
  right: -30px;
  max-width: 50%;
  height: auto;
}

.swal-pet-wofl-image {
  position: absolute;
  bottom: 0;
  right: 50px;
  max-width: 40%;
  height: auto;
  z-index: 1;
}

.swal-pet-mavuong-image {
  position: absolute;
  bottom: 0;
  left: -25px;
  max-width: 60%;
  height: auto;
}

.swal-pet-taysai-image {
  position: absolute;
  bottom: 0;
  left: 50px;
  max-width: 50%;
  height: auto;
}

.item-list-pet {
  color: var(--white);
  font-weight: bold;
  text-shadow: 2px 2px 5px var(--orange);
  position: absolute;
  bottom: 70px;
  z-index: 2;
}

.item-list-pet-1 {
  color: var(--white);
  font-weight: bold;
  text-shadow: 2px 2px 5px var(--orange);
  font-size: x-large;
}

#dog-container {
    position: fixed;
    width: 100%;
    max-height: 100px;
    overflow: hidden;
    bottom: 50px;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    padding: 0;
    margin: 0;
}

#shark-container {
    position: fixed;
    width: 100%;
    overflow: hidden;
    bottom: 50px;
    z-index: 2;
    padding: 0;
    margin: 0;
}

@media (min-width: 768px) {
  #shark-container, #dog-container {
    bottom: 0;
  }
}

@media (min-width: 1024px) {
  #shark-container, #dog-container {
    bottom: 0;
  }
}

#sharkCanvas {
  position: absolute;
  bottom: -30px;
  left: 0;
  width: 100%;
  height: 150px;
  display: block;
  padding: 0;
  margin: 0;
  pointer-events: none;
}

#dragon-skull-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 300px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

#dragon-skullCanvas {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  #dragon-skull-container {
    position: fixed;
    bottom: 50px;
  }
}

/* PET WOLF */
@keyframes sleeping {
    100% {
        background-position: -236px; /* Di chuyển hết 4 khung */
    }
}

/* Animation cho dậy từ từ */
@keyframes wakeup {
    100% {
        background-position: -253px; /* Di chuyển hết 4 khung */
    }
}

/* Animation cho đi bộ */
@keyframes walk {
    100% {
        background-position: -320px; /* Di chuyển hết 5 khung */
    }
}

/* Animation cho chạy */
@keyframes run {
    100% {
        background-position: -320px; /* Di chuyển hết 5 khung */
    }
}

/* Animation cho sủa */
@keyframes bark {
    100% {
        background-position: -256px; /* Di chuyển hết 4 khung */
    }
}

/* RADAR */
#radar-container {
  position: fixed;
  bottom: 105px;
  right: 60px;
  width: 150px;
  height: 150px;
  z-index: 1;
}

@media (min-width: 768px) {
  #shark-container, #dog-container, #radar-container {
    position: absolute;
  }
}

@media screen and (min-width: 768px) {
  #radar-container {
    bottom: 60px;
  }
}

#radar {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 50%;
  overflow: visible;
  background: radial-gradient(circle, #043b0b30, #021e04);
  border: 2px solid rgba(0, 255, 0, 0.5);
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

#radar-image {
  position: absolute;
  top: -57px;
  left: -43px;
  width: 230px;
  height: 230px;
  pointer-events: none;
  z-index: -1;
}

#radar-image.default-background {
  filter: grayscale(100%);
  top: -54px;
  left: -54px;
  width: 255px;
  height: 255px;
}

#radar_item, #radar_no_item {
  position: absolute;
  top: 0;
  left: 0;
  width: 150px;
  height: 150px;
  z-index: 1;
}

/* SHOP */
.shops-view-items {
  transition: filter 0.3s ease, opacity 0.3s ease;
}

#shopsTab, #treasureTab, #friendTabs, #connectTabs, #connectJourneyTabs {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #fff;
  margin-bottom: 0;
  border-radius: 5px;
}

#shopsTab {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

#shopsTab .nav-item {
  width: 100%;
  padding: 0px 5px 0px 0px;
}

#shopsTab .nav-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  font-size: 16px;
  color: #fff !important;
  background-color: var(--swal2-validation-message-color);
  border: 1px solid #444;
  border-radius: 5px;
  margin-bottom: 10px;
  transition: all 0.3s ease-in-out;
}

#shopsTab .nav-link i {
  margin-right: 10px;
}

#shopsTab .nav-link:hover, 
#shopsTab .nav-link:focus {
  background-color: #444;
  color: #f39c12;
  box-shadow: 0 0 10px rgba(243, 156, 18, 0.8);
  transform: translateX(5px);
}

#shopsTab .nav-link.active {
  background-color: #f39c12;
  color: #fff;
  box-shadow: 0 0 10px rgba(243, 156, 18, 1);
  font-weight: bold;
}

#shopsTab {
  overflow-y: auto;
}

#shopsTab .nav-link {
  opacity: 0;
  animation: fadeIn 0.5s ease-in-out forwards;
}

/* FRIENDS */
.nav-link {
  padding: 5px !important;
}

.nav-link.active {
  color: #ff6600 !important;
  border-color: #fff !important;
}

.nav.nav-tabs {
  border-bottom: none;
}

.list-group-item {
  margin: 5px;
}

.friends-action {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  z-index: 10;
  padding: 10px;
}

.friends-profile {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding: 0 10px;
}

/* MAP */
.treasure-count {
    position: absolute;
    top: -10px;
    right: 0;
    background: red;
    border-radius: 5px;
    padding: 2px;
    color: white;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle-with-label {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 60px;
}

.circle-with-label > .label {
    font-size: 10px;
    color: #000;
    text-align: center;
    line-height: normal;
    margin-top: -15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    background: linear-gradient(to right, rgba(130, 129, 129, 0) 0%, #fff 30%, #fff 70%, rgba(130, 129, 129, 0) 100%), 
                linear-gradient(to bottom, rgba(130, 129, 129, 0) 0%, #82818140 10px, #82818140 calc(100% - 10px), rgba(130, 129, 129, 0) 100%);
    background-blend-mode: multiply;
    border-radius: 3px;
    z-index: inherit;
}

.circle-with-label i {
    font-size: 16px;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    color: white;
    font-size: 16px;
    transition: opacity 0.3s ease;
}

#image-container {
    width: 300px;
    height: 25px;
    position: relative;
    overflow: hidden;
}

#image-container img {
    width: 50px;
    position: absolute;
    left: 0;
    transition: left 0.3s ease;
}

#loading-progress {
    width: 300px;
    height: 10px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: #FF9800;
    transition: width 0.3s ease;
}

#loading-text {
    margin-top: 10px;
    max-width: 250px; /* Nhỏ hơn 300px */
    min-width: 150px; /* Đảm bảo không quá hẹp */
    white-space: normal; /* Cho phép xuống dòng */
    word-wrap: break-word; /* Ngắt từ nếu cần */
    text-align: center; /* Căn giữa */
    padding: 10px; /* Khoảng cách bên trong */
}

.container-fluid {
    max-width: 100%;
}
.h-vh-100 {
    height: 100vh; /* Chiều cao 100% viewport */
    overflow-x: hidden; /* Thêm thanh cuộn dọc khi nội dung tràn */
    box-sizing: border-box; /* Đảm bảo padding/đệm không gây tràn */
}
.content-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0;
}

.leaflet-container {
    width: 100%;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.header-wrapper {
    height: 40px;
    background-image: url(/images/mission/mission_tab.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid #aaa;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.user-image img {
    background: #fff;
    width: 30px;
    height: 30px;
}
#notificationContainer {
    color: #fff;
    text-align: center;
    line-height: normal;
    margin-top: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 30%, rgba(0, 0, 0, 0.8) 70%, rgba(0, 0, 0, 0) 100%), 
                linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 10px, rgba(0, 0, 0, 0.5) calc(100% - 10px), rgba(0, 0, 0, 0) 100%);
    background-blend-mode: multiply;
    border-radius: 3px;
    z-index: 1001;
    position: absolute;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 30px; /* 📌 Định kích thước container */
    justify-content: center; /* 📌 Căn giữa nội dung */
}

.nav-wrapper {
    position: fixed;
    bottom: 0;
    width: 100%;
    flex-shrink: 0;
    height: 50px;
    z-index: 1;
}

.stat-item a, .stat-item a:hover {
    color: #fff;
    border-radius: inherit;
}

.stat-item {
    display: flex; /* Căn chỉnh nội dung trong từng ô */
    align-items: center; /* Căn giữa theo chiều dọc */
    background-color: #3b3b3b; /* Màu nền của ô chỉ số */
    color: white; /* Màu chữ */
    padding: 5px 10px; /* Khoảng cách bên trong */
    border-radius: 5px; /* Bo góc */
    min-width: 80px; /* Chiều rộng tối thiểu của ô */
    justify-content: space-between; /* Icon ở bên trái, số ở bên phải */
    gap: 10px;
}

.stat-item span {
    font-size: 12px;
}

.stat-item img {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.map-menu {
    display: flex;
    position: absolute;
    top: 0px;
    right: 50px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    padding: 10px;
    gap: 10px;
    z-index: 1000;
}

.layer-icon {
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.layer-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.leaflet-touch .leaflet-bar {
    border: none !important;
}

#treasure-button, #openPopupButton, #list-bds-button, #openPopupPet, #openPopupMission, #openPopupShops, #openFriendList, #openFriendAction, #openPopupGift, #openConnectTravel, #openBackpackModal, #openSettingsModal, .main-icon {
    border-radius: 50% !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
    margin-bottom: 10px;
}

#treasure-button, #openPopupPet, #openPopupMission, #openPopupShops, #openFriendList, #openFriendAction, #openPopupGift, #openConnectTravel, #openBackpackModal, #openSettingsModal, .main-icon {
    height: 30px;
    width: 30px;
    background: #fff;
    border-radius: 2px;
    display: flex;
    flex-direction: center;
    align-items: center;
    justify-content: space-around;
}

/* Hướng dẫn (HDV/Agency)-related styles */
#friendTravel {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2000;
  width: min-content;
  background: #ff00dd;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
  color: #fff;
}

@keyframes flipIcon {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

#friendTravel i {
  animation: flipIcon 5s infinite;
}

.selected-hdv, .selected-agency {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  padding: 8px;
  margin-top: 5px;
  border-radius: 5px;
}

.hdv-avatar, .agency-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ddd;
}

.hdv-name, .agency-name {
  font-weight: bold;
}

.hdv-rating, .agency-rating {
  color: #f39c12;
  font-size: 14px;
}

.remove-btn {
  margin-left: auto;
}

/* TÚI ĐỒ */
.item-container {
  display: flex;
  flex-direction: column;
}

.category h4 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: bold;
}

.item-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  padding: 5px;
}

.item {
  flex: 1 1 calc((500px - 70px) / 8); /* 8 ô/hàng trên laptop, trừ 70px cho 7 khoảng cách */
  min-width: 50px;
  max-width: 65px;
  text-align: center;
  box-sizing: border-box;
}

.item-content {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.item-content img {
  width: 100%;
  height: auto;
  max-width: 50px;
  max-height: 50px;
}

.item-name {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
  margin-top: 4px;
  font-size: 10px;
}

.item-quantity {
  position: absolute;
  top: 0;
  right: 0;
  background: red;
  color: white;
  font-size: 10px;
  border-radius: 50%;
  padding: 2px 4px;
}

@media (max-width: 767px) {
  .item {
    flex: 1 1 calc((100% - 50px) / 6); /* 6 ô/hàng trên di động, trừ 50px cho 5 khoảng cách */
    min-width: 45px;
    max-width: 60px;
  }

  .item-content img {
    max-width: 45px;
    max-height: 45px;
  }

  .item-name {
    font-size: 9px;
  }
}

.item img {
  width: auto;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.2s, transform 0.2s;
}

.item:hover img {
  filter: none;
  transform: scale(1.05);
}

.item.selected img {
  filter: none;
  transform: scale(1.1);
}

.item p {
  margin-top: 5px;
  font-size: 12px;
  text-align: center;
  color: #333;
  word-wrap: break-word;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  padding: 8px;
  margin-top: 5px;
  border-radius: 5px;
}

.item-title {
  font-weight: bold;
  font-size: 14px;
  color: #333;
}

/* Sidebar and tab styles (used in map, shop, friend) */
@media (max-width: 1024px) {
  .leaflet-sidebar > .leaflet-control {
    height: auto;
    overflow: hidden;
  }
}

@media (min-width: 1025px) {
  #sidebar, #sidebar-content, .card-body {
    height: calc(100vh - 50px);
    overflow: hidden;
  }
  .tab-container {
    height: 100%;
    position: relative;
  }
}

/* ROOM */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.marquee-container {
    overflow: hidden;
    position: relative;
    text-align: center;
}

.marquee-text {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 8s linear infinite;
    font-size: 12px;
    color: #fff;
    padding-left: 100%;
}

.marquee-text:hover {
    animation-play-state: paused;
}

.static-text {
    font-size: 12px;
    color: #fff;
    text-align: center;
    font-weight: bold;
}

.btn-cancel {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 50%;
    background: #fff;
    color: #dc3545;
    border-color: #dc3545;
}

.leaflet-div-icon {
    background: none;
    border: none;
}

/* Hiệu ứng animation */
@keyframes fadeIn {
    0% {
        opacity: 0; /* Modal ẩn hoàn toàn */
    }
    100% {
        opacity: 1; /* Modal hiển thị đầy đủ */
    }
}

/* Tùy chỉnh thanh cuộn cho trình duyệt hiện đại */
.modal-body::-webkit-scrollbar {
    width: 8px; /* Độ rộng của thanh cuộn */
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: #ddd; /* Màu thanh cuộn */
    border-radius: 4px; /* Bo góc thanh cuộn */
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background-color: #3a3f44; /* Màu thanh cuộn khi hover */
}

.modal-body::-webkit-scrollbar-track {
    background: #fff; /* Màu nền track */
}
.modal-backdrop {
    z-index: 2;
}
.important-icon {
    position: absolute;
    top: -15px;
    right: -10px;
    color: red;
    background: white;
    border-radius: 50%;
    padding: 5px;
    animation: shakeRotate 1.5s infinite ease-in-out;
}

.heart-help {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    background-color: #3b3b3b;
    padding: 5px 10px;
    animation: glowText 1s ease-in-out infinite;
}

.travel-help {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    background-color: #3b3b3b;
    padding: 5px 10px;
    animation: glowText 1s ease-in-out infinite;
    width: 100%;
    box-sizing: border-box;
}

.mission-help {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
    border-radius: 5px;
    animation: glowText 1s ease-in-out infinite;
    cursor: pointer;
}

.mission-help span {
    font-size: 12px;
}
.treasure-help {
    display: flex;
    align-items: center;
    cursor: pointer;
}
#treasureTab {
    display: flex;
    align-items: center;
}
@keyframes slideUpRepeat {
    0% {
        transform: translateY(10px);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
    100% {
        transform: translateY(10px);
        opacity: 0.5;
    }
}

/* Animation lắc trái phải */
@keyframes shakeRotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-15deg); }
    100% { transform: rotate(0deg); }
}
div:where(.swal2-container) div:where(.swal2-popup) {
    max-height: 80vh;
    display: flex !important;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}
.swal2-html-container {
    overflow-x: hidden;
}