@font-face {
  font-family: "UVNButLong2";
  src: url("../img/UVN-But-Long-2.TTF") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

#header_right,
#headwrap .nav-items,
.mobile-icon-menu {
  position: relative;
}
.mobile-icon-menu{
  display: flex;
  justify-content: flex-end;
}
#open-user-menu-modal,
.yan-user-nav-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 11rem;
  overflow: hidden;
  border: 1px solid rgba(220, 230, 255, 0.14);
  border-radius: 999px;
  color: #e8edf5;
  background: linear-gradient(180deg, rgba(4, 8, 20, 0.92) 0%, rgba(4, 6, 16, 0.96) 70%, rgba(3, 5, 12, 0.98) 100%);
  box-shadow: 0 8px 18px #0005;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  height: 36px;
  line-height: 36px;
  border-radius: .2rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  width: 48px;
    align-items: center;
    justify-content: center;
}

#open-user-menu-modal:hover,
#open-user-menu-modal.menu-show,
.yan-user-nav-trigger:hover,
.yan-user-nav-trigger.menu-show {
  border-color: rgba(220, 230, 255, 0.28);
  box-shadow: 0 10px 22px #0006;
}

#open-user-menu-modal.menu-show > * {
  visibility: hidden;
}

#open-user-menu-modal.menu-show::before {
  position: absolute;
  content: "✖";
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  z-index: 1;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: rgba(66, 66, 66, 0.78);
}

.yan-user-nav-trigger-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(220, 230, 255, 0.18);
  background: rgba(10, 12, 24, 0.8);
  color: #dce3f2;
}

.yan-user-nav-trigger-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.yan-user-nav-trigger-name {
  display: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .yan-user-nav-trigger {
    height: 36px;
  }
}

.user-menu-content.yan-user-nav-wrap {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  max-height: none !important;
  overflow: visible !important;
  /* Theme .user-menu-content { width:250px } quá hẹp → «Tiên Ngọc» xuống dòng, số bị cắt */
  width: min(22.5rem, calc(100vw - 1rem)) !important;
  min-width: min(22.5rem, calc(100vw - 1rem)) !important;
  max-width: calc(100vw - 0.75rem) !important;
  box-sizing: border-box !important;
  top: 56px;
  right: 0;
  display: none;
}

.yan-user-nav-panel {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(220, 230, 255, 0.12);
  border-radius: 18px;
  color: #e8edf5;
  background: linear-gradient(180deg, rgb(31 32 33) 0%, rgb(31 32 33) 70%, rgb(31 32 33) 100%);
  box-shadow: 0 22px 48px #000a, inset 0 1px 0 rgba(220, 230, 255, 0.06);
}

.yan-user-nav-scroll {
  max-height: min(78vh, 32rem);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(220, 230, 255, 0.28) #040814;
}

.yan-user-nav-profile {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
  border: 1px solid rgba(220, 230, 255, 0.14);
  border-radius: 14px;
  padding: 10px;
  background: rgba(8, 10, 20, 0.88);
  text-decoration: none;
  color: inherit;
}

.yan-user-nav-profile:hover {
  border-color: rgba(220, 230, 255, 0.28);
  color: inherit;
}

.yan-user-nav-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: visible;
}

.yan-user-nav-avatar img {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Khung site dùng translate lệch theo ảnh lớn. Trong menu 44px thì căn giữa ảnh. */
.yan-user-nav-avatar:after {
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  pointer-events: none;
}

.yan-user-nav-profile-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.yan-user-nav-profile-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: #21addbcc;
  -webkit-background-clip: text;
  background-clip: text;
}

.yan-user-nav-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #c9d2e8;
  font-size: 12px;
  line-height: 1.4;
  width: 100%;
}

