.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;
}

.language-switcher {
  width: auto;
  min-width: 136px;
  height: 2.25rem;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.2;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.375rem;
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 10px 12px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  appearance: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.language-switcher:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.42);
}

.language-switcher:focus {
  outline: none;
  border-color: rgba(13, 110, 253, 0.8);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.language-switcher option {
  color: #212529;
}

.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: "Courier New", monospace;
  font-size: 0.875rem;
  color: #6c757d;
}

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

.server-stats {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

.stat-item {
  text-align: center;
  flex: 1 1 0;
  min-width: 0;
}

.stat-number {
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  font-weight: bold;
  color: #0d6efd;
}

.stat-number-sm {
  font-size: clamp(0.85rem, 1.6vw, 1.1rem);
  font-weight: 600;
  color: #6c757d;
}

.stat-label {
  font-size: clamp(0.7rem, 1.6vw, 0.875rem);
  white-space: nowrap;
}

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

/* Token显示样式 */
.token-display {
  font-family: "Courier New", monospace;
  font-size: 0.875rem;
  color: #6c757d;
  background-color: #f8f9fa;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

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

.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;
  background-color: #f8f9fa;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
}

.server-ip,
.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;
  color: #212529;
  font-family: "Courier New", monospace;
  word-break: break-all;
}

.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) {
  .language-switcher {
    min-width: 120px;
  }

  .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;
  }
}