@font-face
{
  font-family: 'HarmonyOS Sans SC';
  src: url('../Font/HarmonyOS_Sans_SC_Regular.ttf') format('truetype');
}

@font-face
{
  font-family: 'Maple Mono NL';
  src: url('../Font/MapleMonoNL-Light.t') format('truetype');
  src: url('../Font/MapleMonoNL-Light.otf') format('opentype');
  src: url('../Font/MapleMonoNL-Light.ttf.woff2') format('woff2');
}

body
{
  font-family: 'HarmonyOS Sans SC';
}

.b-example-divider
{
  width: 100%;
  height: 3rem;
  background-color: #0000001a;
  border: solid rgba(0, 0, 0, .15);
  border-width: 1px 0;
  box-shadow: inset 0 .5em 1.5em #0000001a, inset 0 .125em .5em #00000026
}

.bi
{
  vertical-align: -.125em;
  fill: currentColor
}

.bd-mode-toggle
{
  z-index: 1500
}

.bd-mode-toggle .bi
{
  width: 1em;
  height: 1em
}

.bd-mode-toggle .dropdown-menu .active .bi
{
  display: block !important
}

.body
{
  background-color: #f8f9fa;
}

.card
{
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.server-card
{
  transition: transform 0.2s ease-in-out;
}

.server-card:hover
{
  transform: translateY(-2px);
}

.server-status
{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.status-online
{
  background-color: #28a745;
}

.status-offline
{
  background-color: #dc3545;
}

.status-unknown
{
  background-color: #ffc107;
}

.navbar-brand
{
  font-weight: 600;
}

.form-text
{
  font-size: 0.875rem;
  color: #6c757d;
}

#loading
{
  margin-top: 100px;
}

.toast-container
{
  z-index: 1055;
}

.server-actions
{
  display: flex;
  gap: 0.5rem;
}

.server-url
{
  font-family: "Maple Mono NL", monospace;
  font-size: 0.875rem;
  color: #6c757d;
}

.server-info
{
  margin-bottom: 1rem;
}

.server-stats
{
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-secondary-bg);
}

.stat-item
{
  text-align: center;
}

.stat-number
{
  font-size: 1.5rem;
  font-weight: bold;
  color: #0d6efd;
}

.stat-label
{
  font-size: 0.875rem;
  color: #6c757d;
}

/* Token显示样式 */
.token-display
{
  font-family: "Maple Mono NL", monospace;
  font-size: 0.875rem;
  color: #6c757d;
  padding: 2px 6px;
  border-radius: 4px;
}

/* 排序模式样式 */
.sort-mode .server-card
{
  transition: all 0.3s ease;
  border: 2px dashed transparent;
  position: relative;
  cursor: move;
}

/* 确保下拉菜单在卡片上方显示 */
.server-card .dropdown-menu
{
  z-index: 1050 !important;
}

/* 确保卡片在正常状态下不会遮挡下拉菜单 */
.server-card
{
  position: relative;
  z-index: 1;
}

.server-card:hover
{
  z-index: 2;
}

.sort-mode .server-card:hover
{
  border-color: #0d6efd;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.sortable-ghost
{
  opacity: 0.5 !important;
  background-color: #f8f9fa !important;
  border: 2px dashed #0d6efd !important;
  transform: none !important;
}

.sortable-chosen
{
  transform: scale(1.02) !important;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
  z-index: 1000 !important;
}

.sortable-drag
{
  opacity: 0.8 !important;
  transform: rotate(2deg) scale(0.95) !important;
  z-index: 1001 !important;
}

/* 移除阻止拖拽的样式 */
/* .sort-mode .col-md-6:not(.sortable-chosen):not(.sortable-ghost) {
  pointer-events: none;
}

.sort-mode .sortable-chosen {
  pointer-events: auto;
} */

/* 拖拽手柄样式 */
.fa-grip-vertical
{
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.sort-mode .fa-grip-vertical
{
  opacity: 1;
}

/* 确保容器在排序模式下的稳定性 */
.sort-mode
{
  min-height: 200px;
  position: relative;
}

/* 防止快速拖拽时的布局问题 */
.sort-mode .col-md-6
{
  transition: none !important;
}

/* 添加排序模式下的视觉提示 */
.sort-mode .server-card::before
{
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px dashed transparent;
  border-radius: inherit;
  pointer-events: none;
  transition: border-color 0.2s ease;
}

.sort-mode .server-card:hover::before
{
  border-color: #0d6efd;
}

/* 服务器详细信息样式 */
.server-details
{
  display: flex;
  justify-content: space-between;
  margin: 1rem 0;
  padding: 0.75rem;
  border-radius: 0.375rem;
}

.server-version
{
  flex: 1;
  text-align: center;
}

.server-ip:not(:last-child)
{
  border-right: 1px solid #dee2e6;
  padding-right: 0.75rem;
  margin-right: 0.75rem;
}

.detail-label
{
  font-size: 0.75rem;
  color: #6c757d;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.detail-value
{
  font-size: 0.875rem;
  font-weight: 600;
  font-family: "Maple Mono NL", monospace;
  word-break: break-word;
}

.detail-value-container
{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.detail-value-container .btn-link
{
  font-size: 0.75rem;
  color: #6c757d;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.detail-value-container .btn-link:hover
{
  opacity: 1;
  color: #0d6efd;
}

/* 在小屏幕上调整布局 */
@media (max-width: 768px)
{
  .server-details
  {
    flex-direction: column;
    gap: 0.5rem;
  }

  .server-ip
  {
    border-right: none !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
  }

  .detail-value-container
  {
    justify-content: flex-start;
  }
}