.yan-user-nav-stat > span {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.yan-user-nav-stat b {
  flex: 0 0 auto;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.yan-user-nav-divider {
  margin: 8px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(220, 230, 255, 0.18), transparent);
}

.yan-user-nav-group,
.yan-user-nav-back {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
  border: 1px solid rgba(220, 230, 255, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  color: #e8edf5;
  background: rgba(10, 12, 24, 0.78);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.yan-user-nav-group {
  justify-content: space-between;
}

.yan-user-nav-group:hover,
.yan-user-nav-back:hover {
  border-color: rgba(220, 230, 255, 0.28);
}

.yan-user-nav-group svg,
.yan-user-nav-back svg {
  width: 16px;
  height: 16px;
  color: #c9d2e8;
  flex: 0 0 auto;
}

.yan-user-nav-back {
  color: #f0c579;
  background: rgba(8, 10, 20, 0.88);
  border-color: rgba(220, 230, 255, 0.14);
  font-size: 15px;
}

.yan-user-nav-item {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0;
  border: 1px solid transparent !important;
  border-radius: 10px;
  padding: 8px 11px !important;
  color: #e8edf5 !important;
  background: none;
  font-size: 13px !important;
  text-align: left;
  max-width: 100%;
  width: 100%;
}

.yan-user-nav-item:hover,
.yan-user-nav-item:focus {
  border-color: rgba(220, 230, 255, 0.14) !important;
  background: rgba(220, 230, 255, 0.06) !important;
  color: #fff !important;
}

.yan-user-nav-item.is-gold {
  color: #f0c579 !important;
  font-weight: 800;
}

.yan-user-nav-item.is-red {
  color: #fb7185 !important;
  font-weight: 800;
}

.yan-user-nav-item.is-purple {
  color: #c4b5fd !important;
  font-weight: 800;
}

.yan-user-nav-badge {
  display: inline-flex;
  min-width: 1.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 1px 6px;
  background: linear-gradient(180deg, #f87171, #dc2626);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.yan-user-nav-danger {
  color: #fda4af !important;
}

.yan-user-nav-danger:hover {
  border-color: #fb718566 !important;
  background: rgba(127, 29, 29, 0.28) !important;
  color: #fecdd3 !important;
}

.yan-user-nav-admin {
  color: #86efac !important;
}

/*
 * Theme (#headwrap .nav-items a / main.css + rank.css) ép mọi <a> trong header:
 * height:36px + flex-direction:column + min-width:56px → bẹp card profile,
 * Tu Vi / Tinh Thạch / Tiên Ngọc chồng lên nút «Thông Tin».
 */
#headwrap .nav-items .user-menu-content.yan-user-nav-wrap a.yan-user-nav-profile {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  height: auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 6px !important;
  padding: 10px !important;
  border: 1px solid rgba(220, 230, 255, 0.14) !important;
  border-radius: 14px !important;
  background: rgba(8, 10, 20, 0.88) !important;
  color: inherit !important;
  font-size: inherit !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap a.yan-user-nav-profile:hover {
  border-color: rgba(220, 230, 255, 0.28) !important;
  background: rgba(8, 10, 20, 0.95) !important;
  color: inherit !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap a.yan-user-nav-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  height: auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 2px 0 !important;
  padding: 8px 11px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: none !important;
  color: #e8edf5 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  text-align: left !important;
  text-decoration: none !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap a.yan-user-nav-item:hover,
#headwrap .nav-items .user-menu-content.yan-user-nav-wrap a.yan-user-nav-item:focus {
  border-color: rgba(220, 230, 255, 0.14) !important;
  background: rgba(220, 230, 255, 0.06) !important;
  color: #fff !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap a.yan-user-nav-item.is-gold {
  color: #f0c579 !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap a.yan-user-nav-item.is-red {
  color: #fb7185 !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap a.yan-user-nav-item.is-purple {
  color: #c4b5fd !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap a.yan-user-nav-danger {
  color: #fda4af !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap a.yan-user-nav-danger:hover {
  border-color: #fb718566 !important;
  background: rgba(127, 29, 29, 0.28) !important;
  color: #fecdd3 !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap a.yan-user-nav-admin {
  color: #86efac !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap .yan-user-nav-profile-meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap .yan-user-nav-stat {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  height: auto !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap .yan-user-nav-stat > span {
  white-space: nowrap !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap .yan-user-nav-stat b {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap {
  width: min(24.5rem, calc(100vw - 1rem)) !important;
  min-width: min(18rem, calc(100vw - 1rem)) !important;
  max-width: calc(100vw - 0.75rem) !important;
  box-sizing: border-box !important;
}

#headwrap .nav-items .user-menu-content.yan-user-nav-wrap .yan-user-nav-panel {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
