/* 卡片、按钮、Toast、加载 */
/* —— Card —— */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.field {
  margin-bottom: 24px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.field-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.4;
}

/* —— Server list —— */
.server-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.server-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.server-input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.server-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
  background: #fff;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: rgba(255, 59, 48, 0.1);
  color: var(--danger);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  margin-top: 12px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(0, 113, 227, 0.08);
}

.btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* —— Number input —— */
.number-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.number-input {
  width: 120px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: 500;
  font-family: var(--font);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.number-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
  background: #fff;
}

/* —— Actions —— */
.actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn-primary {
  flex: 1;
  height: 48px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  height: 48px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* —— Toast —— */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 14px 24px;
  border-radius: 100px;
  background: var(--text);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.4s ease;
  z-index: 100;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  background: var(--danger);
}

/* —— Loading overlay —— */
.loading-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #5ac8fa);
  border-radius: 2px;
  margin-bottom: 20px;
  animation: pulse 1.2s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.2s;
}

.loading-bar.active {
  opacity: 1;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.hidden {
  display: none !important;
}
